Skip to main content

google_cloud_netapp_v1/
builder.rs

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