google_cloud_bigtable_admin_v2/
builder.rs

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