Skip to main content

google_cloud_bigtable_admin_v2/
builder.rs

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