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::list_snapshots][crate::client::NetApp::list_snapshots] calls.
1547    ///
1548    /// # Example
1549    /// ```
1550    /// # use google_cloud_netapp_v1::builder::net_app::ListSnapshots;
1551    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1552    /// use google_cloud_gax::paginator::ItemPaginator;
1553    ///
1554    /// let builder = prepare_request_builder();
1555    /// let mut items = builder.by_item();
1556    /// while let Some(result) = items.next().await {
1557    ///   let item = result?;
1558    /// }
1559    /// # Ok(()) }
1560    ///
1561    /// fn prepare_request_builder() -> ListSnapshots {
1562    ///   # panic!();
1563    ///   // ... details omitted ...
1564    /// }
1565    /// ```
1566    #[derive(Clone, Debug)]
1567    pub struct ListSnapshots(RequestBuilder<crate::model::ListSnapshotsRequest>);
1568
1569    impl ListSnapshots {
1570        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1571            Self(RequestBuilder::new(stub))
1572        }
1573
1574        /// Sets the full request, replacing any prior values.
1575        pub fn with_request<V: Into<crate::model::ListSnapshotsRequest>>(mut self, v: V) -> 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        pub async fn send(self) -> Result<crate::model::ListSnapshotsResponse> {
1588            (*self.0.stub)
1589                .list_snapshots(self.0.request, self.0.options)
1590                .await
1591                .map(crate::Response::into_body)
1592        }
1593
1594        /// Streams each page in the collection.
1595        pub fn by_page(
1596            self,
1597        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListSnapshotsResponse, crate::Error>
1598        {
1599            use std::clone::Clone;
1600            let token = self.0.request.page_token.clone();
1601            let execute = move |token: String| {
1602                let mut builder = self.clone();
1603                builder.0.request = builder.0.request.set_page_token(token);
1604                builder.send()
1605            };
1606            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1607        }
1608
1609        /// Streams each item in the collection.
1610        pub fn by_item(
1611            self,
1612        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1613            crate::model::ListSnapshotsResponse,
1614            crate::Error,
1615        > {
1616            use google_cloud_gax::paginator::Paginator;
1617            self.by_page().items()
1618        }
1619
1620        /// Sets the value of [parent][crate::model::ListSnapshotsRequest::parent].
1621        ///
1622        /// This is a **required** field for requests.
1623        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1624            self.0.request.parent = v.into();
1625            self
1626        }
1627
1628        /// Sets the value of [page_size][crate::model::ListSnapshotsRequest::page_size].
1629        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1630            self.0.request.page_size = v.into();
1631            self
1632        }
1633
1634        /// Sets the value of [page_token][crate::model::ListSnapshotsRequest::page_token].
1635        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1636            self.0.request.page_token = v.into();
1637            self
1638        }
1639
1640        /// Sets the value of [order_by][crate::model::ListSnapshotsRequest::order_by].
1641        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1642            self.0.request.order_by = v.into();
1643            self
1644        }
1645
1646        /// Sets the value of [filter][crate::model::ListSnapshotsRequest::filter].
1647        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1648            self.0.request.filter = v.into();
1649            self
1650        }
1651    }
1652
1653    #[doc(hidden)]
1654    impl crate::RequestBuilder for ListSnapshots {
1655        fn request_options(&mut self) -> &mut crate::RequestOptions {
1656            &mut self.0.options
1657        }
1658    }
1659
1660    /// The request builder for [NetApp::get_snapshot][crate::client::NetApp::get_snapshot] calls.
1661    ///
1662    /// # Example
1663    /// ```
1664    /// # use google_cloud_netapp_v1::builder::net_app::GetSnapshot;
1665    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1666    ///
1667    /// let builder = prepare_request_builder();
1668    /// let response = builder.send().await?;
1669    /// # Ok(()) }
1670    ///
1671    /// fn prepare_request_builder() -> GetSnapshot {
1672    ///   # panic!();
1673    ///   // ... details omitted ...
1674    /// }
1675    /// ```
1676    #[derive(Clone, Debug)]
1677    pub struct GetSnapshot(RequestBuilder<crate::model::GetSnapshotRequest>);
1678
1679    impl GetSnapshot {
1680        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1681            Self(RequestBuilder::new(stub))
1682        }
1683
1684        /// Sets the full request, replacing any prior values.
1685        pub fn with_request<V: Into<crate::model::GetSnapshotRequest>>(mut self, v: V) -> Self {
1686            self.0.request = v.into();
1687            self
1688        }
1689
1690        /// Sets all the options, replacing any prior values.
1691        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1692            self.0.options = v.into();
1693            self
1694        }
1695
1696        /// Sends the request.
1697        pub async fn send(self) -> Result<crate::model::Snapshot> {
1698            (*self.0.stub)
1699                .get_snapshot(self.0.request, self.0.options)
1700                .await
1701                .map(crate::Response::into_body)
1702        }
1703
1704        /// Sets the value of [name][crate::model::GetSnapshotRequest::name].
1705        ///
1706        /// This is a **required** field for requests.
1707        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1708            self.0.request.name = v.into();
1709            self
1710        }
1711    }
1712
1713    #[doc(hidden)]
1714    impl crate::RequestBuilder for GetSnapshot {
1715        fn request_options(&mut self) -> &mut crate::RequestOptions {
1716            &mut self.0.options
1717        }
1718    }
1719
1720    /// The request builder for [NetApp::create_snapshot][crate::client::NetApp::create_snapshot] calls.
1721    ///
1722    /// # Example
1723    /// ```
1724    /// # use google_cloud_netapp_v1::builder::net_app::CreateSnapshot;
1725    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1726    /// use google_cloud_lro::Poller;
1727    ///
1728    /// let builder = prepare_request_builder();
1729    /// let response = builder.poller().until_done().await?;
1730    /// # Ok(()) }
1731    ///
1732    /// fn prepare_request_builder() -> CreateSnapshot {
1733    ///   # panic!();
1734    ///   // ... details omitted ...
1735    /// }
1736    /// ```
1737    #[derive(Clone, Debug)]
1738    pub struct CreateSnapshot(RequestBuilder<crate::model::CreateSnapshotRequest>);
1739
1740    impl CreateSnapshot {
1741        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1742            Self(RequestBuilder::new(stub))
1743        }
1744
1745        /// Sets the full request, replacing any prior values.
1746        pub fn with_request<V: Into<crate::model::CreateSnapshotRequest>>(mut self, v: V) -> Self {
1747            self.0.request = v.into();
1748            self
1749        }
1750
1751        /// Sets all the options, replacing any prior values.
1752        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1753            self.0.options = v.into();
1754            self
1755        }
1756
1757        /// Sends the request.
1758        ///
1759        /// # Long running operations
1760        ///
1761        /// This starts, but does not poll, a longrunning operation. More information
1762        /// on [create_snapshot][crate::client::NetApp::create_snapshot].
1763        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1764            (*self.0.stub)
1765                .create_snapshot(self.0.request, self.0.options)
1766                .await
1767                .map(crate::Response::into_body)
1768        }
1769
1770        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_snapshot`.
1771        pub fn poller(
1772            self,
1773        ) -> impl google_cloud_lro::Poller<crate::model::Snapshot, crate::model::OperationMetadata>
1774        {
1775            type Operation = google_cloud_lro::internal::Operation<
1776                crate::model::Snapshot,
1777                crate::model::OperationMetadata,
1778            >;
1779            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1780            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1781
1782            let stub = self.0.stub.clone();
1783            let mut options = self.0.options.clone();
1784            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1785            let query = move |name| {
1786                let stub = stub.clone();
1787                let options = options.clone();
1788                async {
1789                    let op = GetOperation::new(stub)
1790                        .set_name(name)
1791                        .with_options(options)
1792                        .send()
1793                        .await?;
1794                    Ok(Operation::new(op))
1795                }
1796            };
1797
1798            let start = move || async {
1799                let op = self.send().await?;
1800                Ok(Operation::new(op))
1801            };
1802
1803            google_cloud_lro::internal::new_poller(
1804                polling_error_policy,
1805                polling_backoff_policy,
1806                start,
1807                query,
1808            )
1809        }
1810
1811        /// Sets the value of [parent][crate::model::CreateSnapshotRequest::parent].
1812        ///
1813        /// This is a **required** field for requests.
1814        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1815            self.0.request.parent = v.into();
1816            self
1817        }
1818
1819        /// Sets the value of [snapshot][crate::model::CreateSnapshotRequest::snapshot].
1820        ///
1821        /// This is a **required** field for requests.
1822        pub fn set_snapshot<T>(mut self, v: T) -> Self
1823        where
1824            T: std::convert::Into<crate::model::Snapshot>,
1825        {
1826            self.0.request.snapshot = std::option::Option::Some(v.into());
1827            self
1828        }
1829
1830        /// Sets or clears the value of [snapshot][crate::model::CreateSnapshotRequest::snapshot].
1831        ///
1832        /// This is a **required** field for requests.
1833        pub fn set_or_clear_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
1834        where
1835            T: std::convert::Into<crate::model::Snapshot>,
1836        {
1837            self.0.request.snapshot = v.map(|x| x.into());
1838            self
1839        }
1840
1841        /// Sets the value of [snapshot_id][crate::model::CreateSnapshotRequest::snapshot_id].
1842        ///
1843        /// This is a **required** field for requests.
1844        pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1845            self.0.request.snapshot_id = v.into();
1846            self
1847        }
1848    }
1849
1850    #[doc(hidden)]
1851    impl crate::RequestBuilder for CreateSnapshot {
1852        fn request_options(&mut self) -> &mut crate::RequestOptions {
1853            &mut self.0.options
1854        }
1855    }
1856
1857    /// The request builder for [NetApp::delete_snapshot][crate::client::NetApp::delete_snapshot] calls.
1858    ///
1859    /// # Example
1860    /// ```
1861    /// # use google_cloud_netapp_v1::builder::net_app::DeleteSnapshot;
1862    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1863    /// use google_cloud_lro::Poller;
1864    ///
1865    /// let builder = prepare_request_builder();
1866    /// let response = builder.poller().until_done().await?;
1867    /// # Ok(()) }
1868    ///
1869    /// fn prepare_request_builder() -> DeleteSnapshot {
1870    ///   # panic!();
1871    ///   // ... details omitted ...
1872    /// }
1873    /// ```
1874    #[derive(Clone, Debug)]
1875    pub struct DeleteSnapshot(RequestBuilder<crate::model::DeleteSnapshotRequest>);
1876
1877    impl DeleteSnapshot {
1878        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1879            Self(RequestBuilder::new(stub))
1880        }
1881
1882        /// Sets the full request, replacing any prior values.
1883        pub fn with_request<V: Into<crate::model::DeleteSnapshotRequest>>(mut self, v: V) -> Self {
1884            self.0.request = v.into();
1885            self
1886        }
1887
1888        /// Sets all the options, replacing any prior values.
1889        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1890            self.0.options = v.into();
1891            self
1892        }
1893
1894        /// Sends the request.
1895        ///
1896        /// # Long running operations
1897        ///
1898        /// This starts, but does not poll, a longrunning operation. More information
1899        /// on [delete_snapshot][crate::client::NetApp::delete_snapshot].
1900        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1901            (*self.0.stub)
1902                .delete_snapshot(self.0.request, self.0.options)
1903                .await
1904                .map(crate::Response::into_body)
1905        }
1906
1907        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_snapshot`.
1908        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1909            type Operation =
1910                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1911            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1912            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1913
1914            let stub = self.0.stub.clone();
1915            let mut options = self.0.options.clone();
1916            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1917            let query = move |name| {
1918                let stub = stub.clone();
1919                let options = options.clone();
1920                async {
1921                    let op = GetOperation::new(stub)
1922                        .set_name(name)
1923                        .with_options(options)
1924                        .send()
1925                        .await?;
1926                    Ok(Operation::new(op))
1927                }
1928            };
1929
1930            let start = move || async {
1931                let op = self.send().await?;
1932                Ok(Operation::new(op))
1933            };
1934
1935            google_cloud_lro::internal::new_unit_response_poller(
1936                polling_error_policy,
1937                polling_backoff_policy,
1938                start,
1939                query,
1940            )
1941        }
1942
1943        /// Sets the value of [name][crate::model::DeleteSnapshotRequest::name].
1944        ///
1945        /// This is a **required** field for requests.
1946        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1947            self.0.request.name = v.into();
1948            self
1949        }
1950    }
1951
1952    #[doc(hidden)]
1953    impl crate::RequestBuilder for DeleteSnapshot {
1954        fn request_options(&mut self) -> &mut crate::RequestOptions {
1955            &mut self.0.options
1956        }
1957    }
1958
1959    /// The request builder for [NetApp::update_snapshot][crate::client::NetApp::update_snapshot] calls.
1960    ///
1961    /// # Example
1962    /// ```
1963    /// # use google_cloud_netapp_v1::builder::net_app::UpdateSnapshot;
1964    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1965    /// use google_cloud_lro::Poller;
1966    ///
1967    /// let builder = prepare_request_builder();
1968    /// let response = builder.poller().until_done().await?;
1969    /// # Ok(()) }
1970    ///
1971    /// fn prepare_request_builder() -> UpdateSnapshot {
1972    ///   # panic!();
1973    ///   // ... details omitted ...
1974    /// }
1975    /// ```
1976    #[derive(Clone, Debug)]
1977    pub struct UpdateSnapshot(RequestBuilder<crate::model::UpdateSnapshotRequest>);
1978
1979    impl UpdateSnapshot {
1980        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1981            Self(RequestBuilder::new(stub))
1982        }
1983
1984        /// Sets the full request, replacing any prior values.
1985        pub fn with_request<V: Into<crate::model::UpdateSnapshotRequest>>(mut self, v: V) -> Self {
1986            self.0.request = v.into();
1987            self
1988        }
1989
1990        /// Sets all the options, replacing any prior values.
1991        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1992            self.0.options = v.into();
1993            self
1994        }
1995
1996        /// Sends the request.
1997        ///
1998        /// # Long running operations
1999        ///
2000        /// This starts, but does not poll, a longrunning operation. More information
2001        /// on [update_snapshot][crate::client::NetApp::update_snapshot].
2002        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2003            (*self.0.stub)
2004                .update_snapshot(self.0.request, self.0.options)
2005                .await
2006                .map(crate::Response::into_body)
2007        }
2008
2009        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_snapshot`.
2010        pub fn poller(
2011            self,
2012        ) -> impl google_cloud_lro::Poller<crate::model::Snapshot, crate::model::OperationMetadata>
2013        {
2014            type Operation = google_cloud_lro::internal::Operation<
2015                crate::model::Snapshot,
2016                crate::model::OperationMetadata,
2017            >;
2018            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2019            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2020
2021            let stub = self.0.stub.clone();
2022            let mut options = self.0.options.clone();
2023            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2024            let query = move |name| {
2025                let stub = stub.clone();
2026                let options = options.clone();
2027                async {
2028                    let op = GetOperation::new(stub)
2029                        .set_name(name)
2030                        .with_options(options)
2031                        .send()
2032                        .await?;
2033                    Ok(Operation::new(op))
2034                }
2035            };
2036
2037            let start = move || async {
2038                let op = self.send().await?;
2039                Ok(Operation::new(op))
2040            };
2041
2042            google_cloud_lro::internal::new_poller(
2043                polling_error_policy,
2044                polling_backoff_policy,
2045                start,
2046                query,
2047            )
2048        }
2049
2050        /// Sets the value of [update_mask][crate::model::UpdateSnapshotRequest::update_mask].
2051        ///
2052        /// This is a **required** field for requests.
2053        pub fn set_update_mask<T>(mut self, v: T) -> Self
2054        where
2055            T: std::convert::Into<wkt::FieldMask>,
2056        {
2057            self.0.request.update_mask = std::option::Option::Some(v.into());
2058            self
2059        }
2060
2061        /// Sets or clears the value of [update_mask][crate::model::UpdateSnapshotRequest::update_mask].
2062        ///
2063        /// This is a **required** field for requests.
2064        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2065        where
2066            T: std::convert::Into<wkt::FieldMask>,
2067        {
2068            self.0.request.update_mask = v.map(|x| x.into());
2069            self
2070        }
2071
2072        /// Sets the value of [snapshot][crate::model::UpdateSnapshotRequest::snapshot].
2073        ///
2074        /// This is a **required** field for requests.
2075        pub fn set_snapshot<T>(mut self, v: T) -> Self
2076        where
2077            T: std::convert::Into<crate::model::Snapshot>,
2078        {
2079            self.0.request.snapshot = std::option::Option::Some(v.into());
2080            self
2081        }
2082
2083        /// Sets or clears the value of [snapshot][crate::model::UpdateSnapshotRequest::snapshot].
2084        ///
2085        /// This is a **required** field for requests.
2086        pub fn set_or_clear_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
2087        where
2088            T: std::convert::Into<crate::model::Snapshot>,
2089        {
2090            self.0.request.snapshot = v.map(|x| x.into());
2091            self
2092        }
2093    }
2094
2095    #[doc(hidden)]
2096    impl crate::RequestBuilder for UpdateSnapshot {
2097        fn request_options(&mut self) -> &mut crate::RequestOptions {
2098            &mut self.0.options
2099        }
2100    }
2101
2102    /// The request builder for [NetApp::list_active_directories][crate::client::NetApp::list_active_directories] calls.
2103    ///
2104    /// # Example
2105    /// ```
2106    /// # use google_cloud_netapp_v1::builder::net_app::ListActiveDirectories;
2107    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2108    /// use google_cloud_gax::paginator::ItemPaginator;
2109    ///
2110    /// let builder = prepare_request_builder();
2111    /// let mut items = builder.by_item();
2112    /// while let Some(result) = items.next().await {
2113    ///   let item = result?;
2114    /// }
2115    /// # Ok(()) }
2116    ///
2117    /// fn prepare_request_builder() -> ListActiveDirectories {
2118    ///   # panic!();
2119    ///   // ... details omitted ...
2120    /// }
2121    /// ```
2122    #[derive(Clone, Debug)]
2123    pub struct ListActiveDirectories(RequestBuilder<crate::model::ListActiveDirectoriesRequest>);
2124
2125    impl ListActiveDirectories {
2126        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2127            Self(RequestBuilder::new(stub))
2128        }
2129
2130        /// Sets the full request, replacing any prior values.
2131        pub fn with_request<V: Into<crate::model::ListActiveDirectoriesRequest>>(
2132            mut self,
2133            v: V,
2134        ) -> Self {
2135            self.0.request = v.into();
2136            self
2137        }
2138
2139        /// Sets all the options, replacing any prior values.
2140        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2141            self.0.options = v.into();
2142            self
2143        }
2144
2145        /// Sends the request.
2146        pub async fn send(self) -> Result<crate::model::ListActiveDirectoriesResponse> {
2147            (*self.0.stub)
2148                .list_active_directories(self.0.request, self.0.options)
2149                .await
2150                .map(crate::Response::into_body)
2151        }
2152
2153        /// Streams each page in the collection.
2154        pub fn by_page(
2155            self,
2156        ) -> impl google_cloud_gax::paginator::Paginator<
2157            crate::model::ListActiveDirectoriesResponse,
2158            crate::Error,
2159        > {
2160            use std::clone::Clone;
2161            let token = self.0.request.page_token.clone();
2162            let execute = move |token: String| {
2163                let mut builder = self.clone();
2164                builder.0.request = builder.0.request.set_page_token(token);
2165                builder.send()
2166            };
2167            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2168        }
2169
2170        /// Streams each item in the collection.
2171        pub fn by_item(
2172            self,
2173        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2174            crate::model::ListActiveDirectoriesResponse,
2175            crate::Error,
2176        > {
2177            use google_cloud_gax::paginator::Paginator;
2178            self.by_page().items()
2179        }
2180
2181        /// Sets the value of [parent][crate::model::ListActiveDirectoriesRequest::parent].
2182        ///
2183        /// This is a **required** field for requests.
2184        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2185            self.0.request.parent = v.into();
2186            self
2187        }
2188
2189        /// Sets the value of [page_size][crate::model::ListActiveDirectoriesRequest::page_size].
2190        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2191            self.0.request.page_size = v.into();
2192            self
2193        }
2194
2195        /// Sets the value of [page_token][crate::model::ListActiveDirectoriesRequest::page_token].
2196        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2197            self.0.request.page_token = v.into();
2198            self
2199        }
2200
2201        /// Sets the value of [filter][crate::model::ListActiveDirectoriesRequest::filter].
2202        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2203            self.0.request.filter = v.into();
2204            self
2205        }
2206
2207        /// Sets the value of [order_by][crate::model::ListActiveDirectoriesRequest::order_by].
2208        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2209            self.0.request.order_by = v.into();
2210            self
2211        }
2212    }
2213
2214    #[doc(hidden)]
2215    impl crate::RequestBuilder for ListActiveDirectories {
2216        fn request_options(&mut self) -> &mut crate::RequestOptions {
2217            &mut self.0.options
2218        }
2219    }
2220
2221    /// The request builder for [NetApp::get_active_directory][crate::client::NetApp::get_active_directory] calls.
2222    ///
2223    /// # Example
2224    /// ```
2225    /// # use google_cloud_netapp_v1::builder::net_app::GetActiveDirectory;
2226    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2227    ///
2228    /// let builder = prepare_request_builder();
2229    /// let response = builder.send().await?;
2230    /// # Ok(()) }
2231    ///
2232    /// fn prepare_request_builder() -> GetActiveDirectory {
2233    ///   # panic!();
2234    ///   // ... details omitted ...
2235    /// }
2236    /// ```
2237    #[derive(Clone, Debug)]
2238    pub struct GetActiveDirectory(RequestBuilder<crate::model::GetActiveDirectoryRequest>);
2239
2240    impl GetActiveDirectory {
2241        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2242            Self(RequestBuilder::new(stub))
2243        }
2244
2245        /// Sets the full request, replacing any prior values.
2246        pub fn with_request<V: Into<crate::model::GetActiveDirectoryRequest>>(
2247            mut self,
2248            v: V,
2249        ) -> Self {
2250            self.0.request = v.into();
2251            self
2252        }
2253
2254        /// Sets all the options, replacing any prior values.
2255        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2256            self.0.options = v.into();
2257            self
2258        }
2259
2260        /// Sends the request.
2261        pub async fn send(self) -> Result<crate::model::ActiveDirectory> {
2262            (*self.0.stub)
2263                .get_active_directory(self.0.request, self.0.options)
2264                .await
2265                .map(crate::Response::into_body)
2266        }
2267
2268        /// Sets the value of [name][crate::model::GetActiveDirectoryRequest::name].
2269        ///
2270        /// This is a **required** field for requests.
2271        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2272            self.0.request.name = v.into();
2273            self
2274        }
2275    }
2276
2277    #[doc(hidden)]
2278    impl crate::RequestBuilder for GetActiveDirectory {
2279        fn request_options(&mut self) -> &mut crate::RequestOptions {
2280            &mut self.0.options
2281        }
2282    }
2283
2284    /// The request builder for [NetApp::create_active_directory][crate::client::NetApp::create_active_directory] calls.
2285    ///
2286    /// # Example
2287    /// ```
2288    /// # use google_cloud_netapp_v1::builder::net_app::CreateActiveDirectory;
2289    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2290    /// use google_cloud_lro::Poller;
2291    ///
2292    /// let builder = prepare_request_builder();
2293    /// let response = builder.poller().until_done().await?;
2294    /// # Ok(()) }
2295    ///
2296    /// fn prepare_request_builder() -> CreateActiveDirectory {
2297    ///   # panic!();
2298    ///   // ... details omitted ...
2299    /// }
2300    /// ```
2301    #[derive(Clone, Debug)]
2302    pub struct CreateActiveDirectory(RequestBuilder<crate::model::CreateActiveDirectoryRequest>);
2303
2304    impl CreateActiveDirectory {
2305        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2306            Self(RequestBuilder::new(stub))
2307        }
2308
2309        /// Sets the full request, replacing any prior values.
2310        pub fn with_request<V: Into<crate::model::CreateActiveDirectoryRequest>>(
2311            mut self,
2312            v: V,
2313        ) -> Self {
2314            self.0.request = v.into();
2315            self
2316        }
2317
2318        /// Sets all the options, replacing any prior values.
2319        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2320            self.0.options = v.into();
2321            self
2322        }
2323
2324        /// Sends the request.
2325        ///
2326        /// # Long running operations
2327        ///
2328        /// This starts, but does not poll, a longrunning operation. More information
2329        /// on [create_active_directory][crate::client::NetApp::create_active_directory].
2330        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2331            (*self.0.stub)
2332                .create_active_directory(self.0.request, self.0.options)
2333                .await
2334                .map(crate::Response::into_body)
2335        }
2336
2337        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_active_directory`.
2338        pub fn poller(
2339            self,
2340        ) -> impl google_cloud_lro::Poller<crate::model::ActiveDirectory, crate::model::OperationMetadata>
2341        {
2342            type Operation = google_cloud_lro::internal::Operation<
2343                crate::model::ActiveDirectory,
2344                crate::model::OperationMetadata,
2345            >;
2346            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2347            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2348
2349            let stub = self.0.stub.clone();
2350            let mut options = self.0.options.clone();
2351            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2352            let query = move |name| {
2353                let stub = stub.clone();
2354                let options = options.clone();
2355                async {
2356                    let op = GetOperation::new(stub)
2357                        .set_name(name)
2358                        .with_options(options)
2359                        .send()
2360                        .await?;
2361                    Ok(Operation::new(op))
2362                }
2363            };
2364
2365            let start = move || async {
2366                let op = self.send().await?;
2367                Ok(Operation::new(op))
2368            };
2369
2370            google_cloud_lro::internal::new_poller(
2371                polling_error_policy,
2372                polling_backoff_policy,
2373                start,
2374                query,
2375            )
2376        }
2377
2378        /// Sets the value of [parent][crate::model::CreateActiveDirectoryRequest::parent].
2379        ///
2380        /// This is a **required** field for requests.
2381        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2382            self.0.request.parent = v.into();
2383            self
2384        }
2385
2386        /// Sets the value of [active_directory][crate::model::CreateActiveDirectoryRequest::active_directory].
2387        ///
2388        /// This is a **required** field for requests.
2389        pub fn set_active_directory<T>(mut self, v: T) -> Self
2390        where
2391            T: std::convert::Into<crate::model::ActiveDirectory>,
2392        {
2393            self.0.request.active_directory = std::option::Option::Some(v.into());
2394            self
2395        }
2396
2397        /// Sets or clears the value of [active_directory][crate::model::CreateActiveDirectoryRequest::active_directory].
2398        ///
2399        /// This is a **required** field for requests.
2400        pub fn set_or_clear_active_directory<T>(mut self, v: std::option::Option<T>) -> Self
2401        where
2402            T: std::convert::Into<crate::model::ActiveDirectory>,
2403        {
2404            self.0.request.active_directory = v.map(|x| x.into());
2405            self
2406        }
2407
2408        /// Sets the value of [active_directory_id][crate::model::CreateActiveDirectoryRequest::active_directory_id].
2409        ///
2410        /// This is a **required** field for requests.
2411        pub fn set_active_directory_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2412            self.0.request.active_directory_id = v.into();
2413            self
2414        }
2415    }
2416
2417    #[doc(hidden)]
2418    impl crate::RequestBuilder for CreateActiveDirectory {
2419        fn request_options(&mut self) -> &mut crate::RequestOptions {
2420            &mut self.0.options
2421        }
2422    }
2423
2424    /// The request builder for [NetApp::update_active_directory][crate::client::NetApp::update_active_directory] calls.
2425    ///
2426    /// # Example
2427    /// ```
2428    /// # use google_cloud_netapp_v1::builder::net_app::UpdateActiveDirectory;
2429    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2430    /// use google_cloud_lro::Poller;
2431    ///
2432    /// let builder = prepare_request_builder();
2433    /// let response = builder.poller().until_done().await?;
2434    /// # Ok(()) }
2435    ///
2436    /// fn prepare_request_builder() -> UpdateActiveDirectory {
2437    ///   # panic!();
2438    ///   // ... details omitted ...
2439    /// }
2440    /// ```
2441    #[derive(Clone, Debug)]
2442    pub struct UpdateActiveDirectory(RequestBuilder<crate::model::UpdateActiveDirectoryRequest>);
2443
2444    impl UpdateActiveDirectory {
2445        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2446            Self(RequestBuilder::new(stub))
2447        }
2448
2449        /// Sets the full request, replacing any prior values.
2450        pub fn with_request<V: Into<crate::model::UpdateActiveDirectoryRequest>>(
2451            mut self,
2452            v: V,
2453        ) -> Self {
2454            self.0.request = v.into();
2455            self
2456        }
2457
2458        /// Sets all the options, replacing any prior values.
2459        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2460            self.0.options = v.into();
2461            self
2462        }
2463
2464        /// Sends the request.
2465        ///
2466        /// # Long running operations
2467        ///
2468        /// This starts, but does not poll, a longrunning operation. More information
2469        /// on [update_active_directory][crate::client::NetApp::update_active_directory].
2470        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2471            (*self.0.stub)
2472                .update_active_directory(self.0.request, self.0.options)
2473                .await
2474                .map(crate::Response::into_body)
2475        }
2476
2477        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_active_directory`.
2478        pub fn poller(
2479            self,
2480        ) -> impl google_cloud_lro::Poller<crate::model::ActiveDirectory, crate::model::OperationMetadata>
2481        {
2482            type Operation = google_cloud_lro::internal::Operation<
2483                crate::model::ActiveDirectory,
2484                crate::model::OperationMetadata,
2485            >;
2486            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2487            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2488
2489            let stub = self.0.stub.clone();
2490            let mut options = self.0.options.clone();
2491            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2492            let query = move |name| {
2493                let stub = stub.clone();
2494                let options = options.clone();
2495                async {
2496                    let op = GetOperation::new(stub)
2497                        .set_name(name)
2498                        .with_options(options)
2499                        .send()
2500                        .await?;
2501                    Ok(Operation::new(op))
2502                }
2503            };
2504
2505            let start = move || async {
2506                let op = self.send().await?;
2507                Ok(Operation::new(op))
2508            };
2509
2510            google_cloud_lro::internal::new_poller(
2511                polling_error_policy,
2512                polling_backoff_policy,
2513                start,
2514                query,
2515            )
2516        }
2517
2518        /// Sets the value of [update_mask][crate::model::UpdateActiveDirectoryRequest::update_mask].
2519        ///
2520        /// This is a **required** field for requests.
2521        pub fn set_update_mask<T>(mut self, v: T) -> Self
2522        where
2523            T: std::convert::Into<wkt::FieldMask>,
2524        {
2525            self.0.request.update_mask = std::option::Option::Some(v.into());
2526            self
2527        }
2528
2529        /// Sets or clears the value of [update_mask][crate::model::UpdateActiveDirectoryRequest::update_mask].
2530        ///
2531        /// This is a **required** field for requests.
2532        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2533        where
2534            T: std::convert::Into<wkt::FieldMask>,
2535        {
2536            self.0.request.update_mask = v.map(|x| x.into());
2537            self
2538        }
2539
2540        /// Sets the value of [active_directory][crate::model::UpdateActiveDirectoryRequest::active_directory].
2541        ///
2542        /// This is a **required** field for requests.
2543        pub fn set_active_directory<T>(mut self, v: T) -> Self
2544        where
2545            T: std::convert::Into<crate::model::ActiveDirectory>,
2546        {
2547            self.0.request.active_directory = std::option::Option::Some(v.into());
2548            self
2549        }
2550
2551        /// Sets or clears the value of [active_directory][crate::model::UpdateActiveDirectoryRequest::active_directory].
2552        ///
2553        /// This is a **required** field for requests.
2554        pub fn set_or_clear_active_directory<T>(mut self, v: std::option::Option<T>) -> Self
2555        where
2556            T: std::convert::Into<crate::model::ActiveDirectory>,
2557        {
2558            self.0.request.active_directory = v.map(|x| x.into());
2559            self
2560        }
2561    }
2562
2563    #[doc(hidden)]
2564    impl crate::RequestBuilder for UpdateActiveDirectory {
2565        fn request_options(&mut self) -> &mut crate::RequestOptions {
2566            &mut self.0.options
2567        }
2568    }
2569
2570    /// The request builder for [NetApp::delete_active_directory][crate::client::NetApp::delete_active_directory] calls.
2571    ///
2572    /// # Example
2573    /// ```
2574    /// # use google_cloud_netapp_v1::builder::net_app::DeleteActiveDirectory;
2575    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2576    /// use google_cloud_lro::Poller;
2577    ///
2578    /// let builder = prepare_request_builder();
2579    /// let response = builder.poller().until_done().await?;
2580    /// # Ok(()) }
2581    ///
2582    /// fn prepare_request_builder() -> DeleteActiveDirectory {
2583    ///   # panic!();
2584    ///   // ... details omitted ...
2585    /// }
2586    /// ```
2587    #[derive(Clone, Debug)]
2588    pub struct DeleteActiveDirectory(RequestBuilder<crate::model::DeleteActiveDirectoryRequest>);
2589
2590    impl DeleteActiveDirectory {
2591        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2592            Self(RequestBuilder::new(stub))
2593        }
2594
2595        /// Sets the full request, replacing any prior values.
2596        pub fn with_request<V: Into<crate::model::DeleteActiveDirectoryRequest>>(
2597            mut self,
2598            v: V,
2599        ) -> Self {
2600            self.0.request = v.into();
2601            self
2602        }
2603
2604        /// Sets all the options, replacing any prior values.
2605        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2606            self.0.options = v.into();
2607            self
2608        }
2609
2610        /// Sends the request.
2611        ///
2612        /// # Long running operations
2613        ///
2614        /// This starts, but does not poll, a longrunning operation. More information
2615        /// on [delete_active_directory][crate::client::NetApp::delete_active_directory].
2616        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2617            (*self.0.stub)
2618                .delete_active_directory(self.0.request, self.0.options)
2619                .await
2620                .map(crate::Response::into_body)
2621        }
2622
2623        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_active_directory`.
2624        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2625            type Operation =
2626                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2627            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2628            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2629
2630            let stub = self.0.stub.clone();
2631            let mut options = self.0.options.clone();
2632            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2633            let query = move |name| {
2634                let stub = stub.clone();
2635                let options = options.clone();
2636                async {
2637                    let op = GetOperation::new(stub)
2638                        .set_name(name)
2639                        .with_options(options)
2640                        .send()
2641                        .await?;
2642                    Ok(Operation::new(op))
2643                }
2644            };
2645
2646            let start = move || async {
2647                let op = self.send().await?;
2648                Ok(Operation::new(op))
2649            };
2650
2651            google_cloud_lro::internal::new_unit_response_poller(
2652                polling_error_policy,
2653                polling_backoff_policy,
2654                start,
2655                query,
2656            )
2657        }
2658
2659        /// Sets the value of [name][crate::model::DeleteActiveDirectoryRequest::name].
2660        ///
2661        /// This is a **required** field for requests.
2662        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2663            self.0.request.name = v.into();
2664            self
2665        }
2666    }
2667
2668    #[doc(hidden)]
2669    impl crate::RequestBuilder for DeleteActiveDirectory {
2670        fn request_options(&mut self) -> &mut crate::RequestOptions {
2671            &mut self.0.options
2672        }
2673    }
2674
2675    /// The request builder for [NetApp::list_kms_configs][crate::client::NetApp::list_kms_configs] calls.
2676    ///
2677    /// # Example
2678    /// ```
2679    /// # use google_cloud_netapp_v1::builder::net_app::ListKmsConfigs;
2680    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2681    /// use google_cloud_gax::paginator::ItemPaginator;
2682    ///
2683    /// let builder = prepare_request_builder();
2684    /// let mut items = builder.by_item();
2685    /// while let Some(result) = items.next().await {
2686    ///   let item = result?;
2687    /// }
2688    /// # Ok(()) }
2689    ///
2690    /// fn prepare_request_builder() -> ListKmsConfigs {
2691    ///   # panic!();
2692    ///   // ... details omitted ...
2693    /// }
2694    /// ```
2695    #[derive(Clone, Debug)]
2696    pub struct ListKmsConfigs(RequestBuilder<crate::model::ListKmsConfigsRequest>);
2697
2698    impl ListKmsConfigs {
2699        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2700            Self(RequestBuilder::new(stub))
2701        }
2702
2703        /// Sets the full request, replacing any prior values.
2704        pub fn with_request<V: Into<crate::model::ListKmsConfigsRequest>>(mut self, v: V) -> Self {
2705            self.0.request = v.into();
2706            self
2707        }
2708
2709        /// Sets all the options, replacing any prior values.
2710        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2711            self.0.options = v.into();
2712            self
2713        }
2714
2715        /// Sends the request.
2716        pub async fn send(self) -> Result<crate::model::ListKmsConfigsResponse> {
2717            (*self.0.stub)
2718                .list_kms_configs(self.0.request, self.0.options)
2719                .await
2720                .map(crate::Response::into_body)
2721        }
2722
2723        /// Streams each page in the collection.
2724        pub fn by_page(
2725            self,
2726        ) -> impl google_cloud_gax::paginator::Paginator<
2727            crate::model::ListKmsConfigsResponse,
2728            crate::Error,
2729        > {
2730            use std::clone::Clone;
2731            let token = self.0.request.page_token.clone();
2732            let execute = move |token: String| {
2733                let mut builder = self.clone();
2734                builder.0.request = builder.0.request.set_page_token(token);
2735                builder.send()
2736            };
2737            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2738        }
2739
2740        /// Streams each item in the collection.
2741        pub fn by_item(
2742            self,
2743        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2744            crate::model::ListKmsConfigsResponse,
2745            crate::Error,
2746        > {
2747            use google_cloud_gax::paginator::Paginator;
2748            self.by_page().items()
2749        }
2750
2751        /// Sets the value of [parent][crate::model::ListKmsConfigsRequest::parent].
2752        ///
2753        /// This is a **required** field for requests.
2754        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2755            self.0.request.parent = v.into();
2756            self
2757        }
2758
2759        /// Sets the value of [page_size][crate::model::ListKmsConfigsRequest::page_size].
2760        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2761            self.0.request.page_size = v.into();
2762            self
2763        }
2764
2765        /// Sets the value of [page_token][crate::model::ListKmsConfigsRequest::page_token].
2766        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2767            self.0.request.page_token = v.into();
2768            self
2769        }
2770
2771        /// Sets the value of [order_by][crate::model::ListKmsConfigsRequest::order_by].
2772        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2773            self.0.request.order_by = v.into();
2774            self
2775        }
2776
2777        /// Sets the value of [filter][crate::model::ListKmsConfigsRequest::filter].
2778        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2779            self.0.request.filter = v.into();
2780            self
2781        }
2782    }
2783
2784    #[doc(hidden)]
2785    impl crate::RequestBuilder for ListKmsConfigs {
2786        fn request_options(&mut self) -> &mut crate::RequestOptions {
2787            &mut self.0.options
2788        }
2789    }
2790
2791    /// The request builder for [NetApp::create_kms_config][crate::client::NetApp::create_kms_config] calls.
2792    ///
2793    /// # Example
2794    /// ```
2795    /// # use google_cloud_netapp_v1::builder::net_app::CreateKmsConfig;
2796    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2797    /// use google_cloud_lro::Poller;
2798    ///
2799    /// let builder = prepare_request_builder();
2800    /// let response = builder.poller().until_done().await?;
2801    /// # Ok(()) }
2802    ///
2803    /// fn prepare_request_builder() -> CreateKmsConfig {
2804    ///   # panic!();
2805    ///   // ... details omitted ...
2806    /// }
2807    /// ```
2808    #[derive(Clone, Debug)]
2809    pub struct CreateKmsConfig(RequestBuilder<crate::model::CreateKmsConfigRequest>);
2810
2811    impl CreateKmsConfig {
2812        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2813            Self(RequestBuilder::new(stub))
2814        }
2815
2816        /// Sets the full request, replacing any prior values.
2817        pub fn with_request<V: Into<crate::model::CreateKmsConfigRequest>>(mut self, v: V) -> Self {
2818            self.0.request = v.into();
2819            self
2820        }
2821
2822        /// Sets all the options, replacing any prior values.
2823        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2824            self.0.options = v.into();
2825            self
2826        }
2827
2828        /// Sends the request.
2829        ///
2830        /// # Long running operations
2831        ///
2832        /// This starts, but does not poll, a longrunning operation. More information
2833        /// on [create_kms_config][crate::client::NetApp::create_kms_config].
2834        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2835            (*self.0.stub)
2836                .create_kms_config(self.0.request, self.0.options)
2837                .await
2838                .map(crate::Response::into_body)
2839        }
2840
2841        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_kms_config`.
2842        pub fn poller(
2843            self,
2844        ) -> impl google_cloud_lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata>
2845        {
2846            type Operation = google_cloud_lro::internal::Operation<
2847                crate::model::KmsConfig,
2848                crate::model::OperationMetadata,
2849            >;
2850            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2851            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2852
2853            let stub = self.0.stub.clone();
2854            let mut options = self.0.options.clone();
2855            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2856            let query = move |name| {
2857                let stub = stub.clone();
2858                let options = options.clone();
2859                async {
2860                    let op = GetOperation::new(stub)
2861                        .set_name(name)
2862                        .with_options(options)
2863                        .send()
2864                        .await?;
2865                    Ok(Operation::new(op))
2866                }
2867            };
2868
2869            let start = move || async {
2870                let op = self.send().await?;
2871                Ok(Operation::new(op))
2872            };
2873
2874            google_cloud_lro::internal::new_poller(
2875                polling_error_policy,
2876                polling_backoff_policy,
2877                start,
2878                query,
2879            )
2880        }
2881
2882        /// Sets the value of [parent][crate::model::CreateKmsConfigRequest::parent].
2883        ///
2884        /// This is a **required** field for requests.
2885        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2886            self.0.request.parent = v.into();
2887            self
2888        }
2889
2890        /// Sets the value of [kms_config_id][crate::model::CreateKmsConfigRequest::kms_config_id].
2891        ///
2892        /// This is a **required** field for requests.
2893        pub fn set_kms_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2894            self.0.request.kms_config_id = v.into();
2895            self
2896        }
2897
2898        /// Sets the value of [kms_config][crate::model::CreateKmsConfigRequest::kms_config].
2899        ///
2900        /// This is a **required** field for requests.
2901        pub fn set_kms_config<T>(mut self, v: T) -> Self
2902        where
2903            T: std::convert::Into<crate::model::KmsConfig>,
2904        {
2905            self.0.request.kms_config = std::option::Option::Some(v.into());
2906            self
2907        }
2908
2909        /// Sets or clears the value of [kms_config][crate::model::CreateKmsConfigRequest::kms_config].
2910        ///
2911        /// This is a **required** field for requests.
2912        pub fn set_or_clear_kms_config<T>(mut self, v: std::option::Option<T>) -> Self
2913        where
2914            T: std::convert::Into<crate::model::KmsConfig>,
2915        {
2916            self.0.request.kms_config = v.map(|x| x.into());
2917            self
2918        }
2919    }
2920
2921    #[doc(hidden)]
2922    impl crate::RequestBuilder for CreateKmsConfig {
2923        fn request_options(&mut self) -> &mut crate::RequestOptions {
2924            &mut self.0.options
2925        }
2926    }
2927
2928    /// The request builder for [NetApp::get_kms_config][crate::client::NetApp::get_kms_config] calls.
2929    ///
2930    /// # Example
2931    /// ```
2932    /// # use google_cloud_netapp_v1::builder::net_app::GetKmsConfig;
2933    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2934    ///
2935    /// let builder = prepare_request_builder();
2936    /// let response = builder.send().await?;
2937    /// # Ok(()) }
2938    ///
2939    /// fn prepare_request_builder() -> GetKmsConfig {
2940    ///   # panic!();
2941    ///   // ... details omitted ...
2942    /// }
2943    /// ```
2944    #[derive(Clone, Debug)]
2945    pub struct GetKmsConfig(RequestBuilder<crate::model::GetKmsConfigRequest>);
2946
2947    impl GetKmsConfig {
2948        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2949            Self(RequestBuilder::new(stub))
2950        }
2951
2952        /// Sets the full request, replacing any prior values.
2953        pub fn with_request<V: Into<crate::model::GetKmsConfigRequest>>(mut self, v: V) -> Self {
2954            self.0.request = v.into();
2955            self
2956        }
2957
2958        /// Sets all the options, replacing any prior values.
2959        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2960            self.0.options = v.into();
2961            self
2962        }
2963
2964        /// Sends the request.
2965        pub async fn send(self) -> Result<crate::model::KmsConfig> {
2966            (*self.0.stub)
2967                .get_kms_config(self.0.request, self.0.options)
2968                .await
2969                .map(crate::Response::into_body)
2970        }
2971
2972        /// Sets the value of [name][crate::model::GetKmsConfigRequest::name].
2973        ///
2974        /// This is a **required** field for requests.
2975        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2976            self.0.request.name = v.into();
2977            self
2978        }
2979    }
2980
2981    #[doc(hidden)]
2982    impl crate::RequestBuilder for GetKmsConfig {
2983        fn request_options(&mut self) -> &mut crate::RequestOptions {
2984            &mut self.0.options
2985        }
2986    }
2987
2988    /// The request builder for [NetApp::update_kms_config][crate::client::NetApp::update_kms_config] calls.
2989    ///
2990    /// # Example
2991    /// ```
2992    /// # use google_cloud_netapp_v1::builder::net_app::UpdateKmsConfig;
2993    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2994    /// use google_cloud_lro::Poller;
2995    ///
2996    /// let builder = prepare_request_builder();
2997    /// let response = builder.poller().until_done().await?;
2998    /// # Ok(()) }
2999    ///
3000    /// fn prepare_request_builder() -> UpdateKmsConfig {
3001    ///   # panic!();
3002    ///   // ... details omitted ...
3003    /// }
3004    /// ```
3005    #[derive(Clone, Debug)]
3006    pub struct UpdateKmsConfig(RequestBuilder<crate::model::UpdateKmsConfigRequest>);
3007
3008    impl UpdateKmsConfig {
3009        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3010            Self(RequestBuilder::new(stub))
3011        }
3012
3013        /// Sets the full request, replacing any prior values.
3014        pub fn with_request<V: Into<crate::model::UpdateKmsConfigRequest>>(mut self, v: V) -> Self {
3015            self.0.request = v.into();
3016            self
3017        }
3018
3019        /// Sets all the options, replacing any prior values.
3020        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3021            self.0.options = v.into();
3022            self
3023        }
3024
3025        /// Sends the request.
3026        ///
3027        /// # Long running operations
3028        ///
3029        /// This starts, but does not poll, a longrunning operation. More information
3030        /// on [update_kms_config][crate::client::NetApp::update_kms_config].
3031        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3032            (*self.0.stub)
3033                .update_kms_config(self.0.request, self.0.options)
3034                .await
3035                .map(crate::Response::into_body)
3036        }
3037
3038        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_kms_config`.
3039        pub fn poller(
3040            self,
3041        ) -> impl google_cloud_lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata>
3042        {
3043            type Operation = google_cloud_lro::internal::Operation<
3044                crate::model::KmsConfig,
3045                crate::model::OperationMetadata,
3046            >;
3047            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3048            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3049
3050            let stub = self.0.stub.clone();
3051            let mut options = self.0.options.clone();
3052            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3053            let query = move |name| {
3054                let stub = stub.clone();
3055                let options = options.clone();
3056                async {
3057                    let op = GetOperation::new(stub)
3058                        .set_name(name)
3059                        .with_options(options)
3060                        .send()
3061                        .await?;
3062                    Ok(Operation::new(op))
3063                }
3064            };
3065
3066            let start = move || async {
3067                let op = self.send().await?;
3068                Ok(Operation::new(op))
3069            };
3070
3071            google_cloud_lro::internal::new_poller(
3072                polling_error_policy,
3073                polling_backoff_policy,
3074                start,
3075                query,
3076            )
3077        }
3078
3079        /// Sets the value of [update_mask][crate::model::UpdateKmsConfigRequest::update_mask].
3080        ///
3081        /// This is a **required** field for requests.
3082        pub fn set_update_mask<T>(mut self, v: T) -> Self
3083        where
3084            T: std::convert::Into<wkt::FieldMask>,
3085        {
3086            self.0.request.update_mask = std::option::Option::Some(v.into());
3087            self
3088        }
3089
3090        /// Sets or clears the value of [update_mask][crate::model::UpdateKmsConfigRequest::update_mask].
3091        ///
3092        /// This is a **required** field for requests.
3093        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3094        where
3095            T: std::convert::Into<wkt::FieldMask>,
3096        {
3097            self.0.request.update_mask = v.map(|x| x.into());
3098            self
3099        }
3100
3101        /// Sets the value of [kms_config][crate::model::UpdateKmsConfigRequest::kms_config].
3102        ///
3103        /// This is a **required** field for requests.
3104        pub fn set_kms_config<T>(mut self, v: T) -> Self
3105        where
3106            T: std::convert::Into<crate::model::KmsConfig>,
3107        {
3108            self.0.request.kms_config = std::option::Option::Some(v.into());
3109            self
3110        }
3111
3112        /// Sets or clears the value of [kms_config][crate::model::UpdateKmsConfigRequest::kms_config].
3113        ///
3114        /// This is a **required** field for requests.
3115        pub fn set_or_clear_kms_config<T>(mut self, v: std::option::Option<T>) -> Self
3116        where
3117            T: std::convert::Into<crate::model::KmsConfig>,
3118        {
3119            self.0.request.kms_config = v.map(|x| x.into());
3120            self
3121        }
3122    }
3123
3124    #[doc(hidden)]
3125    impl crate::RequestBuilder for UpdateKmsConfig {
3126        fn request_options(&mut self) -> &mut crate::RequestOptions {
3127            &mut self.0.options
3128        }
3129    }
3130
3131    /// The request builder for [NetApp::encrypt_volumes][crate::client::NetApp::encrypt_volumes] calls.
3132    ///
3133    /// # Example
3134    /// ```
3135    /// # use google_cloud_netapp_v1::builder::net_app::EncryptVolumes;
3136    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3137    /// use google_cloud_lro::Poller;
3138    ///
3139    /// let builder = prepare_request_builder();
3140    /// let response = builder.poller().until_done().await?;
3141    /// # Ok(()) }
3142    ///
3143    /// fn prepare_request_builder() -> EncryptVolumes {
3144    ///   # panic!();
3145    ///   // ... details omitted ...
3146    /// }
3147    /// ```
3148    #[derive(Clone, Debug)]
3149    pub struct EncryptVolumes(RequestBuilder<crate::model::EncryptVolumesRequest>);
3150
3151    impl EncryptVolumes {
3152        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3153            Self(RequestBuilder::new(stub))
3154        }
3155
3156        /// Sets the full request, replacing any prior values.
3157        pub fn with_request<V: Into<crate::model::EncryptVolumesRequest>>(mut self, v: V) -> Self {
3158            self.0.request = v.into();
3159            self
3160        }
3161
3162        /// Sets all the options, replacing any prior values.
3163        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3164            self.0.options = v.into();
3165            self
3166        }
3167
3168        /// Sends the request.
3169        ///
3170        /// # Long running operations
3171        ///
3172        /// This starts, but does not poll, a longrunning operation. More information
3173        /// on [encrypt_volumes][crate::client::NetApp::encrypt_volumes].
3174        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3175            (*self.0.stub)
3176                .encrypt_volumes(self.0.request, self.0.options)
3177                .await
3178                .map(crate::Response::into_body)
3179        }
3180
3181        /// Creates a [Poller][google_cloud_lro::Poller] to work with `encrypt_volumes`.
3182        pub fn poller(
3183            self,
3184        ) -> impl google_cloud_lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata>
3185        {
3186            type Operation = google_cloud_lro::internal::Operation<
3187                crate::model::KmsConfig,
3188                crate::model::OperationMetadata,
3189            >;
3190            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3191            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3192
3193            let stub = self.0.stub.clone();
3194            let mut options = self.0.options.clone();
3195            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3196            let query = move |name| {
3197                let stub = stub.clone();
3198                let options = options.clone();
3199                async {
3200                    let op = GetOperation::new(stub)
3201                        .set_name(name)
3202                        .with_options(options)
3203                        .send()
3204                        .await?;
3205                    Ok(Operation::new(op))
3206                }
3207            };
3208
3209            let start = move || async {
3210                let op = self.send().await?;
3211                Ok(Operation::new(op))
3212            };
3213
3214            google_cloud_lro::internal::new_poller(
3215                polling_error_policy,
3216                polling_backoff_policy,
3217                start,
3218                query,
3219            )
3220        }
3221
3222        /// Sets the value of [name][crate::model::EncryptVolumesRequest::name].
3223        ///
3224        /// This is a **required** field for requests.
3225        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3226            self.0.request.name = v.into();
3227            self
3228        }
3229    }
3230
3231    #[doc(hidden)]
3232    impl crate::RequestBuilder for EncryptVolumes {
3233        fn request_options(&mut self) -> &mut crate::RequestOptions {
3234            &mut self.0.options
3235        }
3236    }
3237
3238    /// The request builder for [NetApp::verify_kms_config][crate::client::NetApp::verify_kms_config] calls.
3239    ///
3240    /// # Example
3241    /// ```
3242    /// # use google_cloud_netapp_v1::builder::net_app::VerifyKmsConfig;
3243    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3244    ///
3245    /// let builder = prepare_request_builder();
3246    /// let response = builder.send().await?;
3247    /// # Ok(()) }
3248    ///
3249    /// fn prepare_request_builder() -> VerifyKmsConfig {
3250    ///   # panic!();
3251    ///   // ... details omitted ...
3252    /// }
3253    /// ```
3254    #[derive(Clone, Debug)]
3255    pub struct VerifyKmsConfig(RequestBuilder<crate::model::VerifyKmsConfigRequest>);
3256
3257    impl VerifyKmsConfig {
3258        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3259            Self(RequestBuilder::new(stub))
3260        }
3261
3262        /// Sets the full request, replacing any prior values.
3263        pub fn with_request<V: Into<crate::model::VerifyKmsConfigRequest>>(mut self, v: V) -> Self {
3264            self.0.request = v.into();
3265            self
3266        }
3267
3268        /// Sets all the options, replacing any prior values.
3269        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3270            self.0.options = v.into();
3271            self
3272        }
3273
3274        /// Sends the request.
3275        pub async fn send(self) -> Result<crate::model::VerifyKmsConfigResponse> {
3276            (*self.0.stub)
3277                .verify_kms_config(self.0.request, self.0.options)
3278                .await
3279                .map(crate::Response::into_body)
3280        }
3281
3282        /// Sets the value of [name][crate::model::VerifyKmsConfigRequest::name].
3283        ///
3284        /// This is a **required** field for requests.
3285        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3286            self.0.request.name = v.into();
3287            self
3288        }
3289    }
3290
3291    #[doc(hidden)]
3292    impl crate::RequestBuilder for VerifyKmsConfig {
3293        fn request_options(&mut self) -> &mut crate::RequestOptions {
3294            &mut self.0.options
3295        }
3296    }
3297
3298    /// The request builder for [NetApp::delete_kms_config][crate::client::NetApp::delete_kms_config] calls.
3299    ///
3300    /// # Example
3301    /// ```
3302    /// # use google_cloud_netapp_v1::builder::net_app::DeleteKmsConfig;
3303    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3304    /// use google_cloud_lro::Poller;
3305    ///
3306    /// let builder = prepare_request_builder();
3307    /// let response = builder.poller().until_done().await?;
3308    /// # Ok(()) }
3309    ///
3310    /// fn prepare_request_builder() -> DeleteKmsConfig {
3311    ///   # panic!();
3312    ///   // ... details omitted ...
3313    /// }
3314    /// ```
3315    #[derive(Clone, Debug)]
3316    pub struct DeleteKmsConfig(RequestBuilder<crate::model::DeleteKmsConfigRequest>);
3317
3318    impl DeleteKmsConfig {
3319        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3320            Self(RequestBuilder::new(stub))
3321        }
3322
3323        /// Sets the full request, replacing any prior values.
3324        pub fn with_request<V: Into<crate::model::DeleteKmsConfigRequest>>(mut self, v: V) -> Self {
3325            self.0.request = v.into();
3326            self
3327        }
3328
3329        /// Sets all the options, replacing any prior values.
3330        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3331            self.0.options = v.into();
3332            self
3333        }
3334
3335        /// Sends the request.
3336        ///
3337        /// # Long running operations
3338        ///
3339        /// This starts, but does not poll, a longrunning operation. More information
3340        /// on [delete_kms_config][crate::client::NetApp::delete_kms_config].
3341        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3342            (*self.0.stub)
3343                .delete_kms_config(self.0.request, self.0.options)
3344                .await
3345                .map(crate::Response::into_body)
3346        }
3347
3348        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_kms_config`.
3349        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3350            type Operation =
3351                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3352            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3353            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3354
3355            let stub = self.0.stub.clone();
3356            let mut options = self.0.options.clone();
3357            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3358            let query = move |name| {
3359                let stub = stub.clone();
3360                let options = options.clone();
3361                async {
3362                    let op = GetOperation::new(stub)
3363                        .set_name(name)
3364                        .with_options(options)
3365                        .send()
3366                        .await?;
3367                    Ok(Operation::new(op))
3368                }
3369            };
3370
3371            let start = move || async {
3372                let op = self.send().await?;
3373                Ok(Operation::new(op))
3374            };
3375
3376            google_cloud_lro::internal::new_unit_response_poller(
3377                polling_error_policy,
3378                polling_backoff_policy,
3379                start,
3380                query,
3381            )
3382        }
3383
3384        /// Sets the value of [name][crate::model::DeleteKmsConfigRequest::name].
3385        ///
3386        /// This is a **required** field for requests.
3387        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3388            self.0.request.name = v.into();
3389            self
3390        }
3391    }
3392
3393    #[doc(hidden)]
3394    impl crate::RequestBuilder for DeleteKmsConfig {
3395        fn request_options(&mut self) -> &mut crate::RequestOptions {
3396            &mut self.0.options
3397        }
3398    }
3399
3400    /// The request builder for [NetApp::list_replications][crate::client::NetApp::list_replications] calls.
3401    ///
3402    /// # Example
3403    /// ```
3404    /// # use google_cloud_netapp_v1::builder::net_app::ListReplications;
3405    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3406    /// use google_cloud_gax::paginator::ItemPaginator;
3407    ///
3408    /// let builder = prepare_request_builder();
3409    /// let mut items = builder.by_item();
3410    /// while let Some(result) = items.next().await {
3411    ///   let item = result?;
3412    /// }
3413    /// # Ok(()) }
3414    ///
3415    /// fn prepare_request_builder() -> ListReplications {
3416    ///   # panic!();
3417    ///   // ... details omitted ...
3418    /// }
3419    /// ```
3420    #[derive(Clone, Debug)]
3421    pub struct ListReplications(RequestBuilder<crate::model::ListReplicationsRequest>);
3422
3423    impl ListReplications {
3424        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3425            Self(RequestBuilder::new(stub))
3426        }
3427
3428        /// Sets the full request, replacing any prior values.
3429        pub fn with_request<V: Into<crate::model::ListReplicationsRequest>>(
3430            mut self,
3431            v: V,
3432        ) -> Self {
3433            self.0.request = v.into();
3434            self
3435        }
3436
3437        /// Sets all the options, replacing any prior values.
3438        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3439            self.0.options = v.into();
3440            self
3441        }
3442
3443        /// Sends the request.
3444        pub async fn send(self) -> Result<crate::model::ListReplicationsResponse> {
3445            (*self.0.stub)
3446                .list_replications(self.0.request, self.0.options)
3447                .await
3448                .map(crate::Response::into_body)
3449        }
3450
3451        /// Streams each page in the collection.
3452        pub fn by_page(
3453            self,
3454        ) -> impl google_cloud_gax::paginator::Paginator<
3455            crate::model::ListReplicationsResponse,
3456            crate::Error,
3457        > {
3458            use std::clone::Clone;
3459            let token = self.0.request.page_token.clone();
3460            let execute = move |token: String| {
3461                let mut builder = self.clone();
3462                builder.0.request = builder.0.request.set_page_token(token);
3463                builder.send()
3464            };
3465            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3466        }
3467
3468        /// Streams each item in the collection.
3469        pub fn by_item(
3470            self,
3471        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3472            crate::model::ListReplicationsResponse,
3473            crate::Error,
3474        > {
3475            use google_cloud_gax::paginator::Paginator;
3476            self.by_page().items()
3477        }
3478
3479        /// Sets the value of [parent][crate::model::ListReplicationsRequest::parent].
3480        ///
3481        /// This is a **required** field for requests.
3482        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3483            self.0.request.parent = v.into();
3484            self
3485        }
3486
3487        /// Sets the value of [page_size][crate::model::ListReplicationsRequest::page_size].
3488        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3489            self.0.request.page_size = v.into();
3490            self
3491        }
3492
3493        /// Sets the value of [page_token][crate::model::ListReplicationsRequest::page_token].
3494        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3495            self.0.request.page_token = v.into();
3496            self
3497        }
3498
3499        /// Sets the value of [order_by][crate::model::ListReplicationsRequest::order_by].
3500        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3501            self.0.request.order_by = v.into();
3502            self
3503        }
3504
3505        /// Sets the value of [filter][crate::model::ListReplicationsRequest::filter].
3506        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3507            self.0.request.filter = v.into();
3508            self
3509        }
3510    }
3511
3512    #[doc(hidden)]
3513    impl crate::RequestBuilder for ListReplications {
3514        fn request_options(&mut self) -> &mut crate::RequestOptions {
3515            &mut self.0.options
3516        }
3517    }
3518
3519    /// The request builder for [NetApp::get_replication][crate::client::NetApp::get_replication] calls.
3520    ///
3521    /// # Example
3522    /// ```
3523    /// # use google_cloud_netapp_v1::builder::net_app::GetReplication;
3524    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3525    ///
3526    /// let builder = prepare_request_builder();
3527    /// let response = builder.send().await?;
3528    /// # Ok(()) }
3529    ///
3530    /// fn prepare_request_builder() -> GetReplication {
3531    ///   # panic!();
3532    ///   // ... details omitted ...
3533    /// }
3534    /// ```
3535    #[derive(Clone, Debug)]
3536    pub struct GetReplication(RequestBuilder<crate::model::GetReplicationRequest>);
3537
3538    impl GetReplication {
3539        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3540            Self(RequestBuilder::new(stub))
3541        }
3542
3543        /// Sets the full request, replacing any prior values.
3544        pub fn with_request<V: Into<crate::model::GetReplicationRequest>>(mut self, v: V) -> Self {
3545            self.0.request = v.into();
3546            self
3547        }
3548
3549        /// Sets all the options, replacing any prior values.
3550        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3551            self.0.options = v.into();
3552            self
3553        }
3554
3555        /// Sends the request.
3556        pub async fn send(self) -> Result<crate::model::Replication> {
3557            (*self.0.stub)
3558                .get_replication(self.0.request, self.0.options)
3559                .await
3560                .map(crate::Response::into_body)
3561        }
3562
3563        /// Sets the value of [name][crate::model::GetReplicationRequest::name].
3564        ///
3565        /// This is a **required** field for requests.
3566        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3567            self.0.request.name = v.into();
3568            self
3569        }
3570    }
3571
3572    #[doc(hidden)]
3573    impl crate::RequestBuilder for GetReplication {
3574        fn request_options(&mut self) -> &mut crate::RequestOptions {
3575            &mut self.0.options
3576        }
3577    }
3578
3579    /// The request builder for [NetApp::create_replication][crate::client::NetApp::create_replication] calls.
3580    ///
3581    /// # Example
3582    /// ```
3583    /// # use google_cloud_netapp_v1::builder::net_app::CreateReplication;
3584    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3585    /// use google_cloud_lro::Poller;
3586    ///
3587    /// let builder = prepare_request_builder();
3588    /// let response = builder.poller().until_done().await?;
3589    /// # Ok(()) }
3590    ///
3591    /// fn prepare_request_builder() -> CreateReplication {
3592    ///   # panic!();
3593    ///   // ... details omitted ...
3594    /// }
3595    /// ```
3596    #[derive(Clone, Debug)]
3597    pub struct CreateReplication(RequestBuilder<crate::model::CreateReplicationRequest>);
3598
3599    impl CreateReplication {
3600        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3601            Self(RequestBuilder::new(stub))
3602        }
3603
3604        /// Sets the full request, replacing any prior values.
3605        pub fn with_request<V: Into<crate::model::CreateReplicationRequest>>(
3606            mut self,
3607            v: V,
3608        ) -> Self {
3609            self.0.request = v.into();
3610            self
3611        }
3612
3613        /// Sets all the options, replacing any prior values.
3614        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3615            self.0.options = v.into();
3616            self
3617        }
3618
3619        /// Sends the request.
3620        ///
3621        /// # Long running operations
3622        ///
3623        /// This starts, but does not poll, a longrunning operation. More information
3624        /// on [create_replication][crate::client::NetApp::create_replication].
3625        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3626            (*self.0.stub)
3627                .create_replication(self.0.request, self.0.options)
3628                .await
3629                .map(crate::Response::into_body)
3630        }
3631
3632        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_replication`.
3633        pub fn poller(
3634            self,
3635        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
3636        {
3637            type Operation = google_cloud_lro::internal::Operation<
3638                crate::model::Replication,
3639                crate::model::OperationMetadata,
3640            >;
3641            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3642            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3643
3644            let stub = self.0.stub.clone();
3645            let mut options = self.0.options.clone();
3646            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3647            let query = move |name| {
3648                let stub = stub.clone();
3649                let options = options.clone();
3650                async {
3651                    let op = GetOperation::new(stub)
3652                        .set_name(name)
3653                        .with_options(options)
3654                        .send()
3655                        .await?;
3656                    Ok(Operation::new(op))
3657                }
3658            };
3659
3660            let start = move || async {
3661                let op = self.send().await?;
3662                Ok(Operation::new(op))
3663            };
3664
3665            google_cloud_lro::internal::new_poller(
3666                polling_error_policy,
3667                polling_backoff_policy,
3668                start,
3669                query,
3670            )
3671        }
3672
3673        /// Sets the value of [parent][crate::model::CreateReplicationRequest::parent].
3674        ///
3675        /// This is a **required** field for requests.
3676        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3677            self.0.request.parent = v.into();
3678            self
3679        }
3680
3681        /// Sets the value of [replication][crate::model::CreateReplicationRequest::replication].
3682        ///
3683        /// This is a **required** field for requests.
3684        pub fn set_replication<T>(mut self, v: T) -> Self
3685        where
3686            T: std::convert::Into<crate::model::Replication>,
3687        {
3688            self.0.request.replication = std::option::Option::Some(v.into());
3689            self
3690        }
3691
3692        /// Sets or clears the value of [replication][crate::model::CreateReplicationRequest::replication].
3693        ///
3694        /// This is a **required** field for requests.
3695        pub fn set_or_clear_replication<T>(mut self, v: std::option::Option<T>) -> Self
3696        where
3697            T: std::convert::Into<crate::model::Replication>,
3698        {
3699            self.0.request.replication = v.map(|x| x.into());
3700            self
3701        }
3702
3703        /// Sets the value of [replication_id][crate::model::CreateReplicationRequest::replication_id].
3704        ///
3705        /// This is a **required** field for requests.
3706        pub fn set_replication_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3707            self.0.request.replication_id = v.into();
3708            self
3709        }
3710    }
3711
3712    #[doc(hidden)]
3713    impl crate::RequestBuilder for CreateReplication {
3714        fn request_options(&mut self) -> &mut crate::RequestOptions {
3715            &mut self.0.options
3716        }
3717    }
3718
3719    /// The request builder for [NetApp::delete_replication][crate::client::NetApp::delete_replication] calls.
3720    ///
3721    /// # Example
3722    /// ```
3723    /// # use google_cloud_netapp_v1::builder::net_app::DeleteReplication;
3724    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3725    /// use google_cloud_lro::Poller;
3726    ///
3727    /// let builder = prepare_request_builder();
3728    /// let response = builder.poller().until_done().await?;
3729    /// # Ok(()) }
3730    ///
3731    /// fn prepare_request_builder() -> DeleteReplication {
3732    ///   # panic!();
3733    ///   // ... details omitted ...
3734    /// }
3735    /// ```
3736    #[derive(Clone, Debug)]
3737    pub struct DeleteReplication(RequestBuilder<crate::model::DeleteReplicationRequest>);
3738
3739    impl DeleteReplication {
3740        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3741            Self(RequestBuilder::new(stub))
3742        }
3743
3744        /// Sets the full request, replacing any prior values.
3745        pub fn with_request<V: Into<crate::model::DeleteReplicationRequest>>(
3746            mut self,
3747            v: V,
3748        ) -> Self {
3749            self.0.request = v.into();
3750            self
3751        }
3752
3753        /// Sets all the options, replacing any prior values.
3754        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3755            self.0.options = v.into();
3756            self
3757        }
3758
3759        /// Sends the request.
3760        ///
3761        /// # Long running operations
3762        ///
3763        /// This starts, but does not poll, a longrunning operation. More information
3764        /// on [delete_replication][crate::client::NetApp::delete_replication].
3765        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3766            (*self.0.stub)
3767                .delete_replication(self.0.request, self.0.options)
3768                .await
3769                .map(crate::Response::into_body)
3770        }
3771
3772        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_replication`.
3773        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3774            type Operation =
3775                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3776            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3777            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3778
3779            let stub = self.0.stub.clone();
3780            let mut options = self.0.options.clone();
3781            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3782            let query = move |name| {
3783                let stub = stub.clone();
3784                let options = options.clone();
3785                async {
3786                    let op = GetOperation::new(stub)
3787                        .set_name(name)
3788                        .with_options(options)
3789                        .send()
3790                        .await?;
3791                    Ok(Operation::new(op))
3792                }
3793            };
3794
3795            let start = move || async {
3796                let op = self.send().await?;
3797                Ok(Operation::new(op))
3798            };
3799
3800            google_cloud_lro::internal::new_unit_response_poller(
3801                polling_error_policy,
3802                polling_backoff_policy,
3803                start,
3804                query,
3805            )
3806        }
3807
3808        /// Sets the value of [name][crate::model::DeleteReplicationRequest::name].
3809        ///
3810        /// This is a **required** field for requests.
3811        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3812            self.0.request.name = v.into();
3813            self
3814        }
3815    }
3816
3817    #[doc(hidden)]
3818    impl crate::RequestBuilder for DeleteReplication {
3819        fn request_options(&mut self) -> &mut crate::RequestOptions {
3820            &mut self.0.options
3821        }
3822    }
3823
3824    /// The request builder for [NetApp::update_replication][crate::client::NetApp::update_replication] calls.
3825    ///
3826    /// # Example
3827    /// ```
3828    /// # use google_cloud_netapp_v1::builder::net_app::UpdateReplication;
3829    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3830    /// use google_cloud_lro::Poller;
3831    ///
3832    /// let builder = prepare_request_builder();
3833    /// let response = builder.poller().until_done().await?;
3834    /// # Ok(()) }
3835    ///
3836    /// fn prepare_request_builder() -> UpdateReplication {
3837    ///   # panic!();
3838    ///   // ... details omitted ...
3839    /// }
3840    /// ```
3841    #[derive(Clone, Debug)]
3842    pub struct UpdateReplication(RequestBuilder<crate::model::UpdateReplicationRequest>);
3843
3844    impl UpdateReplication {
3845        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3846            Self(RequestBuilder::new(stub))
3847        }
3848
3849        /// Sets the full request, replacing any prior values.
3850        pub fn with_request<V: Into<crate::model::UpdateReplicationRequest>>(
3851            mut self,
3852            v: V,
3853        ) -> Self {
3854            self.0.request = v.into();
3855            self
3856        }
3857
3858        /// Sets all the options, replacing any prior values.
3859        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3860            self.0.options = v.into();
3861            self
3862        }
3863
3864        /// Sends the request.
3865        ///
3866        /// # Long running operations
3867        ///
3868        /// This starts, but does not poll, a longrunning operation. More information
3869        /// on [update_replication][crate::client::NetApp::update_replication].
3870        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3871            (*self.0.stub)
3872                .update_replication(self.0.request, self.0.options)
3873                .await
3874                .map(crate::Response::into_body)
3875        }
3876
3877        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_replication`.
3878        pub fn poller(
3879            self,
3880        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
3881        {
3882            type Operation = google_cloud_lro::internal::Operation<
3883                crate::model::Replication,
3884                crate::model::OperationMetadata,
3885            >;
3886            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3887            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3888
3889            let stub = self.0.stub.clone();
3890            let mut options = self.0.options.clone();
3891            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3892            let query = move |name| {
3893                let stub = stub.clone();
3894                let options = options.clone();
3895                async {
3896                    let op = GetOperation::new(stub)
3897                        .set_name(name)
3898                        .with_options(options)
3899                        .send()
3900                        .await?;
3901                    Ok(Operation::new(op))
3902                }
3903            };
3904
3905            let start = move || async {
3906                let op = self.send().await?;
3907                Ok(Operation::new(op))
3908            };
3909
3910            google_cloud_lro::internal::new_poller(
3911                polling_error_policy,
3912                polling_backoff_policy,
3913                start,
3914                query,
3915            )
3916        }
3917
3918        /// Sets the value of [update_mask][crate::model::UpdateReplicationRequest::update_mask].
3919        ///
3920        /// This is a **required** field for requests.
3921        pub fn set_update_mask<T>(mut self, v: T) -> Self
3922        where
3923            T: std::convert::Into<wkt::FieldMask>,
3924        {
3925            self.0.request.update_mask = std::option::Option::Some(v.into());
3926            self
3927        }
3928
3929        /// Sets or clears the value of [update_mask][crate::model::UpdateReplicationRequest::update_mask].
3930        ///
3931        /// This is a **required** field for requests.
3932        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3933        where
3934            T: std::convert::Into<wkt::FieldMask>,
3935        {
3936            self.0.request.update_mask = v.map(|x| x.into());
3937            self
3938        }
3939
3940        /// Sets the value of [replication][crate::model::UpdateReplicationRequest::replication].
3941        ///
3942        /// This is a **required** field for requests.
3943        pub fn set_replication<T>(mut self, v: T) -> Self
3944        where
3945            T: std::convert::Into<crate::model::Replication>,
3946        {
3947            self.0.request.replication = std::option::Option::Some(v.into());
3948            self
3949        }
3950
3951        /// Sets or clears the value of [replication][crate::model::UpdateReplicationRequest::replication].
3952        ///
3953        /// This is a **required** field for requests.
3954        pub fn set_or_clear_replication<T>(mut self, v: std::option::Option<T>) -> Self
3955        where
3956            T: std::convert::Into<crate::model::Replication>,
3957        {
3958            self.0.request.replication = v.map(|x| x.into());
3959            self
3960        }
3961    }
3962
3963    #[doc(hidden)]
3964    impl crate::RequestBuilder for UpdateReplication {
3965        fn request_options(&mut self) -> &mut crate::RequestOptions {
3966            &mut self.0.options
3967        }
3968    }
3969
3970    /// The request builder for [NetApp::stop_replication][crate::client::NetApp::stop_replication] calls.
3971    ///
3972    /// # Example
3973    /// ```
3974    /// # use google_cloud_netapp_v1::builder::net_app::StopReplication;
3975    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3976    /// use google_cloud_lro::Poller;
3977    ///
3978    /// let builder = prepare_request_builder();
3979    /// let response = builder.poller().until_done().await?;
3980    /// # Ok(()) }
3981    ///
3982    /// fn prepare_request_builder() -> StopReplication {
3983    ///   # panic!();
3984    ///   // ... details omitted ...
3985    /// }
3986    /// ```
3987    #[derive(Clone, Debug)]
3988    pub struct StopReplication(RequestBuilder<crate::model::StopReplicationRequest>);
3989
3990    impl StopReplication {
3991        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3992            Self(RequestBuilder::new(stub))
3993        }
3994
3995        /// Sets the full request, replacing any prior values.
3996        pub fn with_request<V: Into<crate::model::StopReplicationRequest>>(mut self, v: V) -> Self {
3997            self.0.request = v.into();
3998            self
3999        }
4000
4001        /// Sets all the options, replacing any prior values.
4002        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4003            self.0.options = v.into();
4004            self
4005        }
4006
4007        /// Sends the request.
4008        ///
4009        /// # Long running operations
4010        ///
4011        /// This starts, but does not poll, a longrunning operation. More information
4012        /// on [stop_replication][crate::client::NetApp::stop_replication].
4013        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4014            (*self.0.stub)
4015                .stop_replication(self.0.request, self.0.options)
4016                .await
4017                .map(crate::Response::into_body)
4018        }
4019
4020        /// Creates a [Poller][google_cloud_lro::Poller] to work with `stop_replication`.
4021        pub fn poller(
4022            self,
4023        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4024        {
4025            type Operation = google_cloud_lro::internal::Operation<
4026                crate::model::Replication,
4027                crate::model::OperationMetadata,
4028            >;
4029            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4030            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4031
4032            let stub = self.0.stub.clone();
4033            let mut options = self.0.options.clone();
4034            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4035            let query = move |name| {
4036                let stub = stub.clone();
4037                let options = options.clone();
4038                async {
4039                    let op = GetOperation::new(stub)
4040                        .set_name(name)
4041                        .with_options(options)
4042                        .send()
4043                        .await?;
4044                    Ok(Operation::new(op))
4045                }
4046            };
4047
4048            let start = move || async {
4049                let op = self.send().await?;
4050                Ok(Operation::new(op))
4051            };
4052
4053            google_cloud_lro::internal::new_poller(
4054                polling_error_policy,
4055                polling_backoff_policy,
4056                start,
4057                query,
4058            )
4059        }
4060
4061        /// Sets the value of [name][crate::model::StopReplicationRequest::name].
4062        ///
4063        /// This is a **required** field for requests.
4064        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4065            self.0.request.name = v.into();
4066            self
4067        }
4068
4069        /// Sets the value of [force][crate::model::StopReplicationRequest::force].
4070        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
4071            self.0.request.force = v.into();
4072            self
4073        }
4074    }
4075
4076    #[doc(hidden)]
4077    impl crate::RequestBuilder for StopReplication {
4078        fn request_options(&mut self) -> &mut crate::RequestOptions {
4079            &mut self.0.options
4080        }
4081    }
4082
4083    /// The request builder for [NetApp::resume_replication][crate::client::NetApp::resume_replication] calls.
4084    ///
4085    /// # Example
4086    /// ```
4087    /// # use google_cloud_netapp_v1::builder::net_app::ResumeReplication;
4088    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4089    /// use google_cloud_lro::Poller;
4090    ///
4091    /// let builder = prepare_request_builder();
4092    /// let response = builder.poller().until_done().await?;
4093    /// # Ok(()) }
4094    ///
4095    /// fn prepare_request_builder() -> ResumeReplication {
4096    ///   # panic!();
4097    ///   // ... details omitted ...
4098    /// }
4099    /// ```
4100    #[derive(Clone, Debug)]
4101    pub struct ResumeReplication(RequestBuilder<crate::model::ResumeReplicationRequest>);
4102
4103    impl ResumeReplication {
4104        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4105            Self(RequestBuilder::new(stub))
4106        }
4107
4108        /// Sets the full request, replacing any prior values.
4109        pub fn with_request<V: Into<crate::model::ResumeReplicationRequest>>(
4110            mut self,
4111            v: V,
4112        ) -> Self {
4113            self.0.request = v.into();
4114            self
4115        }
4116
4117        /// Sets all the options, replacing any prior values.
4118        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4119            self.0.options = v.into();
4120            self
4121        }
4122
4123        /// Sends the request.
4124        ///
4125        /// # Long running operations
4126        ///
4127        /// This starts, but does not poll, a longrunning operation. More information
4128        /// on [resume_replication][crate::client::NetApp::resume_replication].
4129        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4130            (*self.0.stub)
4131                .resume_replication(self.0.request, self.0.options)
4132                .await
4133                .map(crate::Response::into_body)
4134        }
4135
4136        /// Creates a [Poller][google_cloud_lro::Poller] to work with `resume_replication`.
4137        pub fn poller(
4138            self,
4139        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4140        {
4141            type Operation = google_cloud_lro::internal::Operation<
4142                crate::model::Replication,
4143                crate::model::OperationMetadata,
4144            >;
4145            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4146            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4147
4148            let stub = self.0.stub.clone();
4149            let mut options = self.0.options.clone();
4150            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4151            let query = move |name| {
4152                let stub = stub.clone();
4153                let options = options.clone();
4154                async {
4155                    let op = GetOperation::new(stub)
4156                        .set_name(name)
4157                        .with_options(options)
4158                        .send()
4159                        .await?;
4160                    Ok(Operation::new(op))
4161                }
4162            };
4163
4164            let start = move || async {
4165                let op = self.send().await?;
4166                Ok(Operation::new(op))
4167            };
4168
4169            google_cloud_lro::internal::new_poller(
4170                polling_error_policy,
4171                polling_backoff_policy,
4172                start,
4173                query,
4174            )
4175        }
4176
4177        /// Sets the value of [name][crate::model::ResumeReplicationRequest::name].
4178        ///
4179        /// This is a **required** field for requests.
4180        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4181            self.0.request.name = v.into();
4182            self
4183        }
4184    }
4185
4186    #[doc(hidden)]
4187    impl crate::RequestBuilder for ResumeReplication {
4188        fn request_options(&mut self) -> &mut crate::RequestOptions {
4189            &mut self.0.options
4190        }
4191    }
4192
4193    /// The request builder for [NetApp::reverse_replication_direction][crate::client::NetApp::reverse_replication_direction] calls.
4194    ///
4195    /// # Example
4196    /// ```
4197    /// # use google_cloud_netapp_v1::builder::net_app::ReverseReplicationDirection;
4198    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4199    /// use google_cloud_lro::Poller;
4200    ///
4201    /// let builder = prepare_request_builder();
4202    /// let response = builder.poller().until_done().await?;
4203    /// # Ok(()) }
4204    ///
4205    /// fn prepare_request_builder() -> ReverseReplicationDirection {
4206    ///   # panic!();
4207    ///   // ... details omitted ...
4208    /// }
4209    /// ```
4210    #[derive(Clone, Debug)]
4211    pub struct ReverseReplicationDirection(
4212        RequestBuilder<crate::model::ReverseReplicationDirectionRequest>,
4213    );
4214
4215    impl ReverseReplicationDirection {
4216        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4217            Self(RequestBuilder::new(stub))
4218        }
4219
4220        /// Sets the full request, replacing any prior values.
4221        pub fn with_request<V: Into<crate::model::ReverseReplicationDirectionRequest>>(
4222            mut self,
4223            v: V,
4224        ) -> Self {
4225            self.0.request = v.into();
4226            self
4227        }
4228
4229        /// Sets all the options, replacing any prior values.
4230        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4231            self.0.options = v.into();
4232            self
4233        }
4234
4235        /// Sends the request.
4236        ///
4237        /// # Long running operations
4238        ///
4239        /// This starts, but does not poll, a longrunning operation. More information
4240        /// on [reverse_replication_direction][crate::client::NetApp::reverse_replication_direction].
4241        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4242            (*self.0.stub)
4243                .reverse_replication_direction(self.0.request, self.0.options)
4244                .await
4245                .map(crate::Response::into_body)
4246        }
4247
4248        /// Creates a [Poller][google_cloud_lro::Poller] to work with `reverse_replication_direction`.
4249        pub fn poller(
4250            self,
4251        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4252        {
4253            type Operation = google_cloud_lro::internal::Operation<
4254                crate::model::Replication,
4255                crate::model::OperationMetadata,
4256            >;
4257            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4258            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4259
4260            let stub = self.0.stub.clone();
4261            let mut options = self.0.options.clone();
4262            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4263            let query = move |name| {
4264                let stub = stub.clone();
4265                let options = options.clone();
4266                async {
4267                    let op = GetOperation::new(stub)
4268                        .set_name(name)
4269                        .with_options(options)
4270                        .send()
4271                        .await?;
4272                    Ok(Operation::new(op))
4273                }
4274            };
4275
4276            let start = move || async {
4277                let op = self.send().await?;
4278                Ok(Operation::new(op))
4279            };
4280
4281            google_cloud_lro::internal::new_poller(
4282                polling_error_policy,
4283                polling_backoff_policy,
4284                start,
4285                query,
4286            )
4287        }
4288
4289        /// Sets the value of [name][crate::model::ReverseReplicationDirectionRequest::name].
4290        ///
4291        /// This is a **required** field for requests.
4292        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4293            self.0.request.name = v.into();
4294            self
4295        }
4296    }
4297
4298    #[doc(hidden)]
4299    impl crate::RequestBuilder for ReverseReplicationDirection {
4300        fn request_options(&mut self) -> &mut crate::RequestOptions {
4301            &mut self.0.options
4302        }
4303    }
4304
4305    /// The request builder for [NetApp::establish_peering][crate::client::NetApp::establish_peering] calls.
4306    ///
4307    /// # Example
4308    /// ```
4309    /// # use google_cloud_netapp_v1::builder::net_app::EstablishPeering;
4310    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4311    /// use google_cloud_lro::Poller;
4312    ///
4313    /// let builder = prepare_request_builder();
4314    /// let response = builder.poller().until_done().await?;
4315    /// # Ok(()) }
4316    ///
4317    /// fn prepare_request_builder() -> EstablishPeering {
4318    ///   # panic!();
4319    ///   // ... details omitted ...
4320    /// }
4321    /// ```
4322    #[derive(Clone, Debug)]
4323    pub struct EstablishPeering(RequestBuilder<crate::model::EstablishPeeringRequest>);
4324
4325    impl EstablishPeering {
4326        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4327            Self(RequestBuilder::new(stub))
4328        }
4329
4330        /// Sets the full request, replacing any prior values.
4331        pub fn with_request<V: Into<crate::model::EstablishPeeringRequest>>(
4332            mut self,
4333            v: V,
4334        ) -> Self {
4335            self.0.request = v.into();
4336            self
4337        }
4338
4339        /// Sets all the options, replacing any prior values.
4340        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4341            self.0.options = v.into();
4342            self
4343        }
4344
4345        /// Sends the request.
4346        ///
4347        /// # Long running operations
4348        ///
4349        /// This starts, but does not poll, a longrunning operation. More information
4350        /// on [establish_peering][crate::client::NetApp::establish_peering].
4351        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4352            (*self.0.stub)
4353                .establish_peering(self.0.request, self.0.options)
4354                .await
4355                .map(crate::Response::into_body)
4356        }
4357
4358        /// Creates a [Poller][google_cloud_lro::Poller] to work with `establish_peering`.
4359        pub fn poller(
4360            self,
4361        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4362        {
4363            type Operation = google_cloud_lro::internal::Operation<
4364                crate::model::Replication,
4365                crate::model::OperationMetadata,
4366            >;
4367            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4368            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4369
4370            let stub = self.0.stub.clone();
4371            let mut options = self.0.options.clone();
4372            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4373            let query = move |name| {
4374                let stub = stub.clone();
4375                let options = options.clone();
4376                async {
4377                    let op = GetOperation::new(stub)
4378                        .set_name(name)
4379                        .with_options(options)
4380                        .send()
4381                        .await?;
4382                    Ok(Operation::new(op))
4383                }
4384            };
4385
4386            let start = move || async {
4387                let op = self.send().await?;
4388                Ok(Operation::new(op))
4389            };
4390
4391            google_cloud_lro::internal::new_poller(
4392                polling_error_policy,
4393                polling_backoff_policy,
4394                start,
4395                query,
4396            )
4397        }
4398
4399        /// Sets the value of [name][crate::model::EstablishPeeringRequest::name].
4400        ///
4401        /// This is a **required** field for requests.
4402        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4403            self.0.request.name = v.into();
4404            self
4405        }
4406
4407        /// Sets the value of [peer_cluster_name][crate::model::EstablishPeeringRequest::peer_cluster_name].
4408        ///
4409        /// This is a **required** field for requests.
4410        pub fn set_peer_cluster_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4411            self.0.request.peer_cluster_name = v.into();
4412            self
4413        }
4414
4415        /// Sets the value of [peer_svm_name][crate::model::EstablishPeeringRequest::peer_svm_name].
4416        ///
4417        /// This is a **required** field for requests.
4418        pub fn set_peer_svm_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4419            self.0.request.peer_svm_name = v.into();
4420            self
4421        }
4422
4423        /// Sets the value of [peer_ip_addresses][crate::model::EstablishPeeringRequest::peer_ip_addresses].
4424        pub fn set_peer_ip_addresses<T, V>(mut self, v: T) -> Self
4425        where
4426            T: std::iter::IntoIterator<Item = V>,
4427            V: std::convert::Into<std::string::String>,
4428        {
4429            use std::iter::Iterator;
4430            self.0.request.peer_ip_addresses = v.into_iter().map(|i| i.into()).collect();
4431            self
4432        }
4433
4434        /// Sets the value of [peer_volume_name][crate::model::EstablishPeeringRequest::peer_volume_name].
4435        ///
4436        /// This is a **required** field for requests.
4437        pub fn set_peer_volume_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4438            self.0.request.peer_volume_name = v.into();
4439            self
4440        }
4441    }
4442
4443    #[doc(hidden)]
4444    impl crate::RequestBuilder for EstablishPeering {
4445        fn request_options(&mut self) -> &mut crate::RequestOptions {
4446            &mut self.0.options
4447        }
4448    }
4449
4450    /// The request builder for [NetApp::sync_replication][crate::client::NetApp::sync_replication] calls.
4451    ///
4452    /// # Example
4453    /// ```
4454    /// # use google_cloud_netapp_v1::builder::net_app::SyncReplication;
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() -> SyncReplication {
4463    ///   # panic!();
4464    ///   // ... details omitted ...
4465    /// }
4466    /// ```
4467    #[derive(Clone, Debug)]
4468    pub struct SyncReplication(RequestBuilder<crate::model::SyncReplicationRequest>);
4469
4470    impl SyncReplication {
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::SyncReplicationRequest>>(mut self, v: V) -> Self {
4477            self.0.request = v.into();
4478            self
4479        }
4480
4481        /// Sets all the options, replacing any prior values.
4482        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4483            self.0.options = v.into();
4484            self
4485        }
4486
4487        /// Sends the request.
4488        ///
4489        /// # Long running operations
4490        ///
4491        /// This starts, but does not poll, a longrunning operation. More information
4492        /// on [sync_replication][crate::client::NetApp::sync_replication].
4493        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4494            (*self.0.stub)
4495                .sync_replication(self.0.request, self.0.options)
4496                .await
4497                .map(crate::Response::into_body)
4498        }
4499
4500        /// Creates a [Poller][google_cloud_lro::Poller] to work with `sync_replication`.
4501        pub fn poller(
4502            self,
4503        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4504        {
4505            type Operation = google_cloud_lro::internal::Operation<
4506                crate::model::Replication,
4507                crate::model::OperationMetadata,
4508            >;
4509            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4510            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4511
4512            let stub = self.0.stub.clone();
4513            let mut options = self.0.options.clone();
4514            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4515            let query = move |name| {
4516                let stub = stub.clone();
4517                let options = options.clone();
4518                async {
4519                    let op = GetOperation::new(stub)
4520                        .set_name(name)
4521                        .with_options(options)
4522                        .send()
4523                        .await?;
4524                    Ok(Operation::new(op))
4525                }
4526            };
4527
4528            let start = move || async {
4529                let op = self.send().await?;
4530                Ok(Operation::new(op))
4531            };
4532
4533            google_cloud_lro::internal::new_poller(
4534                polling_error_policy,
4535                polling_backoff_policy,
4536                start,
4537                query,
4538            )
4539        }
4540
4541        /// Sets the value of [name][crate::model::SyncReplicationRequest::name].
4542        ///
4543        /// This is a **required** field for requests.
4544        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4545            self.0.request.name = v.into();
4546            self
4547        }
4548    }
4549
4550    #[doc(hidden)]
4551    impl crate::RequestBuilder for SyncReplication {
4552        fn request_options(&mut self) -> &mut crate::RequestOptions {
4553            &mut self.0.options
4554        }
4555    }
4556
4557    /// The request builder for [NetApp::create_backup_vault][crate::client::NetApp::create_backup_vault] calls.
4558    ///
4559    /// # Example
4560    /// ```
4561    /// # use google_cloud_netapp_v1::builder::net_app::CreateBackupVault;
4562    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4563    /// use google_cloud_lro::Poller;
4564    ///
4565    /// let builder = prepare_request_builder();
4566    /// let response = builder.poller().until_done().await?;
4567    /// # Ok(()) }
4568    ///
4569    /// fn prepare_request_builder() -> CreateBackupVault {
4570    ///   # panic!();
4571    ///   // ... details omitted ...
4572    /// }
4573    /// ```
4574    #[derive(Clone, Debug)]
4575    pub struct CreateBackupVault(RequestBuilder<crate::model::CreateBackupVaultRequest>);
4576
4577    impl CreateBackupVault {
4578        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4579            Self(RequestBuilder::new(stub))
4580        }
4581
4582        /// Sets the full request, replacing any prior values.
4583        pub fn with_request<V: Into<crate::model::CreateBackupVaultRequest>>(
4584            mut self,
4585            v: V,
4586        ) -> Self {
4587            self.0.request = v.into();
4588            self
4589        }
4590
4591        /// Sets all the options, replacing any prior values.
4592        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4593            self.0.options = v.into();
4594            self
4595        }
4596
4597        /// Sends the request.
4598        ///
4599        /// # Long running operations
4600        ///
4601        /// This starts, but does not poll, a longrunning operation. More information
4602        /// on [create_backup_vault][crate::client::NetApp::create_backup_vault].
4603        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4604            (*self.0.stub)
4605                .create_backup_vault(self.0.request, self.0.options)
4606                .await
4607                .map(crate::Response::into_body)
4608        }
4609
4610        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_backup_vault`.
4611        pub fn poller(
4612            self,
4613        ) -> impl google_cloud_lro::Poller<crate::model::BackupVault, crate::model::OperationMetadata>
4614        {
4615            type Operation = google_cloud_lro::internal::Operation<
4616                crate::model::BackupVault,
4617                crate::model::OperationMetadata,
4618            >;
4619            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4620            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4621
4622            let stub = self.0.stub.clone();
4623            let mut options = self.0.options.clone();
4624            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4625            let query = move |name| {
4626                let stub = stub.clone();
4627                let options = options.clone();
4628                async {
4629                    let op = GetOperation::new(stub)
4630                        .set_name(name)
4631                        .with_options(options)
4632                        .send()
4633                        .await?;
4634                    Ok(Operation::new(op))
4635                }
4636            };
4637
4638            let start = move || async {
4639                let op = self.send().await?;
4640                Ok(Operation::new(op))
4641            };
4642
4643            google_cloud_lro::internal::new_poller(
4644                polling_error_policy,
4645                polling_backoff_policy,
4646                start,
4647                query,
4648            )
4649        }
4650
4651        /// Sets the value of [parent][crate::model::CreateBackupVaultRequest::parent].
4652        ///
4653        /// This is a **required** field for requests.
4654        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4655            self.0.request.parent = v.into();
4656            self
4657        }
4658
4659        /// Sets the value of [backup_vault_id][crate::model::CreateBackupVaultRequest::backup_vault_id].
4660        ///
4661        /// This is a **required** field for requests.
4662        pub fn set_backup_vault_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4663            self.0.request.backup_vault_id = v.into();
4664            self
4665        }
4666
4667        /// Sets the value of [backup_vault][crate::model::CreateBackupVaultRequest::backup_vault].
4668        ///
4669        /// This is a **required** field for requests.
4670        pub fn set_backup_vault<T>(mut self, v: T) -> Self
4671        where
4672            T: std::convert::Into<crate::model::BackupVault>,
4673        {
4674            self.0.request.backup_vault = std::option::Option::Some(v.into());
4675            self
4676        }
4677
4678        /// Sets or clears the value of [backup_vault][crate::model::CreateBackupVaultRequest::backup_vault].
4679        ///
4680        /// This is a **required** field for requests.
4681        pub fn set_or_clear_backup_vault<T>(mut self, v: std::option::Option<T>) -> Self
4682        where
4683            T: std::convert::Into<crate::model::BackupVault>,
4684        {
4685            self.0.request.backup_vault = v.map(|x| x.into());
4686            self
4687        }
4688    }
4689
4690    #[doc(hidden)]
4691    impl crate::RequestBuilder for CreateBackupVault {
4692        fn request_options(&mut self) -> &mut crate::RequestOptions {
4693            &mut self.0.options
4694        }
4695    }
4696
4697    /// The request builder for [NetApp::get_backup_vault][crate::client::NetApp::get_backup_vault] calls.
4698    ///
4699    /// # Example
4700    /// ```
4701    /// # use google_cloud_netapp_v1::builder::net_app::GetBackupVault;
4702    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4703    ///
4704    /// let builder = prepare_request_builder();
4705    /// let response = builder.send().await?;
4706    /// # Ok(()) }
4707    ///
4708    /// fn prepare_request_builder() -> GetBackupVault {
4709    ///   # panic!();
4710    ///   // ... details omitted ...
4711    /// }
4712    /// ```
4713    #[derive(Clone, Debug)]
4714    pub struct GetBackupVault(RequestBuilder<crate::model::GetBackupVaultRequest>);
4715
4716    impl GetBackupVault {
4717        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4718            Self(RequestBuilder::new(stub))
4719        }
4720
4721        /// Sets the full request, replacing any prior values.
4722        pub fn with_request<V: Into<crate::model::GetBackupVaultRequest>>(mut self, v: V) -> Self {
4723            self.0.request = v.into();
4724            self
4725        }
4726
4727        /// Sets all the options, replacing any prior values.
4728        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4729            self.0.options = v.into();
4730            self
4731        }
4732
4733        /// Sends the request.
4734        pub async fn send(self) -> Result<crate::model::BackupVault> {
4735            (*self.0.stub)
4736                .get_backup_vault(self.0.request, self.0.options)
4737                .await
4738                .map(crate::Response::into_body)
4739        }
4740
4741        /// Sets the value of [name][crate::model::GetBackupVaultRequest::name].
4742        ///
4743        /// This is a **required** field for requests.
4744        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4745            self.0.request.name = v.into();
4746            self
4747        }
4748    }
4749
4750    #[doc(hidden)]
4751    impl crate::RequestBuilder for GetBackupVault {
4752        fn request_options(&mut self) -> &mut crate::RequestOptions {
4753            &mut self.0.options
4754        }
4755    }
4756
4757    /// The request builder for [NetApp::list_backup_vaults][crate::client::NetApp::list_backup_vaults] calls.
4758    ///
4759    /// # Example
4760    /// ```
4761    /// # use google_cloud_netapp_v1::builder::net_app::ListBackupVaults;
4762    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4763    /// use google_cloud_gax::paginator::ItemPaginator;
4764    ///
4765    /// let builder = prepare_request_builder();
4766    /// let mut items = builder.by_item();
4767    /// while let Some(result) = items.next().await {
4768    ///   let item = result?;
4769    /// }
4770    /// # Ok(()) }
4771    ///
4772    /// fn prepare_request_builder() -> ListBackupVaults {
4773    ///   # panic!();
4774    ///   // ... details omitted ...
4775    /// }
4776    /// ```
4777    #[derive(Clone, Debug)]
4778    pub struct ListBackupVaults(RequestBuilder<crate::model::ListBackupVaultsRequest>);
4779
4780    impl ListBackupVaults {
4781        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4782            Self(RequestBuilder::new(stub))
4783        }
4784
4785        /// Sets the full request, replacing any prior values.
4786        pub fn with_request<V: Into<crate::model::ListBackupVaultsRequest>>(
4787            mut self,
4788            v: V,
4789        ) -> Self {
4790            self.0.request = v.into();
4791            self
4792        }
4793
4794        /// Sets all the options, replacing any prior values.
4795        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4796            self.0.options = v.into();
4797            self
4798        }
4799
4800        /// Sends the request.
4801        pub async fn send(self) -> Result<crate::model::ListBackupVaultsResponse> {
4802            (*self.0.stub)
4803                .list_backup_vaults(self.0.request, self.0.options)
4804                .await
4805                .map(crate::Response::into_body)
4806        }
4807
4808        /// Streams each page in the collection.
4809        pub fn by_page(
4810            self,
4811        ) -> impl google_cloud_gax::paginator::Paginator<
4812            crate::model::ListBackupVaultsResponse,
4813            crate::Error,
4814        > {
4815            use std::clone::Clone;
4816            let token = self.0.request.page_token.clone();
4817            let execute = move |token: String| {
4818                let mut builder = self.clone();
4819                builder.0.request = builder.0.request.set_page_token(token);
4820                builder.send()
4821            };
4822            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4823        }
4824
4825        /// Streams each item in the collection.
4826        pub fn by_item(
4827            self,
4828        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4829            crate::model::ListBackupVaultsResponse,
4830            crate::Error,
4831        > {
4832            use google_cloud_gax::paginator::Paginator;
4833            self.by_page().items()
4834        }
4835
4836        /// Sets the value of [parent][crate::model::ListBackupVaultsRequest::parent].
4837        ///
4838        /// This is a **required** field for requests.
4839        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4840            self.0.request.parent = v.into();
4841            self
4842        }
4843
4844        /// Sets the value of [page_size][crate::model::ListBackupVaultsRequest::page_size].
4845        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4846            self.0.request.page_size = v.into();
4847            self
4848        }
4849
4850        /// Sets the value of [page_token][crate::model::ListBackupVaultsRequest::page_token].
4851        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4852            self.0.request.page_token = v.into();
4853            self
4854        }
4855
4856        /// Sets the value of [order_by][crate::model::ListBackupVaultsRequest::order_by].
4857        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4858            self.0.request.order_by = v.into();
4859            self
4860        }
4861
4862        /// Sets the value of [filter][crate::model::ListBackupVaultsRequest::filter].
4863        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4864            self.0.request.filter = v.into();
4865            self
4866        }
4867    }
4868
4869    #[doc(hidden)]
4870    impl crate::RequestBuilder for ListBackupVaults {
4871        fn request_options(&mut self) -> &mut crate::RequestOptions {
4872            &mut self.0.options
4873        }
4874    }
4875
4876    /// The request builder for [NetApp::update_backup_vault][crate::client::NetApp::update_backup_vault] calls.
4877    ///
4878    /// # Example
4879    /// ```
4880    /// # use google_cloud_netapp_v1::builder::net_app::UpdateBackupVault;
4881    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4882    /// use google_cloud_lro::Poller;
4883    ///
4884    /// let builder = prepare_request_builder();
4885    /// let response = builder.poller().until_done().await?;
4886    /// # Ok(()) }
4887    ///
4888    /// fn prepare_request_builder() -> UpdateBackupVault {
4889    ///   # panic!();
4890    ///   // ... details omitted ...
4891    /// }
4892    /// ```
4893    #[derive(Clone, Debug)]
4894    pub struct UpdateBackupVault(RequestBuilder<crate::model::UpdateBackupVaultRequest>);
4895
4896    impl UpdateBackupVault {
4897        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4898            Self(RequestBuilder::new(stub))
4899        }
4900
4901        /// Sets the full request, replacing any prior values.
4902        pub fn with_request<V: Into<crate::model::UpdateBackupVaultRequest>>(
4903            mut self,
4904            v: V,
4905        ) -> Self {
4906            self.0.request = v.into();
4907            self
4908        }
4909
4910        /// Sets all the options, replacing any prior values.
4911        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4912            self.0.options = v.into();
4913            self
4914        }
4915
4916        /// Sends the request.
4917        ///
4918        /// # Long running operations
4919        ///
4920        /// This starts, but does not poll, a longrunning operation. More information
4921        /// on [update_backup_vault][crate::client::NetApp::update_backup_vault].
4922        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4923            (*self.0.stub)
4924                .update_backup_vault(self.0.request, self.0.options)
4925                .await
4926                .map(crate::Response::into_body)
4927        }
4928
4929        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_backup_vault`.
4930        pub fn poller(
4931            self,
4932        ) -> impl google_cloud_lro::Poller<crate::model::BackupVault, crate::model::OperationMetadata>
4933        {
4934            type Operation = google_cloud_lro::internal::Operation<
4935                crate::model::BackupVault,
4936                crate::model::OperationMetadata,
4937            >;
4938            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4939            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4940
4941            let stub = self.0.stub.clone();
4942            let mut options = self.0.options.clone();
4943            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4944            let query = move |name| {
4945                let stub = stub.clone();
4946                let options = options.clone();
4947                async {
4948                    let op = GetOperation::new(stub)
4949                        .set_name(name)
4950                        .with_options(options)
4951                        .send()
4952                        .await?;
4953                    Ok(Operation::new(op))
4954                }
4955            };
4956
4957            let start = move || async {
4958                let op = self.send().await?;
4959                Ok(Operation::new(op))
4960            };
4961
4962            google_cloud_lro::internal::new_poller(
4963                polling_error_policy,
4964                polling_backoff_policy,
4965                start,
4966                query,
4967            )
4968        }
4969
4970        /// Sets the value of [update_mask][crate::model::UpdateBackupVaultRequest::update_mask].
4971        ///
4972        /// This is a **required** field for requests.
4973        pub fn set_update_mask<T>(mut self, v: T) -> Self
4974        where
4975            T: std::convert::Into<wkt::FieldMask>,
4976        {
4977            self.0.request.update_mask = std::option::Option::Some(v.into());
4978            self
4979        }
4980
4981        /// Sets or clears the value of [update_mask][crate::model::UpdateBackupVaultRequest::update_mask].
4982        ///
4983        /// This is a **required** field for requests.
4984        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4985        where
4986            T: std::convert::Into<wkt::FieldMask>,
4987        {
4988            self.0.request.update_mask = v.map(|x| x.into());
4989            self
4990        }
4991
4992        /// Sets the value of [backup_vault][crate::model::UpdateBackupVaultRequest::backup_vault].
4993        ///
4994        /// This is a **required** field for requests.
4995        pub fn set_backup_vault<T>(mut self, v: T) -> Self
4996        where
4997            T: std::convert::Into<crate::model::BackupVault>,
4998        {
4999            self.0.request.backup_vault = std::option::Option::Some(v.into());
5000            self
5001        }
5002
5003        /// Sets or clears the value of [backup_vault][crate::model::UpdateBackupVaultRequest::backup_vault].
5004        ///
5005        /// This is a **required** field for requests.
5006        pub fn set_or_clear_backup_vault<T>(mut self, v: std::option::Option<T>) -> Self
5007        where
5008            T: std::convert::Into<crate::model::BackupVault>,
5009        {
5010            self.0.request.backup_vault = v.map(|x| x.into());
5011            self
5012        }
5013    }
5014
5015    #[doc(hidden)]
5016    impl crate::RequestBuilder for UpdateBackupVault {
5017        fn request_options(&mut self) -> &mut crate::RequestOptions {
5018            &mut self.0.options
5019        }
5020    }
5021
5022    /// The request builder for [NetApp::delete_backup_vault][crate::client::NetApp::delete_backup_vault] calls.
5023    ///
5024    /// # Example
5025    /// ```
5026    /// # use google_cloud_netapp_v1::builder::net_app::DeleteBackupVault;
5027    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5028    /// use google_cloud_lro::Poller;
5029    ///
5030    /// let builder = prepare_request_builder();
5031    /// let response = builder.poller().until_done().await?;
5032    /// # Ok(()) }
5033    ///
5034    /// fn prepare_request_builder() -> DeleteBackupVault {
5035    ///   # panic!();
5036    ///   // ... details omitted ...
5037    /// }
5038    /// ```
5039    #[derive(Clone, Debug)]
5040    pub struct DeleteBackupVault(RequestBuilder<crate::model::DeleteBackupVaultRequest>);
5041
5042    impl DeleteBackupVault {
5043        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5044            Self(RequestBuilder::new(stub))
5045        }
5046
5047        /// Sets the full request, replacing any prior values.
5048        pub fn with_request<V: Into<crate::model::DeleteBackupVaultRequest>>(
5049            mut self,
5050            v: V,
5051        ) -> Self {
5052            self.0.request = v.into();
5053            self
5054        }
5055
5056        /// Sets all the options, replacing any prior values.
5057        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5058            self.0.options = v.into();
5059            self
5060        }
5061
5062        /// Sends the request.
5063        ///
5064        /// # Long running operations
5065        ///
5066        /// This starts, but does not poll, a longrunning operation. More information
5067        /// on [delete_backup_vault][crate::client::NetApp::delete_backup_vault].
5068        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5069            (*self.0.stub)
5070                .delete_backup_vault(self.0.request, self.0.options)
5071                .await
5072                .map(crate::Response::into_body)
5073        }
5074
5075        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_backup_vault`.
5076        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5077            type Operation =
5078                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5079            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5080            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5081
5082            let stub = self.0.stub.clone();
5083            let mut options = self.0.options.clone();
5084            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5085            let query = move |name| {
5086                let stub = stub.clone();
5087                let options = options.clone();
5088                async {
5089                    let op = GetOperation::new(stub)
5090                        .set_name(name)
5091                        .with_options(options)
5092                        .send()
5093                        .await?;
5094                    Ok(Operation::new(op))
5095                }
5096            };
5097
5098            let start = move || async {
5099                let op = self.send().await?;
5100                Ok(Operation::new(op))
5101            };
5102
5103            google_cloud_lro::internal::new_unit_response_poller(
5104                polling_error_policy,
5105                polling_backoff_policy,
5106                start,
5107                query,
5108            )
5109        }
5110
5111        /// Sets the value of [name][crate::model::DeleteBackupVaultRequest::name].
5112        ///
5113        /// This is a **required** field for requests.
5114        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5115            self.0.request.name = v.into();
5116            self
5117        }
5118    }
5119
5120    #[doc(hidden)]
5121    impl crate::RequestBuilder for DeleteBackupVault {
5122        fn request_options(&mut self) -> &mut crate::RequestOptions {
5123            &mut self.0.options
5124        }
5125    }
5126
5127    /// The request builder for [NetApp::create_backup][crate::client::NetApp::create_backup] calls.
5128    ///
5129    /// # Example
5130    /// ```
5131    /// # use google_cloud_netapp_v1::builder::net_app::CreateBackup;
5132    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5133    /// use google_cloud_lro::Poller;
5134    ///
5135    /// let builder = prepare_request_builder();
5136    /// let response = builder.poller().until_done().await?;
5137    /// # Ok(()) }
5138    ///
5139    /// fn prepare_request_builder() -> CreateBackup {
5140    ///   # panic!();
5141    ///   // ... details omitted ...
5142    /// }
5143    /// ```
5144    #[derive(Clone, Debug)]
5145    pub struct CreateBackup(RequestBuilder<crate::model::CreateBackupRequest>);
5146
5147    impl CreateBackup {
5148        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5149            Self(RequestBuilder::new(stub))
5150        }
5151
5152        /// Sets the full request, replacing any prior values.
5153        pub fn with_request<V: Into<crate::model::CreateBackupRequest>>(mut self, v: V) -> Self {
5154            self.0.request = v.into();
5155            self
5156        }
5157
5158        /// Sets all the options, replacing any prior values.
5159        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5160            self.0.options = v.into();
5161            self
5162        }
5163
5164        /// Sends the request.
5165        ///
5166        /// # Long running operations
5167        ///
5168        /// This starts, but does not poll, a longrunning operation. More information
5169        /// on [create_backup][crate::client::NetApp::create_backup].
5170        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5171            (*self.0.stub)
5172                .create_backup(self.0.request, self.0.options)
5173                .await
5174                .map(crate::Response::into_body)
5175        }
5176
5177        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_backup`.
5178        pub fn poller(
5179            self,
5180        ) -> impl google_cloud_lro::Poller<crate::model::Backup, crate::model::OperationMetadata>
5181        {
5182            type Operation = google_cloud_lro::internal::Operation<
5183                crate::model::Backup,
5184                crate::model::OperationMetadata,
5185            >;
5186            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5187            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5188
5189            let stub = self.0.stub.clone();
5190            let mut options = self.0.options.clone();
5191            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5192            let query = move |name| {
5193                let stub = stub.clone();
5194                let options = options.clone();
5195                async {
5196                    let op = GetOperation::new(stub)
5197                        .set_name(name)
5198                        .with_options(options)
5199                        .send()
5200                        .await?;
5201                    Ok(Operation::new(op))
5202                }
5203            };
5204
5205            let start = move || async {
5206                let op = self.send().await?;
5207                Ok(Operation::new(op))
5208            };
5209
5210            google_cloud_lro::internal::new_poller(
5211                polling_error_policy,
5212                polling_backoff_policy,
5213                start,
5214                query,
5215            )
5216        }
5217
5218        /// Sets the value of [parent][crate::model::CreateBackupRequest::parent].
5219        ///
5220        /// This is a **required** field for requests.
5221        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5222            self.0.request.parent = v.into();
5223            self
5224        }
5225
5226        /// Sets the value of [backup_id][crate::model::CreateBackupRequest::backup_id].
5227        ///
5228        /// This is a **required** field for requests.
5229        pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5230            self.0.request.backup_id = v.into();
5231            self
5232        }
5233
5234        /// Sets the value of [backup][crate::model::CreateBackupRequest::backup].
5235        ///
5236        /// This is a **required** field for requests.
5237        pub fn set_backup<T>(mut self, v: T) -> Self
5238        where
5239            T: std::convert::Into<crate::model::Backup>,
5240        {
5241            self.0.request.backup = std::option::Option::Some(v.into());
5242            self
5243        }
5244
5245        /// Sets or clears the value of [backup][crate::model::CreateBackupRequest::backup].
5246        ///
5247        /// This is a **required** field for requests.
5248        pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5249        where
5250            T: std::convert::Into<crate::model::Backup>,
5251        {
5252            self.0.request.backup = v.map(|x| x.into());
5253            self
5254        }
5255    }
5256
5257    #[doc(hidden)]
5258    impl crate::RequestBuilder for CreateBackup {
5259        fn request_options(&mut self) -> &mut crate::RequestOptions {
5260            &mut self.0.options
5261        }
5262    }
5263
5264    /// The request builder for [NetApp::get_backup][crate::client::NetApp::get_backup] calls.
5265    ///
5266    /// # Example
5267    /// ```
5268    /// # use google_cloud_netapp_v1::builder::net_app::GetBackup;
5269    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5270    ///
5271    /// let builder = prepare_request_builder();
5272    /// let response = builder.send().await?;
5273    /// # Ok(()) }
5274    ///
5275    /// fn prepare_request_builder() -> GetBackup {
5276    ///   # panic!();
5277    ///   // ... details omitted ...
5278    /// }
5279    /// ```
5280    #[derive(Clone, Debug)]
5281    pub struct GetBackup(RequestBuilder<crate::model::GetBackupRequest>);
5282
5283    impl GetBackup {
5284        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5285            Self(RequestBuilder::new(stub))
5286        }
5287
5288        /// Sets the full request, replacing any prior values.
5289        pub fn with_request<V: Into<crate::model::GetBackupRequest>>(mut self, v: V) -> Self {
5290            self.0.request = v.into();
5291            self
5292        }
5293
5294        /// Sets all the options, replacing any prior values.
5295        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5296            self.0.options = v.into();
5297            self
5298        }
5299
5300        /// Sends the request.
5301        pub async fn send(self) -> Result<crate::model::Backup> {
5302            (*self.0.stub)
5303                .get_backup(self.0.request, self.0.options)
5304                .await
5305                .map(crate::Response::into_body)
5306        }
5307
5308        /// Sets the value of [name][crate::model::GetBackupRequest::name].
5309        ///
5310        /// This is a **required** field for requests.
5311        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5312            self.0.request.name = v.into();
5313            self
5314        }
5315    }
5316
5317    #[doc(hidden)]
5318    impl crate::RequestBuilder for GetBackup {
5319        fn request_options(&mut self) -> &mut crate::RequestOptions {
5320            &mut self.0.options
5321        }
5322    }
5323
5324    /// The request builder for [NetApp::list_backups][crate::client::NetApp::list_backups] calls.
5325    ///
5326    /// # Example
5327    /// ```
5328    /// # use google_cloud_netapp_v1::builder::net_app::ListBackups;
5329    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5330    /// use google_cloud_gax::paginator::ItemPaginator;
5331    ///
5332    /// let builder = prepare_request_builder();
5333    /// let mut items = builder.by_item();
5334    /// while let Some(result) = items.next().await {
5335    ///   let item = result?;
5336    /// }
5337    /// # Ok(()) }
5338    ///
5339    /// fn prepare_request_builder() -> ListBackups {
5340    ///   # panic!();
5341    ///   // ... details omitted ...
5342    /// }
5343    /// ```
5344    #[derive(Clone, Debug)]
5345    pub struct ListBackups(RequestBuilder<crate::model::ListBackupsRequest>);
5346
5347    impl ListBackups {
5348        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5349            Self(RequestBuilder::new(stub))
5350        }
5351
5352        /// Sets the full request, replacing any prior values.
5353        pub fn with_request<V: Into<crate::model::ListBackupsRequest>>(mut self, v: V) -> Self {
5354            self.0.request = v.into();
5355            self
5356        }
5357
5358        /// Sets all the options, replacing any prior values.
5359        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5360            self.0.options = v.into();
5361            self
5362        }
5363
5364        /// Sends the request.
5365        pub async fn send(self) -> Result<crate::model::ListBackupsResponse> {
5366            (*self.0.stub)
5367                .list_backups(self.0.request, self.0.options)
5368                .await
5369                .map(crate::Response::into_body)
5370        }
5371
5372        /// Streams each page in the collection.
5373        pub fn by_page(
5374            self,
5375        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListBackupsResponse, crate::Error>
5376        {
5377            use std::clone::Clone;
5378            let token = self.0.request.page_token.clone();
5379            let execute = move |token: String| {
5380                let mut builder = self.clone();
5381                builder.0.request = builder.0.request.set_page_token(token);
5382                builder.send()
5383            };
5384            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5385        }
5386
5387        /// Streams each item in the collection.
5388        pub fn by_item(
5389            self,
5390        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5391            crate::model::ListBackupsResponse,
5392            crate::Error,
5393        > {
5394            use google_cloud_gax::paginator::Paginator;
5395            self.by_page().items()
5396        }
5397
5398        /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
5399        ///
5400        /// This is a **required** field for requests.
5401        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5402            self.0.request.parent = v.into();
5403            self
5404        }
5405
5406        /// Sets the value of [page_size][crate::model::ListBackupsRequest::page_size].
5407        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5408            self.0.request.page_size = v.into();
5409            self
5410        }
5411
5412        /// Sets the value of [page_token][crate::model::ListBackupsRequest::page_token].
5413        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5414            self.0.request.page_token = v.into();
5415            self
5416        }
5417
5418        /// Sets the value of [order_by][crate::model::ListBackupsRequest::order_by].
5419        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5420            self.0.request.order_by = v.into();
5421            self
5422        }
5423
5424        /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
5425        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5426            self.0.request.filter = v.into();
5427            self
5428        }
5429    }
5430
5431    #[doc(hidden)]
5432    impl crate::RequestBuilder for ListBackups {
5433        fn request_options(&mut self) -> &mut crate::RequestOptions {
5434            &mut self.0.options
5435        }
5436    }
5437
5438    /// The request builder for [NetApp::delete_backup][crate::client::NetApp::delete_backup] calls.
5439    ///
5440    /// # Example
5441    /// ```
5442    /// # use google_cloud_netapp_v1::builder::net_app::DeleteBackup;
5443    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5444    /// use google_cloud_lro::Poller;
5445    ///
5446    /// let builder = prepare_request_builder();
5447    /// let response = builder.poller().until_done().await?;
5448    /// # Ok(()) }
5449    ///
5450    /// fn prepare_request_builder() -> DeleteBackup {
5451    ///   # panic!();
5452    ///   // ... details omitted ...
5453    /// }
5454    /// ```
5455    #[derive(Clone, Debug)]
5456    pub struct DeleteBackup(RequestBuilder<crate::model::DeleteBackupRequest>);
5457
5458    impl DeleteBackup {
5459        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5460            Self(RequestBuilder::new(stub))
5461        }
5462
5463        /// Sets the full request, replacing any prior values.
5464        pub fn with_request<V: Into<crate::model::DeleteBackupRequest>>(mut self, v: V) -> Self {
5465            self.0.request = v.into();
5466            self
5467        }
5468
5469        /// Sets all the options, replacing any prior values.
5470        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5471            self.0.options = v.into();
5472            self
5473        }
5474
5475        /// Sends the request.
5476        ///
5477        /// # Long running operations
5478        ///
5479        /// This starts, but does not poll, a longrunning operation. More information
5480        /// on [delete_backup][crate::client::NetApp::delete_backup].
5481        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5482            (*self.0.stub)
5483                .delete_backup(self.0.request, self.0.options)
5484                .await
5485                .map(crate::Response::into_body)
5486        }
5487
5488        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_backup`.
5489        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5490            type Operation =
5491                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5492            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5493            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5494
5495            let stub = self.0.stub.clone();
5496            let mut options = self.0.options.clone();
5497            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5498            let query = move |name| {
5499                let stub = stub.clone();
5500                let options = options.clone();
5501                async {
5502                    let op = GetOperation::new(stub)
5503                        .set_name(name)
5504                        .with_options(options)
5505                        .send()
5506                        .await?;
5507                    Ok(Operation::new(op))
5508                }
5509            };
5510
5511            let start = move || async {
5512                let op = self.send().await?;
5513                Ok(Operation::new(op))
5514            };
5515
5516            google_cloud_lro::internal::new_unit_response_poller(
5517                polling_error_policy,
5518                polling_backoff_policy,
5519                start,
5520                query,
5521            )
5522        }
5523
5524        /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
5525        ///
5526        /// This is a **required** field for requests.
5527        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5528            self.0.request.name = v.into();
5529            self
5530        }
5531    }
5532
5533    #[doc(hidden)]
5534    impl crate::RequestBuilder for DeleteBackup {
5535        fn request_options(&mut self) -> &mut crate::RequestOptions {
5536            &mut self.0.options
5537        }
5538    }
5539
5540    /// The request builder for [NetApp::update_backup][crate::client::NetApp::update_backup] calls.
5541    ///
5542    /// # Example
5543    /// ```
5544    /// # use google_cloud_netapp_v1::builder::net_app::UpdateBackup;
5545    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5546    /// use google_cloud_lro::Poller;
5547    ///
5548    /// let builder = prepare_request_builder();
5549    /// let response = builder.poller().until_done().await?;
5550    /// # Ok(()) }
5551    ///
5552    /// fn prepare_request_builder() -> UpdateBackup {
5553    ///   # panic!();
5554    ///   // ... details omitted ...
5555    /// }
5556    /// ```
5557    #[derive(Clone, Debug)]
5558    pub struct UpdateBackup(RequestBuilder<crate::model::UpdateBackupRequest>);
5559
5560    impl UpdateBackup {
5561        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5562            Self(RequestBuilder::new(stub))
5563        }
5564
5565        /// Sets the full request, replacing any prior values.
5566        pub fn with_request<V: Into<crate::model::UpdateBackupRequest>>(mut self, v: V) -> Self {
5567            self.0.request = v.into();
5568            self
5569        }
5570
5571        /// Sets all the options, replacing any prior values.
5572        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5573            self.0.options = v.into();
5574            self
5575        }
5576
5577        /// Sends the request.
5578        ///
5579        /// # Long running operations
5580        ///
5581        /// This starts, but does not poll, a longrunning operation. More information
5582        /// on [update_backup][crate::client::NetApp::update_backup].
5583        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5584            (*self.0.stub)
5585                .update_backup(self.0.request, self.0.options)
5586                .await
5587                .map(crate::Response::into_body)
5588        }
5589
5590        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_backup`.
5591        pub fn poller(
5592            self,
5593        ) -> impl google_cloud_lro::Poller<crate::model::Backup, crate::model::OperationMetadata>
5594        {
5595            type Operation = google_cloud_lro::internal::Operation<
5596                crate::model::Backup,
5597                crate::model::OperationMetadata,
5598            >;
5599            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5600            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5601
5602            let stub = self.0.stub.clone();
5603            let mut options = self.0.options.clone();
5604            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5605            let query = move |name| {
5606                let stub = stub.clone();
5607                let options = options.clone();
5608                async {
5609                    let op = GetOperation::new(stub)
5610                        .set_name(name)
5611                        .with_options(options)
5612                        .send()
5613                        .await?;
5614                    Ok(Operation::new(op))
5615                }
5616            };
5617
5618            let start = move || async {
5619                let op = self.send().await?;
5620                Ok(Operation::new(op))
5621            };
5622
5623            google_cloud_lro::internal::new_poller(
5624                polling_error_policy,
5625                polling_backoff_policy,
5626                start,
5627                query,
5628            )
5629        }
5630
5631        /// Sets the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
5632        ///
5633        /// This is a **required** field for requests.
5634        pub fn set_update_mask<T>(mut self, v: T) -> Self
5635        where
5636            T: std::convert::Into<wkt::FieldMask>,
5637        {
5638            self.0.request.update_mask = std::option::Option::Some(v.into());
5639            self
5640        }
5641
5642        /// Sets or clears the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
5643        ///
5644        /// This is a **required** field for requests.
5645        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5646        where
5647            T: std::convert::Into<wkt::FieldMask>,
5648        {
5649            self.0.request.update_mask = v.map(|x| x.into());
5650            self
5651        }
5652
5653        /// Sets the value of [backup][crate::model::UpdateBackupRequest::backup].
5654        ///
5655        /// This is a **required** field for requests.
5656        pub fn set_backup<T>(mut self, v: T) -> Self
5657        where
5658            T: std::convert::Into<crate::model::Backup>,
5659        {
5660            self.0.request.backup = std::option::Option::Some(v.into());
5661            self
5662        }
5663
5664        /// Sets or clears the value of [backup][crate::model::UpdateBackupRequest::backup].
5665        ///
5666        /// This is a **required** field for requests.
5667        pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5668        where
5669            T: std::convert::Into<crate::model::Backup>,
5670        {
5671            self.0.request.backup = v.map(|x| x.into());
5672            self
5673        }
5674    }
5675
5676    #[doc(hidden)]
5677    impl crate::RequestBuilder for UpdateBackup {
5678        fn request_options(&mut self) -> &mut crate::RequestOptions {
5679            &mut self.0.options
5680        }
5681    }
5682
5683    /// The request builder for [NetApp::create_backup_policy][crate::client::NetApp::create_backup_policy] calls.
5684    ///
5685    /// # Example
5686    /// ```
5687    /// # use google_cloud_netapp_v1::builder::net_app::CreateBackupPolicy;
5688    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5689    /// use google_cloud_lro::Poller;
5690    ///
5691    /// let builder = prepare_request_builder();
5692    /// let response = builder.poller().until_done().await?;
5693    /// # Ok(()) }
5694    ///
5695    /// fn prepare_request_builder() -> CreateBackupPolicy {
5696    ///   # panic!();
5697    ///   // ... details omitted ...
5698    /// }
5699    /// ```
5700    #[derive(Clone, Debug)]
5701    pub struct CreateBackupPolicy(RequestBuilder<crate::model::CreateBackupPolicyRequest>);
5702
5703    impl CreateBackupPolicy {
5704        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5705            Self(RequestBuilder::new(stub))
5706        }
5707
5708        /// Sets the full request, replacing any prior values.
5709        pub fn with_request<V: Into<crate::model::CreateBackupPolicyRequest>>(
5710            mut self,
5711            v: V,
5712        ) -> Self {
5713            self.0.request = v.into();
5714            self
5715        }
5716
5717        /// Sets all the options, replacing any prior values.
5718        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5719            self.0.options = v.into();
5720            self
5721        }
5722
5723        /// Sends the request.
5724        ///
5725        /// # Long running operations
5726        ///
5727        /// This starts, but does not poll, a longrunning operation. More information
5728        /// on [create_backup_policy][crate::client::NetApp::create_backup_policy].
5729        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5730            (*self.0.stub)
5731                .create_backup_policy(self.0.request, self.0.options)
5732                .await
5733                .map(crate::Response::into_body)
5734        }
5735
5736        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_backup_policy`.
5737        pub fn poller(
5738            self,
5739        ) -> impl google_cloud_lro::Poller<crate::model::BackupPolicy, crate::model::OperationMetadata>
5740        {
5741            type Operation = google_cloud_lro::internal::Operation<
5742                crate::model::BackupPolicy,
5743                crate::model::OperationMetadata,
5744            >;
5745            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5746            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5747
5748            let stub = self.0.stub.clone();
5749            let mut options = self.0.options.clone();
5750            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5751            let query = move |name| {
5752                let stub = stub.clone();
5753                let options = options.clone();
5754                async {
5755                    let op = GetOperation::new(stub)
5756                        .set_name(name)
5757                        .with_options(options)
5758                        .send()
5759                        .await?;
5760                    Ok(Operation::new(op))
5761                }
5762            };
5763
5764            let start = move || async {
5765                let op = self.send().await?;
5766                Ok(Operation::new(op))
5767            };
5768
5769            google_cloud_lro::internal::new_poller(
5770                polling_error_policy,
5771                polling_backoff_policy,
5772                start,
5773                query,
5774            )
5775        }
5776
5777        /// Sets the value of [parent][crate::model::CreateBackupPolicyRequest::parent].
5778        ///
5779        /// This is a **required** field for requests.
5780        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5781            self.0.request.parent = v.into();
5782            self
5783        }
5784
5785        /// Sets the value of [backup_policy][crate::model::CreateBackupPolicyRequest::backup_policy].
5786        ///
5787        /// This is a **required** field for requests.
5788        pub fn set_backup_policy<T>(mut self, v: T) -> Self
5789        where
5790            T: std::convert::Into<crate::model::BackupPolicy>,
5791        {
5792            self.0.request.backup_policy = std::option::Option::Some(v.into());
5793            self
5794        }
5795
5796        /// Sets or clears the value of [backup_policy][crate::model::CreateBackupPolicyRequest::backup_policy].
5797        ///
5798        /// This is a **required** field for requests.
5799        pub fn set_or_clear_backup_policy<T>(mut self, v: std::option::Option<T>) -> Self
5800        where
5801            T: std::convert::Into<crate::model::BackupPolicy>,
5802        {
5803            self.0.request.backup_policy = v.map(|x| x.into());
5804            self
5805        }
5806
5807        /// Sets the value of [backup_policy_id][crate::model::CreateBackupPolicyRequest::backup_policy_id].
5808        ///
5809        /// This is a **required** field for requests.
5810        pub fn set_backup_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5811            self.0.request.backup_policy_id = v.into();
5812            self
5813        }
5814    }
5815
5816    #[doc(hidden)]
5817    impl crate::RequestBuilder for CreateBackupPolicy {
5818        fn request_options(&mut self) -> &mut crate::RequestOptions {
5819            &mut self.0.options
5820        }
5821    }
5822
5823    /// The request builder for [NetApp::get_backup_policy][crate::client::NetApp::get_backup_policy] calls.
5824    ///
5825    /// # Example
5826    /// ```
5827    /// # use google_cloud_netapp_v1::builder::net_app::GetBackupPolicy;
5828    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5829    ///
5830    /// let builder = prepare_request_builder();
5831    /// let response = builder.send().await?;
5832    /// # Ok(()) }
5833    ///
5834    /// fn prepare_request_builder() -> GetBackupPolicy {
5835    ///   # panic!();
5836    ///   // ... details omitted ...
5837    /// }
5838    /// ```
5839    #[derive(Clone, Debug)]
5840    pub struct GetBackupPolicy(RequestBuilder<crate::model::GetBackupPolicyRequest>);
5841
5842    impl GetBackupPolicy {
5843        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5844            Self(RequestBuilder::new(stub))
5845        }
5846
5847        /// Sets the full request, replacing any prior values.
5848        pub fn with_request<V: Into<crate::model::GetBackupPolicyRequest>>(mut self, v: V) -> Self {
5849            self.0.request = v.into();
5850            self
5851        }
5852
5853        /// Sets all the options, replacing any prior values.
5854        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5855            self.0.options = v.into();
5856            self
5857        }
5858
5859        /// Sends the request.
5860        pub async fn send(self) -> Result<crate::model::BackupPolicy> {
5861            (*self.0.stub)
5862                .get_backup_policy(self.0.request, self.0.options)
5863                .await
5864                .map(crate::Response::into_body)
5865        }
5866
5867        /// Sets the value of [name][crate::model::GetBackupPolicyRequest::name].
5868        ///
5869        /// This is a **required** field for requests.
5870        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5871            self.0.request.name = v.into();
5872            self
5873        }
5874    }
5875
5876    #[doc(hidden)]
5877    impl crate::RequestBuilder for GetBackupPolicy {
5878        fn request_options(&mut self) -> &mut crate::RequestOptions {
5879            &mut self.0.options
5880        }
5881    }
5882
5883    /// The request builder for [NetApp::list_backup_policies][crate::client::NetApp::list_backup_policies] calls.
5884    ///
5885    /// # Example
5886    /// ```
5887    /// # use google_cloud_netapp_v1::builder::net_app::ListBackupPolicies;
5888    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5889    /// use google_cloud_gax::paginator::ItemPaginator;
5890    ///
5891    /// let builder = prepare_request_builder();
5892    /// let mut items = builder.by_item();
5893    /// while let Some(result) = items.next().await {
5894    ///   let item = result?;
5895    /// }
5896    /// # Ok(()) }
5897    ///
5898    /// fn prepare_request_builder() -> ListBackupPolicies {
5899    ///   # panic!();
5900    ///   // ... details omitted ...
5901    /// }
5902    /// ```
5903    #[derive(Clone, Debug)]
5904    pub struct ListBackupPolicies(RequestBuilder<crate::model::ListBackupPoliciesRequest>);
5905
5906    impl ListBackupPolicies {
5907        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5908            Self(RequestBuilder::new(stub))
5909        }
5910
5911        /// Sets the full request, replacing any prior values.
5912        pub fn with_request<V: Into<crate::model::ListBackupPoliciesRequest>>(
5913            mut self,
5914            v: V,
5915        ) -> Self {
5916            self.0.request = v.into();
5917            self
5918        }
5919
5920        /// Sets all the options, replacing any prior values.
5921        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5922            self.0.options = v.into();
5923            self
5924        }
5925
5926        /// Sends the request.
5927        pub async fn send(self) -> Result<crate::model::ListBackupPoliciesResponse> {
5928            (*self.0.stub)
5929                .list_backup_policies(self.0.request, self.0.options)
5930                .await
5931                .map(crate::Response::into_body)
5932        }
5933
5934        /// Streams each page in the collection.
5935        pub fn by_page(
5936            self,
5937        ) -> impl google_cloud_gax::paginator::Paginator<
5938            crate::model::ListBackupPoliciesResponse,
5939            crate::Error,
5940        > {
5941            use std::clone::Clone;
5942            let token = self.0.request.page_token.clone();
5943            let execute = move |token: String| {
5944                let mut builder = self.clone();
5945                builder.0.request = builder.0.request.set_page_token(token);
5946                builder.send()
5947            };
5948            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5949        }
5950
5951        /// Streams each item in the collection.
5952        pub fn by_item(
5953            self,
5954        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5955            crate::model::ListBackupPoliciesResponse,
5956            crate::Error,
5957        > {
5958            use google_cloud_gax::paginator::Paginator;
5959            self.by_page().items()
5960        }
5961
5962        /// Sets the value of [parent][crate::model::ListBackupPoliciesRequest::parent].
5963        ///
5964        /// This is a **required** field for requests.
5965        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5966            self.0.request.parent = v.into();
5967            self
5968        }
5969
5970        /// Sets the value of [page_size][crate::model::ListBackupPoliciesRequest::page_size].
5971        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5972            self.0.request.page_size = v.into();
5973            self
5974        }
5975
5976        /// Sets the value of [page_token][crate::model::ListBackupPoliciesRequest::page_token].
5977        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5978            self.0.request.page_token = v.into();
5979            self
5980        }
5981
5982        /// Sets the value of [filter][crate::model::ListBackupPoliciesRequest::filter].
5983        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5984            self.0.request.filter = v.into();
5985            self
5986        }
5987
5988        /// Sets the value of [order_by][crate::model::ListBackupPoliciesRequest::order_by].
5989        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5990            self.0.request.order_by = v.into();
5991            self
5992        }
5993    }
5994
5995    #[doc(hidden)]
5996    impl crate::RequestBuilder for ListBackupPolicies {
5997        fn request_options(&mut self) -> &mut crate::RequestOptions {
5998            &mut self.0.options
5999        }
6000    }
6001
6002    /// The request builder for [NetApp::update_backup_policy][crate::client::NetApp::update_backup_policy] calls.
6003    ///
6004    /// # Example
6005    /// ```
6006    /// # use google_cloud_netapp_v1::builder::net_app::UpdateBackupPolicy;
6007    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6008    /// use google_cloud_lro::Poller;
6009    ///
6010    /// let builder = prepare_request_builder();
6011    /// let response = builder.poller().until_done().await?;
6012    /// # Ok(()) }
6013    ///
6014    /// fn prepare_request_builder() -> UpdateBackupPolicy {
6015    ///   # panic!();
6016    ///   // ... details omitted ...
6017    /// }
6018    /// ```
6019    #[derive(Clone, Debug)]
6020    pub struct UpdateBackupPolicy(RequestBuilder<crate::model::UpdateBackupPolicyRequest>);
6021
6022    impl UpdateBackupPolicy {
6023        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6024            Self(RequestBuilder::new(stub))
6025        }
6026
6027        /// Sets the full request, replacing any prior values.
6028        pub fn with_request<V: Into<crate::model::UpdateBackupPolicyRequest>>(
6029            mut self,
6030            v: V,
6031        ) -> Self {
6032            self.0.request = v.into();
6033            self
6034        }
6035
6036        /// Sets all the options, replacing any prior values.
6037        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6038            self.0.options = v.into();
6039            self
6040        }
6041
6042        /// Sends the request.
6043        ///
6044        /// # Long running operations
6045        ///
6046        /// This starts, but does not poll, a longrunning operation. More information
6047        /// on [update_backup_policy][crate::client::NetApp::update_backup_policy].
6048        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6049            (*self.0.stub)
6050                .update_backup_policy(self.0.request, self.0.options)
6051                .await
6052                .map(crate::Response::into_body)
6053        }
6054
6055        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_backup_policy`.
6056        pub fn poller(
6057            self,
6058        ) -> impl google_cloud_lro::Poller<crate::model::BackupPolicy, crate::model::OperationMetadata>
6059        {
6060            type Operation = google_cloud_lro::internal::Operation<
6061                crate::model::BackupPolicy,
6062                crate::model::OperationMetadata,
6063            >;
6064            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6065            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6066
6067            let stub = self.0.stub.clone();
6068            let mut options = self.0.options.clone();
6069            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6070            let query = move |name| {
6071                let stub = stub.clone();
6072                let options = options.clone();
6073                async {
6074                    let op = GetOperation::new(stub)
6075                        .set_name(name)
6076                        .with_options(options)
6077                        .send()
6078                        .await?;
6079                    Ok(Operation::new(op))
6080                }
6081            };
6082
6083            let start = move || async {
6084                let op = self.send().await?;
6085                Ok(Operation::new(op))
6086            };
6087
6088            google_cloud_lro::internal::new_poller(
6089                polling_error_policy,
6090                polling_backoff_policy,
6091                start,
6092                query,
6093            )
6094        }
6095
6096        /// Sets the value of [update_mask][crate::model::UpdateBackupPolicyRequest::update_mask].
6097        ///
6098        /// This is a **required** field for requests.
6099        pub fn set_update_mask<T>(mut self, v: T) -> Self
6100        where
6101            T: std::convert::Into<wkt::FieldMask>,
6102        {
6103            self.0.request.update_mask = std::option::Option::Some(v.into());
6104            self
6105        }
6106
6107        /// Sets or clears the value of [update_mask][crate::model::UpdateBackupPolicyRequest::update_mask].
6108        ///
6109        /// This is a **required** field for requests.
6110        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6111        where
6112            T: std::convert::Into<wkt::FieldMask>,
6113        {
6114            self.0.request.update_mask = v.map(|x| x.into());
6115            self
6116        }
6117
6118        /// Sets the value of [backup_policy][crate::model::UpdateBackupPolicyRequest::backup_policy].
6119        ///
6120        /// This is a **required** field for requests.
6121        pub fn set_backup_policy<T>(mut self, v: T) -> Self
6122        where
6123            T: std::convert::Into<crate::model::BackupPolicy>,
6124        {
6125            self.0.request.backup_policy = std::option::Option::Some(v.into());
6126            self
6127        }
6128
6129        /// Sets or clears the value of [backup_policy][crate::model::UpdateBackupPolicyRequest::backup_policy].
6130        ///
6131        /// This is a **required** field for requests.
6132        pub fn set_or_clear_backup_policy<T>(mut self, v: std::option::Option<T>) -> Self
6133        where
6134            T: std::convert::Into<crate::model::BackupPolicy>,
6135        {
6136            self.0.request.backup_policy = v.map(|x| x.into());
6137            self
6138        }
6139    }
6140
6141    #[doc(hidden)]
6142    impl crate::RequestBuilder for UpdateBackupPolicy {
6143        fn request_options(&mut self) -> &mut crate::RequestOptions {
6144            &mut self.0.options
6145        }
6146    }
6147
6148    /// The request builder for [NetApp::delete_backup_policy][crate::client::NetApp::delete_backup_policy] calls.
6149    ///
6150    /// # Example
6151    /// ```
6152    /// # use google_cloud_netapp_v1::builder::net_app::DeleteBackupPolicy;
6153    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6154    /// use google_cloud_lro::Poller;
6155    ///
6156    /// let builder = prepare_request_builder();
6157    /// let response = builder.poller().until_done().await?;
6158    /// # Ok(()) }
6159    ///
6160    /// fn prepare_request_builder() -> DeleteBackupPolicy {
6161    ///   # panic!();
6162    ///   // ... details omitted ...
6163    /// }
6164    /// ```
6165    #[derive(Clone, Debug)]
6166    pub struct DeleteBackupPolicy(RequestBuilder<crate::model::DeleteBackupPolicyRequest>);
6167
6168    impl DeleteBackupPolicy {
6169        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6170            Self(RequestBuilder::new(stub))
6171        }
6172
6173        /// Sets the full request, replacing any prior values.
6174        pub fn with_request<V: Into<crate::model::DeleteBackupPolicyRequest>>(
6175            mut self,
6176            v: V,
6177        ) -> Self {
6178            self.0.request = v.into();
6179            self
6180        }
6181
6182        /// Sets all the options, replacing any prior values.
6183        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6184            self.0.options = v.into();
6185            self
6186        }
6187
6188        /// Sends the request.
6189        ///
6190        /// # Long running operations
6191        ///
6192        /// This starts, but does not poll, a longrunning operation. More information
6193        /// on [delete_backup_policy][crate::client::NetApp::delete_backup_policy].
6194        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6195            (*self.0.stub)
6196                .delete_backup_policy(self.0.request, self.0.options)
6197                .await
6198                .map(crate::Response::into_body)
6199        }
6200
6201        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_backup_policy`.
6202        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6203            type Operation =
6204                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6205            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6206            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6207
6208            let stub = self.0.stub.clone();
6209            let mut options = self.0.options.clone();
6210            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6211            let query = move |name| {
6212                let stub = stub.clone();
6213                let options = options.clone();
6214                async {
6215                    let op = GetOperation::new(stub)
6216                        .set_name(name)
6217                        .with_options(options)
6218                        .send()
6219                        .await?;
6220                    Ok(Operation::new(op))
6221                }
6222            };
6223
6224            let start = move || async {
6225                let op = self.send().await?;
6226                Ok(Operation::new(op))
6227            };
6228
6229            google_cloud_lro::internal::new_unit_response_poller(
6230                polling_error_policy,
6231                polling_backoff_policy,
6232                start,
6233                query,
6234            )
6235        }
6236
6237        /// Sets the value of [name][crate::model::DeleteBackupPolicyRequest::name].
6238        ///
6239        /// This is a **required** field for requests.
6240        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6241            self.0.request.name = v.into();
6242            self
6243        }
6244    }
6245
6246    #[doc(hidden)]
6247    impl crate::RequestBuilder for DeleteBackupPolicy {
6248        fn request_options(&mut self) -> &mut crate::RequestOptions {
6249            &mut self.0.options
6250        }
6251    }
6252
6253    /// The request builder for [NetApp::list_quota_rules][crate::client::NetApp::list_quota_rules] calls.
6254    ///
6255    /// # Example
6256    /// ```
6257    /// # use google_cloud_netapp_v1::builder::net_app::ListQuotaRules;
6258    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6259    /// use google_cloud_gax::paginator::ItemPaginator;
6260    ///
6261    /// let builder = prepare_request_builder();
6262    /// let mut items = builder.by_item();
6263    /// while let Some(result) = items.next().await {
6264    ///   let item = result?;
6265    /// }
6266    /// # Ok(()) }
6267    ///
6268    /// fn prepare_request_builder() -> ListQuotaRules {
6269    ///   # panic!();
6270    ///   // ... details omitted ...
6271    /// }
6272    /// ```
6273    #[derive(Clone, Debug)]
6274    pub struct ListQuotaRules(RequestBuilder<crate::model::ListQuotaRulesRequest>);
6275
6276    impl ListQuotaRules {
6277        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6278            Self(RequestBuilder::new(stub))
6279        }
6280
6281        /// Sets the full request, replacing any prior values.
6282        pub fn with_request<V: Into<crate::model::ListQuotaRulesRequest>>(mut self, v: V) -> Self {
6283            self.0.request = v.into();
6284            self
6285        }
6286
6287        /// Sets all the options, replacing any prior values.
6288        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6289            self.0.options = v.into();
6290            self
6291        }
6292
6293        /// Sends the request.
6294        pub async fn send(self) -> Result<crate::model::ListQuotaRulesResponse> {
6295            (*self.0.stub)
6296                .list_quota_rules(self.0.request, self.0.options)
6297                .await
6298                .map(crate::Response::into_body)
6299        }
6300
6301        /// Streams each page in the collection.
6302        pub fn by_page(
6303            self,
6304        ) -> impl google_cloud_gax::paginator::Paginator<
6305            crate::model::ListQuotaRulesResponse,
6306            crate::Error,
6307        > {
6308            use std::clone::Clone;
6309            let token = self.0.request.page_token.clone();
6310            let execute = move |token: String| {
6311                let mut builder = self.clone();
6312                builder.0.request = builder.0.request.set_page_token(token);
6313                builder.send()
6314            };
6315            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6316        }
6317
6318        /// Streams each item in the collection.
6319        pub fn by_item(
6320            self,
6321        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6322            crate::model::ListQuotaRulesResponse,
6323            crate::Error,
6324        > {
6325            use google_cloud_gax::paginator::Paginator;
6326            self.by_page().items()
6327        }
6328
6329        /// Sets the value of [parent][crate::model::ListQuotaRulesRequest::parent].
6330        ///
6331        /// This is a **required** field for requests.
6332        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6333            self.0.request.parent = v.into();
6334            self
6335        }
6336
6337        /// Sets the value of [page_size][crate::model::ListQuotaRulesRequest::page_size].
6338        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6339            self.0.request.page_size = v.into();
6340            self
6341        }
6342
6343        /// Sets the value of [page_token][crate::model::ListQuotaRulesRequest::page_token].
6344        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6345            self.0.request.page_token = v.into();
6346            self
6347        }
6348
6349        /// Sets the value of [filter][crate::model::ListQuotaRulesRequest::filter].
6350        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6351            self.0.request.filter = v.into();
6352            self
6353        }
6354
6355        /// Sets the value of [order_by][crate::model::ListQuotaRulesRequest::order_by].
6356        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6357            self.0.request.order_by = v.into();
6358            self
6359        }
6360    }
6361
6362    #[doc(hidden)]
6363    impl crate::RequestBuilder for ListQuotaRules {
6364        fn request_options(&mut self) -> &mut crate::RequestOptions {
6365            &mut self.0.options
6366        }
6367    }
6368
6369    /// The request builder for [NetApp::get_quota_rule][crate::client::NetApp::get_quota_rule] calls.
6370    ///
6371    /// # Example
6372    /// ```
6373    /// # use google_cloud_netapp_v1::builder::net_app::GetQuotaRule;
6374    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6375    ///
6376    /// let builder = prepare_request_builder();
6377    /// let response = builder.send().await?;
6378    /// # Ok(()) }
6379    ///
6380    /// fn prepare_request_builder() -> GetQuotaRule {
6381    ///   # panic!();
6382    ///   // ... details omitted ...
6383    /// }
6384    /// ```
6385    #[derive(Clone, Debug)]
6386    pub struct GetQuotaRule(RequestBuilder<crate::model::GetQuotaRuleRequest>);
6387
6388    impl GetQuotaRule {
6389        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6390            Self(RequestBuilder::new(stub))
6391        }
6392
6393        /// Sets the full request, replacing any prior values.
6394        pub fn with_request<V: Into<crate::model::GetQuotaRuleRequest>>(mut self, v: V) -> Self {
6395            self.0.request = v.into();
6396            self
6397        }
6398
6399        /// Sets all the options, replacing any prior values.
6400        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6401            self.0.options = v.into();
6402            self
6403        }
6404
6405        /// Sends the request.
6406        pub async fn send(self) -> Result<crate::model::QuotaRule> {
6407            (*self.0.stub)
6408                .get_quota_rule(self.0.request, self.0.options)
6409                .await
6410                .map(crate::Response::into_body)
6411        }
6412
6413        /// Sets the value of [name][crate::model::GetQuotaRuleRequest::name].
6414        ///
6415        /// This is a **required** field for requests.
6416        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6417            self.0.request.name = v.into();
6418            self
6419        }
6420    }
6421
6422    #[doc(hidden)]
6423    impl crate::RequestBuilder for GetQuotaRule {
6424        fn request_options(&mut self) -> &mut crate::RequestOptions {
6425            &mut self.0.options
6426        }
6427    }
6428
6429    /// The request builder for [NetApp::create_quota_rule][crate::client::NetApp::create_quota_rule] calls.
6430    ///
6431    /// # Example
6432    /// ```
6433    /// # use google_cloud_netapp_v1::builder::net_app::CreateQuotaRule;
6434    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6435    /// use google_cloud_lro::Poller;
6436    ///
6437    /// let builder = prepare_request_builder();
6438    /// let response = builder.poller().until_done().await?;
6439    /// # Ok(()) }
6440    ///
6441    /// fn prepare_request_builder() -> CreateQuotaRule {
6442    ///   # panic!();
6443    ///   // ... details omitted ...
6444    /// }
6445    /// ```
6446    #[derive(Clone, Debug)]
6447    pub struct CreateQuotaRule(RequestBuilder<crate::model::CreateQuotaRuleRequest>);
6448
6449    impl CreateQuotaRule {
6450        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6451            Self(RequestBuilder::new(stub))
6452        }
6453
6454        /// Sets the full request, replacing any prior values.
6455        pub fn with_request<V: Into<crate::model::CreateQuotaRuleRequest>>(mut self, v: V) -> Self {
6456            self.0.request = v.into();
6457            self
6458        }
6459
6460        /// Sets all the options, replacing any prior values.
6461        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6462            self.0.options = v.into();
6463            self
6464        }
6465
6466        /// Sends the request.
6467        ///
6468        /// # Long running operations
6469        ///
6470        /// This starts, but does not poll, a longrunning operation. More information
6471        /// on [create_quota_rule][crate::client::NetApp::create_quota_rule].
6472        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6473            (*self.0.stub)
6474                .create_quota_rule(self.0.request, self.0.options)
6475                .await
6476                .map(crate::Response::into_body)
6477        }
6478
6479        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_quota_rule`.
6480        pub fn poller(
6481            self,
6482        ) -> impl google_cloud_lro::Poller<crate::model::QuotaRule, crate::model::OperationMetadata>
6483        {
6484            type Operation = google_cloud_lro::internal::Operation<
6485                crate::model::QuotaRule,
6486                crate::model::OperationMetadata,
6487            >;
6488            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6489            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6490
6491            let stub = self.0.stub.clone();
6492            let mut options = self.0.options.clone();
6493            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6494            let query = move |name| {
6495                let stub = stub.clone();
6496                let options = options.clone();
6497                async {
6498                    let op = GetOperation::new(stub)
6499                        .set_name(name)
6500                        .with_options(options)
6501                        .send()
6502                        .await?;
6503                    Ok(Operation::new(op))
6504                }
6505            };
6506
6507            let start = move || async {
6508                let op = self.send().await?;
6509                Ok(Operation::new(op))
6510            };
6511
6512            google_cloud_lro::internal::new_poller(
6513                polling_error_policy,
6514                polling_backoff_policy,
6515                start,
6516                query,
6517            )
6518        }
6519
6520        /// Sets the value of [parent][crate::model::CreateQuotaRuleRequest::parent].
6521        ///
6522        /// This is a **required** field for requests.
6523        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6524            self.0.request.parent = v.into();
6525            self
6526        }
6527
6528        /// Sets the value of [quota_rule][crate::model::CreateQuotaRuleRequest::quota_rule].
6529        ///
6530        /// This is a **required** field for requests.
6531        pub fn set_quota_rule<T>(mut self, v: T) -> Self
6532        where
6533            T: std::convert::Into<crate::model::QuotaRule>,
6534        {
6535            self.0.request.quota_rule = std::option::Option::Some(v.into());
6536            self
6537        }
6538
6539        /// Sets or clears the value of [quota_rule][crate::model::CreateQuotaRuleRequest::quota_rule].
6540        ///
6541        /// This is a **required** field for requests.
6542        pub fn set_or_clear_quota_rule<T>(mut self, v: std::option::Option<T>) -> Self
6543        where
6544            T: std::convert::Into<crate::model::QuotaRule>,
6545        {
6546            self.0.request.quota_rule = v.map(|x| x.into());
6547            self
6548        }
6549
6550        /// Sets the value of [quota_rule_id][crate::model::CreateQuotaRuleRequest::quota_rule_id].
6551        ///
6552        /// This is a **required** field for requests.
6553        pub fn set_quota_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6554            self.0.request.quota_rule_id = v.into();
6555            self
6556        }
6557    }
6558
6559    #[doc(hidden)]
6560    impl crate::RequestBuilder for CreateQuotaRule {
6561        fn request_options(&mut self) -> &mut crate::RequestOptions {
6562            &mut self.0.options
6563        }
6564    }
6565
6566    /// The request builder for [NetApp::update_quota_rule][crate::client::NetApp::update_quota_rule] calls.
6567    ///
6568    /// # Example
6569    /// ```
6570    /// # use google_cloud_netapp_v1::builder::net_app::UpdateQuotaRule;
6571    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6572    /// use google_cloud_lro::Poller;
6573    ///
6574    /// let builder = prepare_request_builder();
6575    /// let response = builder.poller().until_done().await?;
6576    /// # Ok(()) }
6577    ///
6578    /// fn prepare_request_builder() -> UpdateQuotaRule {
6579    ///   # panic!();
6580    ///   // ... details omitted ...
6581    /// }
6582    /// ```
6583    #[derive(Clone, Debug)]
6584    pub struct UpdateQuotaRule(RequestBuilder<crate::model::UpdateQuotaRuleRequest>);
6585
6586    impl UpdateQuotaRule {
6587        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6588            Self(RequestBuilder::new(stub))
6589        }
6590
6591        /// Sets the full request, replacing any prior values.
6592        pub fn with_request<V: Into<crate::model::UpdateQuotaRuleRequest>>(mut self, v: V) -> Self {
6593            self.0.request = v.into();
6594            self
6595        }
6596
6597        /// Sets all the options, replacing any prior values.
6598        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6599            self.0.options = v.into();
6600            self
6601        }
6602
6603        /// Sends the request.
6604        ///
6605        /// # Long running operations
6606        ///
6607        /// This starts, but does not poll, a longrunning operation. More information
6608        /// on [update_quota_rule][crate::client::NetApp::update_quota_rule].
6609        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6610            (*self.0.stub)
6611                .update_quota_rule(self.0.request, self.0.options)
6612                .await
6613                .map(crate::Response::into_body)
6614        }
6615
6616        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_quota_rule`.
6617        pub fn poller(
6618            self,
6619        ) -> impl google_cloud_lro::Poller<crate::model::QuotaRule, crate::model::OperationMetadata>
6620        {
6621            type Operation = google_cloud_lro::internal::Operation<
6622                crate::model::QuotaRule,
6623                crate::model::OperationMetadata,
6624            >;
6625            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6626            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6627
6628            let stub = self.0.stub.clone();
6629            let mut options = self.0.options.clone();
6630            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6631            let query = move |name| {
6632                let stub = stub.clone();
6633                let options = options.clone();
6634                async {
6635                    let op = GetOperation::new(stub)
6636                        .set_name(name)
6637                        .with_options(options)
6638                        .send()
6639                        .await?;
6640                    Ok(Operation::new(op))
6641                }
6642            };
6643
6644            let start = move || async {
6645                let op = self.send().await?;
6646                Ok(Operation::new(op))
6647            };
6648
6649            google_cloud_lro::internal::new_poller(
6650                polling_error_policy,
6651                polling_backoff_policy,
6652                start,
6653                query,
6654            )
6655        }
6656
6657        /// Sets the value of [update_mask][crate::model::UpdateQuotaRuleRequest::update_mask].
6658        pub fn set_update_mask<T>(mut self, v: T) -> Self
6659        where
6660            T: std::convert::Into<wkt::FieldMask>,
6661        {
6662            self.0.request.update_mask = std::option::Option::Some(v.into());
6663            self
6664        }
6665
6666        /// Sets or clears the value of [update_mask][crate::model::UpdateQuotaRuleRequest::update_mask].
6667        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6668        where
6669            T: std::convert::Into<wkt::FieldMask>,
6670        {
6671            self.0.request.update_mask = v.map(|x| x.into());
6672            self
6673        }
6674
6675        /// Sets the value of [quota_rule][crate::model::UpdateQuotaRuleRequest::quota_rule].
6676        ///
6677        /// This is a **required** field for requests.
6678        pub fn set_quota_rule<T>(mut self, v: T) -> Self
6679        where
6680            T: std::convert::Into<crate::model::QuotaRule>,
6681        {
6682            self.0.request.quota_rule = std::option::Option::Some(v.into());
6683            self
6684        }
6685
6686        /// Sets or clears the value of [quota_rule][crate::model::UpdateQuotaRuleRequest::quota_rule].
6687        ///
6688        /// This is a **required** field for requests.
6689        pub fn set_or_clear_quota_rule<T>(mut self, v: std::option::Option<T>) -> Self
6690        where
6691            T: std::convert::Into<crate::model::QuotaRule>,
6692        {
6693            self.0.request.quota_rule = v.map(|x| x.into());
6694            self
6695        }
6696    }
6697
6698    #[doc(hidden)]
6699    impl crate::RequestBuilder for UpdateQuotaRule {
6700        fn request_options(&mut self) -> &mut crate::RequestOptions {
6701            &mut self.0.options
6702        }
6703    }
6704
6705    /// The request builder for [NetApp::delete_quota_rule][crate::client::NetApp::delete_quota_rule] calls.
6706    ///
6707    /// # Example
6708    /// ```
6709    /// # use google_cloud_netapp_v1::builder::net_app::DeleteQuotaRule;
6710    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6711    /// use google_cloud_lro::Poller;
6712    ///
6713    /// let builder = prepare_request_builder();
6714    /// let response = builder.poller().until_done().await?;
6715    /// # Ok(()) }
6716    ///
6717    /// fn prepare_request_builder() -> DeleteQuotaRule {
6718    ///   # panic!();
6719    ///   // ... details omitted ...
6720    /// }
6721    /// ```
6722    #[derive(Clone, Debug)]
6723    pub struct DeleteQuotaRule(RequestBuilder<crate::model::DeleteQuotaRuleRequest>);
6724
6725    impl DeleteQuotaRule {
6726        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6727            Self(RequestBuilder::new(stub))
6728        }
6729
6730        /// Sets the full request, replacing any prior values.
6731        pub fn with_request<V: Into<crate::model::DeleteQuotaRuleRequest>>(mut self, v: V) -> Self {
6732            self.0.request = v.into();
6733            self
6734        }
6735
6736        /// Sets all the options, replacing any prior values.
6737        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6738            self.0.options = v.into();
6739            self
6740        }
6741
6742        /// Sends the request.
6743        ///
6744        /// # Long running operations
6745        ///
6746        /// This starts, but does not poll, a longrunning operation. More information
6747        /// on [delete_quota_rule][crate::client::NetApp::delete_quota_rule].
6748        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6749            (*self.0.stub)
6750                .delete_quota_rule(self.0.request, self.0.options)
6751                .await
6752                .map(crate::Response::into_body)
6753        }
6754
6755        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_quota_rule`.
6756        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6757            type Operation =
6758                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6759            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6760            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6761
6762            let stub = self.0.stub.clone();
6763            let mut options = self.0.options.clone();
6764            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6765            let query = move |name| {
6766                let stub = stub.clone();
6767                let options = options.clone();
6768                async {
6769                    let op = GetOperation::new(stub)
6770                        .set_name(name)
6771                        .with_options(options)
6772                        .send()
6773                        .await?;
6774                    Ok(Operation::new(op))
6775                }
6776            };
6777
6778            let start = move || async {
6779                let op = self.send().await?;
6780                Ok(Operation::new(op))
6781            };
6782
6783            google_cloud_lro::internal::new_unit_response_poller(
6784                polling_error_policy,
6785                polling_backoff_policy,
6786                start,
6787                query,
6788            )
6789        }
6790
6791        /// Sets the value of [name][crate::model::DeleteQuotaRuleRequest::name].
6792        ///
6793        /// This is a **required** field for requests.
6794        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6795            self.0.request.name = v.into();
6796            self
6797        }
6798    }
6799
6800    #[doc(hidden)]
6801    impl crate::RequestBuilder for DeleteQuotaRule {
6802        fn request_options(&mut self) -> &mut crate::RequestOptions {
6803            &mut self.0.options
6804        }
6805    }
6806
6807    /// The request builder for [NetApp::restore_backup_files][crate::client::NetApp::restore_backup_files] calls.
6808    ///
6809    /// # Example
6810    /// ```
6811    /// # use google_cloud_netapp_v1::builder::net_app::RestoreBackupFiles;
6812    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6813    /// use google_cloud_lro::Poller;
6814    ///
6815    /// let builder = prepare_request_builder();
6816    /// let response = builder.poller().until_done().await?;
6817    /// # Ok(()) }
6818    ///
6819    /// fn prepare_request_builder() -> RestoreBackupFiles {
6820    ///   # panic!();
6821    ///   // ... details omitted ...
6822    /// }
6823    /// ```
6824    #[derive(Clone, Debug)]
6825    pub struct RestoreBackupFiles(RequestBuilder<crate::model::RestoreBackupFilesRequest>);
6826
6827    impl RestoreBackupFiles {
6828        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6829            Self(RequestBuilder::new(stub))
6830        }
6831
6832        /// Sets the full request, replacing any prior values.
6833        pub fn with_request<V: Into<crate::model::RestoreBackupFilesRequest>>(
6834            mut self,
6835            v: V,
6836        ) -> Self {
6837            self.0.request = v.into();
6838            self
6839        }
6840
6841        /// Sets all the options, replacing any prior values.
6842        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6843            self.0.options = v.into();
6844            self
6845        }
6846
6847        /// Sends the request.
6848        ///
6849        /// # Long running operations
6850        ///
6851        /// This starts, but does not poll, a longrunning operation. More information
6852        /// on [restore_backup_files][crate::client::NetApp::restore_backup_files].
6853        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6854            (*self.0.stub)
6855                .restore_backup_files(self.0.request, self.0.options)
6856                .await
6857                .map(crate::Response::into_body)
6858        }
6859
6860        /// Creates a [Poller][google_cloud_lro::Poller] to work with `restore_backup_files`.
6861        pub fn poller(
6862            self,
6863        ) -> impl google_cloud_lro::Poller<
6864            crate::model::RestoreBackupFilesResponse,
6865            crate::model::OperationMetadata,
6866        > {
6867            type Operation = google_cloud_lro::internal::Operation<
6868                crate::model::RestoreBackupFilesResponse,
6869                crate::model::OperationMetadata,
6870            >;
6871            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6872            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6873
6874            let stub = self.0.stub.clone();
6875            let mut options = self.0.options.clone();
6876            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6877            let query = move |name| {
6878                let stub = stub.clone();
6879                let options = options.clone();
6880                async {
6881                    let op = GetOperation::new(stub)
6882                        .set_name(name)
6883                        .with_options(options)
6884                        .send()
6885                        .await?;
6886                    Ok(Operation::new(op))
6887                }
6888            };
6889
6890            let start = move || async {
6891                let op = self.send().await?;
6892                Ok(Operation::new(op))
6893            };
6894
6895            google_cloud_lro::internal::new_poller(
6896                polling_error_policy,
6897                polling_backoff_policy,
6898                start,
6899                query,
6900            )
6901        }
6902
6903        /// Sets the value of [name][crate::model::RestoreBackupFilesRequest::name].
6904        ///
6905        /// This is a **required** field for requests.
6906        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6907            self.0.request.name = v.into();
6908            self
6909        }
6910
6911        /// Sets the value of [backup][crate::model::RestoreBackupFilesRequest::backup].
6912        ///
6913        /// This is a **required** field for requests.
6914        pub fn set_backup<T: Into<std::string::String>>(mut self, v: T) -> Self {
6915            self.0.request.backup = v.into();
6916            self
6917        }
6918
6919        /// Sets the value of [file_list][crate::model::RestoreBackupFilesRequest::file_list].
6920        ///
6921        /// This is a **required** field for requests.
6922        pub fn set_file_list<T, V>(mut self, v: T) -> Self
6923        where
6924            T: std::iter::IntoIterator<Item = V>,
6925            V: std::convert::Into<std::string::String>,
6926        {
6927            use std::iter::Iterator;
6928            self.0.request.file_list = v.into_iter().map(|i| i.into()).collect();
6929            self
6930        }
6931
6932        /// Sets the value of [restore_destination_path][crate::model::RestoreBackupFilesRequest::restore_destination_path].
6933        pub fn set_restore_destination_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
6934            self.0.request.restore_destination_path = v.into();
6935            self
6936        }
6937    }
6938
6939    #[doc(hidden)]
6940    impl crate::RequestBuilder for RestoreBackupFiles {
6941        fn request_options(&mut self) -> &mut crate::RequestOptions {
6942            &mut self.0.options
6943        }
6944    }
6945
6946    /// The request builder for [NetApp::list_host_groups][crate::client::NetApp::list_host_groups] calls.
6947    ///
6948    /// # Example
6949    /// ```
6950    /// # use google_cloud_netapp_v1::builder::net_app::ListHostGroups;
6951    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6952    /// use google_cloud_gax::paginator::ItemPaginator;
6953    ///
6954    /// let builder = prepare_request_builder();
6955    /// let mut items = builder.by_item();
6956    /// while let Some(result) = items.next().await {
6957    ///   let item = result?;
6958    /// }
6959    /// # Ok(()) }
6960    ///
6961    /// fn prepare_request_builder() -> ListHostGroups {
6962    ///   # panic!();
6963    ///   // ... details omitted ...
6964    /// }
6965    /// ```
6966    #[derive(Clone, Debug)]
6967    pub struct ListHostGroups(RequestBuilder<crate::model::ListHostGroupsRequest>);
6968
6969    impl ListHostGroups {
6970        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6971            Self(RequestBuilder::new(stub))
6972        }
6973
6974        /// Sets the full request, replacing any prior values.
6975        pub fn with_request<V: Into<crate::model::ListHostGroupsRequest>>(mut self, v: V) -> Self {
6976            self.0.request = v.into();
6977            self
6978        }
6979
6980        /// Sets all the options, replacing any prior values.
6981        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6982            self.0.options = v.into();
6983            self
6984        }
6985
6986        /// Sends the request.
6987        pub async fn send(self) -> Result<crate::model::ListHostGroupsResponse> {
6988            (*self.0.stub)
6989                .list_host_groups(self.0.request, self.0.options)
6990                .await
6991                .map(crate::Response::into_body)
6992        }
6993
6994        /// Streams each page in the collection.
6995        pub fn by_page(
6996            self,
6997        ) -> impl google_cloud_gax::paginator::Paginator<
6998            crate::model::ListHostGroupsResponse,
6999            crate::Error,
7000        > {
7001            use std::clone::Clone;
7002            let token = self.0.request.page_token.clone();
7003            let execute = move |token: String| {
7004                let mut builder = self.clone();
7005                builder.0.request = builder.0.request.set_page_token(token);
7006                builder.send()
7007            };
7008            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7009        }
7010
7011        /// Streams each item in the collection.
7012        pub fn by_item(
7013            self,
7014        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7015            crate::model::ListHostGroupsResponse,
7016            crate::Error,
7017        > {
7018            use google_cloud_gax::paginator::Paginator;
7019            self.by_page().items()
7020        }
7021
7022        /// Sets the value of [parent][crate::model::ListHostGroupsRequest::parent].
7023        ///
7024        /// This is a **required** field for requests.
7025        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7026            self.0.request.parent = v.into();
7027            self
7028        }
7029
7030        /// Sets the value of [page_size][crate::model::ListHostGroupsRequest::page_size].
7031        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7032            self.0.request.page_size = v.into();
7033            self
7034        }
7035
7036        /// Sets the value of [page_token][crate::model::ListHostGroupsRequest::page_token].
7037        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7038            self.0.request.page_token = v.into();
7039            self
7040        }
7041
7042        /// Sets the value of [filter][crate::model::ListHostGroupsRequest::filter].
7043        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7044            self.0.request.filter = v.into();
7045            self
7046        }
7047
7048        /// Sets the value of [order_by][crate::model::ListHostGroupsRequest::order_by].
7049        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7050            self.0.request.order_by = v.into();
7051            self
7052        }
7053    }
7054
7055    #[doc(hidden)]
7056    impl crate::RequestBuilder for ListHostGroups {
7057        fn request_options(&mut self) -> &mut crate::RequestOptions {
7058            &mut self.0.options
7059        }
7060    }
7061
7062    /// The request builder for [NetApp::get_host_group][crate::client::NetApp::get_host_group] calls.
7063    ///
7064    /// # Example
7065    /// ```
7066    /// # use google_cloud_netapp_v1::builder::net_app::GetHostGroup;
7067    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7068    ///
7069    /// let builder = prepare_request_builder();
7070    /// let response = builder.send().await?;
7071    /// # Ok(()) }
7072    ///
7073    /// fn prepare_request_builder() -> GetHostGroup {
7074    ///   # panic!();
7075    ///   // ... details omitted ...
7076    /// }
7077    /// ```
7078    #[derive(Clone, Debug)]
7079    pub struct GetHostGroup(RequestBuilder<crate::model::GetHostGroupRequest>);
7080
7081    impl GetHostGroup {
7082        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7083            Self(RequestBuilder::new(stub))
7084        }
7085
7086        /// Sets the full request, replacing any prior values.
7087        pub fn with_request<V: Into<crate::model::GetHostGroupRequest>>(mut self, v: V) -> Self {
7088            self.0.request = v.into();
7089            self
7090        }
7091
7092        /// Sets all the options, replacing any prior values.
7093        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7094            self.0.options = v.into();
7095            self
7096        }
7097
7098        /// Sends the request.
7099        pub async fn send(self) -> Result<crate::model::HostGroup> {
7100            (*self.0.stub)
7101                .get_host_group(self.0.request, self.0.options)
7102                .await
7103                .map(crate::Response::into_body)
7104        }
7105
7106        /// Sets the value of [name][crate::model::GetHostGroupRequest::name].
7107        ///
7108        /// This is a **required** field for requests.
7109        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7110            self.0.request.name = v.into();
7111            self
7112        }
7113    }
7114
7115    #[doc(hidden)]
7116    impl crate::RequestBuilder for GetHostGroup {
7117        fn request_options(&mut self) -> &mut crate::RequestOptions {
7118            &mut self.0.options
7119        }
7120    }
7121
7122    /// The request builder for [NetApp::create_host_group][crate::client::NetApp::create_host_group] calls.
7123    ///
7124    /// # Example
7125    /// ```
7126    /// # use google_cloud_netapp_v1::builder::net_app::CreateHostGroup;
7127    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7128    /// use google_cloud_lro::Poller;
7129    ///
7130    /// let builder = prepare_request_builder();
7131    /// let response = builder.poller().until_done().await?;
7132    /// # Ok(()) }
7133    ///
7134    /// fn prepare_request_builder() -> CreateHostGroup {
7135    ///   # panic!();
7136    ///   // ... details omitted ...
7137    /// }
7138    /// ```
7139    #[derive(Clone, Debug)]
7140    pub struct CreateHostGroup(RequestBuilder<crate::model::CreateHostGroupRequest>);
7141
7142    impl CreateHostGroup {
7143        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7144            Self(RequestBuilder::new(stub))
7145        }
7146
7147        /// Sets the full request, replacing any prior values.
7148        pub fn with_request<V: Into<crate::model::CreateHostGroupRequest>>(mut self, v: V) -> Self {
7149            self.0.request = v.into();
7150            self
7151        }
7152
7153        /// Sets all the options, replacing any prior values.
7154        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7155            self.0.options = v.into();
7156            self
7157        }
7158
7159        /// Sends the request.
7160        ///
7161        /// # Long running operations
7162        ///
7163        /// This starts, but does not poll, a longrunning operation. More information
7164        /// on [create_host_group][crate::client::NetApp::create_host_group].
7165        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7166            (*self.0.stub)
7167                .create_host_group(self.0.request, self.0.options)
7168                .await
7169                .map(crate::Response::into_body)
7170        }
7171
7172        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_host_group`.
7173        pub fn poller(
7174            self,
7175        ) -> impl google_cloud_lro::Poller<crate::model::HostGroup, crate::model::OperationMetadata>
7176        {
7177            type Operation = google_cloud_lro::internal::Operation<
7178                crate::model::HostGroup,
7179                crate::model::OperationMetadata,
7180            >;
7181            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7182            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7183
7184            let stub = self.0.stub.clone();
7185            let mut options = self.0.options.clone();
7186            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7187            let query = move |name| {
7188                let stub = stub.clone();
7189                let options = options.clone();
7190                async {
7191                    let op = GetOperation::new(stub)
7192                        .set_name(name)
7193                        .with_options(options)
7194                        .send()
7195                        .await?;
7196                    Ok(Operation::new(op))
7197                }
7198            };
7199
7200            let start = move || async {
7201                let op = self.send().await?;
7202                Ok(Operation::new(op))
7203            };
7204
7205            google_cloud_lro::internal::new_poller(
7206                polling_error_policy,
7207                polling_backoff_policy,
7208                start,
7209                query,
7210            )
7211        }
7212
7213        /// Sets the value of [parent][crate::model::CreateHostGroupRequest::parent].
7214        ///
7215        /// This is a **required** field for requests.
7216        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7217            self.0.request.parent = v.into();
7218            self
7219        }
7220
7221        /// Sets the value of [host_group][crate::model::CreateHostGroupRequest::host_group].
7222        ///
7223        /// This is a **required** field for requests.
7224        pub fn set_host_group<T>(mut self, v: T) -> Self
7225        where
7226            T: std::convert::Into<crate::model::HostGroup>,
7227        {
7228            self.0.request.host_group = std::option::Option::Some(v.into());
7229            self
7230        }
7231
7232        /// Sets or clears the value of [host_group][crate::model::CreateHostGroupRequest::host_group].
7233        ///
7234        /// This is a **required** field for requests.
7235        pub fn set_or_clear_host_group<T>(mut self, v: std::option::Option<T>) -> Self
7236        where
7237            T: std::convert::Into<crate::model::HostGroup>,
7238        {
7239            self.0.request.host_group = v.map(|x| x.into());
7240            self
7241        }
7242
7243        /// Sets the value of [host_group_id][crate::model::CreateHostGroupRequest::host_group_id].
7244        ///
7245        /// This is a **required** field for requests.
7246        pub fn set_host_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7247            self.0.request.host_group_id = v.into();
7248            self
7249        }
7250    }
7251
7252    #[doc(hidden)]
7253    impl crate::RequestBuilder for CreateHostGroup {
7254        fn request_options(&mut self) -> &mut crate::RequestOptions {
7255            &mut self.0.options
7256        }
7257    }
7258
7259    /// The request builder for [NetApp::update_host_group][crate::client::NetApp::update_host_group] calls.
7260    ///
7261    /// # Example
7262    /// ```
7263    /// # use google_cloud_netapp_v1::builder::net_app::UpdateHostGroup;
7264    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7265    /// use google_cloud_lro::Poller;
7266    ///
7267    /// let builder = prepare_request_builder();
7268    /// let response = builder.poller().until_done().await?;
7269    /// # Ok(()) }
7270    ///
7271    /// fn prepare_request_builder() -> UpdateHostGroup {
7272    ///   # panic!();
7273    ///   // ... details omitted ...
7274    /// }
7275    /// ```
7276    #[derive(Clone, Debug)]
7277    pub struct UpdateHostGroup(RequestBuilder<crate::model::UpdateHostGroupRequest>);
7278
7279    impl UpdateHostGroup {
7280        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7281            Self(RequestBuilder::new(stub))
7282        }
7283
7284        /// Sets the full request, replacing any prior values.
7285        pub fn with_request<V: Into<crate::model::UpdateHostGroupRequest>>(mut self, v: V) -> Self {
7286            self.0.request = v.into();
7287            self
7288        }
7289
7290        /// Sets all the options, replacing any prior values.
7291        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7292            self.0.options = v.into();
7293            self
7294        }
7295
7296        /// Sends the request.
7297        ///
7298        /// # Long running operations
7299        ///
7300        /// This starts, but does not poll, a longrunning operation. More information
7301        /// on [update_host_group][crate::client::NetApp::update_host_group].
7302        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7303            (*self.0.stub)
7304                .update_host_group(self.0.request, self.0.options)
7305                .await
7306                .map(crate::Response::into_body)
7307        }
7308
7309        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_host_group`.
7310        pub fn poller(
7311            self,
7312        ) -> impl google_cloud_lro::Poller<crate::model::HostGroup, crate::model::OperationMetadata>
7313        {
7314            type Operation = google_cloud_lro::internal::Operation<
7315                crate::model::HostGroup,
7316                crate::model::OperationMetadata,
7317            >;
7318            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7319            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7320
7321            let stub = self.0.stub.clone();
7322            let mut options = self.0.options.clone();
7323            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7324            let query = move |name| {
7325                let stub = stub.clone();
7326                let options = options.clone();
7327                async {
7328                    let op = GetOperation::new(stub)
7329                        .set_name(name)
7330                        .with_options(options)
7331                        .send()
7332                        .await?;
7333                    Ok(Operation::new(op))
7334                }
7335            };
7336
7337            let start = move || async {
7338                let op = self.send().await?;
7339                Ok(Operation::new(op))
7340            };
7341
7342            google_cloud_lro::internal::new_poller(
7343                polling_error_policy,
7344                polling_backoff_policy,
7345                start,
7346                query,
7347            )
7348        }
7349
7350        /// Sets the value of [host_group][crate::model::UpdateHostGroupRequest::host_group].
7351        ///
7352        /// This is a **required** field for requests.
7353        pub fn set_host_group<T>(mut self, v: T) -> Self
7354        where
7355            T: std::convert::Into<crate::model::HostGroup>,
7356        {
7357            self.0.request.host_group = std::option::Option::Some(v.into());
7358            self
7359        }
7360
7361        /// Sets or clears the value of [host_group][crate::model::UpdateHostGroupRequest::host_group].
7362        ///
7363        /// This is a **required** field for requests.
7364        pub fn set_or_clear_host_group<T>(mut self, v: std::option::Option<T>) -> Self
7365        where
7366            T: std::convert::Into<crate::model::HostGroup>,
7367        {
7368            self.0.request.host_group = v.map(|x| x.into());
7369            self
7370        }
7371
7372        /// Sets the value of [update_mask][crate::model::UpdateHostGroupRequest::update_mask].
7373        pub fn set_update_mask<T>(mut self, v: T) -> Self
7374        where
7375            T: std::convert::Into<wkt::FieldMask>,
7376        {
7377            self.0.request.update_mask = std::option::Option::Some(v.into());
7378            self
7379        }
7380
7381        /// Sets or clears the value of [update_mask][crate::model::UpdateHostGroupRequest::update_mask].
7382        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7383        where
7384            T: std::convert::Into<wkt::FieldMask>,
7385        {
7386            self.0.request.update_mask = v.map(|x| x.into());
7387            self
7388        }
7389    }
7390
7391    #[doc(hidden)]
7392    impl crate::RequestBuilder for UpdateHostGroup {
7393        fn request_options(&mut self) -> &mut crate::RequestOptions {
7394            &mut self.0.options
7395        }
7396    }
7397
7398    /// The request builder for [NetApp::delete_host_group][crate::client::NetApp::delete_host_group] calls.
7399    ///
7400    /// # Example
7401    /// ```
7402    /// # use google_cloud_netapp_v1::builder::net_app::DeleteHostGroup;
7403    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7404    /// use google_cloud_lro::Poller;
7405    ///
7406    /// let builder = prepare_request_builder();
7407    /// let response = builder.poller().until_done().await?;
7408    /// # Ok(()) }
7409    ///
7410    /// fn prepare_request_builder() -> DeleteHostGroup {
7411    ///   # panic!();
7412    ///   // ... details omitted ...
7413    /// }
7414    /// ```
7415    #[derive(Clone, Debug)]
7416    pub struct DeleteHostGroup(RequestBuilder<crate::model::DeleteHostGroupRequest>);
7417
7418    impl DeleteHostGroup {
7419        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7420            Self(RequestBuilder::new(stub))
7421        }
7422
7423        /// Sets the full request, replacing any prior values.
7424        pub fn with_request<V: Into<crate::model::DeleteHostGroupRequest>>(mut self, v: V) -> Self {
7425            self.0.request = v.into();
7426            self
7427        }
7428
7429        /// Sets all the options, replacing any prior values.
7430        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7431            self.0.options = v.into();
7432            self
7433        }
7434
7435        /// Sends the request.
7436        ///
7437        /// # Long running operations
7438        ///
7439        /// This starts, but does not poll, a longrunning operation. More information
7440        /// on [delete_host_group][crate::client::NetApp::delete_host_group].
7441        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7442            (*self.0.stub)
7443                .delete_host_group(self.0.request, self.0.options)
7444                .await
7445                .map(crate::Response::into_body)
7446        }
7447
7448        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_host_group`.
7449        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7450            type Operation =
7451                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7452            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7453            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7454
7455            let stub = self.0.stub.clone();
7456            let mut options = self.0.options.clone();
7457            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7458            let query = move |name| {
7459                let stub = stub.clone();
7460                let options = options.clone();
7461                async {
7462                    let op = GetOperation::new(stub)
7463                        .set_name(name)
7464                        .with_options(options)
7465                        .send()
7466                        .await?;
7467                    Ok(Operation::new(op))
7468                }
7469            };
7470
7471            let start = move || async {
7472                let op = self.send().await?;
7473                Ok(Operation::new(op))
7474            };
7475
7476            google_cloud_lro::internal::new_unit_response_poller(
7477                polling_error_policy,
7478                polling_backoff_policy,
7479                start,
7480                query,
7481            )
7482        }
7483
7484        /// Sets the value of [name][crate::model::DeleteHostGroupRequest::name].
7485        ///
7486        /// This is a **required** field for requests.
7487        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7488            self.0.request.name = v.into();
7489            self
7490        }
7491    }
7492
7493    #[doc(hidden)]
7494    impl crate::RequestBuilder for DeleteHostGroup {
7495        fn request_options(&mut self) -> &mut crate::RequestOptions {
7496            &mut self.0.options
7497        }
7498    }
7499
7500    /// The request builder for [NetApp::list_locations][crate::client::NetApp::list_locations] calls.
7501    ///
7502    /// # Example
7503    /// ```
7504    /// # use google_cloud_netapp_v1::builder::net_app::ListLocations;
7505    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7506    /// use google_cloud_gax::paginator::ItemPaginator;
7507    ///
7508    /// let builder = prepare_request_builder();
7509    /// let mut items = builder.by_item();
7510    /// while let Some(result) = items.next().await {
7511    ///   let item = result?;
7512    /// }
7513    /// # Ok(()) }
7514    ///
7515    /// fn prepare_request_builder() -> ListLocations {
7516    ///   # panic!();
7517    ///   // ... details omitted ...
7518    /// }
7519    /// ```
7520    #[derive(Clone, Debug)]
7521    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
7522
7523    impl ListLocations {
7524        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7525            Self(RequestBuilder::new(stub))
7526        }
7527
7528        /// Sets the full request, replacing any prior values.
7529        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
7530            mut self,
7531            v: V,
7532        ) -> Self {
7533            self.0.request = v.into();
7534            self
7535        }
7536
7537        /// Sets all the options, replacing any prior values.
7538        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7539            self.0.options = v.into();
7540            self
7541        }
7542
7543        /// Sends the request.
7544        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
7545            (*self.0.stub)
7546                .list_locations(self.0.request, self.0.options)
7547                .await
7548                .map(crate::Response::into_body)
7549        }
7550
7551        /// Streams each page in the collection.
7552        pub fn by_page(
7553            self,
7554        ) -> impl google_cloud_gax::paginator::Paginator<
7555            google_cloud_location::model::ListLocationsResponse,
7556            crate::Error,
7557        > {
7558            use std::clone::Clone;
7559            let token = self.0.request.page_token.clone();
7560            let execute = move |token: String| {
7561                let mut builder = self.clone();
7562                builder.0.request = builder.0.request.set_page_token(token);
7563                builder.send()
7564            };
7565            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7566        }
7567
7568        /// Streams each item in the collection.
7569        pub fn by_item(
7570            self,
7571        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7572            google_cloud_location::model::ListLocationsResponse,
7573            crate::Error,
7574        > {
7575            use google_cloud_gax::paginator::Paginator;
7576            self.by_page().items()
7577        }
7578
7579        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
7580        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7581            self.0.request.name = v.into();
7582            self
7583        }
7584
7585        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
7586        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7587            self.0.request.filter = v.into();
7588            self
7589        }
7590
7591        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
7592        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7593            self.0.request.page_size = v.into();
7594            self
7595        }
7596
7597        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
7598        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7599            self.0.request.page_token = v.into();
7600            self
7601        }
7602    }
7603
7604    #[doc(hidden)]
7605    impl crate::RequestBuilder for ListLocations {
7606        fn request_options(&mut self) -> &mut crate::RequestOptions {
7607            &mut self.0.options
7608        }
7609    }
7610
7611    /// The request builder for [NetApp::get_location][crate::client::NetApp::get_location] calls.
7612    ///
7613    /// # Example
7614    /// ```
7615    /// # use google_cloud_netapp_v1::builder::net_app::GetLocation;
7616    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7617    ///
7618    /// let builder = prepare_request_builder();
7619    /// let response = builder.send().await?;
7620    /// # Ok(()) }
7621    ///
7622    /// fn prepare_request_builder() -> GetLocation {
7623    ///   # panic!();
7624    ///   // ... details omitted ...
7625    /// }
7626    /// ```
7627    #[derive(Clone, Debug)]
7628    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
7629
7630    impl GetLocation {
7631        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7632            Self(RequestBuilder::new(stub))
7633        }
7634
7635        /// Sets the full request, replacing any prior values.
7636        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
7637            mut self,
7638            v: V,
7639        ) -> Self {
7640            self.0.request = v.into();
7641            self
7642        }
7643
7644        /// Sets all the options, replacing any prior values.
7645        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7646            self.0.options = v.into();
7647            self
7648        }
7649
7650        /// Sends the request.
7651        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
7652            (*self.0.stub)
7653                .get_location(self.0.request, self.0.options)
7654                .await
7655                .map(crate::Response::into_body)
7656        }
7657
7658        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
7659        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7660            self.0.request.name = v.into();
7661            self
7662        }
7663    }
7664
7665    #[doc(hidden)]
7666    impl crate::RequestBuilder for GetLocation {
7667        fn request_options(&mut self) -> &mut crate::RequestOptions {
7668            &mut self.0.options
7669        }
7670    }
7671
7672    /// The request builder for [NetApp::list_operations][crate::client::NetApp::list_operations] calls.
7673    ///
7674    /// # Example
7675    /// ```
7676    /// # use google_cloud_netapp_v1::builder::net_app::ListOperations;
7677    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7678    /// use google_cloud_gax::paginator::ItemPaginator;
7679    ///
7680    /// let builder = prepare_request_builder();
7681    /// let mut items = builder.by_item();
7682    /// while let Some(result) = items.next().await {
7683    ///   let item = result?;
7684    /// }
7685    /// # Ok(()) }
7686    ///
7687    /// fn prepare_request_builder() -> ListOperations {
7688    ///   # panic!();
7689    ///   // ... details omitted ...
7690    /// }
7691    /// ```
7692    #[derive(Clone, Debug)]
7693    pub struct ListOperations(
7694        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
7695    );
7696
7697    impl ListOperations {
7698        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7699            Self(RequestBuilder::new(stub))
7700        }
7701
7702        /// Sets the full request, replacing any prior values.
7703        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
7704            mut self,
7705            v: V,
7706        ) -> Self {
7707            self.0.request = v.into();
7708            self
7709        }
7710
7711        /// Sets all the options, replacing any prior values.
7712        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7713            self.0.options = v.into();
7714            self
7715        }
7716
7717        /// Sends the request.
7718        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
7719            (*self.0.stub)
7720                .list_operations(self.0.request, self.0.options)
7721                .await
7722                .map(crate::Response::into_body)
7723        }
7724
7725        /// Streams each page in the collection.
7726        pub fn by_page(
7727            self,
7728        ) -> impl google_cloud_gax::paginator::Paginator<
7729            google_cloud_longrunning::model::ListOperationsResponse,
7730            crate::Error,
7731        > {
7732            use std::clone::Clone;
7733            let token = self.0.request.page_token.clone();
7734            let execute = move |token: String| {
7735                let mut builder = self.clone();
7736                builder.0.request = builder.0.request.set_page_token(token);
7737                builder.send()
7738            };
7739            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7740        }
7741
7742        /// Streams each item in the collection.
7743        pub fn by_item(
7744            self,
7745        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7746            google_cloud_longrunning::model::ListOperationsResponse,
7747            crate::Error,
7748        > {
7749            use google_cloud_gax::paginator::Paginator;
7750            self.by_page().items()
7751        }
7752
7753        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
7754        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7755            self.0.request.name = v.into();
7756            self
7757        }
7758
7759        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
7760        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7761            self.0.request.filter = v.into();
7762            self
7763        }
7764
7765        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
7766        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7767            self.0.request.page_size = v.into();
7768            self
7769        }
7770
7771        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
7772        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7773            self.0.request.page_token = v.into();
7774            self
7775        }
7776
7777        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
7778        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7779            self.0.request.return_partial_success = v.into();
7780            self
7781        }
7782    }
7783
7784    #[doc(hidden)]
7785    impl crate::RequestBuilder for ListOperations {
7786        fn request_options(&mut self) -> &mut crate::RequestOptions {
7787            &mut self.0.options
7788        }
7789    }
7790
7791    /// The request builder for [NetApp::get_operation][crate::client::NetApp::get_operation] calls.
7792    ///
7793    /// # Example
7794    /// ```
7795    /// # use google_cloud_netapp_v1::builder::net_app::GetOperation;
7796    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7797    ///
7798    /// let builder = prepare_request_builder();
7799    /// let response = builder.send().await?;
7800    /// # Ok(()) }
7801    ///
7802    /// fn prepare_request_builder() -> GetOperation {
7803    ///   # panic!();
7804    ///   // ... details omitted ...
7805    /// }
7806    /// ```
7807    #[derive(Clone, Debug)]
7808    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
7809
7810    impl GetOperation {
7811        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7812            Self(RequestBuilder::new(stub))
7813        }
7814
7815        /// Sets the full request, replacing any prior values.
7816        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
7817            mut self,
7818            v: V,
7819        ) -> Self {
7820            self.0.request = v.into();
7821            self
7822        }
7823
7824        /// Sets all the options, replacing any prior values.
7825        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7826            self.0.options = v.into();
7827            self
7828        }
7829
7830        /// Sends the request.
7831        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7832            (*self.0.stub)
7833                .get_operation(self.0.request, self.0.options)
7834                .await
7835                .map(crate::Response::into_body)
7836        }
7837
7838        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
7839        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7840            self.0.request.name = v.into();
7841            self
7842        }
7843    }
7844
7845    #[doc(hidden)]
7846    impl crate::RequestBuilder for GetOperation {
7847        fn request_options(&mut self) -> &mut crate::RequestOptions {
7848            &mut self.0.options
7849        }
7850    }
7851
7852    /// The request builder for [NetApp::delete_operation][crate::client::NetApp::delete_operation] calls.
7853    ///
7854    /// # Example
7855    /// ```
7856    /// # use google_cloud_netapp_v1::builder::net_app::DeleteOperation;
7857    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7858    ///
7859    /// let builder = prepare_request_builder();
7860    /// let response = builder.send().await?;
7861    /// # Ok(()) }
7862    ///
7863    /// fn prepare_request_builder() -> DeleteOperation {
7864    ///   # panic!();
7865    ///   // ... details omitted ...
7866    /// }
7867    /// ```
7868    #[derive(Clone, Debug)]
7869    pub struct DeleteOperation(
7870        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
7871    );
7872
7873    impl DeleteOperation {
7874        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7875            Self(RequestBuilder::new(stub))
7876        }
7877
7878        /// Sets the full request, replacing any prior values.
7879        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
7880            mut self,
7881            v: V,
7882        ) -> Self {
7883            self.0.request = v.into();
7884            self
7885        }
7886
7887        /// Sets all the options, replacing any prior values.
7888        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7889            self.0.options = v.into();
7890            self
7891        }
7892
7893        /// Sends the request.
7894        pub async fn send(self) -> Result<()> {
7895            (*self.0.stub)
7896                .delete_operation(self.0.request, self.0.options)
7897                .await
7898                .map(crate::Response::into_body)
7899        }
7900
7901        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
7902        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7903            self.0.request.name = v.into();
7904            self
7905        }
7906    }
7907
7908    #[doc(hidden)]
7909    impl crate::RequestBuilder for DeleteOperation {
7910        fn request_options(&mut self) -> &mut crate::RequestOptions {
7911            &mut self.0.options
7912        }
7913    }
7914
7915    /// The request builder for [NetApp::cancel_operation][crate::client::NetApp::cancel_operation] calls.
7916    ///
7917    /// # Example
7918    /// ```
7919    /// # use google_cloud_netapp_v1::builder::net_app::CancelOperation;
7920    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7921    ///
7922    /// let builder = prepare_request_builder();
7923    /// let response = builder.send().await?;
7924    /// # Ok(()) }
7925    ///
7926    /// fn prepare_request_builder() -> CancelOperation {
7927    ///   # panic!();
7928    ///   // ... details omitted ...
7929    /// }
7930    /// ```
7931    #[derive(Clone, Debug)]
7932    pub struct CancelOperation(
7933        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
7934    );
7935
7936    impl CancelOperation {
7937        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7938            Self(RequestBuilder::new(stub))
7939        }
7940
7941        /// Sets the full request, replacing any prior values.
7942        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
7943            mut self,
7944            v: V,
7945        ) -> Self {
7946            self.0.request = v.into();
7947            self
7948        }
7949
7950        /// Sets all the options, replacing any prior values.
7951        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7952            self.0.options = v.into();
7953            self
7954        }
7955
7956        /// Sends the request.
7957        pub async fn send(self) -> Result<()> {
7958            (*self.0.stub)
7959                .cancel_operation(self.0.request, self.0.options)
7960                .await
7961                .map(crate::Response::into_body)
7962        }
7963
7964        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
7965        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7966            self.0.request.name = v.into();
7967            self
7968        }
7969    }
7970
7971    #[doc(hidden)]
7972    impl crate::RequestBuilder for CancelOperation {
7973        fn request_options(&mut self) -> &mut crate::RequestOptions {
7974            &mut self.0.options
7975        }
7976    }
7977}