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