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