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