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::update_memory_layer][crate::client::BigtableInstanceAdmin::update_memory_layer] calls.
1435    ///
1436    /// # Example
1437    /// ```
1438    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::UpdateMemoryLayer;
1439    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
1440    /// use google_cloud_lro::Poller;
1441    ///
1442    /// let builder = prepare_request_builder();
1443    /// let response = builder.poller().until_done().await?;
1444    /// # Ok(()) }
1445    ///
1446    /// fn prepare_request_builder() -> UpdateMemoryLayer {
1447    ///   # panic!();
1448    ///   // ... details omitted ...
1449    /// }
1450    /// ```
1451    #[derive(Clone, Debug)]
1452    pub struct UpdateMemoryLayer(RequestBuilder<crate::model::UpdateMemoryLayerRequest>);
1453
1454    impl UpdateMemoryLayer {
1455        pub(crate) fn new(
1456            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1457        ) -> Self {
1458            Self(RequestBuilder::new(stub))
1459        }
1460
1461        /// Sets the full request, replacing any prior values.
1462        pub fn with_request<V: Into<crate::model::UpdateMemoryLayerRequest>>(
1463            mut self,
1464            v: V,
1465        ) -> Self {
1466            self.0.request = v.into();
1467            self
1468        }
1469
1470        /// Sets all the options, replacing any prior values.
1471        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1472            self.0.options = v.into();
1473            self
1474        }
1475
1476        /// Sends the request.
1477        ///
1478        /// # Long running operations
1479        ///
1480        /// This starts, but does not poll, a longrunning operation. More information
1481        /// on [update_memory_layer][crate::client::BigtableInstanceAdmin::update_memory_layer].
1482        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1483            (*self.0.stub)
1484                .update_memory_layer(self.0.request, self.0.options)
1485                .await
1486                .map(crate::Response::into_body)
1487        }
1488
1489        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_memory_layer`.
1490        pub fn poller(
1491            self,
1492        ) -> impl google_cloud_lro::Poller<
1493            crate::model::MemoryLayer,
1494            crate::model::UpdateMemoryLayerMetadata,
1495        > {
1496            type Operation = google_cloud_lro::internal::Operation<
1497                crate::model::MemoryLayer,
1498                crate::model::UpdateMemoryLayerMetadata,
1499            >;
1500            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1501            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1502            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1503            if let Some(ref mut details) = poller_options.tracing {
1504                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::update_memory_layer::until_done";
1505            }
1506
1507            let stub = self.0.stub.clone();
1508            let mut options = self.0.options.clone();
1509            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1510            let query = move |name| {
1511                let stub = stub.clone();
1512                let options = options.clone();
1513                async {
1514                    let op = GetOperation::new(stub)
1515                        .set_name(name)
1516                        .with_options(options)
1517                        .send()
1518                        .await?;
1519                    Ok(Operation::new(op))
1520                }
1521            };
1522
1523            let start = move || async {
1524                let op = self.send().await?;
1525                Ok(Operation::new(op))
1526            };
1527
1528            use google_cloud_lro::internal::PollerExt;
1529            {
1530                google_cloud_lro::internal::new_poller(
1531                    polling_error_policy,
1532                    polling_backoff_policy,
1533                    start,
1534                    query,
1535                )
1536            }
1537            .with_options(poller_options)
1538        }
1539
1540        /// Sets the value of [memory_layer][crate::model::UpdateMemoryLayerRequest::memory_layer].
1541        ///
1542        /// This is a **required** field for requests.
1543        pub fn set_memory_layer<T>(mut self, v: T) -> Self
1544        where
1545            T: std::convert::Into<crate::model::MemoryLayer>,
1546        {
1547            self.0.request.memory_layer = std::option::Option::Some(v.into());
1548            self
1549        }
1550
1551        /// Sets or clears the value of [memory_layer][crate::model::UpdateMemoryLayerRequest::memory_layer].
1552        ///
1553        /// This is a **required** field for requests.
1554        pub fn set_or_clear_memory_layer<T>(mut self, v: std::option::Option<T>) -> Self
1555        where
1556            T: std::convert::Into<crate::model::MemoryLayer>,
1557        {
1558            self.0.request.memory_layer = v.map(|x| x.into());
1559            self
1560        }
1561
1562        /// Sets the value of [update_mask][crate::model::UpdateMemoryLayerRequest::update_mask].
1563        pub fn set_update_mask<T>(mut self, v: T) -> Self
1564        where
1565            T: std::convert::Into<wkt::FieldMask>,
1566        {
1567            self.0.request.update_mask = std::option::Option::Some(v.into());
1568            self
1569        }
1570
1571        /// Sets or clears the value of [update_mask][crate::model::UpdateMemoryLayerRequest::update_mask].
1572        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1573        where
1574            T: std::convert::Into<wkt::FieldMask>,
1575        {
1576            self.0.request.update_mask = v.map(|x| x.into());
1577            self
1578        }
1579    }
1580
1581    #[doc(hidden)]
1582    impl crate::RequestBuilder for UpdateMemoryLayer {
1583        fn request_options(&mut self) -> &mut crate::RequestOptions {
1584            &mut self.0.options
1585        }
1586    }
1587
1588    /// The request builder for [BigtableInstanceAdmin::list_memory_layers][crate::client::BigtableInstanceAdmin::list_memory_layers] calls.
1589    ///
1590    /// # Example
1591    /// ```
1592    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::ListMemoryLayers;
1593    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
1594    /// use google_cloud_gax::paginator::ItemPaginator;
1595    ///
1596    /// let builder = prepare_request_builder();
1597    /// let mut items = builder.by_item();
1598    /// while let Some(result) = items.next().await {
1599    ///   let item = result?;
1600    /// }
1601    /// # Ok(()) }
1602    ///
1603    /// fn prepare_request_builder() -> ListMemoryLayers {
1604    ///   # panic!();
1605    ///   // ... details omitted ...
1606    /// }
1607    /// ```
1608    #[derive(Clone, Debug)]
1609    pub struct ListMemoryLayers(RequestBuilder<crate::model::ListMemoryLayersRequest>);
1610
1611    impl ListMemoryLayers {
1612        pub(crate) fn new(
1613            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1614        ) -> Self {
1615            Self(RequestBuilder::new(stub))
1616        }
1617
1618        /// Sets the full request, replacing any prior values.
1619        pub fn with_request<V: Into<crate::model::ListMemoryLayersRequest>>(
1620            mut self,
1621            v: V,
1622        ) -> Self {
1623            self.0.request = v.into();
1624            self
1625        }
1626
1627        /// Sets all the options, replacing any prior values.
1628        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1629            self.0.options = v.into();
1630            self
1631        }
1632
1633        /// Sends the request.
1634        pub async fn send(self) -> Result<crate::model::ListMemoryLayersResponse> {
1635            (*self.0.stub)
1636                .list_memory_layers(self.0.request, self.0.options)
1637                .await
1638                .map(crate::Response::into_body)
1639        }
1640
1641        /// Streams each page in the collection.
1642        pub fn by_page(
1643            self,
1644        ) -> impl google_cloud_gax::paginator::Paginator<
1645            crate::model::ListMemoryLayersResponse,
1646            crate::Error,
1647        > {
1648            use std::clone::Clone;
1649            let token = self.0.request.page_token.clone();
1650            let execute = move |token: String| {
1651                let mut builder = self.clone();
1652                builder.0.request = builder.0.request.set_page_token(token);
1653                builder.send()
1654            };
1655            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1656        }
1657
1658        /// Streams each item in the collection.
1659        pub fn by_item(
1660            self,
1661        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1662            crate::model::ListMemoryLayersResponse,
1663            crate::Error,
1664        > {
1665            use google_cloud_gax::paginator::Paginator;
1666            self.by_page().items()
1667        }
1668
1669        /// Sets the value of [parent][crate::model::ListMemoryLayersRequest::parent].
1670        ///
1671        /// This is a **required** field for requests.
1672        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1673            self.0.request.parent = v.into();
1674            self
1675        }
1676
1677        /// Sets the value of [page_size][crate::model::ListMemoryLayersRequest::page_size].
1678        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1679            self.0.request.page_size = v.into();
1680            self
1681        }
1682
1683        /// Sets the value of [page_token][crate::model::ListMemoryLayersRequest::page_token].
1684        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1685            self.0.request.page_token = v.into();
1686            self
1687        }
1688    }
1689
1690    #[doc(hidden)]
1691    impl crate::RequestBuilder for ListMemoryLayers {
1692        fn request_options(&mut self) -> &mut crate::RequestOptions {
1693            &mut self.0.options
1694        }
1695    }
1696
1697    /// The request builder for [BigtableInstanceAdmin::get_memory_layer][crate::client::BigtableInstanceAdmin::get_memory_layer] calls.
1698    ///
1699    /// # Example
1700    /// ```
1701    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::GetMemoryLayer;
1702    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
1703    ///
1704    /// let builder = prepare_request_builder();
1705    /// let response = builder.send().await?;
1706    /// # Ok(()) }
1707    ///
1708    /// fn prepare_request_builder() -> GetMemoryLayer {
1709    ///   # panic!();
1710    ///   // ... details omitted ...
1711    /// }
1712    /// ```
1713    #[derive(Clone, Debug)]
1714    pub struct GetMemoryLayer(RequestBuilder<crate::model::GetMemoryLayerRequest>);
1715
1716    impl GetMemoryLayer {
1717        pub(crate) fn new(
1718            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1719        ) -> Self {
1720            Self(RequestBuilder::new(stub))
1721        }
1722
1723        /// Sets the full request, replacing any prior values.
1724        pub fn with_request<V: Into<crate::model::GetMemoryLayerRequest>>(mut self, v: V) -> Self {
1725            self.0.request = v.into();
1726            self
1727        }
1728
1729        /// Sets all the options, replacing any prior values.
1730        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1731            self.0.options = v.into();
1732            self
1733        }
1734
1735        /// Sends the request.
1736        pub async fn send(self) -> Result<crate::model::MemoryLayer> {
1737            (*self.0.stub)
1738                .get_memory_layer(self.0.request, self.0.options)
1739                .await
1740                .map(crate::Response::into_body)
1741        }
1742
1743        /// Sets the value of [name][crate::model::GetMemoryLayerRequest::name].
1744        ///
1745        /// This is a **required** field for requests.
1746        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1747            self.0.request.name = v.into();
1748            self
1749        }
1750    }
1751
1752    #[doc(hidden)]
1753    impl crate::RequestBuilder for GetMemoryLayer {
1754        fn request_options(&mut self) -> &mut crate::RequestOptions {
1755            &mut self.0.options
1756        }
1757    }
1758
1759    /// The request builder for [BigtableInstanceAdmin::create_app_profile][crate::client::BigtableInstanceAdmin::create_app_profile] calls.
1760    ///
1761    /// # Example
1762    /// ```
1763    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::CreateAppProfile;
1764    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
1765    ///
1766    /// let builder = prepare_request_builder();
1767    /// let response = builder.send().await?;
1768    /// # Ok(()) }
1769    ///
1770    /// fn prepare_request_builder() -> CreateAppProfile {
1771    ///   # panic!();
1772    ///   // ... details omitted ...
1773    /// }
1774    /// ```
1775    #[derive(Clone, Debug)]
1776    pub struct CreateAppProfile(RequestBuilder<crate::model::CreateAppProfileRequest>);
1777
1778    impl CreateAppProfile {
1779        pub(crate) fn new(
1780            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1781        ) -> Self {
1782            Self(RequestBuilder::new(stub))
1783        }
1784
1785        /// Sets the full request, replacing any prior values.
1786        pub fn with_request<V: Into<crate::model::CreateAppProfileRequest>>(
1787            mut self,
1788            v: V,
1789        ) -> Self {
1790            self.0.request = v.into();
1791            self
1792        }
1793
1794        /// Sets all the options, replacing any prior values.
1795        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1796            self.0.options = v.into();
1797            self
1798        }
1799
1800        /// Sends the request.
1801        pub async fn send(self) -> Result<crate::model::AppProfile> {
1802            (*self.0.stub)
1803                .create_app_profile(self.0.request, self.0.options)
1804                .await
1805                .map(crate::Response::into_body)
1806        }
1807
1808        /// Sets the value of [parent][crate::model::CreateAppProfileRequest::parent].
1809        ///
1810        /// This is a **required** field for requests.
1811        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1812            self.0.request.parent = v.into();
1813            self
1814        }
1815
1816        /// Sets the value of [app_profile_id][crate::model::CreateAppProfileRequest::app_profile_id].
1817        ///
1818        /// This is a **required** field for requests.
1819        pub fn set_app_profile_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1820            self.0.request.app_profile_id = v.into();
1821            self
1822        }
1823
1824        /// Sets the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1825        ///
1826        /// This is a **required** field for requests.
1827        pub fn set_app_profile<T>(mut self, v: T) -> Self
1828        where
1829            T: std::convert::Into<crate::model::AppProfile>,
1830        {
1831            self.0.request.app_profile = std::option::Option::Some(v.into());
1832            self
1833        }
1834
1835        /// Sets or clears the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1836        ///
1837        /// This is a **required** field for requests.
1838        pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1839        where
1840            T: std::convert::Into<crate::model::AppProfile>,
1841        {
1842            self.0.request.app_profile = v.map(|x| x.into());
1843            self
1844        }
1845
1846        /// Sets the value of [ignore_warnings][crate::model::CreateAppProfileRequest::ignore_warnings].
1847        pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
1848            self.0.request.ignore_warnings = v.into();
1849            self
1850        }
1851    }
1852
1853    #[doc(hidden)]
1854    impl crate::RequestBuilder for CreateAppProfile {
1855        fn request_options(&mut self) -> &mut crate::RequestOptions {
1856            &mut self.0.options
1857        }
1858    }
1859
1860    /// The request builder for [BigtableInstanceAdmin::get_app_profile][crate::client::BigtableInstanceAdmin::get_app_profile] calls.
1861    ///
1862    /// # Example
1863    /// ```
1864    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::GetAppProfile;
1865    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
1866    ///
1867    /// let builder = prepare_request_builder();
1868    /// let response = builder.send().await?;
1869    /// # Ok(()) }
1870    ///
1871    /// fn prepare_request_builder() -> GetAppProfile {
1872    ///   # panic!();
1873    ///   // ... details omitted ...
1874    /// }
1875    /// ```
1876    #[derive(Clone, Debug)]
1877    pub struct GetAppProfile(RequestBuilder<crate::model::GetAppProfileRequest>);
1878
1879    impl GetAppProfile {
1880        pub(crate) fn new(
1881            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1882        ) -> Self {
1883            Self(RequestBuilder::new(stub))
1884        }
1885
1886        /// Sets the full request, replacing any prior values.
1887        pub fn with_request<V: Into<crate::model::GetAppProfileRequest>>(mut self, v: V) -> Self {
1888            self.0.request = v.into();
1889            self
1890        }
1891
1892        /// Sets all the options, replacing any prior values.
1893        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1894            self.0.options = v.into();
1895            self
1896        }
1897
1898        /// Sends the request.
1899        pub async fn send(self) -> Result<crate::model::AppProfile> {
1900            (*self.0.stub)
1901                .get_app_profile(self.0.request, self.0.options)
1902                .await
1903                .map(crate::Response::into_body)
1904        }
1905
1906        /// Sets the value of [name][crate::model::GetAppProfileRequest::name].
1907        ///
1908        /// This is a **required** field for requests.
1909        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1910            self.0.request.name = v.into();
1911            self
1912        }
1913    }
1914
1915    #[doc(hidden)]
1916    impl crate::RequestBuilder for GetAppProfile {
1917        fn request_options(&mut self) -> &mut crate::RequestOptions {
1918            &mut self.0.options
1919        }
1920    }
1921
1922    /// The request builder for [BigtableInstanceAdmin::list_app_profiles][crate::client::BigtableInstanceAdmin::list_app_profiles] calls.
1923    ///
1924    /// # Example
1925    /// ```
1926    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::ListAppProfiles;
1927    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
1928    /// use google_cloud_gax::paginator::ItemPaginator;
1929    ///
1930    /// let builder = prepare_request_builder();
1931    /// let mut items = builder.by_item();
1932    /// while let Some(result) = items.next().await {
1933    ///   let item = result?;
1934    /// }
1935    /// # Ok(()) }
1936    ///
1937    /// fn prepare_request_builder() -> ListAppProfiles {
1938    ///   # panic!();
1939    ///   // ... details omitted ...
1940    /// }
1941    /// ```
1942    #[derive(Clone, Debug)]
1943    pub struct ListAppProfiles(RequestBuilder<crate::model::ListAppProfilesRequest>);
1944
1945    impl ListAppProfiles {
1946        pub(crate) fn new(
1947            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
1948        ) -> Self {
1949            Self(RequestBuilder::new(stub))
1950        }
1951
1952        /// Sets the full request, replacing any prior values.
1953        pub fn with_request<V: Into<crate::model::ListAppProfilesRequest>>(mut self, v: V) -> Self {
1954            self.0.request = v.into();
1955            self
1956        }
1957
1958        /// Sets all the options, replacing any prior values.
1959        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1960            self.0.options = v.into();
1961            self
1962        }
1963
1964        /// Sends the request.
1965        pub async fn send(self) -> Result<crate::model::ListAppProfilesResponse> {
1966            (*self.0.stub)
1967                .list_app_profiles(self.0.request, self.0.options)
1968                .await
1969                .map(crate::Response::into_body)
1970        }
1971
1972        /// Streams each page in the collection.
1973        pub fn by_page(
1974            self,
1975        ) -> impl google_cloud_gax::paginator::Paginator<
1976            crate::model::ListAppProfilesResponse,
1977            crate::Error,
1978        > {
1979            use std::clone::Clone;
1980            let token = self.0.request.page_token.clone();
1981            let execute = move |token: String| {
1982                let mut builder = self.clone();
1983                builder.0.request = builder.0.request.set_page_token(token);
1984                builder.send()
1985            };
1986            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1987        }
1988
1989        /// Streams each item in the collection.
1990        pub fn by_item(
1991            self,
1992        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1993            crate::model::ListAppProfilesResponse,
1994            crate::Error,
1995        > {
1996            use google_cloud_gax::paginator::Paginator;
1997            self.by_page().items()
1998        }
1999
2000        /// Sets the value of [parent][crate::model::ListAppProfilesRequest::parent].
2001        ///
2002        /// This is a **required** field for requests.
2003        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2004            self.0.request.parent = v.into();
2005            self
2006        }
2007
2008        /// Sets the value of [page_size][crate::model::ListAppProfilesRequest::page_size].
2009        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2010            self.0.request.page_size = v.into();
2011            self
2012        }
2013
2014        /// Sets the value of [page_token][crate::model::ListAppProfilesRequest::page_token].
2015        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2016            self.0.request.page_token = v.into();
2017            self
2018        }
2019    }
2020
2021    #[doc(hidden)]
2022    impl crate::RequestBuilder for ListAppProfiles {
2023        fn request_options(&mut self) -> &mut crate::RequestOptions {
2024            &mut self.0.options
2025        }
2026    }
2027
2028    /// The request builder for [BigtableInstanceAdmin::update_app_profile][crate::client::BigtableInstanceAdmin::update_app_profile] calls.
2029    ///
2030    /// # Example
2031    /// ```
2032    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::UpdateAppProfile;
2033    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
2034    /// use google_cloud_lro::Poller;
2035    ///
2036    /// let builder = prepare_request_builder();
2037    /// let response = builder.poller().until_done().await?;
2038    /// # Ok(()) }
2039    ///
2040    /// fn prepare_request_builder() -> UpdateAppProfile {
2041    ///   # panic!();
2042    ///   // ... details omitted ...
2043    /// }
2044    /// ```
2045    #[derive(Clone, Debug)]
2046    pub struct UpdateAppProfile(RequestBuilder<crate::model::UpdateAppProfileRequest>);
2047
2048    impl UpdateAppProfile {
2049        pub(crate) fn new(
2050            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2051        ) -> Self {
2052            Self(RequestBuilder::new(stub))
2053        }
2054
2055        /// Sets the full request, replacing any prior values.
2056        pub fn with_request<V: Into<crate::model::UpdateAppProfileRequest>>(
2057            mut self,
2058            v: V,
2059        ) -> Self {
2060            self.0.request = v.into();
2061            self
2062        }
2063
2064        /// Sets all the options, replacing any prior values.
2065        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2066            self.0.options = v.into();
2067            self
2068        }
2069
2070        /// Sends the request.
2071        ///
2072        /// # Long running operations
2073        ///
2074        /// This starts, but does not poll, a longrunning operation. More information
2075        /// on [update_app_profile][crate::client::BigtableInstanceAdmin::update_app_profile].
2076        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2077            (*self.0.stub)
2078                .update_app_profile(self.0.request, self.0.options)
2079                .await
2080                .map(crate::Response::into_body)
2081        }
2082
2083        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_app_profile`.
2084        pub fn poller(
2085            self,
2086        ) -> impl google_cloud_lro::Poller<
2087            crate::model::AppProfile,
2088            crate::model::UpdateAppProfileMetadata,
2089        > {
2090            type Operation = google_cloud_lro::internal::Operation<
2091                crate::model::AppProfile,
2092                crate::model::UpdateAppProfileMetadata,
2093            >;
2094            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2095            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2096            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2097            if let Some(ref mut details) = poller_options.tracing {
2098                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::update_app_profile::until_done";
2099            }
2100
2101            let stub = self.0.stub.clone();
2102            let mut options = self.0.options.clone();
2103            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2104            let query = move |name| {
2105                let stub = stub.clone();
2106                let options = options.clone();
2107                async {
2108                    let op = GetOperation::new(stub)
2109                        .set_name(name)
2110                        .with_options(options)
2111                        .send()
2112                        .await?;
2113                    Ok(Operation::new(op))
2114                }
2115            };
2116
2117            let start = move || async {
2118                let op = self.send().await?;
2119                Ok(Operation::new(op))
2120            };
2121
2122            use google_cloud_lro::internal::PollerExt;
2123            {
2124                google_cloud_lro::internal::new_poller(
2125                    polling_error_policy,
2126                    polling_backoff_policy,
2127                    start,
2128                    query,
2129                )
2130            }
2131            .with_options(poller_options)
2132        }
2133
2134        /// Sets the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2135        ///
2136        /// This is a **required** field for requests.
2137        pub fn set_app_profile<T>(mut self, v: T) -> Self
2138        where
2139            T: std::convert::Into<crate::model::AppProfile>,
2140        {
2141            self.0.request.app_profile = std::option::Option::Some(v.into());
2142            self
2143        }
2144
2145        /// Sets or clears the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2146        ///
2147        /// This is a **required** field for requests.
2148        pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
2149        where
2150            T: std::convert::Into<crate::model::AppProfile>,
2151        {
2152            self.0.request.app_profile = v.map(|x| x.into());
2153            self
2154        }
2155
2156        /// Sets the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2157        ///
2158        /// This is a **required** field for requests.
2159        pub fn set_update_mask<T>(mut self, v: T) -> Self
2160        where
2161            T: std::convert::Into<wkt::FieldMask>,
2162        {
2163            self.0.request.update_mask = std::option::Option::Some(v.into());
2164            self
2165        }
2166
2167        /// Sets or clears the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2168        ///
2169        /// This is a **required** field for requests.
2170        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2171        where
2172            T: std::convert::Into<wkt::FieldMask>,
2173        {
2174            self.0.request.update_mask = v.map(|x| x.into());
2175            self
2176        }
2177
2178        /// Sets the value of [ignore_warnings][crate::model::UpdateAppProfileRequest::ignore_warnings].
2179        pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
2180            self.0.request.ignore_warnings = v.into();
2181            self
2182        }
2183    }
2184
2185    #[doc(hidden)]
2186    impl crate::RequestBuilder for UpdateAppProfile {
2187        fn request_options(&mut self) -> &mut crate::RequestOptions {
2188            &mut self.0.options
2189        }
2190    }
2191
2192    /// The request builder for [BigtableInstanceAdmin::delete_app_profile][crate::client::BigtableInstanceAdmin::delete_app_profile] calls.
2193    ///
2194    /// # Example
2195    /// ```
2196    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::DeleteAppProfile;
2197    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
2198    ///
2199    /// let builder = prepare_request_builder();
2200    /// let response = builder.send().await?;
2201    /// # Ok(()) }
2202    ///
2203    /// fn prepare_request_builder() -> DeleteAppProfile {
2204    ///   # panic!();
2205    ///   // ... details omitted ...
2206    /// }
2207    /// ```
2208    #[derive(Clone, Debug)]
2209    pub struct DeleteAppProfile(RequestBuilder<crate::model::DeleteAppProfileRequest>);
2210
2211    impl DeleteAppProfile {
2212        pub(crate) fn new(
2213            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2214        ) -> Self {
2215            Self(RequestBuilder::new(stub))
2216        }
2217
2218        /// Sets the full request, replacing any prior values.
2219        pub fn with_request<V: Into<crate::model::DeleteAppProfileRequest>>(
2220            mut self,
2221            v: V,
2222        ) -> Self {
2223            self.0.request = v.into();
2224            self
2225        }
2226
2227        /// Sets all the options, replacing any prior values.
2228        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2229            self.0.options = v.into();
2230            self
2231        }
2232
2233        /// Sends the request.
2234        pub async fn send(self) -> Result<()> {
2235            (*self.0.stub)
2236                .delete_app_profile(self.0.request, self.0.options)
2237                .await
2238                .map(crate::Response::into_body)
2239        }
2240
2241        /// Sets the value of [name][crate::model::DeleteAppProfileRequest::name].
2242        ///
2243        /// This is a **required** field for requests.
2244        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2245            self.0.request.name = v.into();
2246            self
2247        }
2248
2249        /// Sets the value of [ignore_warnings][crate::model::DeleteAppProfileRequest::ignore_warnings].
2250        ///
2251        /// This is a **required** field for requests.
2252        pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
2253            self.0.request.ignore_warnings = v.into();
2254            self
2255        }
2256    }
2257
2258    #[doc(hidden)]
2259    impl crate::RequestBuilder for DeleteAppProfile {
2260        fn request_options(&mut self) -> &mut crate::RequestOptions {
2261            &mut self.0.options
2262        }
2263    }
2264
2265    /// The request builder for [BigtableInstanceAdmin::get_iam_policy][crate::client::BigtableInstanceAdmin::get_iam_policy] calls.
2266    ///
2267    /// # Example
2268    /// ```
2269    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::GetIamPolicy;
2270    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
2271    ///
2272    /// let builder = prepare_request_builder();
2273    /// let response = builder.send().await?;
2274    /// # Ok(()) }
2275    ///
2276    /// fn prepare_request_builder() -> GetIamPolicy {
2277    ///   # panic!();
2278    ///   // ... details omitted ...
2279    /// }
2280    /// ```
2281    #[derive(Clone, Debug)]
2282    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
2283
2284    impl GetIamPolicy {
2285        pub(crate) fn new(
2286            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2287        ) -> Self {
2288            Self(RequestBuilder::new(stub))
2289        }
2290
2291        /// Sets the full request, replacing any prior values.
2292        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
2293            mut self,
2294            v: V,
2295        ) -> Self {
2296            self.0.request = v.into();
2297            self
2298        }
2299
2300        /// Sets all the options, replacing any prior values.
2301        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2302            self.0.options = v.into();
2303            self
2304        }
2305
2306        /// Sends the request.
2307        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
2308            (*self.0.stub)
2309                .get_iam_policy(self.0.request, self.0.options)
2310                .await
2311                .map(crate::Response::into_body)
2312        }
2313
2314        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
2315        ///
2316        /// This is a **required** field for requests.
2317        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2318            self.0.request.resource = v.into();
2319            self
2320        }
2321
2322        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
2323        pub fn set_options<T>(mut self, v: T) -> Self
2324        where
2325            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
2326        {
2327            self.0.request.options = std::option::Option::Some(v.into());
2328            self
2329        }
2330
2331        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
2332        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
2333        where
2334            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
2335        {
2336            self.0.request.options = v.map(|x| x.into());
2337            self
2338        }
2339    }
2340
2341    #[doc(hidden)]
2342    impl crate::RequestBuilder for GetIamPolicy {
2343        fn request_options(&mut self) -> &mut crate::RequestOptions {
2344            &mut self.0.options
2345        }
2346    }
2347
2348    /// The request builder for [BigtableInstanceAdmin::set_iam_policy][crate::client::BigtableInstanceAdmin::set_iam_policy] calls.
2349    ///
2350    /// # Example
2351    /// ```
2352    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::SetIamPolicy;
2353    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
2354    ///
2355    /// let builder = prepare_request_builder();
2356    /// let response = builder.send().await?;
2357    /// # Ok(()) }
2358    ///
2359    /// fn prepare_request_builder() -> SetIamPolicy {
2360    ///   # panic!();
2361    ///   // ... details omitted ...
2362    /// }
2363    /// ```
2364    #[derive(Clone, Debug)]
2365    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
2366
2367    impl SetIamPolicy {
2368        pub(crate) fn new(
2369            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2370        ) -> Self {
2371            Self(RequestBuilder::new(stub))
2372        }
2373
2374        /// Sets the full request, replacing any prior values.
2375        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
2376            mut self,
2377            v: V,
2378        ) -> Self {
2379            self.0.request = v.into();
2380            self
2381        }
2382
2383        /// Sets all the options, replacing any prior values.
2384        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2385            self.0.options = v.into();
2386            self
2387        }
2388
2389        /// Sends the request.
2390        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
2391            (*self.0.stub)
2392                .set_iam_policy(self.0.request, self.0.options)
2393                .await
2394                .map(crate::Response::into_body)
2395        }
2396
2397        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
2398        ///
2399        /// This is a **required** field for requests.
2400        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2401            self.0.request.resource = v.into();
2402            self
2403        }
2404
2405        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
2406        ///
2407        /// This is a **required** field for requests.
2408        pub fn set_policy<T>(mut self, v: T) -> Self
2409        where
2410            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
2411        {
2412            self.0.request.policy = std::option::Option::Some(v.into());
2413            self
2414        }
2415
2416        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
2417        ///
2418        /// This is a **required** field for requests.
2419        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
2420        where
2421            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
2422        {
2423            self.0.request.policy = v.map(|x| x.into());
2424            self
2425        }
2426
2427        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
2428        pub fn set_update_mask<T>(mut self, v: T) -> Self
2429        where
2430            T: std::convert::Into<wkt::FieldMask>,
2431        {
2432            self.0.request.update_mask = std::option::Option::Some(v.into());
2433            self
2434        }
2435
2436        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
2437        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2438        where
2439            T: std::convert::Into<wkt::FieldMask>,
2440        {
2441            self.0.request.update_mask = v.map(|x| x.into());
2442            self
2443        }
2444    }
2445
2446    #[doc(hidden)]
2447    impl crate::RequestBuilder for SetIamPolicy {
2448        fn request_options(&mut self) -> &mut crate::RequestOptions {
2449            &mut self.0.options
2450        }
2451    }
2452
2453    /// The request builder for [BigtableInstanceAdmin::test_iam_permissions][crate::client::BigtableInstanceAdmin::test_iam_permissions] calls.
2454    ///
2455    /// # Example
2456    /// ```
2457    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::TestIamPermissions;
2458    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
2459    ///
2460    /// let builder = prepare_request_builder();
2461    /// let response = builder.send().await?;
2462    /// # Ok(()) }
2463    ///
2464    /// fn prepare_request_builder() -> TestIamPermissions {
2465    ///   # panic!();
2466    ///   // ... details omitted ...
2467    /// }
2468    /// ```
2469    #[derive(Clone, Debug)]
2470    pub struct TestIamPermissions(
2471        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
2472    );
2473
2474    impl TestIamPermissions {
2475        pub(crate) fn new(
2476            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2477        ) -> Self {
2478            Self(RequestBuilder::new(stub))
2479        }
2480
2481        /// Sets the full request, replacing any prior values.
2482        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
2483            mut self,
2484            v: V,
2485        ) -> Self {
2486            self.0.request = v.into();
2487            self
2488        }
2489
2490        /// Sets all the options, replacing any prior values.
2491        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2492            self.0.options = v.into();
2493            self
2494        }
2495
2496        /// Sends the request.
2497        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
2498            (*self.0.stub)
2499                .test_iam_permissions(self.0.request, self.0.options)
2500                .await
2501                .map(crate::Response::into_body)
2502        }
2503
2504        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
2505        ///
2506        /// This is a **required** field for requests.
2507        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2508            self.0.request.resource = v.into();
2509            self
2510        }
2511
2512        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
2513        ///
2514        /// This is a **required** field for requests.
2515        pub fn set_permissions<T, V>(mut self, v: T) -> Self
2516        where
2517            T: std::iter::IntoIterator<Item = V>,
2518            V: std::convert::Into<std::string::String>,
2519        {
2520            use std::iter::Iterator;
2521            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
2522            self
2523        }
2524    }
2525
2526    #[doc(hidden)]
2527    impl crate::RequestBuilder for TestIamPermissions {
2528        fn request_options(&mut self) -> &mut crate::RequestOptions {
2529            &mut self.0.options
2530        }
2531    }
2532
2533    /// The request builder for [BigtableInstanceAdmin::list_hot_tablets][crate::client::BigtableInstanceAdmin::list_hot_tablets] calls.
2534    ///
2535    /// # Example
2536    /// ```
2537    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::ListHotTablets;
2538    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
2539    /// use google_cloud_gax::paginator::ItemPaginator;
2540    ///
2541    /// let builder = prepare_request_builder();
2542    /// let mut items = builder.by_item();
2543    /// while let Some(result) = items.next().await {
2544    ///   let item = result?;
2545    /// }
2546    /// # Ok(()) }
2547    ///
2548    /// fn prepare_request_builder() -> ListHotTablets {
2549    ///   # panic!();
2550    ///   // ... details omitted ...
2551    /// }
2552    /// ```
2553    #[derive(Clone, Debug)]
2554    pub struct ListHotTablets(RequestBuilder<crate::model::ListHotTabletsRequest>);
2555
2556    impl ListHotTablets {
2557        pub(crate) fn new(
2558            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2559        ) -> Self {
2560            Self(RequestBuilder::new(stub))
2561        }
2562
2563        /// Sets the full request, replacing any prior values.
2564        pub fn with_request<V: Into<crate::model::ListHotTabletsRequest>>(mut self, v: V) -> Self {
2565            self.0.request = v.into();
2566            self
2567        }
2568
2569        /// Sets all the options, replacing any prior values.
2570        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2571            self.0.options = v.into();
2572            self
2573        }
2574
2575        /// Sends the request.
2576        pub async fn send(self) -> Result<crate::model::ListHotTabletsResponse> {
2577            (*self.0.stub)
2578                .list_hot_tablets(self.0.request, self.0.options)
2579                .await
2580                .map(crate::Response::into_body)
2581        }
2582
2583        /// Streams each page in the collection.
2584        pub fn by_page(
2585            self,
2586        ) -> impl google_cloud_gax::paginator::Paginator<
2587            crate::model::ListHotTabletsResponse,
2588            crate::Error,
2589        > {
2590            use std::clone::Clone;
2591            let token = self.0.request.page_token.clone();
2592            let execute = move |token: String| {
2593                let mut builder = self.clone();
2594                builder.0.request = builder.0.request.set_page_token(token);
2595                builder.send()
2596            };
2597            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2598        }
2599
2600        /// Streams each item in the collection.
2601        pub fn by_item(
2602            self,
2603        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2604            crate::model::ListHotTabletsResponse,
2605            crate::Error,
2606        > {
2607            use google_cloud_gax::paginator::Paginator;
2608            self.by_page().items()
2609        }
2610
2611        /// Sets the value of [parent][crate::model::ListHotTabletsRequest::parent].
2612        ///
2613        /// This is a **required** field for requests.
2614        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2615            self.0.request.parent = v.into();
2616            self
2617        }
2618
2619        /// Sets the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2620        pub fn set_start_time<T>(mut self, v: T) -> Self
2621        where
2622            T: std::convert::Into<wkt::Timestamp>,
2623        {
2624            self.0.request.start_time = std::option::Option::Some(v.into());
2625            self
2626        }
2627
2628        /// Sets or clears the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2629        pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2630        where
2631            T: std::convert::Into<wkt::Timestamp>,
2632        {
2633            self.0.request.start_time = v.map(|x| x.into());
2634            self
2635        }
2636
2637        /// Sets the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2638        pub fn set_end_time<T>(mut self, v: T) -> Self
2639        where
2640            T: std::convert::Into<wkt::Timestamp>,
2641        {
2642            self.0.request.end_time = std::option::Option::Some(v.into());
2643            self
2644        }
2645
2646        /// Sets or clears the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2647        pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2648        where
2649            T: std::convert::Into<wkt::Timestamp>,
2650        {
2651            self.0.request.end_time = v.map(|x| x.into());
2652            self
2653        }
2654
2655        /// Sets the value of [page_size][crate::model::ListHotTabletsRequest::page_size].
2656        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2657            self.0.request.page_size = v.into();
2658            self
2659        }
2660
2661        /// Sets the value of [page_token][crate::model::ListHotTabletsRequest::page_token].
2662        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2663            self.0.request.page_token = v.into();
2664            self
2665        }
2666    }
2667
2668    #[doc(hidden)]
2669    impl crate::RequestBuilder for ListHotTablets {
2670        fn request_options(&mut self) -> &mut crate::RequestOptions {
2671            &mut self.0.options
2672        }
2673    }
2674
2675    /// The request builder for [BigtableInstanceAdmin::create_logical_view][crate::client::BigtableInstanceAdmin::create_logical_view] calls.
2676    ///
2677    /// # Example
2678    /// ```
2679    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::CreateLogicalView;
2680    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
2681    /// use google_cloud_lro::Poller;
2682    ///
2683    /// let builder = prepare_request_builder();
2684    /// let response = builder.poller().until_done().await?;
2685    /// # Ok(()) }
2686    ///
2687    /// fn prepare_request_builder() -> CreateLogicalView {
2688    ///   # panic!();
2689    ///   // ... details omitted ...
2690    /// }
2691    /// ```
2692    #[derive(Clone, Debug)]
2693    pub struct CreateLogicalView(RequestBuilder<crate::model::CreateLogicalViewRequest>);
2694
2695    impl CreateLogicalView {
2696        pub(crate) fn new(
2697            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2698        ) -> Self {
2699            Self(RequestBuilder::new(stub))
2700        }
2701
2702        /// Sets the full request, replacing any prior values.
2703        pub fn with_request<V: Into<crate::model::CreateLogicalViewRequest>>(
2704            mut self,
2705            v: V,
2706        ) -> Self {
2707            self.0.request = v.into();
2708            self
2709        }
2710
2711        /// Sets all the options, replacing any prior values.
2712        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2713            self.0.options = v.into();
2714            self
2715        }
2716
2717        /// Sends the request.
2718        ///
2719        /// # Long running operations
2720        ///
2721        /// This starts, but does not poll, a longrunning operation. More information
2722        /// on [create_logical_view][crate::client::BigtableInstanceAdmin::create_logical_view].
2723        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2724            (*self.0.stub)
2725                .create_logical_view(self.0.request, self.0.options)
2726                .await
2727                .map(crate::Response::into_body)
2728        }
2729
2730        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_logical_view`.
2731        pub fn poller(
2732            self,
2733        ) -> impl google_cloud_lro::Poller<
2734            crate::model::LogicalView,
2735            crate::model::CreateLogicalViewMetadata,
2736        > {
2737            type Operation = google_cloud_lro::internal::Operation<
2738                crate::model::LogicalView,
2739                crate::model::CreateLogicalViewMetadata,
2740            >;
2741            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2742            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2743            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2744            if let Some(ref mut details) = poller_options.tracing {
2745                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::create_logical_view::until_done";
2746            }
2747
2748            let stub = self.0.stub.clone();
2749            let mut options = self.0.options.clone();
2750            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2751            let query = move |name| {
2752                let stub = stub.clone();
2753                let options = options.clone();
2754                async {
2755                    let op = GetOperation::new(stub)
2756                        .set_name(name)
2757                        .with_options(options)
2758                        .send()
2759                        .await?;
2760                    Ok(Operation::new(op))
2761                }
2762            };
2763
2764            let start = move || async {
2765                let op = self.send().await?;
2766                Ok(Operation::new(op))
2767            };
2768
2769            use google_cloud_lro::internal::PollerExt;
2770            {
2771                google_cloud_lro::internal::new_poller(
2772                    polling_error_policy,
2773                    polling_backoff_policy,
2774                    start,
2775                    query,
2776                )
2777            }
2778            .with_options(poller_options)
2779        }
2780
2781        /// Sets the value of [parent][crate::model::CreateLogicalViewRequest::parent].
2782        ///
2783        /// This is a **required** field for requests.
2784        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2785            self.0.request.parent = v.into();
2786            self
2787        }
2788
2789        /// Sets the value of [logical_view_id][crate::model::CreateLogicalViewRequest::logical_view_id].
2790        ///
2791        /// This is a **required** field for requests.
2792        pub fn set_logical_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2793            self.0.request.logical_view_id = v.into();
2794            self
2795        }
2796
2797        /// Sets the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2798        ///
2799        /// This is a **required** field for requests.
2800        pub fn set_logical_view<T>(mut self, v: T) -> Self
2801        where
2802            T: std::convert::Into<crate::model::LogicalView>,
2803        {
2804            self.0.request.logical_view = std::option::Option::Some(v.into());
2805            self
2806        }
2807
2808        /// Sets or clears the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2809        ///
2810        /// This is a **required** field for requests.
2811        pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2812        where
2813            T: std::convert::Into<crate::model::LogicalView>,
2814        {
2815            self.0.request.logical_view = v.map(|x| x.into());
2816            self
2817        }
2818    }
2819
2820    #[doc(hidden)]
2821    impl crate::RequestBuilder for CreateLogicalView {
2822        fn request_options(&mut self) -> &mut crate::RequestOptions {
2823            &mut self.0.options
2824        }
2825    }
2826
2827    /// The request builder for [BigtableInstanceAdmin::get_logical_view][crate::client::BigtableInstanceAdmin::get_logical_view] calls.
2828    ///
2829    /// # Example
2830    /// ```
2831    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::GetLogicalView;
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() -> GetLogicalView {
2839    ///   # panic!();
2840    ///   // ... details omitted ...
2841    /// }
2842    /// ```
2843    #[derive(Clone, Debug)]
2844    pub struct GetLogicalView(RequestBuilder<crate::model::GetLogicalViewRequest>);
2845
2846    impl GetLogicalView {
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::GetLogicalViewRequest>>(mut self, v: V) -> Self {
2855            self.0.request = v.into();
2856            self
2857        }
2858
2859        /// Sets all the options, replacing any prior values.
2860        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2861            self.0.options = v.into();
2862            self
2863        }
2864
2865        /// Sends the request.
2866        pub async fn send(self) -> Result<crate::model::LogicalView> {
2867            (*self.0.stub)
2868                .get_logical_view(self.0.request, self.0.options)
2869                .await
2870                .map(crate::Response::into_body)
2871        }
2872
2873        /// Sets the value of [name][crate::model::GetLogicalViewRequest::name].
2874        ///
2875        /// This is a **required** field for requests.
2876        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2877            self.0.request.name = v.into();
2878            self
2879        }
2880    }
2881
2882    #[doc(hidden)]
2883    impl crate::RequestBuilder for GetLogicalView {
2884        fn request_options(&mut self) -> &mut crate::RequestOptions {
2885            &mut self.0.options
2886        }
2887    }
2888
2889    /// The request builder for [BigtableInstanceAdmin::list_logical_views][crate::client::BigtableInstanceAdmin::list_logical_views] calls.
2890    ///
2891    /// # Example
2892    /// ```
2893    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::ListLogicalViews;
2894    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
2895    /// use google_cloud_gax::paginator::ItemPaginator;
2896    ///
2897    /// let builder = prepare_request_builder();
2898    /// let mut items = builder.by_item();
2899    /// while let Some(result) = items.next().await {
2900    ///   let item = result?;
2901    /// }
2902    /// # Ok(()) }
2903    ///
2904    /// fn prepare_request_builder() -> ListLogicalViews {
2905    ///   # panic!();
2906    ///   // ... details omitted ...
2907    /// }
2908    /// ```
2909    #[derive(Clone, Debug)]
2910    pub struct ListLogicalViews(RequestBuilder<crate::model::ListLogicalViewsRequest>);
2911
2912    impl ListLogicalViews {
2913        pub(crate) fn new(
2914            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
2915        ) -> Self {
2916            Self(RequestBuilder::new(stub))
2917        }
2918
2919        /// Sets the full request, replacing any prior values.
2920        pub fn with_request<V: Into<crate::model::ListLogicalViewsRequest>>(
2921            mut self,
2922            v: V,
2923        ) -> Self {
2924            self.0.request = v.into();
2925            self
2926        }
2927
2928        /// Sets all the options, replacing any prior values.
2929        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2930            self.0.options = v.into();
2931            self
2932        }
2933
2934        /// Sends the request.
2935        pub async fn send(self) -> Result<crate::model::ListLogicalViewsResponse> {
2936            (*self.0.stub)
2937                .list_logical_views(self.0.request, self.0.options)
2938                .await
2939                .map(crate::Response::into_body)
2940        }
2941
2942        /// Streams each page in the collection.
2943        pub fn by_page(
2944            self,
2945        ) -> impl google_cloud_gax::paginator::Paginator<
2946            crate::model::ListLogicalViewsResponse,
2947            crate::Error,
2948        > {
2949            use std::clone::Clone;
2950            let token = self.0.request.page_token.clone();
2951            let execute = move |token: String| {
2952                let mut builder = self.clone();
2953                builder.0.request = builder.0.request.set_page_token(token);
2954                builder.send()
2955            };
2956            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2957        }
2958
2959        /// Streams each item in the collection.
2960        pub fn by_item(
2961            self,
2962        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2963            crate::model::ListLogicalViewsResponse,
2964            crate::Error,
2965        > {
2966            use google_cloud_gax::paginator::Paginator;
2967            self.by_page().items()
2968        }
2969
2970        /// Sets the value of [parent][crate::model::ListLogicalViewsRequest::parent].
2971        ///
2972        /// This is a **required** field for requests.
2973        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2974            self.0.request.parent = v.into();
2975            self
2976        }
2977
2978        /// Sets the value of [page_size][crate::model::ListLogicalViewsRequest::page_size].
2979        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2980            self.0.request.page_size = v.into();
2981            self
2982        }
2983
2984        /// Sets the value of [page_token][crate::model::ListLogicalViewsRequest::page_token].
2985        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2986            self.0.request.page_token = v.into();
2987            self
2988        }
2989    }
2990
2991    #[doc(hidden)]
2992    impl crate::RequestBuilder for ListLogicalViews {
2993        fn request_options(&mut self) -> &mut crate::RequestOptions {
2994            &mut self.0.options
2995        }
2996    }
2997
2998    /// The request builder for [BigtableInstanceAdmin::update_logical_view][crate::client::BigtableInstanceAdmin::update_logical_view] calls.
2999    ///
3000    /// # Example
3001    /// ```
3002    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::UpdateLogicalView;
3003    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
3004    /// use google_cloud_lro::Poller;
3005    ///
3006    /// let builder = prepare_request_builder();
3007    /// let response = builder.poller().until_done().await?;
3008    /// # Ok(()) }
3009    ///
3010    /// fn prepare_request_builder() -> UpdateLogicalView {
3011    ///   # panic!();
3012    ///   // ... details omitted ...
3013    /// }
3014    /// ```
3015    #[derive(Clone, Debug)]
3016    pub struct UpdateLogicalView(RequestBuilder<crate::model::UpdateLogicalViewRequest>);
3017
3018    impl UpdateLogicalView {
3019        pub(crate) fn new(
3020            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3021        ) -> Self {
3022            Self(RequestBuilder::new(stub))
3023        }
3024
3025        /// Sets the full request, replacing any prior values.
3026        pub fn with_request<V: Into<crate::model::UpdateLogicalViewRequest>>(
3027            mut self,
3028            v: V,
3029        ) -> Self {
3030            self.0.request = v.into();
3031            self
3032        }
3033
3034        /// Sets all the options, replacing any prior values.
3035        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3036            self.0.options = v.into();
3037            self
3038        }
3039
3040        /// Sends the request.
3041        ///
3042        /// # Long running operations
3043        ///
3044        /// This starts, but does not poll, a longrunning operation. More information
3045        /// on [update_logical_view][crate::client::BigtableInstanceAdmin::update_logical_view].
3046        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3047            (*self.0.stub)
3048                .update_logical_view(self.0.request, self.0.options)
3049                .await
3050                .map(crate::Response::into_body)
3051        }
3052
3053        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_logical_view`.
3054        pub fn poller(
3055            self,
3056        ) -> impl google_cloud_lro::Poller<
3057            crate::model::LogicalView,
3058            crate::model::UpdateLogicalViewMetadata,
3059        > {
3060            type Operation = google_cloud_lro::internal::Operation<
3061                crate::model::LogicalView,
3062                crate::model::UpdateLogicalViewMetadata,
3063            >;
3064            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3065            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3066            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3067            if let Some(ref mut details) = poller_options.tracing {
3068                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::update_logical_view::until_done";
3069            }
3070
3071            let stub = self.0.stub.clone();
3072            let mut options = self.0.options.clone();
3073            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3074            let query = move |name| {
3075                let stub = stub.clone();
3076                let options = options.clone();
3077                async {
3078                    let op = GetOperation::new(stub)
3079                        .set_name(name)
3080                        .with_options(options)
3081                        .send()
3082                        .await?;
3083                    Ok(Operation::new(op))
3084                }
3085            };
3086
3087            let start = move || async {
3088                let op = self.send().await?;
3089                Ok(Operation::new(op))
3090            };
3091
3092            use google_cloud_lro::internal::PollerExt;
3093            {
3094                google_cloud_lro::internal::new_poller(
3095                    polling_error_policy,
3096                    polling_backoff_policy,
3097                    start,
3098                    query,
3099                )
3100            }
3101            .with_options(poller_options)
3102        }
3103
3104        /// Sets the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
3105        ///
3106        /// This is a **required** field for requests.
3107        pub fn set_logical_view<T>(mut self, v: T) -> Self
3108        where
3109            T: std::convert::Into<crate::model::LogicalView>,
3110        {
3111            self.0.request.logical_view = std::option::Option::Some(v.into());
3112            self
3113        }
3114
3115        /// Sets or clears the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
3116        ///
3117        /// This is a **required** field for requests.
3118        pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
3119        where
3120            T: std::convert::Into<crate::model::LogicalView>,
3121        {
3122            self.0.request.logical_view = v.map(|x| x.into());
3123            self
3124        }
3125
3126        /// Sets the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
3127        pub fn set_update_mask<T>(mut self, v: T) -> Self
3128        where
3129            T: std::convert::Into<wkt::FieldMask>,
3130        {
3131            self.0.request.update_mask = std::option::Option::Some(v.into());
3132            self
3133        }
3134
3135        /// Sets or clears the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
3136        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3137        where
3138            T: std::convert::Into<wkt::FieldMask>,
3139        {
3140            self.0.request.update_mask = v.map(|x| x.into());
3141            self
3142        }
3143    }
3144
3145    #[doc(hidden)]
3146    impl crate::RequestBuilder for UpdateLogicalView {
3147        fn request_options(&mut self) -> &mut crate::RequestOptions {
3148            &mut self.0.options
3149        }
3150    }
3151
3152    /// The request builder for [BigtableInstanceAdmin::delete_logical_view][crate::client::BigtableInstanceAdmin::delete_logical_view] calls.
3153    ///
3154    /// # Example
3155    /// ```
3156    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::DeleteLogicalView;
3157    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
3158    ///
3159    /// let builder = prepare_request_builder();
3160    /// let response = builder.send().await?;
3161    /// # Ok(()) }
3162    ///
3163    /// fn prepare_request_builder() -> DeleteLogicalView {
3164    ///   # panic!();
3165    ///   // ... details omitted ...
3166    /// }
3167    /// ```
3168    #[derive(Clone, Debug)]
3169    pub struct DeleteLogicalView(RequestBuilder<crate::model::DeleteLogicalViewRequest>);
3170
3171    impl DeleteLogicalView {
3172        pub(crate) fn new(
3173            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3174        ) -> Self {
3175            Self(RequestBuilder::new(stub))
3176        }
3177
3178        /// Sets the full request, replacing any prior values.
3179        pub fn with_request<V: Into<crate::model::DeleteLogicalViewRequest>>(
3180            mut self,
3181            v: V,
3182        ) -> Self {
3183            self.0.request = v.into();
3184            self
3185        }
3186
3187        /// Sets all the options, replacing any prior values.
3188        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3189            self.0.options = v.into();
3190            self
3191        }
3192
3193        /// Sends the request.
3194        pub async fn send(self) -> Result<()> {
3195            (*self.0.stub)
3196                .delete_logical_view(self.0.request, self.0.options)
3197                .await
3198                .map(crate::Response::into_body)
3199        }
3200
3201        /// Sets the value of [name][crate::model::DeleteLogicalViewRequest::name].
3202        ///
3203        /// This is a **required** field for requests.
3204        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3205            self.0.request.name = v.into();
3206            self
3207        }
3208
3209        /// Sets the value of [etag][crate::model::DeleteLogicalViewRequest::etag].
3210        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3211            self.0.request.etag = v.into();
3212            self
3213        }
3214    }
3215
3216    #[doc(hidden)]
3217    impl crate::RequestBuilder for DeleteLogicalView {
3218        fn request_options(&mut self) -> &mut crate::RequestOptions {
3219            &mut self.0.options
3220        }
3221    }
3222
3223    /// The request builder for [BigtableInstanceAdmin::create_materialized_view][crate::client::BigtableInstanceAdmin::create_materialized_view] calls.
3224    ///
3225    /// # Example
3226    /// ```
3227    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::CreateMaterializedView;
3228    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
3229    /// use google_cloud_lro::Poller;
3230    ///
3231    /// let builder = prepare_request_builder();
3232    /// let response = builder.poller().until_done().await?;
3233    /// # Ok(()) }
3234    ///
3235    /// fn prepare_request_builder() -> CreateMaterializedView {
3236    ///   # panic!();
3237    ///   // ... details omitted ...
3238    /// }
3239    /// ```
3240    #[derive(Clone, Debug)]
3241    pub struct CreateMaterializedView(RequestBuilder<crate::model::CreateMaterializedViewRequest>);
3242
3243    impl CreateMaterializedView {
3244        pub(crate) fn new(
3245            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3246        ) -> Self {
3247            Self(RequestBuilder::new(stub))
3248        }
3249
3250        /// Sets the full request, replacing any prior values.
3251        pub fn with_request<V: Into<crate::model::CreateMaterializedViewRequest>>(
3252            mut self,
3253            v: V,
3254        ) -> Self {
3255            self.0.request = v.into();
3256            self
3257        }
3258
3259        /// Sets all the options, replacing any prior values.
3260        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3261            self.0.options = v.into();
3262            self
3263        }
3264
3265        /// Sends the request.
3266        ///
3267        /// # Long running operations
3268        ///
3269        /// This starts, but does not poll, a longrunning operation. More information
3270        /// on [create_materialized_view][crate::client::BigtableInstanceAdmin::create_materialized_view].
3271        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3272            (*self.0.stub)
3273                .create_materialized_view(self.0.request, self.0.options)
3274                .await
3275                .map(crate::Response::into_body)
3276        }
3277
3278        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_materialized_view`.
3279        pub fn poller(
3280            self,
3281        ) -> impl google_cloud_lro::Poller<
3282            crate::model::MaterializedView,
3283            crate::model::CreateMaterializedViewMetadata,
3284        > {
3285            type Operation = google_cloud_lro::internal::Operation<
3286                crate::model::MaterializedView,
3287                crate::model::CreateMaterializedViewMetadata,
3288            >;
3289            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3290            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3291            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3292            if let Some(ref mut details) = poller_options.tracing {
3293                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::create_materialized_view::until_done";
3294            }
3295
3296            let stub = self.0.stub.clone();
3297            let mut options = self.0.options.clone();
3298            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3299            let query = move |name| {
3300                let stub = stub.clone();
3301                let options = options.clone();
3302                async {
3303                    let op = GetOperation::new(stub)
3304                        .set_name(name)
3305                        .with_options(options)
3306                        .send()
3307                        .await?;
3308                    Ok(Operation::new(op))
3309                }
3310            };
3311
3312            let start = move || async {
3313                let op = self.send().await?;
3314                Ok(Operation::new(op))
3315            };
3316
3317            use google_cloud_lro::internal::PollerExt;
3318            {
3319                google_cloud_lro::internal::new_poller(
3320                    polling_error_policy,
3321                    polling_backoff_policy,
3322                    start,
3323                    query,
3324                )
3325            }
3326            .with_options(poller_options)
3327        }
3328
3329        /// Sets the value of [parent][crate::model::CreateMaterializedViewRequest::parent].
3330        ///
3331        /// This is a **required** field for requests.
3332        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3333            self.0.request.parent = v.into();
3334            self
3335        }
3336
3337        /// Sets the value of [materialized_view_id][crate::model::CreateMaterializedViewRequest::materialized_view_id].
3338        ///
3339        /// This is a **required** field for requests.
3340        pub fn set_materialized_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3341            self.0.request.materialized_view_id = v.into();
3342            self
3343        }
3344
3345        /// Sets the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3346        ///
3347        /// This is a **required** field for requests.
3348        pub fn set_materialized_view<T>(mut self, v: T) -> Self
3349        where
3350            T: std::convert::Into<crate::model::MaterializedView>,
3351        {
3352            self.0.request.materialized_view = std::option::Option::Some(v.into());
3353            self
3354        }
3355
3356        /// Sets or clears the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3357        ///
3358        /// This is a **required** field for requests.
3359        pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3360        where
3361            T: std::convert::Into<crate::model::MaterializedView>,
3362        {
3363            self.0.request.materialized_view = v.map(|x| x.into());
3364            self
3365        }
3366    }
3367
3368    #[doc(hidden)]
3369    impl crate::RequestBuilder for CreateMaterializedView {
3370        fn request_options(&mut self) -> &mut crate::RequestOptions {
3371            &mut self.0.options
3372        }
3373    }
3374
3375    /// The request builder for [BigtableInstanceAdmin::get_materialized_view][crate::client::BigtableInstanceAdmin::get_materialized_view] calls.
3376    ///
3377    /// # Example
3378    /// ```
3379    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::GetMaterializedView;
3380    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
3381    ///
3382    /// let builder = prepare_request_builder();
3383    /// let response = builder.send().await?;
3384    /// # Ok(()) }
3385    ///
3386    /// fn prepare_request_builder() -> GetMaterializedView {
3387    ///   # panic!();
3388    ///   // ... details omitted ...
3389    /// }
3390    /// ```
3391    #[derive(Clone, Debug)]
3392    pub struct GetMaterializedView(RequestBuilder<crate::model::GetMaterializedViewRequest>);
3393
3394    impl GetMaterializedView {
3395        pub(crate) fn new(
3396            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3397        ) -> Self {
3398            Self(RequestBuilder::new(stub))
3399        }
3400
3401        /// Sets the full request, replacing any prior values.
3402        pub fn with_request<V: Into<crate::model::GetMaterializedViewRequest>>(
3403            mut self,
3404            v: V,
3405        ) -> Self {
3406            self.0.request = v.into();
3407            self
3408        }
3409
3410        /// Sets all the options, replacing any prior values.
3411        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3412            self.0.options = v.into();
3413            self
3414        }
3415
3416        /// Sends the request.
3417        pub async fn send(self) -> Result<crate::model::MaterializedView> {
3418            (*self.0.stub)
3419                .get_materialized_view(self.0.request, self.0.options)
3420                .await
3421                .map(crate::Response::into_body)
3422        }
3423
3424        /// Sets the value of [name][crate::model::GetMaterializedViewRequest::name].
3425        ///
3426        /// This is a **required** field for requests.
3427        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3428            self.0.request.name = v.into();
3429            self
3430        }
3431    }
3432
3433    #[doc(hidden)]
3434    impl crate::RequestBuilder for GetMaterializedView {
3435        fn request_options(&mut self) -> &mut crate::RequestOptions {
3436            &mut self.0.options
3437        }
3438    }
3439
3440    /// The request builder for [BigtableInstanceAdmin::list_materialized_views][crate::client::BigtableInstanceAdmin::list_materialized_views] calls.
3441    ///
3442    /// # Example
3443    /// ```
3444    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::ListMaterializedViews;
3445    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
3446    /// use google_cloud_gax::paginator::ItemPaginator;
3447    ///
3448    /// let builder = prepare_request_builder();
3449    /// let mut items = builder.by_item();
3450    /// while let Some(result) = items.next().await {
3451    ///   let item = result?;
3452    /// }
3453    /// # Ok(()) }
3454    ///
3455    /// fn prepare_request_builder() -> ListMaterializedViews {
3456    ///   # panic!();
3457    ///   // ... details omitted ...
3458    /// }
3459    /// ```
3460    #[derive(Clone, Debug)]
3461    pub struct ListMaterializedViews(RequestBuilder<crate::model::ListMaterializedViewsRequest>);
3462
3463    impl ListMaterializedViews {
3464        pub(crate) fn new(
3465            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3466        ) -> Self {
3467            Self(RequestBuilder::new(stub))
3468        }
3469
3470        /// Sets the full request, replacing any prior values.
3471        pub fn with_request<V: Into<crate::model::ListMaterializedViewsRequest>>(
3472            mut self,
3473            v: V,
3474        ) -> Self {
3475            self.0.request = v.into();
3476            self
3477        }
3478
3479        /// Sets all the options, replacing any prior values.
3480        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3481            self.0.options = v.into();
3482            self
3483        }
3484
3485        /// Sends the request.
3486        pub async fn send(self) -> Result<crate::model::ListMaterializedViewsResponse> {
3487            (*self.0.stub)
3488                .list_materialized_views(self.0.request, self.0.options)
3489                .await
3490                .map(crate::Response::into_body)
3491        }
3492
3493        /// Streams each page in the collection.
3494        pub fn by_page(
3495            self,
3496        ) -> impl google_cloud_gax::paginator::Paginator<
3497            crate::model::ListMaterializedViewsResponse,
3498            crate::Error,
3499        > {
3500            use std::clone::Clone;
3501            let token = self.0.request.page_token.clone();
3502            let execute = move |token: String| {
3503                let mut builder = self.clone();
3504                builder.0.request = builder.0.request.set_page_token(token);
3505                builder.send()
3506            };
3507            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3508        }
3509
3510        /// Streams each item in the collection.
3511        pub fn by_item(
3512            self,
3513        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3514            crate::model::ListMaterializedViewsResponse,
3515            crate::Error,
3516        > {
3517            use google_cloud_gax::paginator::Paginator;
3518            self.by_page().items()
3519        }
3520
3521        /// Sets the value of [parent][crate::model::ListMaterializedViewsRequest::parent].
3522        ///
3523        /// This is a **required** field for requests.
3524        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3525            self.0.request.parent = v.into();
3526            self
3527        }
3528
3529        /// Sets the value of [page_size][crate::model::ListMaterializedViewsRequest::page_size].
3530        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3531            self.0.request.page_size = v.into();
3532            self
3533        }
3534
3535        /// Sets the value of [page_token][crate::model::ListMaterializedViewsRequest::page_token].
3536        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3537            self.0.request.page_token = v.into();
3538            self
3539        }
3540    }
3541
3542    #[doc(hidden)]
3543    impl crate::RequestBuilder for ListMaterializedViews {
3544        fn request_options(&mut self) -> &mut crate::RequestOptions {
3545            &mut self.0.options
3546        }
3547    }
3548
3549    /// The request builder for [BigtableInstanceAdmin::update_materialized_view][crate::client::BigtableInstanceAdmin::update_materialized_view] calls.
3550    ///
3551    /// # Example
3552    /// ```
3553    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::UpdateMaterializedView;
3554    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
3555    /// use google_cloud_lro::Poller;
3556    ///
3557    /// let builder = prepare_request_builder();
3558    /// let response = builder.poller().until_done().await?;
3559    /// # Ok(()) }
3560    ///
3561    /// fn prepare_request_builder() -> UpdateMaterializedView {
3562    ///   # panic!();
3563    ///   // ... details omitted ...
3564    /// }
3565    /// ```
3566    #[derive(Clone, Debug)]
3567    pub struct UpdateMaterializedView(RequestBuilder<crate::model::UpdateMaterializedViewRequest>);
3568
3569    impl UpdateMaterializedView {
3570        pub(crate) fn new(
3571            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3572        ) -> Self {
3573            Self(RequestBuilder::new(stub))
3574        }
3575
3576        /// Sets the full request, replacing any prior values.
3577        pub fn with_request<V: Into<crate::model::UpdateMaterializedViewRequest>>(
3578            mut self,
3579            v: V,
3580        ) -> Self {
3581            self.0.request = v.into();
3582            self
3583        }
3584
3585        /// Sets all the options, replacing any prior values.
3586        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3587            self.0.options = v.into();
3588            self
3589        }
3590
3591        /// Sends the request.
3592        ///
3593        /// # Long running operations
3594        ///
3595        /// This starts, but does not poll, a longrunning operation. More information
3596        /// on [update_materialized_view][crate::client::BigtableInstanceAdmin::update_materialized_view].
3597        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3598            (*self.0.stub)
3599                .update_materialized_view(self.0.request, self.0.options)
3600                .await
3601                .map(crate::Response::into_body)
3602        }
3603
3604        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_materialized_view`.
3605        pub fn poller(
3606            self,
3607        ) -> impl google_cloud_lro::Poller<
3608            crate::model::MaterializedView,
3609            crate::model::UpdateMaterializedViewMetadata,
3610        > {
3611            type Operation = google_cloud_lro::internal::Operation<
3612                crate::model::MaterializedView,
3613                crate::model::UpdateMaterializedViewMetadata,
3614            >;
3615            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3616            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3617            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3618            if let Some(ref mut details) = poller_options.tracing {
3619                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin::update_materialized_view::until_done";
3620            }
3621
3622            let stub = self.0.stub.clone();
3623            let mut options = self.0.options.clone();
3624            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3625            let query = move |name| {
3626                let stub = stub.clone();
3627                let options = options.clone();
3628                async {
3629                    let op = GetOperation::new(stub)
3630                        .set_name(name)
3631                        .with_options(options)
3632                        .send()
3633                        .await?;
3634                    Ok(Operation::new(op))
3635                }
3636            };
3637
3638            let start = move || async {
3639                let op = self.send().await?;
3640                Ok(Operation::new(op))
3641            };
3642
3643            use google_cloud_lro::internal::PollerExt;
3644            {
3645                google_cloud_lro::internal::new_poller(
3646                    polling_error_policy,
3647                    polling_backoff_policy,
3648                    start,
3649                    query,
3650                )
3651            }
3652            .with_options(poller_options)
3653        }
3654
3655        /// Sets the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3656        ///
3657        /// This is a **required** field for requests.
3658        pub fn set_materialized_view<T>(mut self, v: T) -> Self
3659        where
3660            T: std::convert::Into<crate::model::MaterializedView>,
3661        {
3662            self.0.request.materialized_view = std::option::Option::Some(v.into());
3663            self
3664        }
3665
3666        /// Sets or clears the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3667        ///
3668        /// This is a **required** field for requests.
3669        pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3670        where
3671            T: std::convert::Into<crate::model::MaterializedView>,
3672        {
3673            self.0.request.materialized_view = v.map(|x| x.into());
3674            self
3675        }
3676
3677        /// Sets the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3678        pub fn set_update_mask<T>(mut self, v: T) -> Self
3679        where
3680            T: std::convert::Into<wkt::FieldMask>,
3681        {
3682            self.0.request.update_mask = std::option::Option::Some(v.into());
3683            self
3684        }
3685
3686        /// Sets or clears the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3687        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3688        where
3689            T: std::convert::Into<wkt::FieldMask>,
3690        {
3691            self.0.request.update_mask = v.map(|x| x.into());
3692            self
3693        }
3694    }
3695
3696    #[doc(hidden)]
3697    impl crate::RequestBuilder for UpdateMaterializedView {
3698        fn request_options(&mut self) -> &mut crate::RequestOptions {
3699            &mut self.0.options
3700        }
3701    }
3702
3703    /// The request builder for [BigtableInstanceAdmin::delete_materialized_view][crate::client::BigtableInstanceAdmin::delete_materialized_view] calls.
3704    ///
3705    /// # Example
3706    /// ```
3707    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::DeleteMaterializedView;
3708    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
3709    ///
3710    /// let builder = prepare_request_builder();
3711    /// let response = builder.send().await?;
3712    /// # Ok(()) }
3713    ///
3714    /// fn prepare_request_builder() -> DeleteMaterializedView {
3715    ///   # panic!();
3716    ///   // ... details omitted ...
3717    /// }
3718    /// ```
3719    #[derive(Clone, Debug)]
3720    pub struct DeleteMaterializedView(RequestBuilder<crate::model::DeleteMaterializedViewRequest>);
3721
3722    impl DeleteMaterializedView {
3723        pub(crate) fn new(
3724            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3725        ) -> Self {
3726            Self(RequestBuilder::new(stub))
3727        }
3728
3729        /// Sets the full request, replacing any prior values.
3730        pub fn with_request<V: Into<crate::model::DeleteMaterializedViewRequest>>(
3731            mut self,
3732            v: V,
3733        ) -> Self {
3734            self.0.request = v.into();
3735            self
3736        }
3737
3738        /// Sets all the options, replacing any prior values.
3739        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3740            self.0.options = v.into();
3741            self
3742        }
3743
3744        /// Sends the request.
3745        pub async fn send(self) -> Result<()> {
3746            (*self.0.stub)
3747                .delete_materialized_view(self.0.request, self.0.options)
3748                .await
3749                .map(crate::Response::into_body)
3750        }
3751
3752        /// Sets the value of [name][crate::model::DeleteMaterializedViewRequest::name].
3753        ///
3754        /// This is a **required** field for requests.
3755        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3756            self.0.request.name = v.into();
3757            self
3758        }
3759
3760        /// Sets the value of [etag][crate::model::DeleteMaterializedViewRequest::etag].
3761        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3762            self.0.request.etag = v.into();
3763            self
3764        }
3765    }
3766
3767    #[doc(hidden)]
3768    impl crate::RequestBuilder for DeleteMaterializedView {
3769        fn request_options(&mut self) -> &mut crate::RequestOptions {
3770            &mut self.0.options
3771        }
3772    }
3773
3774    /// The request builder for [BigtableInstanceAdmin::list_operations][crate::client::BigtableInstanceAdmin::list_operations] calls.
3775    ///
3776    /// # Example
3777    /// ```
3778    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::ListOperations;
3779    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
3780    /// use google_cloud_gax::paginator::ItemPaginator;
3781    ///
3782    /// let builder = prepare_request_builder();
3783    /// let mut items = builder.by_item();
3784    /// while let Some(result) = items.next().await {
3785    ///   let item = result?;
3786    /// }
3787    /// # Ok(()) }
3788    ///
3789    /// fn prepare_request_builder() -> ListOperations {
3790    ///   # panic!();
3791    ///   // ... details omitted ...
3792    /// }
3793    /// ```
3794    #[derive(Clone, Debug)]
3795    pub struct ListOperations(
3796        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
3797    );
3798
3799    impl ListOperations {
3800        pub(crate) fn new(
3801            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3802        ) -> Self {
3803            Self(RequestBuilder::new(stub))
3804        }
3805
3806        /// Sets the full request, replacing any prior values.
3807        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
3808            mut self,
3809            v: V,
3810        ) -> Self {
3811            self.0.request = v.into();
3812            self
3813        }
3814
3815        /// Sets all the options, replacing any prior values.
3816        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3817            self.0.options = v.into();
3818            self
3819        }
3820
3821        /// Sends the request.
3822        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
3823            (*self.0.stub)
3824                .list_operations(self.0.request, self.0.options)
3825                .await
3826                .map(crate::Response::into_body)
3827        }
3828
3829        /// Streams each page in the collection.
3830        pub fn by_page(
3831            self,
3832        ) -> impl google_cloud_gax::paginator::Paginator<
3833            google_cloud_longrunning::model::ListOperationsResponse,
3834            crate::Error,
3835        > {
3836            use std::clone::Clone;
3837            let token = self.0.request.page_token.clone();
3838            let execute = move |token: String| {
3839                let mut builder = self.clone();
3840                builder.0.request = builder.0.request.set_page_token(token);
3841                builder.send()
3842            };
3843            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3844        }
3845
3846        /// Streams each item in the collection.
3847        pub fn by_item(
3848            self,
3849        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3850            google_cloud_longrunning::model::ListOperationsResponse,
3851            crate::Error,
3852        > {
3853            use google_cloud_gax::paginator::Paginator;
3854            self.by_page().items()
3855        }
3856
3857        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
3858        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3859            self.0.request.name = v.into();
3860            self
3861        }
3862
3863        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
3864        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3865            self.0.request.filter = v.into();
3866            self
3867        }
3868
3869        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
3870        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3871            self.0.request.page_size = v.into();
3872            self
3873        }
3874
3875        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
3876        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3877            self.0.request.page_token = v.into();
3878            self
3879        }
3880
3881        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
3882        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
3883            self.0.request.return_partial_success = v.into();
3884            self
3885        }
3886    }
3887
3888    #[doc(hidden)]
3889    impl crate::RequestBuilder for ListOperations {
3890        fn request_options(&mut self) -> &mut crate::RequestOptions {
3891            &mut self.0.options
3892        }
3893    }
3894
3895    /// The request builder for [BigtableInstanceAdmin::get_operation][crate::client::BigtableInstanceAdmin::get_operation] calls.
3896    ///
3897    /// # Example
3898    /// ```
3899    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::GetOperation;
3900    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
3901    ///
3902    /// let builder = prepare_request_builder();
3903    /// let response = builder.send().await?;
3904    /// # Ok(()) }
3905    ///
3906    /// fn prepare_request_builder() -> GetOperation {
3907    ///   # panic!();
3908    ///   // ... details omitted ...
3909    /// }
3910    /// ```
3911    #[derive(Clone, Debug)]
3912    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
3913
3914    impl GetOperation {
3915        pub(crate) fn new(
3916            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3917        ) -> Self {
3918            Self(RequestBuilder::new(stub))
3919        }
3920
3921        /// Sets the full request, replacing any prior values.
3922        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
3923            mut self,
3924            v: V,
3925        ) -> Self {
3926            self.0.request = v.into();
3927            self
3928        }
3929
3930        /// Sets all the options, replacing any prior values.
3931        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3932            self.0.options = v.into();
3933            self
3934        }
3935
3936        /// Sends the request.
3937        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3938            (*self.0.stub)
3939                .get_operation(self.0.request, self.0.options)
3940                .await
3941                .map(crate::Response::into_body)
3942        }
3943
3944        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
3945        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3946            self.0.request.name = v.into();
3947            self
3948        }
3949    }
3950
3951    #[doc(hidden)]
3952    impl crate::RequestBuilder for GetOperation {
3953        fn request_options(&mut self) -> &mut crate::RequestOptions {
3954            &mut self.0.options
3955        }
3956    }
3957
3958    /// The request builder for [BigtableInstanceAdmin::delete_operation][crate::client::BigtableInstanceAdmin::delete_operation] calls.
3959    ///
3960    /// # Example
3961    /// ```
3962    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::DeleteOperation;
3963    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
3964    ///
3965    /// let builder = prepare_request_builder();
3966    /// let response = builder.send().await?;
3967    /// # Ok(()) }
3968    ///
3969    /// fn prepare_request_builder() -> DeleteOperation {
3970    ///   # panic!();
3971    ///   // ... details omitted ...
3972    /// }
3973    /// ```
3974    #[derive(Clone, Debug)]
3975    pub struct DeleteOperation(
3976        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
3977    );
3978
3979    impl DeleteOperation {
3980        pub(crate) fn new(
3981            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
3982        ) -> Self {
3983            Self(RequestBuilder::new(stub))
3984        }
3985
3986        /// Sets the full request, replacing any prior values.
3987        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
3988            mut self,
3989            v: V,
3990        ) -> Self {
3991            self.0.request = v.into();
3992            self
3993        }
3994
3995        /// Sets all the options, replacing any prior values.
3996        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3997            self.0.options = v.into();
3998            self
3999        }
4000
4001        /// Sends the request.
4002        pub async fn send(self) -> Result<()> {
4003            (*self.0.stub)
4004                .delete_operation(self.0.request, self.0.options)
4005                .await
4006                .map(crate::Response::into_body)
4007        }
4008
4009        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
4010        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4011            self.0.request.name = v.into();
4012            self
4013        }
4014    }
4015
4016    #[doc(hidden)]
4017    impl crate::RequestBuilder for DeleteOperation {
4018        fn request_options(&mut self) -> &mut crate::RequestOptions {
4019            &mut self.0.options
4020        }
4021    }
4022
4023    /// The request builder for [BigtableInstanceAdmin::cancel_operation][crate::client::BigtableInstanceAdmin::cancel_operation] calls.
4024    ///
4025    /// # Example
4026    /// ```
4027    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_instance_admin::CancelOperation;
4028    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
4029    ///
4030    /// let builder = prepare_request_builder();
4031    /// let response = builder.send().await?;
4032    /// # Ok(()) }
4033    ///
4034    /// fn prepare_request_builder() -> CancelOperation {
4035    ///   # panic!();
4036    ///   // ... details omitted ...
4037    /// }
4038    /// ```
4039    #[derive(Clone, Debug)]
4040    pub struct CancelOperation(
4041        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
4042    );
4043
4044    impl CancelOperation {
4045        pub(crate) fn new(
4046            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableInstanceAdmin>,
4047        ) -> Self {
4048            Self(RequestBuilder::new(stub))
4049        }
4050
4051        /// Sets the full request, replacing any prior values.
4052        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
4053            mut self,
4054            v: V,
4055        ) -> Self {
4056            self.0.request = v.into();
4057            self
4058        }
4059
4060        /// Sets all the options, replacing any prior values.
4061        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4062            self.0.options = v.into();
4063            self
4064        }
4065
4066        /// Sends the request.
4067        pub async fn send(self) -> Result<()> {
4068            (*self.0.stub)
4069                .cancel_operation(self.0.request, self.0.options)
4070                .await
4071                .map(crate::Response::into_body)
4072        }
4073
4074        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
4075        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4076            self.0.request.name = v.into();
4077            self
4078        }
4079    }
4080
4081    #[doc(hidden)]
4082    impl crate::RequestBuilder for CancelOperation {
4083        fn request_options(&mut self) -> &mut crate::RequestOptions {
4084            &mut self.0.options
4085        }
4086    }
4087}
4088
4089/// Request and client builders for [BigtableTableAdmin][crate::client::BigtableTableAdmin].
4090pub mod bigtable_table_admin {
4091    use crate::Result;
4092
4093    /// A builder for [BigtableTableAdmin][crate::client::BigtableTableAdmin].
4094    ///
4095    /// ```
4096    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
4097    /// # use google_cloud_bigtable_admin_v2::*;
4098    /// # use builder::bigtable_table_admin::ClientBuilder;
4099    /// # use client::BigtableTableAdmin;
4100    /// let builder : ClientBuilder = BigtableTableAdmin::builder();
4101    /// let client = builder
4102    ///     .with_endpoint("https://bigtableadmin.googleapis.com")
4103    ///     .build().await?;
4104    /// # Ok(()) }
4105    /// ```
4106    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
4107
4108    pub(crate) mod client {
4109        use super::super::super::client::BigtableTableAdmin;
4110        pub struct Factory;
4111        impl crate::ClientFactory for Factory {
4112            type Client = BigtableTableAdmin;
4113            type Credentials = gaxi::options::Credentials;
4114            async fn build(
4115                self,
4116                config: gaxi::options::ClientConfig,
4117            ) -> crate::ClientBuilderResult<Self::Client> {
4118                Self::Client::new(config).await
4119            }
4120        }
4121    }
4122
4123    /// Common implementation for [crate::client::BigtableTableAdmin] request builders.
4124    #[derive(Clone, Debug)]
4125    pub(crate) struct RequestBuilder<R: std::default::Default> {
4126        stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4127        request: R,
4128        options: crate::RequestOptions,
4129    }
4130
4131    impl<R> RequestBuilder<R>
4132    where
4133        R: std::default::Default,
4134    {
4135        pub(crate) fn new(
4136            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4137        ) -> Self {
4138            Self {
4139                stub,
4140                request: R::default(),
4141                options: crate::RequestOptions::default(),
4142            }
4143        }
4144    }
4145
4146    /// The request builder for [BigtableTableAdmin::create_table][crate::client::BigtableTableAdmin::create_table] calls.
4147    ///
4148    /// # Example
4149    /// ```
4150    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::CreateTable;
4151    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
4152    ///
4153    /// let builder = prepare_request_builder();
4154    /// let response = builder.send().await?;
4155    /// # Ok(()) }
4156    ///
4157    /// fn prepare_request_builder() -> CreateTable {
4158    ///   # panic!();
4159    ///   // ... details omitted ...
4160    /// }
4161    /// ```
4162    #[derive(Clone, Debug)]
4163    pub struct CreateTable(RequestBuilder<crate::model::CreateTableRequest>);
4164
4165    impl CreateTable {
4166        pub(crate) fn new(
4167            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4168        ) -> Self {
4169            Self(RequestBuilder::new(stub))
4170        }
4171
4172        /// Sets the full request, replacing any prior values.
4173        pub fn with_request<V: Into<crate::model::CreateTableRequest>>(mut self, v: V) -> Self {
4174            self.0.request = v.into();
4175            self
4176        }
4177
4178        /// Sets all the options, replacing any prior values.
4179        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4180            self.0.options = v.into();
4181            self
4182        }
4183
4184        /// Sends the request.
4185        pub async fn send(self) -> Result<crate::model::Table> {
4186            (*self.0.stub)
4187                .create_table(self.0.request, self.0.options)
4188                .await
4189                .map(crate::Response::into_body)
4190        }
4191
4192        /// Sets the value of [parent][crate::model::CreateTableRequest::parent].
4193        ///
4194        /// This is a **required** field for requests.
4195        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4196            self.0.request.parent = v.into();
4197            self
4198        }
4199
4200        /// Sets the value of [table_id][crate::model::CreateTableRequest::table_id].
4201        ///
4202        /// This is a **required** field for requests.
4203        pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4204            self.0.request.table_id = v.into();
4205            self
4206        }
4207
4208        /// Sets the value of [table][crate::model::CreateTableRequest::table].
4209        ///
4210        /// This is a **required** field for requests.
4211        pub fn set_table<T>(mut self, v: T) -> Self
4212        where
4213            T: std::convert::Into<crate::model::Table>,
4214        {
4215            self.0.request.table = std::option::Option::Some(v.into());
4216            self
4217        }
4218
4219        /// Sets or clears the value of [table][crate::model::CreateTableRequest::table].
4220        ///
4221        /// This is a **required** field for requests.
4222        pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4223        where
4224            T: std::convert::Into<crate::model::Table>,
4225        {
4226            self.0.request.table = v.map(|x| x.into());
4227            self
4228        }
4229
4230        /// Sets the value of [initial_splits][crate::model::CreateTableRequest::initial_splits].
4231        pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
4232        where
4233            T: std::iter::IntoIterator<Item = V>,
4234            V: std::convert::Into<crate::model::create_table_request::Split>,
4235        {
4236            use std::iter::Iterator;
4237            self.0.request.initial_splits = v.into_iter().map(|i| i.into()).collect();
4238            self
4239        }
4240    }
4241
4242    #[doc(hidden)]
4243    impl crate::RequestBuilder for CreateTable {
4244        fn request_options(&mut self) -> &mut crate::RequestOptions {
4245            &mut self.0.options
4246        }
4247    }
4248
4249    /// The request builder for [BigtableTableAdmin::create_table_from_snapshot][crate::client::BigtableTableAdmin::create_table_from_snapshot] calls.
4250    ///
4251    /// # Example
4252    /// ```
4253    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::CreateTableFromSnapshot;
4254    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
4255    /// use google_cloud_lro::Poller;
4256    ///
4257    /// let builder = prepare_request_builder();
4258    /// let response = builder.poller().until_done().await?;
4259    /// # Ok(()) }
4260    ///
4261    /// fn prepare_request_builder() -> CreateTableFromSnapshot {
4262    ///   # panic!();
4263    ///   // ... details omitted ...
4264    /// }
4265    /// ```
4266    #[derive(Clone, Debug)]
4267    pub struct CreateTableFromSnapshot(
4268        RequestBuilder<crate::model::CreateTableFromSnapshotRequest>,
4269    );
4270
4271    impl CreateTableFromSnapshot {
4272        pub(crate) fn new(
4273            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4274        ) -> Self {
4275            Self(RequestBuilder::new(stub))
4276        }
4277
4278        /// Sets the full request, replacing any prior values.
4279        pub fn with_request<V: Into<crate::model::CreateTableFromSnapshotRequest>>(
4280            mut self,
4281            v: V,
4282        ) -> Self {
4283            self.0.request = v.into();
4284            self
4285        }
4286
4287        /// Sets all the options, replacing any prior values.
4288        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4289            self.0.options = v.into();
4290            self
4291        }
4292
4293        /// Sends the request.
4294        ///
4295        /// # Long running operations
4296        ///
4297        /// This starts, but does not poll, a longrunning operation. More information
4298        /// on [create_table_from_snapshot][crate::client::BigtableTableAdmin::create_table_from_snapshot].
4299        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4300            (*self.0.stub)
4301                .create_table_from_snapshot(self.0.request, self.0.options)
4302                .await
4303                .map(crate::Response::into_body)
4304        }
4305
4306        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_table_from_snapshot`.
4307        pub fn poller(
4308            self,
4309        ) -> impl google_cloud_lro::Poller<
4310            crate::model::Table,
4311            crate::model::CreateTableFromSnapshotMetadata,
4312        > {
4313            type Operation = google_cloud_lro::internal::Operation<
4314                crate::model::Table,
4315                crate::model::CreateTableFromSnapshotMetadata,
4316            >;
4317            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4318            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4319            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4320            if let Some(ref mut details) = poller_options.tracing {
4321                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::create_table_from_snapshot::until_done";
4322            }
4323
4324            let stub = self.0.stub.clone();
4325            let mut options = self.0.options.clone();
4326            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4327            let query = move |name| {
4328                let stub = stub.clone();
4329                let options = options.clone();
4330                async {
4331                    let op = GetOperation::new(stub)
4332                        .set_name(name)
4333                        .with_options(options)
4334                        .send()
4335                        .await?;
4336                    Ok(Operation::new(op))
4337                }
4338            };
4339
4340            let start = move || async {
4341                let op = self.send().await?;
4342                Ok(Operation::new(op))
4343            };
4344
4345            use google_cloud_lro::internal::PollerExt;
4346            {
4347                google_cloud_lro::internal::new_poller(
4348                    polling_error_policy,
4349                    polling_backoff_policy,
4350                    start,
4351                    query,
4352                )
4353            }
4354            .with_options(poller_options)
4355        }
4356
4357        /// Sets the value of [parent][crate::model::CreateTableFromSnapshotRequest::parent].
4358        ///
4359        /// This is a **required** field for requests.
4360        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4361            self.0.request.parent = v.into();
4362            self
4363        }
4364
4365        /// Sets the value of [table_id][crate::model::CreateTableFromSnapshotRequest::table_id].
4366        ///
4367        /// This is a **required** field for requests.
4368        pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4369            self.0.request.table_id = v.into();
4370            self
4371        }
4372
4373        /// Sets the value of [source_snapshot][crate::model::CreateTableFromSnapshotRequest::source_snapshot].
4374        ///
4375        /// This is a **required** field for requests.
4376        pub fn set_source_snapshot<T: Into<std::string::String>>(mut self, v: T) -> Self {
4377            self.0.request.source_snapshot = v.into();
4378            self
4379        }
4380    }
4381
4382    #[doc(hidden)]
4383    impl crate::RequestBuilder for CreateTableFromSnapshot {
4384        fn request_options(&mut self) -> &mut crate::RequestOptions {
4385            &mut self.0.options
4386        }
4387    }
4388
4389    /// The request builder for [BigtableTableAdmin::list_tables][crate::client::BigtableTableAdmin::list_tables] calls.
4390    ///
4391    /// # Example
4392    /// ```
4393    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::ListTables;
4394    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
4395    /// use google_cloud_gax::paginator::ItemPaginator;
4396    ///
4397    /// let builder = prepare_request_builder();
4398    /// let mut items = builder.by_item();
4399    /// while let Some(result) = items.next().await {
4400    ///   let item = result?;
4401    /// }
4402    /// # Ok(()) }
4403    ///
4404    /// fn prepare_request_builder() -> ListTables {
4405    ///   # panic!();
4406    ///   // ... details omitted ...
4407    /// }
4408    /// ```
4409    #[derive(Clone, Debug)]
4410    pub struct ListTables(RequestBuilder<crate::model::ListTablesRequest>);
4411
4412    impl ListTables {
4413        pub(crate) fn new(
4414            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4415        ) -> Self {
4416            Self(RequestBuilder::new(stub))
4417        }
4418
4419        /// Sets the full request, replacing any prior values.
4420        pub fn with_request<V: Into<crate::model::ListTablesRequest>>(mut self, v: V) -> Self {
4421            self.0.request = v.into();
4422            self
4423        }
4424
4425        /// Sets all the options, replacing any prior values.
4426        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4427            self.0.options = v.into();
4428            self
4429        }
4430
4431        /// Sends the request.
4432        pub async fn send(self) -> Result<crate::model::ListTablesResponse> {
4433            (*self.0.stub)
4434                .list_tables(self.0.request, self.0.options)
4435                .await
4436                .map(crate::Response::into_body)
4437        }
4438
4439        /// Streams each page in the collection.
4440        pub fn by_page(
4441            self,
4442        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListTablesResponse, crate::Error>
4443        {
4444            use std::clone::Clone;
4445            let token = self.0.request.page_token.clone();
4446            let execute = move |token: String| {
4447                let mut builder = self.clone();
4448                builder.0.request = builder.0.request.set_page_token(token);
4449                builder.send()
4450            };
4451            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4452        }
4453
4454        /// Streams each item in the collection.
4455        pub fn by_item(
4456            self,
4457        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4458            crate::model::ListTablesResponse,
4459            crate::Error,
4460        > {
4461            use google_cloud_gax::paginator::Paginator;
4462            self.by_page().items()
4463        }
4464
4465        /// Sets the value of [parent][crate::model::ListTablesRequest::parent].
4466        ///
4467        /// This is a **required** field for requests.
4468        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4469            self.0.request.parent = v.into();
4470            self
4471        }
4472
4473        /// Sets the value of [view][crate::model::ListTablesRequest::view].
4474        pub fn set_view<T: Into<crate::model::table::View>>(mut self, v: T) -> Self {
4475            self.0.request.view = v.into();
4476            self
4477        }
4478
4479        /// Sets the value of [page_size][crate::model::ListTablesRequest::page_size].
4480        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4481            self.0.request.page_size = v.into();
4482            self
4483        }
4484
4485        /// Sets the value of [page_token][crate::model::ListTablesRequest::page_token].
4486        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4487            self.0.request.page_token = v.into();
4488            self
4489        }
4490    }
4491
4492    #[doc(hidden)]
4493    impl crate::RequestBuilder for ListTables {
4494        fn request_options(&mut self) -> &mut crate::RequestOptions {
4495            &mut self.0.options
4496        }
4497    }
4498
4499    /// The request builder for [BigtableTableAdmin::get_table][crate::client::BigtableTableAdmin::get_table] calls.
4500    ///
4501    /// # Example
4502    /// ```
4503    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::GetTable;
4504    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
4505    ///
4506    /// let builder = prepare_request_builder();
4507    /// let response = builder.send().await?;
4508    /// # Ok(()) }
4509    ///
4510    /// fn prepare_request_builder() -> GetTable {
4511    ///   # panic!();
4512    ///   // ... details omitted ...
4513    /// }
4514    /// ```
4515    #[derive(Clone, Debug)]
4516    pub struct GetTable(RequestBuilder<crate::model::GetTableRequest>);
4517
4518    impl GetTable {
4519        pub(crate) fn new(
4520            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4521        ) -> Self {
4522            Self(RequestBuilder::new(stub))
4523        }
4524
4525        /// Sets the full request, replacing any prior values.
4526        pub fn with_request<V: Into<crate::model::GetTableRequest>>(mut self, v: V) -> Self {
4527            self.0.request = v.into();
4528            self
4529        }
4530
4531        /// Sets all the options, replacing any prior values.
4532        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4533            self.0.options = v.into();
4534            self
4535        }
4536
4537        /// Sends the request.
4538        pub async fn send(self) -> Result<crate::model::Table> {
4539            (*self.0.stub)
4540                .get_table(self.0.request, self.0.options)
4541                .await
4542                .map(crate::Response::into_body)
4543        }
4544
4545        /// Sets the value of [name][crate::model::GetTableRequest::name].
4546        ///
4547        /// This is a **required** field for requests.
4548        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4549            self.0.request.name = v.into();
4550            self
4551        }
4552
4553        /// Sets the value of [view][crate::model::GetTableRequest::view].
4554        pub fn set_view<T: Into<crate::model::table::View>>(mut self, v: T) -> Self {
4555            self.0.request.view = v.into();
4556            self
4557        }
4558    }
4559
4560    #[doc(hidden)]
4561    impl crate::RequestBuilder for GetTable {
4562        fn request_options(&mut self) -> &mut crate::RequestOptions {
4563            &mut self.0.options
4564        }
4565    }
4566
4567    /// The request builder for [BigtableTableAdmin::update_table][crate::client::BigtableTableAdmin::update_table] calls.
4568    ///
4569    /// # Example
4570    /// ```
4571    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::UpdateTable;
4572    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
4573    /// use google_cloud_lro::Poller;
4574    ///
4575    /// let builder = prepare_request_builder();
4576    /// let response = builder.poller().until_done().await?;
4577    /// # Ok(()) }
4578    ///
4579    /// fn prepare_request_builder() -> UpdateTable {
4580    ///   # panic!();
4581    ///   // ... details omitted ...
4582    /// }
4583    /// ```
4584    #[derive(Clone, Debug)]
4585    pub struct UpdateTable(RequestBuilder<crate::model::UpdateTableRequest>);
4586
4587    impl UpdateTable {
4588        pub(crate) fn new(
4589            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4590        ) -> Self {
4591            Self(RequestBuilder::new(stub))
4592        }
4593
4594        /// Sets the full request, replacing any prior values.
4595        pub fn with_request<V: Into<crate::model::UpdateTableRequest>>(mut self, v: V) -> Self {
4596            self.0.request = v.into();
4597            self
4598        }
4599
4600        /// Sets all the options, replacing any prior values.
4601        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4602            self.0.options = v.into();
4603            self
4604        }
4605
4606        /// Sends the request.
4607        ///
4608        /// # Long running operations
4609        ///
4610        /// This starts, but does not poll, a longrunning operation. More information
4611        /// on [update_table][crate::client::BigtableTableAdmin::update_table].
4612        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4613            (*self.0.stub)
4614                .update_table(self.0.request, self.0.options)
4615                .await
4616                .map(crate::Response::into_body)
4617        }
4618
4619        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_table`.
4620        pub fn poller(
4621            self,
4622        ) -> impl google_cloud_lro::Poller<crate::model::Table, crate::model::UpdateTableMetadata>
4623        {
4624            type Operation = google_cloud_lro::internal::Operation<
4625                crate::model::Table,
4626                crate::model::UpdateTableMetadata,
4627            >;
4628            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4629            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4630            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4631            if let Some(ref mut details) = poller_options.tracing {
4632                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::update_table::until_done";
4633            }
4634
4635            let stub = self.0.stub.clone();
4636            let mut options = self.0.options.clone();
4637            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4638            let query = move |name| {
4639                let stub = stub.clone();
4640                let options = options.clone();
4641                async {
4642                    let op = GetOperation::new(stub)
4643                        .set_name(name)
4644                        .with_options(options)
4645                        .send()
4646                        .await?;
4647                    Ok(Operation::new(op))
4648                }
4649            };
4650
4651            let start = move || async {
4652                let op = self.send().await?;
4653                Ok(Operation::new(op))
4654            };
4655
4656            use google_cloud_lro::internal::PollerExt;
4657            {
4658                google_cloud_lro::internal::new_poller(
4659                    polling_error_policy,
4660                    polling_backoff_policy,
4661                    start,
4662                    query,
4663                )
4664            }
4665            .with_options(poller_options)
4666        }
4667
4668        /// Sets the value of [table][crate::model::UpdateTableRequest::table].
4669        ///
4670        /// This is a **required** field for requests.
4671        pub fn set_table<T>(mut self, v: T) -> Self
4672        where
4673            T: std::convert::Into<crate::model::Table>,
4674        {
4675            self.0.request.table = std::option::Option::Some(v.into());
4676            self
4677        }
4678
4679        /// Sets or clears the value of [table][crate::model::UpdateTableRequest::table].
4680        ///
4681        /// This is a **required** field for requests.
4682        pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4683        where
4684            T: std::convert::Into<crate::model::Table>,
4685        {
4686            self.0.request.table = v.map(|x| x.into());
4687            self
4688        }
4689
4690        /// Sets the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
4691        ///
4692        /// This is a **required** field for requests.
4693        pub fn set_update_mask<T>(mut self, v: T) -> Self
4694        where
4695            T: std::convert::Into<wkt::FieldMask>,
4696        {
4697            self.0.request.update_mask = std::option::Option::Some(v.into());
4698            self
4699        }
4700
4701        /// Sets or clears the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
4702        ///
4703        /// This is a **required** field for requests.
4704        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4705        where
4706            T: std::convert::Into<wkt::FieldMask>,
4707        {
4708            self.0.request.update_mask = v.map(|x| x.into());
4709            self
4710        }
4711
4712        /// Sets the value of [ignore_warnings][crate::model::UpdateTableRequest::ignore_warnings].
4713        pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
4714            self.0.request.ignore_warnings = v.into();
4715            self
4716        }
4717    }
4718
4719    #[doc(hidden)]
4720    impl crate::RequestBuilder for UpdateTable {
4721        fn request_options(&mut self) -> &mut crate::RequestOptions {
4722            &mut self.0.options
4723        }
4724    }
4725
4726    /// The request builder for [BigtableTableAdmin::delete_table][crate::client::BigtableTableAdmin::delete_table] calls.
4727    ///
4728    /// # Example
4729    /// ```
4730    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::DeleteTable;
4731    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
4732    ///
4733    /// let builder = prepare_request_builder();
4734    /// let response = builder.send().await?;
4735    /// # Ok(()) }
4736    ///
4737    /// fn prepare_request_builder() -> DeleteTable {
4738    ///   # panic!();
4739    ///   // ... details omitted ...
4740    /// }
4741    /// ```
4742    #[derive(Clone, Debug)]
4743    pub struct DeleteTable(RequestBuilder<crate::model::DeleteTableRequest>);
4744
4745    impl DeleteTable {
4746        pub(crate) fn new(
4747            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4748        ) -> Self {
4749            Self(RequestBuilder::new(stub))
4750        }
4751
4752        /// Sets the full request, replacing any prior values.
4753        pub fn with_request<V: Into<crate::model::DeleteTableRequest>>(mut self, v: V) -> Self {
4754            self.0.request = v.into();
4755            self
4756        }
4757
4758        /// Sets all the options, replacing any prior values.
4759        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4760            self.0.options = v.into();
4761            self
4762        }
4763
4764        /// Sends the request.
4765        pub async fn send(self) -> Result<()> {
4766            (*self.0.stub)
4767                .delete_table(self.0.request, self.0.options)
4768                .await
4769                .map(crate::Response::into_body)
4770        }
4771
4772        /// Sets the value of [name][crate::model::DeleteTableRequest::name].
4773        ///
4774        /// This is a **required** field for requests.
4775        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4776            self.0.request.name = v.into();
4777            self
4778        }
4779    }
4780
4781    #[doc(hidden)]
4782    impl crate::RequestBuilder for DeleteTable {
4783        fn request_options(&mut self) -> &mut crate::RequestOptions {
4784            &mut self.0.options
4785        }
4786    }
4787
4788    /// The request builder for [BigtableTableAdmin::undelete_table][crate::client::BigtableTableAdmin::undelete_table] calls.
4789    ///
4790    /// # Example
4791    /// ```
4792    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::UndeleteTable;
4793    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
4794    /// use google_cloud_lro::Poller;
4795    ///
4796    /// let builder = prepare_request_builder();
4797    /// let response = builder.poller().until_done().await?;
4798    /// # Ok(()) }
4799    ///
4800    /// fn prepare_request_builder() -> UndeleteTable {
4801    ///   # panic!();
4802    ///   // ... details omitted ...
4803    /// }
4804    /// ```
4805    #[derive(Clone, Debug)]
4806    pub struct UndeleteTable(RequestBuilder<crate::model::UndeleteTableRequest>);
4807
4808    impl UndeleteTable {
4809        pub(crate) fn new(
4810            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4811        ) -> Self {
4812            Self(RequestBuilder::new(stub))
4813        }
4814
4815        /// Sets the full request, replacing any prior values.
4816        pub fn with_request<V: Into<crate::model::UndeleteTableRequest>>(mut self, v: V) -> Self {
4817            self.0.request = v.into();
4818            self
4819        }
4820
4821        /// Sets all the options, replacing any prior values.
4822        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4823            self.0.options = v.into();
4824            self
4825        }
4826
4827        /// Sends the request.
4828        ///
4829        /// # Long running operations
4830        ///
4831        /// This starts, but does not poll, a longrunning operation. More information
4832        /// on [undelete_table][crate::client::BigtableTableAdmin::undelete_table].
4833        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4834            (*self.0.stub)
4835                .undelete_table(self.0.request, self.0.options)
4836                .await
4837                .map(crate::Response::into_body)
4838        }
4839
4840        /// Creates a [Poller][google_cloud_lro::Poller] to work with `undelete_table`.
4841        pub fn poller(
4842            self,
4843        ) -> impl google_cloud_lro::Poller<crate::model::Table, crate::model::UndeleteTableMetadata>
4844        {
4845            type Operation = google_cloud_lro::internal::Operation<
4846                crate::model::Table,
4847                crate::model::UndeleteTableMetadata,
4848            >;
4849            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4850            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4851            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4852            if let Some(ref mut details) = poller_options.tracing {
4853                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::undelete_table::until_done";
4854            }
4855
4856            let stub = self.0.stub.clone();
4857            let mut options = self.0.options.clone();
4858            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4859            let query = move |name| {
4860                let stub = stub.clone();
4861                let options = options.clone();
4862                async {
4863                    let op = GetOperation::new(stub)
4864                        .set_name(name)
4865                        .with_options(options)
4866                        .send()
4867                        .await?;
4868                    Ok(Operation::new(op))
4869                }
4870            };
4871
4872            let start = move || async {
4873                let op = self.send().await?;
4874                Ok(Operation::new(op))
4875            };
4876
4877            use google_cloud_lro::internal::PollerExt;
4878            {
4879                google_cloud_lro::internal::new_poller(
4880                    polling_error_policy,
4881                    polling_backoff_policy,
4882                    start,
4883                    query,
4884                )
4885            }
4886            .with_options(poller_options)
4887        }
4888
4889        /// Sets the value of [name][crate::model::UndeleteTableRequest::name].
4890        ///
4891        /// This is a **required** field for requests.
4892        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4893            self.0.request.name = v.into();
4894            self
4895        }
4896    }
4897
4898    #[doc(hidden)]
4899    impl crate::RequestBuilder for UndeleteTable {
4900        fn request_options(&mut self) -> &mut crate::RequestOptions {
4901            &mut self.0.options
4902        }
4903    }
4904
4905    /// The request builder for [BigtableTableAdmin::create_authorized_view][crate::client::BigtableTableAdmin::create_authorized_view] calls.
4906    ///
4907    /// # Example
4908    /// ```
4909    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::CreateAuthorizedView;
4910    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
4911    /// use google_cloud_lro::Poller;
4912    ///
4913    /// let builder = prepare_request_builder();
4914    /// let response = builder.poller().until_done().await?;
4915    /// # Ok(()) }
4916    ///
4917    /// fn prepare_request_builder() -> CreateAuthorizedView {
4918    ///   # panic!();
4919    ///   // ... details omitted ...
4920    /// }
4921    /// ```
4922    #[derive(Clone, Debug)]
4923    pub struct CreateAuthorizedView(RequestBuilder<crate::model::CreateAuthorizedViewRequest>);
4924
4925    impl CreateAuthorizedView {
4926        pub(crate) fn new(
4927            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
4928        ) -> Self {
4929            Self(RequestBuilder::new(stub))
4930        }
4931
4932        /// Sets the full request, replacing any prior values.
4933        pub fn with_request<V: Into<crate::model::CreateAuthorizedViewRequest>>(
4934            mut self,
4935            v: V,
4936        ) -> Self {
4937            self.0.request = v.into();
4938            self
4939        }
4940
4941        /// Sets all the options, replacing any prior values.
4942        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4943            self.0.options = v.into();
4944            self
4945        }
4946
4947        /// Sends the request.
4948        ///
4949        /// # Long running operations
4950        ///
4951        /// This starts, but does not poll, a longrunning operation. More information
4952        /// on [create_authorized_view][crate::client::BigtableTableAdmin::create_authorized_view].
4953        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4954            (*self.0.stub)
4955                .create_authorized_view(self.0.request, self.0.options)
4956                .await
4957                .map(crate::Response::into_body)
4958        }
4959
4960        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_authorized_view`.
4961        pub fn poller(
4962            self,
4963        ) -> impl google_cloud_lro::Poller<
4964            crate::model::AuthorizedView,
4965            crate::model::CreateAuthorizedViewMetadata,
4966        > {
4967            type Operation = google_cloud_lro::internal::Operation<
4968                crate::model::AuthorizedView,
4969                crate::model::CreateAuthorizedViewMetadata,
4970            >;
4971            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4972            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4973            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4974            if let Some(ref mut details) = poller_options.tracing {
4975                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::create_authorized_view::until_done";
4976            }
4977
4978            let stub = self.0.stub.clone();
4979            let mut options = self.0.options.clone();
4980            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4981            let query = move |name| {
4982                let stub = stub.clone();
4983                let options = options.clone();
4984                async {
4985                    let op = GetOperation::new(stub)
4986                        .set_name(name)
4987                        .with_options(options)
4988                        .send()
4989                        .await?;
4990                    Ok(Operation::new(op))
4991                }
4992            };
4993
4994            let start = move || async {
4995                let op = self.send().await?;
4996                Ok(Operation::new(op))
4997            };
4998
4999            use google_cloud_lro::internal::PollerExt;
5000            {
5001                google_cloud_lro::internal::new_poller(
5002                    polling_error_policy,
5003                    polling_backoff_policy,
5004                    start,
5005                    query,
5006                )
5007            }
5008            .with_options(poller_options)
5009        }
5010
5011        /// Sets the value of [parent][crate::model::CreateAuthorizedViewRequest::parent].
5012        ///
5013        /// This is a **required** field for requests.
5014        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5015            self.0.request.parent = v.into();
5016            self
5017        }
5018
5019        /// Sets the value of [authorized_view_id][crate::model::CreateAuthorizedViewRequest::authorized_view_id].
5020        ///
5021        /// This is a **required** field for requests.
5022        pub fn set_authorized_view_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5023            self.0.request.authorized_view_id = v.into();
5024            self
5025        }
5026
5027        /// Sets the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
5028        ///
5029        /// This is a **required** field for requests.
5030        pub fn set_authorized_view<T>(mut self, v: T) -> Self
5031        where
5032            T: std::convert::Into<crate::model::AuthorizedView>,
5033        {
5034            self.0.request.authorized_view = std::option::Option::Some(v.into());
5035            self
5036        }
5037
5038        /// Sets or clears the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
5039        ///
5040        /// This is a **required** field for requests.
5041        pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
5042        where
5043            T: std::convert::Into<crate::model::AuthorizedView>,
5044        {
5045            self.0.request.authorized_view = v.map(|x| x.into());
5046            self
5047        }
5048    }
5049
5050    #[doc(hidden)]
5051    impl crate::RequestBuilder for CreateAuthorizedView {
5052        fn request_options(&mut self) -> &mut crate::RequestOptions {
5053            &mut self.0.options
5054        }
5055    }
5056
5057    /// The request builder for [BigtableTableAdmin::list_authorized_views][crate::client::BigtableTableAdmin::list_authorized_views] calls.
5058    ///
5059    /// # Example
5060    /// ```
5061    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::ListAuthorizedViews;
5062    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
5063    /// use google_cloud_gax::paginator::ItemPaginator;
5064    ///
5065    /// let builder = prepare_request_builder();
5066    /// let mut items = builder.by_item();
5067    /// while let Some(result) = items.next().await {
5068    ///   let item = result?;
5069    /// }
5070    /// # Ok(()) }
5071    ///
5072    /// fn prepare_request_builder() -> ListAuthorizedViews {
5073    ///   # panic!();
5074    ///   // ... details omitted ...
5075    /// }
5076    /// ```
5077    #[derive(Clone, Debug)]
5078    pub struct ListAuthorizedViews(RequestBuilder<crate::model::ListAuthorizedViewsRequest>);
5079
5080    impl ListAuthorizedViews {
5081        pub(crate) fn new(
5082            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5083        ) -> Self {
5084            Self(RequestBuilder::new(stub))
5085        }
5086
5087        /// Sets the full request, replacing any prior values.
5088        pub fn with_request<V: Into<crate::model::ListAuthorizedViewsRequest>>(
5089            mut self,
5090            v: V,
5091        ) -> Self {
5092            self.0.request = v.into();
5093            self
5094        }
5095
5096        /// Sets all the options, replacing any prior values.
5097        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5098            self.0.options = v.into();
5099            self
5100        }
5101
5102        /// Sends the request.
5103        pub async fn send(self) -> Result<crate::model::ListAuthorizedViewsResponse> {
5104            (*self.0.stub)
5105                .list_authorized_views(self.0.request, self.0.options)
5106                .await
5107                .map(crate::Response::into_body)
5108        }
5109
5110        /// Streams each page in the collection.
5111        pub fn by_page(
5112            self,
5113        ) -> impl google_cloud_gax::paginator::Paginator<
5114            crate::model::ListAuthorizedViewsResponse,
5115            crate::Error,
5116        > {
5117            use std::clone::Clone;
5118            let token = self.0.request.page_token.clone();
5119            let execute = move |token: String| {
5120                let mut builder = self.clone();
5121                builder.0.request = builder.0.request.set_page_token(token);
5122                builder.send()
5123            };
5124            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5125        }
5126
5127        /// Streams each item in the collection.
5128        pub fn by_item(
5129            self,
5130        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5131            crate::model::ListAuthorizedViewsResponse,
5132            crate::Error,
5133        > {
5134            use google_cloud_gax::paginator::Paginator;
5135            self.by_page().items()
5136        }
5137
5138        /// Sets the value of [parent][crate::model::ListAuthorizedViewsRequest::parent].
5139        ///
5140        /// This is a **required** field for requests.
5141        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5142            self.0.request.parent = v.into();
5143            self
5144        }
5145
5146        /// Sets the value of [page_size][crate::model::ListAuthorizedViewsRequest::page_size].
5147        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5148            self.0.request.page_size = v.into();
5149            self
5150        }
5151
5152        /// Sets the value of [page_token][crate::model::ListAuthorizedViewsRequest::page_token].
5153        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5154            self.0.request.page_token = v.into();
5155            self
5156        }
5157
5158        /// Sets the value of [view][crate::model::ListAuthorizedViewsRequest::view].
5159        pub fn set_view<T: Into<crate::model::authorized_view::ResponseView>>(
5160            mut self,
5161            v: T,
5162        ) -> Self {
5163            self.0.request.view = v.into();
5164            self
5165        }
5166    }
5167
5168    #[doc(hidden)]
5169    impl crate::RequestBuilder for ListAuthorizedViews {
5170        fn request_options(&mut self) -> &mut crate::RequestOptions {
5171            &mut self.0.options
5172        }
5173    }
5174
5175    /// The request builder for [BigtableTableAdmin::get_authorized_view][crate::client::BigtableTableAdmin::get_authorized_view] calls.
5176    ///
5177    /// # Example
5178    /// ```
5179    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::GetAuthorizedView;
5180    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
5181    ///
5182    /// let builder = prepare_request_builder();
5183    /// let response = builder.send().await?;
5184    /// # Ok(()) }
5185    ///
5186    /// fn prepare_request_builder() -> GetAuthorizedView {
5187    ///   # panic!();
5188    ///   // ... details omitted ...
5189    /// }
5190    /// ```
5191    #[derive(Clone, Debug)]
5192    pub struct GetAuthorizedView(RequestBuilder<crate::model::GetAuthorizedViewRequest>);
5193
5194    impl GetAuthorizedView {
5195        pub(crate) fn new(
5196            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5197        ) -> Self {
5198            Self(RequestBuilder::new(stub))
5199        }
5200
5201        /// Sets the full request, replacing any prior values.
5202        pub fn with_request<V: Into<crate::model::GetAuthorizedViewRequest>>(
5203            mut self,
5204            v: V,
5205        ) -> Self {
5206            self.0.request = v.into();
5207            self
5208        }
5209
5210        /// Sets all the options, replacing any prior values.
5211        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5212            self.0.options = v.into();
5213            self
5214        }
5215
5216        /// Sends the request.
5217        pub async fn send(self) -> Result<crate::model::AuthorizedView> {
5218            (*self.0.stub)
5219                .get_authorized_view(self.0.request, self.0.options)
5220                .await
5221                .map(crate::Response::into_body)
5222        }
5223
5224        /// Sets the value of [name][crate::model::GetAuthorizedViewRequest::name].
5225        ///
5226        /// This is a **required** field for requests.
5227        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5228            self.0.request.name = v.into();
5229            self
5230        }
5231
5232        /// Sets the value of [view][crate::model::GetAuthorizedViewRequest::view].
5233        pub fn set_view<T: Into<crate::model::authorized_view::ResponseView>>(
5234            mut self,
5235            v: T,
5236        ) -> Self {
5237            self.0.request.view = v.into();
5238            self
5239        }
5240    }
5241
5242    #[doc(hidden)]
5243    impl crate::RequestBuilder for GetAuthorizedView {
5244        fn request_options(&mut self) -> &mut crate::RequestOptions {
5245            &mut self.0.options
5246        }
5247    }
5248
5249    /// The request builder for [BigtableTableAdmin::update_authorized_view][crate::client::BigtableTableAdmin::update_authorized_view] calls.
5250    ///
5251    /// # Example
5252    /// ```
5253    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::UpdateAuthorizedView;
5254    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
5255    /// use google_cloud_lro::Poller;
5256    ///
5257    /// let builder = prepare_request_builder();
5258    /// let response = builder.poller().until_done().await?;
5259    /// # Ok(()) }
5260    ///
5261    /// fn prepare_request_builder() -> UpdateAuthorizedView {
5262    ///   # panic!();
5263    ///   // ... details omitted ...
5264    /// }
5265    /// ```
5266    #[derive(Clone, Debug)]
5267    pub struct UpdateAuthorizedView(RequestBuilder<crate::model::UpdateAuthorizedViewRequest>);
5268
5269    impl UpdateAuthorizedView {
5270        pub(crate) fn new(
5271            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5272        ) -> Self {
5273            Self(RequestBuilder::new(stub))
5274        }
5275
5276        /// Sets the full request, replacing any prior values.
5277        pub fn with_request<V: Into<crate::model::UpdateAuthorizedViewRequest>>(
5278            mut self,
5279            v: V,
5280        ) -> Self {
5281            self.0.request = v.into();
5282            self
5283        }
5284
5285        /// Sets all the options, replacing any prior values.
5286        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5287            self.0.options = v.into();
5288            self
5289        }
5290
5291        /// Sends the request.
5292        ///
5293        /// # Long running operations
5294        ///
5295        /// This starts, but does not poll, a longrunning operation. More information
5296        /// on [update_authorized_view][crate::client::BigtableTableAdmin::update_authorized_view].
5297        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5298            (*self.0.stub)
5299                .update_authorized_view(self.0.request, self.0.options)
5300                .await
5301                .map(crate::Response::into_body)
5302        }
5303
5304        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_authorized_view`.
5305        pub fn poller(
5306            self,
5307        ) -> impl google_cloud_lro::Poller<
5308            crate::model::AuthorizedView,
5309            crate::model::UpdateAuthorizedViewMetadata,
5310        > {
5311            type Operation = google_cloud_lro::internal::Operation<
5312                crate::model::AuthorizedView,
5313                crate::model::UpdateAuthorizedViewMetadata,
5314            >;
5315            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5316            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5317            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5318            if let Some(ref mut details) = poller_options.tracing {
5319                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::update_authorized_view::until_done";
5320            }
5321
5322            let stub = self.0.stub.clone();
5323            let mut options = self.0.options.clone();
5324            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5325            let query = move |name| {
5326                let stub = stub.clone();
5327                let options = options.clone();
5328                async {
5329                    let op = GetOperation::new(stub)
5330                        .set_name(name)
5331                        .with_options(options)
5332                        .send()
5333                        .await?;
5334                    Ok(Operation::new(op))
5335                }
5336            };
5337
5338            let start = move || async {
5339                let op = self.send().await?;
5340                Ok(Operation::new(op))
5341            };
5342
5343            use google_cloud_lro::internal::PollerExt;
5344            {
5345                google_cloud_lro::internal::new_poller(
5346                    polling_error_policy,
5347                    polling_backoff_policy,
5348                    start,
5349                    query,
5350                )
5351            }
5352            .with_options(poller_options)
5353        }
5354
5355        /// Sets the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
5356        ///
5357        /// This is a **required** field for requests.
5358        pub fn set_authorized_view<T>(mut self, v: T) -> Self
5359        where
5360            T: std::convert::Into<crate::model::AuthorizedView>,
5361        {
5362            self.0.request.authorized_view = std::option::Option::Some(v.into());
5363            self
5364        }
5365
5366        /// Sets or clears the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
5367        ///
5368        /// This is a **required** field for requests.
5369        pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
5370        where
5371            T: std::convert::Into<crate::model::AuthorizedView>,
5372        {
5373            self.0.request.authorized_view = v.map(|x| x.into());
5374            self
5375        }
5376
5377        /// Sets the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
5378        pub fn set_update_mask<T>(mut self, v: T) -> Self
5379        where
5380            T: std::convert::Into<wkt::FieldMask>,
5381        {
5382            self.0.request.update_mask = std::option::Option::Some(v.into());
5383            self
5384        }
5385
5386        /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
5387        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5388        where
5389            T: std::convert::Into<wkt::FieldMask>,
5390        {
5391            self.0.request.update_mask = v.map(|x| x.into());
5392            self
5393        }
5394
5395        /// Sets the value of [ignore_warnings][crate::model::UpdateAuthorizedViewRequest::ignore_warnings].
5396        pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
5397            self.0.request.ignore_warnings = v.into();
5398            self
5399        }
5400    }
5401
5402    #[doc(hidden)]
5403    impl crate::RequestBuilder for UpdateAuthorizedView {
5404        fn request_options(&mut self) -> &mut crate::RequestOptions {
5405            &mut self.0.options
5406        }
5407    }
5408
5409    /// The request builder for [BigtableTableAdmin::delete_authorized_view][crate::client::BigtableTableAdmin::delete_authorized_view] calls.
5410    ///
5411    /// # Example
5412    /// ```
5413    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::DeleteAuthorizedView;
5414    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
5415    ///
5416    /// let builder = prepare_request_builder();
5417    /// let response = builder.send().await?;
5418    /// # Ok(()) }
5419    ///
5420    /// fn prepare_request_builder() -> DeleteAuthorizedView {
5421    ///   # panic!();
5422    ///   // ... details omitted ...
5423    /// }
5424    /// ```
5425    #[derive(Clone, Debug)]
5426    pub struct DeleteAuthorizedView(RequestBuilder<crate::model::DeleteAuthorizedViewRequest>);
5427
5428    impl DeleteAuthorizedView {
5429        pub(crate) fn new(
5430            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5431        ) -> Self {
5432            Self(RequestBuilder::new(stub))
5433        }
5434
5435        /// Sets the full request, replacing any prior values.
5436        pub fn with_request<V: Into<crate::model::DeleteAuthorizedViewRequest>>(
5437            mut self,
5438            v: V,
5439        ) -> Self {
5440            self.0.request = v.into();
5441            self
5442        }
5443
5444        /// Sets all the options, replacing any prior values.
5445        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5446            self.0.options = v.into();
5447            self
5448        }
5449
5450        /// Sends the request.
5451        pub async fn send(self) -> Result<()> {
5452            (*self.0.stub)
5453                .delete_authorized_view(self.0.request, self.0.options)
5454                .await
5455                .map(crate::Response::into_body)
5456        }
5457
5458        /// Sets the value of [name][crate::model::DeleteAuthorizedViewRequest::name].
5459        ///
5460        /// This is a **required** field for requests.
5461        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5462            self.0.request.name = v.into();
5463            self
5464        }
5465
5466        /// Sets the value of [etag][crate::model::DeleteAuthorizedViewRequest::etag].
5467        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
5468            self.0.request.etag = v.into();
5469            self
5470        }
5471    }
5472
5473    #[doc(hidden)]
5474    impl crate::RequestBuilder for DeleteAuthorizedView {
5475        fn request_options(&mut self) -> &mut crate::RequestOptions {
5476            &mut self.0.options
5477        }
5478    }
5479
5480    /// The request builder for [BigtableTableAdmin::modify_column_families][crate::client::BigtableTableAdmin::modify_column_families] calls.
5481    ///
5482    /// # Example
5483    /// ```
5484    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::ModifyColumnFamilies;
5485    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
5486    ///
5487    /// let builder = prepare_request_builder();
5488    /// let response = builder.send().await?;
5489    /// # Ok(()) }
5490    ///
5491    /// fn prepare_request_builder() -> ModifyColumnFamilies {
5492    ///   # panic!();
5493    ///   // ... details omitted ...
5494    /// }
5495    /// ```
5496    #[derive(Clone, Debug)]
5497    pub struct ModifyColumnFamilies(RequestBuilder<crate::model::ModifyColumnFamiliesRequest>);
5498
5499    impl ModifyColumnFamilies {
5500        pub(crate) fn new(
5501            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5502        ) -> Self {
5503            Self(RequestBuilder::new(stub))
5504        }
5505
5506        /// Sets the full request, replacing any prior values.
5507        pub fn with_request<V: Into<crate::model::ModifyColumnFamiliesRequest>>(
5508            mut self,
5509            v: V,
5510        ) -> Self {
5511            self.0.request = v.into();
5512            self
5513        }
5514
5515        /// Sets all the options, replacing any prior values.
5516        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5517            self.0.options = v.into();
5518            self
5519        }
5520
5521        /// Sends the request.
5522        pub async fn send(self) -> Result<crate::model::Table> {
5523            (*self.0.stub)
5524                .modify_column_families(self.0.request, self.0.options)
5525                .await
5526                .map(crate::Response::into_body)
5527        }
5528
5529        /// Sets the value of [name][crate::model::ModifyColumnFamiliesRequest::name].
5530        ///
5531        /// This is a **required** field for requests.
5532        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5533            self.0.request.name = v.into();
5534            self
5535        }
5536
5537        /// Sets the value of [modifications][crate::model::ModifyColumnFamiliesRequest::modifications].
5538        ///
5539        /// This is a **required** field for requests.
5540        pub fn set_modifications<T, V>(mut self, v: T) -> Self
5541        where
5542            T: std::iter::IntoIterator<Item = V>,
5543            V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
5544        {
5545            use std::iter::Iterator;
5546            self.0.request.modifications = v.into_iter().map(|i| i.into()).collect();
5547            self
5548        }
5549
5550        /// Sets the value of [ignore_warnings][crate::model::ModifyColumnFamiliesRequest::ignore_warnings].
5551        pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
5552            self.0.request.ignore_warnings = v.into();
5553            self
5554        }
5555    }
5556
5557    #[doc(hidden)]
5558    impl crate::RequestBuilder for ModifyColumnFamilies {
5559        fn request_options(&mut self) -> &mut crate::RequestOptions {
5560            &mut self.0.options
5561        }
5562    }
5563
5564    /// The request builder for [BigtableTableAdmin::drop_row_range][crate::client::BigtableTableAdmin::drop_row_range] calls.
5565    ///
5566    /// # Example
5567    /// ```
5568    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::DropRowRange;
5569    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
5570    ///
5571    /// let builder = prepare_request_builder();
5572    /// let response = builder.send().await?;
5573    /// # Ok(()) }
5574    ///
5575    /// fn prepare_request_builder() -> DropRowRange {
5576    ///   # panic!();
5577    ///   // ... details omitted ...
5578    /// }
5579    /// ```
5580    #[derive(Clone, Debug)]
5581    pub struct DropRowRange(RequestBuilder<crate::model::DropRowRangeRequest>);
5582
5583    impl DropRowRange {
5584        pub(crate) fn new(
5585            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5586        ) -> Self {
5587            Self(RequestBuilder::new(stub))
5588        }
5589
5590        /// Sets the full request, replacing any prior values.
5591        pub fn with_request<V: Into<crate::model::DropRowRangeRequest>>(mut self, v: V) -> Self {
5592            self.0.request = v.into();
5593            self
5594        }
5595
5596        /// Sets all the options, replacing any prior values.
5597        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5598            self.0.options = v.into();
5599            self
5600        }
5601
5602        /// Sends the request.
5603        pub async fn send(self) -> Result<()> {
5604            (*self.0.stub)
5605                .drop_row_range(self.0.request, self.0.options)
5606                .await
5607                .map(crate::Response::into_body)
5608        }
5609
5610        /// Sets the value of [name][crate::model::DropRowRangeRequest::name].
5611        ///
5612        /// This is a **required** field for requests.
5613        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5614            self.0.request.name = v.into();
5615            self
5616        }
5617
5618        /// Sets the value of [target][crate::model::DropRowRangeRequest::target].
5619        ///
5620        /// Note that all the setters affecting `target` are
5621        /// mutually exclusive.
5622        pub fn set_target<T: Into<Option<crate::model::drop_row_range_request::Target>>>(
5623            mut self,
5624            v: T,
5625        ) -> Self {
5626            self.0.request.target = v.into();
5627            self
5628        }
5629
5630        /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
5631        /// to hold a `RowKeyPrefix`.
5632        ///
5633        /// Note that all the setters affecting `target` are
5634        /// mutually exclusive.
5635        pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
5636            self.0.request = self.0.request.set_row_key_prefix(v);
5637            self
5638        }
5639
5640        /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
5641        /// to hold a `DeleteAllDataFromTable`.
5642        ///
5643        /// Note that all the setters affecting `target` are
5644        /// mutually exclusive.
5645        pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5646            self.0.request = self.0.request.set_delete_all_data_from_table(v);
5647            self
5648        }
5649    }
5650
5651    #[doc(hidden)]
5652    impl crate::RequestBuilder for DropRowRange {
5653        fn request_options(&mut self) -> &mut crate::RequestOptions {
5654            &mut self.0.options
5655        }
5656    }
5657
5658    /// The request builder for [BigtableTableAdmin::generate_consistency_token][crate::client::BigtableTableAdmin::generate_consistency_token] calls.
5659    ///
5660    /// # Example
5661    /// ```
5662    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::GenerateConsistencyToken;
5663    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
5664    ///
5665    /// let builder = prepare_request_builder();
5666    /// let response = builder.send().await?;
5667    /// # Ok(()) }
5668    ///
5669    /// fn prepare_request_builder() -> GenerateConsistencyToken {
5670    ///   # panic!();
5671    ///   // ... details omitted ...
5672    /// }
5673    /// ```
5674    #[derive(Clone, Debug)]
5675    pub struct GenerateConsistencyToken(
5676        RequestBuilder<crate::model::GenerateConsistencyTokenRequest>,
5677    );
5678
5679    impl GenerateConsistencyToken {
5680        pub(crate) fn new(
5681            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5682        ) -> Self {
5683            Self(RequestBuilder::new(stub))
5684        }
5685
5686        /// Sets the full request, replacing any prior values.
5687        pub fn with_request<V: Into<crate::model::GenerateConsistencyTokenRequest>>(
5688            mut self,
5689            v: V,
5690        ) -> Self {
5691            self.0.request = v.into();
5692            self
5693        }
5694
5695        /// Sets all the options, replacing any prior values.
5696        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5697            self.0.options = v.into();
5698            self
5699        }
5700
5701        /// Sends the request.
5702        pub async fn send(self) -> Result<crate::model::GenerateConsistencyTokenResponse> {
5703            (*self.0.stub)
5704                .generate_consistency_token(self.0.request, self.0.options)
5705                .await
5706                .map(crate::Response::into_body)
5707        }
5708
5709        /// Sets the value of [name][crate::model::GenerateConsistencyTokenRequest::name].
5710        ///
5711        /// This is a **required** field for requests.
5712        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5713            self.0.request.name = v.into();
5714            self
5715        }
5716    }
5717
5718    #[doc(hidden)]
5719    impl crate::RequestBuilder for GenerateConsistencyToken {
5720        fn request_options(&mut self) -> &mut crate::RequestOptions {
5721            &mut self.0.options
5722        }
5723    }
5724
5725    /// The request builder for [BigtableTableAdmin::check_consistency][crate::client::BigtableTableAdmin::check_consistency] calls.
5726    ///
5727    /// # Example
5728    /// ```
5729    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::CheckConsistency;
5730    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
5731    ///
5732    /// let builder = prepare_request_builder();
5733    /// let response = builder.send().await?;
5734    /// # Ok(()) }
5735    ///
5736    /// fn prepare_request_builder() -> CheckConsistency {
5737    ///   # panic!();
5738    ///   // ... details omitted ...
5739    /// }
5740    /// ```
5741    #[derive(Clone, Debug)]
5742    pub struct CheckConsistency(RequestBuilder<crate::model::CheckConsistencyRequest>);
5743
5744    impl CheckConsistency {
5745        pub(crate) fn new(
5746            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5747        ) -> Self {
5748            Self(RequestBuilder::new(stub))
5749        }
5750
5751        /// Sets the full request, replacing any prior values.
5752        pub fn with_request<V: Into<crate::model::CheckConsistencyRequest>>(
5753            mut self,
5754            v: V,
5755        ) -> Self {
5756            self.0.request = v.into();
5757            self
5758        }
5759
5760        /// Sets all the options, replacing any prior values.
5761        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5762            self.0.options = v.into();
5763            self
5764        }
5765
5766        /// Sends the request.
5767        pub async fn send(self) -> Result<crate::model::CheckConsistencyResponse> {
5768            (*self.0.stub)
5769                .check_consistency(self.0.request, self.0.options)
5770                .await
5771                .map(crate::Response::into_body)
5772        }
5773
5774        /// Sets the value of [name][crate::model::CheckConsistencyRequest::name].
5775        ///
5776        /// This is a **required** field for requests.
5777        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5778            self.0.request.name = v.into();
5779            self
5780        }
5781
5782        /// Sets the value of [consistency_token][crate::model::CheckConsistencyRequest::consistency_token].
5783        ///
5784        /// This is a **required** field for requests.
5785        pub fn set_consistency_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5786            self.0.request.consistency_token = v.into();
5787            self
5788        }
5789
5790        /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode].
5791        ///
5792        /// Note that all the setters affecting `mode` are
5793        /// mutually exclusive.
5794        pub fn set_mode<T: Into<Option<crate::model::check_consistency_request::Mode>>>(
5795            mut self,
5796            v: T,
5797        ) -> Self {
5798            self.0.request.mode = v.into();
5799            self
5800        }
5801
5802        /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5803        /// to hold a `StandardReadRemoteWrites`.
5804        ///
5805        /// Note that all the setters affecting `mode` are
5806        /// mutually exclusive.
5807        pub fn set_standard_read_remote_writes<
5808            T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
5809        >(
5810            mut self,
5811            v: T,
5812        ) -> Self {
5813            self.0.request = self.0.request.set_standard_read_remote_writes(v);
5814            self
5815        }
5816
5817        /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5818        /// to hold a `DataBoostReadLocalWrites`.
5819        ///
5820        /// Note that all the setters affecting `mode` are
5821        /// mutually exclusive.
5822        pub fn set_data_boost_read_local_writes<
5823            T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
5824        >(
5825            mut self,
5826            v: T,
5827        ) -> Self {
5828            self.0.request = self.0.request.set_data_boost_read_local_writes(v);
5829            self
5830        }
5831    }
5832
5833    #[doc(hidden)]
5834    impl crate::RequestBuilder for CheckConsistency {
5835        fn request_options(&mut self) -> &mut crate::RequestOptions {
5836            &mut self.0.options
5837        }
5838    }
5839
5840    /// The request builder for [BigtableTableAdmin::snapshot_table][crate::client::BigtableTableAdmin::snapshot_table] calls.
5841    ///
5842    /// # Example
5843    /// ```
5844    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::SnapshotTable;
5845    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
5846    /// use google_cloud_lro::Poller;
5847    ///
5848    /// let builder = prepare_request_builder();
5849    /// let response = builder.poller().until_done().await?;
5850    /// # Ok(()) }
5851    ///
5852    /// fn prepare_request_builder() -> SnapshotTable {
5853    ///   # panic!();
5854    ///   // ... details omitted ...
5855    /// }
5856    /// ```
5857    #[derive(Clone, Debug)]
5858    pub struct SnapshotTable(RequestBuilder<crate::model::SnapshotTableRequest>);
5859
5860    impl SnapshotTable {
5861        pub(crate) fn new(
5862            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
5863        ) -> Self {
5864            Self(RequestBuilder::new(stub))
5865        }
5866
5867        /// Sets the full request, replacing any prior values.
5868        pub fn with_request<V: Into<crate::model::SnapshotTableRequest>>(mut self, v: V) -> Self {
5869            self.0.request = v.into();
5870            self
5871        }
5872
5873        /// Sets all the options, replacing any prior values.
5874        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5875            self.0.options = v.into();
5876            self
5877        }
5878
5879        /// Sends the request.
5880        ///
5881        /// # Long running operations
5882        ///
5883        /// This starts, but does not poll, a longrunning operation. More information
5884        /// on [snapshot_table][crate::client::BigtableTableAdmin::snapshot_table].
5885        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5886            (*self.0.stub)
5887                .snapshot_table(self.0.request, self.0.options)
5888                .await
5889                .map(crate::Response::into_body)
5890        }
5891
5892        /// Creates a [Poller][google_cloud_lro::Poller] to work with `snapshot_table`.
5893        pub fn poller(
5894            self,
5895        ) -> impl google_cloud_lro::Poller<crate::model::Snapshot, crate::model::SnapshotTableMetadata>
5896        {
5897            type Operation = google_cloud_lro::internal::Operation<
5898                crate::model::Snapshot,
5899                crate::model::SnapshotTableMetadata,
5900            >;
5901            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5902            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5903            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5904            if let Some(ref mut details) = poller_options.tracing {
5905                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::snapshot_table::until_done";
5906            }
5907
5908            let stub = self.0.stub.clone();
5909            let mut options = self.0.options.clone();
5910            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5911            let query = move |name| {
5912                let stub = stub.clone();
5913                let options = options.clone();
5914                async {
5915                    let op = GetOperation::new(stub)
5916                        .set_name(name)
5917                        .with_options(options)
5918                        .send()
5919                        .await?;
5920                    Ok(Operation::new(op))
5921                }
5922            };
5923
5924            let start = move || async {
5925                let op = self.send().await?;
5926                Ok(Operation::new(op))
5927            };
5928
5929            use google_cloud_lro::internal::PollerExt;
5930            {
5931                google_cloud_lro::internal::new_poller(
5932                    polling_error_policy,
5933                    polling_backoff_policy,
5934                    start,
5935                    query,
5936                )
5937            }
5938            .with_options(poller_options)
5939        }
5940
5941        /// Sets the value of [name][crate::model::SnapshotTableRequest::name].
5942        ///
5943        /// This is a **required** field for requests.
5944        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5945            self.0.request.name = v.into();
5946            self
5947        }
5948
5949        /// Sets the value of [cluster][crate::model::SnapshotTableRequest::cluster].
5950        ///
5951        /// This is a **required** field for requests.
5952        pub fn set_cluster<T: Into<std::string::String>>(mut self, v: T) -> Self {
5953            self.0.request.cluster = v.into();
5954            self
5955        }
5956
5957        /// Sets the value of [snapshot_id][crate::model::SnapshotTableRequest::snapshot_id].
5958        ///
5959        /// This is a **required** field for requests.
5960        pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5961            self.0.request.snapshot_id = v.into();
5962            self
5963        }
5964
5965        /// Sets the value of [ttl][crate::model::SnapshotTableRequest::ttl].
5966        pub fn set_ttl<T>(mut self, v: T) -> Self
5967        where
5968            T: std::convert::Into<wkt::Duration>,
5969        {
5970            self.0.request.ttl = std::option::Option::Some(v.into());
5971            self
5972        }
5973
5974        /// Sets or clears the value of [ttl][crate::model::SnapshotTableRequest::ttl].
5975        pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
5976        where
5977            T: std::convert::Into<wkt::Duration>,
5978        {
5979            self.0.request.ttl = v.map(|x| x.into());
5980            self
5981        }
5982
5983        /// Sets the value of [description][crate::model::SnapshotTableRequest::description].
5984        pub fn set_description<T: Into<std::string::String>>(mut self, v: T) -> Self {
5985            self.0.request.description = v.into();
5986            self
5987        }
5988    }
5989
5990    #[doc(hidden)]
5991    impl crate::RequestBuilder for SnapshotTable {
5992        fn request_options(&mut self) -> &mut crate::RequestOptions {
5993            &mut self.0.options
5994        }
5995    }
5996
5997    /// The request builder for [BigtableTableAdmin::get_snapshot][crate::client::BigtableTableAdmin::get_snapshot] calls.
5998    ///
5999    /// # Example
6000    /// ```
6001    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::GetSnapshot;
6002    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
6003    ///
6004    /// let builder = prepare_request_builder();
6005    /// let response = builder.send().await?;
6006    /// # Ok(()) }
6007    ///
6008    /// fn prepare_request_builder() -> GetSnapshot {
6009    ///   # panic!();
6010    ///   // ... details omitted ...
6011    /// }
6012    /// ```
6013    #[derive(Clone, Debug)]
6014    pub struct GetSnapshot(RequestBuilder<crate::model::GetSnapshotRequest>);
6015
6016    impl GetSnapshot {
6017        pub(crate) fn new(
6018            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6019        ) -> Self {
6020            Self(RequestBuilder::new(stub))
6021        }
6022
6023        /// Sets the full request, replacing any prior values.
6024        pub fn with_request<V: Into<crate::model::GetSnapshotRequest>>(mut self, v: V) -> Self {
6025            self.0.request = v.into();
6026            self
6027        }
6028
6029        /// Sets all the options, replacing any prior values.
6030        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6031            self.0.options = v.into();
6032            self
6033        }
6034
6035        /// Sends the request.
6036        pub async fn send(self) -> Result<crate::model::Snapshot> {
6037            (*self.0.stub)
6038                .get_snapshot(self.0.request, self.0.options)
6039                .await
6040                .map(crate::Response::into_body)
6041        }
6042
6043        /// Sets the value of [name][crate::model::GetSnapshotRequest::name].
6044        ///
6045        /// This is a **required** field for requests.
6046        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6047            self.0.request.name = v.into();
6048            self
6049        }
6050    }
6051
6052    #[doc(hidden)]
6053    impl crate::RequestBuilder for GetSnapshot {
6054        fn request_options(&mut self) -> &mut crate::RequestOptions {
6055            &mut self.0.options
6056        }
6057    }
6058
6059    /// The request builder for [BigtableTableAdmin::list_snapshots][crate::client::BigtableTableAdmin::list_snapshots] calls.
6060    ///
6061    /// # Example
6062    /// ```
6063    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::ListSnapshots;
6064    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
6065    /// use google_cloud_gax::paginator::ItemPaginator;
6066    ///
6067    /// let builder = prepare_request_builder();
6068    /// let mut items = builder.by_item();
6069    /// while let Some(result) = items.next().await {
6070    ///   let item = result?;
6071    /// }
6072    /// # Ok(()) }
6073    ///
6074    /// fn prepare_request_builder() -> ListSnapshots {
6075    ///   # panic!();
6076    ///   // ... details omitted ...
6077    /// }
6078    /// ```
6079    #[derive(Clone, Debug)]
6080    pub struct ListSnapshots(RequestBuilder<crate::model::ListSnapshotsRequest>);
6081
6082    impl ListSnapshots {
6083        pub(crate) fn new(
6084            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6085        ) -> Self {
6086            Self(RequestBuilder::new(stub))
6087        }
6088
6089        /// Sets the full request, replacing any prior values.
6090        pub fn with_request<V: Into<crate::model::ListSnapshotsRequest>>(mut self, v: V) -> Self {
6091            self.0.request = v.into();
6092            self
6093        }
6094
6095        /// Sets all the options, replacing any prior values.
6096        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6097            self.0.options = v.into();
6098            self
6099        }
6100
6101        /// Sends the request.
6102        pub async fn send(self) -> Result<crate::model::ListSnapshotsResponse> {
6103            (*self.0.stub)
6104                .list_snapshots(self.0.request, self.0.options)
6105                .await
6106                .map(crate::Response::into_body)
6107        }
6108
6109        /// Streams each page in the collection.
6110        pub fn by_page(
6111            self,
6112        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListSnapshotsResponse, crate::Error>
6113        {
6114            use std::clone::Clone;
6115            let token = self.0.request.page_token.clone();
6116            let execute = move |token: String| {
6117                let mut builder = self.clone();
6118                builder.0.request = builder.0.request.set_page_token(token);
6119                builder.send()
6120            };
6121            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6122        }
6123
6124        /// Streams each item in the collection.
6125        pub fn by_item(
6126            self,
6127        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6128            crate::model::ListSnapshotsResponse,
6129            crate::Error,
6130        > {
6131            use google_cloud_gax::paginator::Paginator;
6132            self.by_page().items()
6133        }
6134
6135        /// Sets the value of [parent][crate::model::ListSnapshotsRequest::parent].
6136        ///
6137        /// This is a **required** field for requests.
6138        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6139            self.0.request.parent = v.into();
6140            self
6141        }
6142
6143        /// Sets the value of [page_size][crate::model::ListSnapshotsRequest::page_size].
6144        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6145            self.0.request.page_size = v.into();
6146            self
6147        }
6148
6149        /// Sets the value of [page_token][crate::model::ListSnapshotsRequest::page_token].
6150        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6151            self.0.request.page_token = v.into();
6152            self
6153        }
6154    }
6155
6156    #[doc(hidden)]
6157    impl crate::RequestBuilder for ListSnapshots {
6158        fn request_options(&mut self) -> &mut crate::RequestOptions {
6159            &mut self.0.options
6160        }
6161    }
6162
6163    /// The request builder for [BigtableTableAdmin::delete_snapshot][crate::client::BigtableTableAdmin::delete_snapshot] calls.
6164    ///
6165    /// # Example
6166    /// ```
6167    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::DeleteSnapshot;
6168    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
6169    ///
6170    /// let builder = prepare_request_builder();
6171    /// let response = builder.send().await?;
6172    /// # Ok(()) }
6173    ///
6174    /// fn prepare_request_builder() -> DeleteSnapshot {
6175    ///   # panic!();
6176    ///   // ... details omitted ...
6177    /// }
6178    /// ```
6179    #[derive(Clone, Debug)]
6180    pub struct DeleteSnapshot(RequestBuilder<crate::model::DeleteSnapshotRequest>);
6181
6182    impl DeleteSnapshot {
6183        pub(crate) fn new(
6184            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6185        ) -> Self {
6186            Self(RequestBuilder::new(stub))
6187        }
6188
6189        /// Sets the full request, replacing any prior values.
6190        pub fn with_request<V: Into<crate::model::DeleteSnapshotRequest>>(mut self, v: V) -> Self {
6191            self.0.request = v.into();
6192            self
6193        }
6194
6195        /// Sets all the options, replacing any prior values.
6196        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6197            self.0.options = v.into();
6198            self
6199        }
6200
6201        /// Sends the request.
6202        pub async fn send(self) -> Result<()> {
6203            (*self.0.stub)
6204                .delete_snapshot(self.0.request, self.0.options)
6205                .await
6206                .map(crate::Response::into_body)
6207        }
6208
6209        /// Sets the value of [name][crate::model::DeleteSnapshotRequest::name].
6210        ///
6211        /// This is a **required** field for requests.
6212        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6213            self.0.request.name = v.into();
6214            self
6215        }
6216    }
6217
6218    #[doc(hidden)]
6219    impl crate::RequestBuilder for DeleteSnapshot {
6220        fn request_options(&mut self) -> &mut crate::RequestOptions {
6221            &mut self.0.options
6222        }
6223    }
6224
6225    /// The request builder for [BigtableTableAdmin::create_backup][crate::client::BigtableTableAdmin::create_backup] calls.
6226    ///
6227    /// # Example
6228    /// ```
6229    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::CreateBackup;
6230    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
6231    /// use google_cloud_lro::Poller;
6232    ///
6233    /// let builder = prepare_request_builder();
6234    /// let response = builder.poller().until_done().await?;
6235    /// # Ok(()) }
6236    ///
6237    /// fn prepare_request_builder() -> CreateBackup {
6238    ///   # panic!();
6239    ///   // ... details omitted ...
6240    /// }
6241    /// ```
6242    #[derive(Clone, Debug)]
6243    pub struct CreateBackup(RequestBuilder<crate::model::CreateBackupRequest>);
6244
6245    impl CreateBackup {
6246        pub(crate) fn new(
6247            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6248        ) -> Self {
6249            Self(RequestBuilder::new(stub))
6250        }
6251
6252        /// Sets the full request, replacing any prior values.
6253        pub fn with_request<V: Into<crate::model::CreateBackupRequest>>(mut self, v: V) -> Self {
6254            self.0.request = v.into();
6255            self
6256        }
6257
6258        /// Sets all the options, replacing any prior values.
6259        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6260            self.0.options = v.into();
6261            self
6262        }
6263
6264        /// Sends the request.
6265        ///
6266        /// # Long running operations
6267        ///
6268        /// This starts, but does not poll, a longrunning operation. More information
6269        /// on [create_backup][crate::client::BigtableTableAdmin::create_backup].
6270        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6271            (*self.0.stub)
6272                .create_backup(self.0.request, self.0.options)
6273                .await
6274                .map(crate::Response::into_body)
6275        }
6276
6277        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_backup`.
6278        pub fn poller(
6279            self,
6280        ) -> impl google_cloud_lro::Poller<crate::model::Backup, crate::model::CreateBackupMetadata>
6281        {
6282            type Operation = google_cloud_lro::internal::Operation<
6283                crate::model::Backup,
6284                crate::model::CreateBackupMetadata,
6285            >;
6286            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6287            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6288            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6289            if let Some(ref mut details) = poller_options.tracing {
6290                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::create_backup::until_done";
6291            }
6292
6293            let stub = self.0.stub.clone();
6294            let mut options = self.0.options.clone();
6295            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6296            let query = move |name| {
6297                let stub = stub.clone();
6298                let options = options.clone();
6299                async {
6300                    let op = GetOperation::new(stub)
6301                        .set_name(name)
6302                        .with_options(options)
6303                        .send()
6304                        .await?;
6305                    Ok(Operation::new(op))
6306                }
6307            };
6308
6309            let start = move || async {
6310                let op = self.send().await?;
6311                Ok(Operation::new(op))
6312            };
6313
6314            use google_cloud_lro::internal::PollerExt;
6315            {
6316                google_cloud_lro::internal::new_poller(
6317                    polling_error_policy,
6318                    polling_backoff_policy,
6319                    start,
6320                    query,
6321                )
6322            }
6323            .with_options(poller_options)
6324        }
6325
6326        /// Sets the value of [parent][crate::model::CreateBackupRequest::parent].
6327        ///
6328        /// This is a **required** field for requests.
6329        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6330            self.0.request.parent = v.into();
6331            self
6332        }
6333
6334        /// Sets the value of [backup_id][crate::model::CreateBackupRequest::backup_id].
6335        ///
6336        /// This is a **required** field for requests.
6337        pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6338            self.0.request.backup_id = v.into();
6339            self
6340        }
6341
6342        /// Sets the value of [backup][crate::model::CreateBackupRequest::backup].
6343        ///
6344        /// This is a **required** field for requests.
6345        pub fn set_backup<T>(mut self, v: T) -> Self
6346        where
6347            T: std::convert::Into<crate::model::Backup>,
6348        {
6349            self.0.request.backup = std::option::Option::Some(v.into());
6350            self
6351        }
6352
6353        /// Sets or clears the value of [backup][crate::model::CreateBackupRequest::backup].
6354        ///
6355        /// This is a **required** field for requests.
6356        pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6357        where
6358            T: std::convert::Into<crate::model::Backup>,
6359        {
6360            self.0.request.backup = v.map(|x| x.into());
6361            self
6362        }
6363    }
6364
6365    #[doc(hidden)]
6366    impl crate::RequestBuilder for CreateBackup {
6367        fn request_options(&mut self) -> &mut crate::RequestOptions {
6368            &mut self.0.options
6369        }
6370    }
6371
6372    /// The request builder for [BigtableTableAdmin::get_backup][crate::client::BigtableTableAdmin::get_backup] calls.
6373    ///
6374    /// # Example
6375    /// ```
6376    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::GetBackup;
6377    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
6378    ///
6379    /// let builder = prepare_request_builder();
6380    /// let response = builder.send().await?;
6381    /// # Ok(()) }
6382    ///
6383    /// fn prepare_request_builder() -> GetBackup {
6384    ///   # panic!();
6385    ///   // ... details omitted ...
6386    /// }
6387    /// ```
6388    #[derive(Clone, Debug)]
6389    pub struct GetBackup(RequestBuilder<crate::model::GetBackupRequest>);
6390
6391    impl GetBackup {
6392        pub(crate) fn new(
6393            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6394        ) -> Self {
6395            Self(RequestBuilder::new(stub))
6396        }
6397
6398        /// Sets the full request, replacing any prior values.
6399        pub fn with_request<V: Into<crate::model::GetBackupRequest>>(mut self, v: V) -> Self {
6400            self.0.request = v.into();
6401            self
6402        }
6403
6404        /// Sets all the options, replacing any prior values.
6405        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6406            self.0.options = v.into();
6407            self
6408        }
6409
6410        /// Sends the request.
6411        pub async fn send(self) -> Result<crate::model::Backup> {
6412            (*self.0.stub)
6413                .get_backup(self.0.request, self.0.options)
6414                .await
6415                .map(crate::Response::into_body)
6416        }
6417
6418        /// Sets the value of [name][crate::model::GetBackupRequest::name].
6419        ///
6420        /// This is a **required** field for requests.
6421        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6422            self.0.request.name = v.into();
6423            self
6424        }
6425    }
6426
6427    #[doc(hidden)]
6428    impl crate::RequestBuilder for GetBackup {
6429        fn request_options(&mut self) -> &mut crate::RequestOptions {
6430            &mut self.0.options
6431        }
6432    }
6433
6434    /// The request builder for [BigtableTableAdmin::update_backup][crate::client::BigtableTableAdmin::update_backup] calls.
6435    ///
6436    /// # Example
6437    /// ```
6438    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::UpdateBackup;
6439    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
6440    ///
6441    /// let builder = prepare_request_builder();
6442    /// let response = builder.send().await?;
6443    /// # Ok(()) }
6444    ///
6445    /// fn prepare_request_builder() -> UpdateBackup {
6446    ///   # panic!();
6447    ///   // ... details omitted ...
6448    /// }
6449    /// ```
6450    #[derive(Clone, Debug)]
6451    pub struct UpdateBackup(RequestBuilder<crate::model::UpdateBackupRequest>);
6452
6453    impl UpdateBackup {
6454        pub(crate) fn new(
6455            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6456        ) -> Self {
6457            Self(RequestBuilder::new(stub))
6458        }
6459
6460        /// Sets the full request, replacing any prior values.
6461        pub fn with_request<V: Into<crate::model::UpdateBackupRequest>>(mut self, v: V) -> Self {
6462            self.0.request = v.into();
6463            self
6464        }
6465
6466        /// Sets all the options, replacing any prior values.
6467        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6468            self.0.options = v.into();
6469            self
6470        }
6471
6472        /// Sends the request.
6473        pub async fn send(self) -> Result<crate::model::Backup> {
6474            (*self.0.stub)
6475                .update_backup(self.0.request, self.0.options)
6476                .await
6477                .map(crate::Response::into_body)
6478        }
6479
6480        /// Sets the value of [backup][crate::model::UpdateBackupRequest::backup].
6481        ///
6482        /// This is a **required** field for requests.
6483        pub fn set_backup<T>(mut self, v: T) -> Self
6484        where
6485            T: std::convert::Into<crate::model::Backup>,
6486        {
6487            self.0.request.backup = std::option::Option::Some(v.into());
6488            self
6489        }
6490
6491        /// Sets or clears the value of [backup][crate::model::UpdateBackupRequest::backup].
6492        ///
6493        /// This is a **required** field for requests.
6494        pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6495        where
6496            T: std::convert::Into<crate::model::Backup>,
6497        {
6498            self.0.request.backup = v.map(|x| x.into());
6499            self
6500        }
6501
6502        /// Sets the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
6503        ///
6504        /// This is a **required** field for requests.
6505        pub fn set_update_mask<T>(mut self, v: T) -> Self
6506        where
6507            T: std::convert::Into<wkt::FieldMask>,
6508        {
6509            self.0.request.update_mask = std::option::Option::Some(v.into());
6510            self
6511        }
6512
6513        /// Sets or clears the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
6514        ///
6515        /// This is a **required** field for requests.
6516        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6517        where
6518            T: std::convert::Into<wkt::FieldMask>,
6519        {
6520            self.0.request.update_mask = v.map(|x| x.into());
6521            self
6522        }
6523    }
6524
6525    #[doc(hidden)]
6526    impl crate::RequestBuilder for UpdateBackup {
6527        fn request_options(&mut self) -> &mut crate::RequestOptions {
6528            &mut self.0.options
6529        }
6530    }
6531
6532    /// The request builder for [BigtableTableAdmin::delete_backup][crate::client::BigtableTableAdmin::delete_backup] calls.
6533    ///
6534    /// # Example
6535    /// ```
6536    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::DeleteBackup;
6537    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
6538    ///
6539    /// let builder = prepare_request_builder();
6540    /// let response = builder.send().await?;
6541    /// # Ok(()) }
6542    ///
6543    /// fn prepare_request_builder() -> DeleteBackup {
6544    ///   # panic!();
6545    ///   // ... details omitted ...
6546    /// }
6547    /// ```
6548    #[derive(Clone, Debug)]
6549    pub struct DeleteBackup(RequestBuilder<crate::model::DeleteBackupRequest>);
6550
6551    impl DeleteBackup {
6552        pub(crate) fn new(
6553            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6554        ) -> Self {
6555            Self(RequestBuilder::new(stub))
6556        }
6557
6558        /// Sets the full request, replacing any prior values.
6559        pub fn with_request<V: Into<crate::model::DeleteBackupRequest>>(mut self, v: V) -> Self {
6560            self.0.request = v.into();
6561            self
6562        }
6563
6564        /// Sets all the options, replacing any prior values.
6565        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6566            self.0.options = v.into();
6567            self
6568        }
6569
6570        /// Sends the request.
6571        pub async fn send(self) -> Result<()> {
6572            (*self.0.stub)
6573                .delete_backup(self.0.request, self.0.options)
6574                .await
6575                .map(crate::Response::into_body)
6576        }
6577
6578        /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
6579        ///
6580        /// This is a **required** field for requests.
6581        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6582            self.0.request.name = v.into();
6583            self
6584        }
6585    }
6586
6587    #[doc(hidden)]
6588    impl crate::RequestBuilder for DeleteBackup {
6589        fn request_options(&mut self) -> &mut crate::RequestOptions {
6590            &mut self.0.options
6591        }
6592    }
6593
6594    /// The request builder for [BigtableTableAdmin::list_backups][crate::client::BigtableTableAdmin::list_backups] calls.
6595    ///
6596    /// # Example
6597    /// ```
6598    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::ListBackups;
6599    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
6600    /// use google_cloud_gax::paginator::ItemPaginator;
6601    ///
6602    /// let builder = prepare_request_builder();
6603    /// let mut items = builder.by_item();
6604    /// while let Some(result) = items.next().await {
6605    ///   let item = result?;
6606    /// }
6607    /// # Ok(()) }
6608    ///
6609    /// fn prepare_request_builder() -> ListBackups {
6610    ///   # panic!();
6611    ///   // ... details omitted ...
6612    /// }
6613    /// ```
6614    #[derive(Clone, Debug)]
6615    pub struct ListBackups(RequestBuilder<crate::model::ListBackupsRequest>);
6616
6617    impl ListBackups {
6618        pub(crate) fn new(
6619            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6620        ) -> Self {
6621            Self(RequestBuilder::new(stub))
6622        }
6623
6624        /// Sets the full request, replacing any prior values.
6625        pub fn with_request<V: Into<crate::model::ListBackupsRequest>>(mut self, v: V) -> Self {
6626            self.0.request = v.into();
6627            self
6628        }
6629
6630        /// Sets all the options, replacing any prior values.
6631        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6632            self.0.options = v.into();
6633            self
6634        }
6635
6636        /// Sends the request.
6637        pub async fn send(self) -> Result<crate::model::ListBackupsResponse> {
6638            (*self.0.stub)
6639                .list_backups(self.0.request, self.0.options)
6640                .await
6641                .map(crate::Response::into_body)
6642        }
6643
6644        /// Streams each page in the collection.
6645        pub fn by_page(
6646            self,
6647        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListBackupsResponse, crate::Error>
6648        {
6649            use std::clone::Clone;
6650            let token = self.0.request.page_token.clone();
6651            let execute = move |token: String| {
6652                let mut builder = self.clone();
6653                builder.0.request = builder.0.request.set_page_token(token);
6654                builder.send()
6655            };
6656            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6657        }
6658
6659        /// Streams each item in the collection.
6660        pub fn by_item(
6661            self,
6662        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6663            crate::model::ListBackupsResponse,
6664            crate::Error,
6665        > {
6666            use google_cloud_gax::paginator::Paginator;
6667            self.by_page().items()
6668        }
6669
6670        /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
6671        ///
6672        /// This is a **required** field for requests.
6673        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6674            self.0.request.parent = v.into();
6675            self
6676        }
6677
6678        /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
6679        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6680            self.0.request.filter = v.into();
6681            self
6682        }
6683
6684        /// Sets the value of [order_by][crate::model::ListBackupsRequest::order_by].
6685        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6686            self.0.request.order_by = v.into();
6687            self
6688        }
6689
6690        /// Sets the value of [page_size][crate::model::ListBackupsRequest::page_size].
6691        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6692            self.0.request.page_size = v.into();
6693            self
6694        }
6695
6696        /// Sets the value of [page_token][crate::model::ListBackupsRequest::page_token].
6697        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6698            self.0.request.page_token = v.into();
6699            self
6700        }
6701    }
6702
6703    #[doc(hidden)]
6704    impl crate::RequestBuilder for ListBackups {
6705        fn request_options(&mut self) -> &mut crate::RequestOptions {
6706            &mut self.0.options
6707        }
6708    }
6709
6710    /// The request builder for [BigtableTableAdmin::restore_table][crate::client::BigtableTableAdmin::restore_table] calls.
6711    ///
6712    /// # Example
6713    /// ```
6714    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::RestoreTable;
6715    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
6716    /// use google_cloud_lro::Poller;
6717    ///
6718    /// let builder = prepare_request_builder();
6719    /// let response = builder.poller().until_done().await?;
6720    /// # Ok(()) }
6721    ///
6722    /// fn prepare_request_builder() -> RestoreTable {
6723    ///   # panic!();
6724    ///   // ... details omitted ...
6725    /// }
6726    /// ```
6727    #[derive(Clone, Debug)]
6728    pub struct RestoreTable(RequestBuilder<crate::model::RestoreTableRequest>);
6729
6730    impl RestoreTable {
6731        pub(crate) fn new(
6732            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6733        ) -> Self {
6734            Self(RequestBuilder::new(stub))
6735        }
6736
6737        /// Sets the full request, replacing any prior values.
6738        pub fn with_request<V: Into<crate::model::RestoreTableRequest>>(mut self, v: V) -> Self {
6739            self.0.request = v.into();
6740            self
6741        }
6742
6743        /// Sets all the options, replacing any prior values.
6744        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6745            self.0.options = v.into();
6746            self
6747        }
6748
6749        /// Sends the request.
6750        ///
6751        /// # Long running operations
6752        ///
6753        /// This starts, but does not poll, a longrunning operation. More information
6754        /// on [restore_table][crate::client::BigtableTableAdmin::restore_table].
6755        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6756            (*self.0.stub)
6757                .restore_table(self.0.request, self.0.options)
6758                .await
6759                .map(crate::Response::into_body)
6760        }
6761
6762        /// Creates a [Poller][google_cloud_lro::Poller] to work with `restore_table`.
6763        pub fn poller(
6764            self,
6765        ) -> impl google_cloud_lro::Poller<crate::model::Table, crate::model::RestoreTableMetadata>
6766        {
6767            type Operation = google_cloud_lro::internal::Operation<
6768                crate::model::Table,
6769                crate::model::RestoreTableMetadata,
6770            >;
6771            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6772            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6773            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6774            if let Some(ref mut details) = poller_options.tracing {
6775                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::restore_table::until_done";
6776            }
6777
6778            let stub = self.0.stub.clone();
6779            let mut options = self.0.options.clone();
6780            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6781            let query = move |name| {
6782                let stub = stub.clone();
6783                let options = options.clone();
6784                async {
6785                    let op = GetOperation::new(stub)
6786                        .set_name(name)
6787                        .with_options(options)
6788                        .send()
6789                        .await?;
6790                    Ok(Operation::new(op))
6791                }
6792            };
6793
6794            let start = move || async {
6795                let op = self.send().await?;
6796                Ok(Operation::new(op))
6797            };
6798
6799            use google_cloud_lro::internal::PollerExt;
6800            {
6801                google_cloud_lro::internal::new_poller(
6802                    polling_error_policy,
6803                    polling_backoff_policy,
6804                    start,
6805                    query,
6806                )
6807            }
6808            .with_options(poller_options)
6809        }
6810
6811        /// Sets the value of [parent][crate::model::RestoreTableRequest::parent].
6812        ///
6813        /// This is a **required** field for requests.
6814        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6815            self.0.request.parent = v.into();
6816            self
6817        }
6818
6819        /// Sets the value of [table_id][crate::model::RestoreTableRequest::table_id].
6820        ///
6821        /// This is a **required** field for requests.
6822        pub fn set_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6823            self.0.request.table_id = v.into();
6824            self
6825        }
6826
6827        /// Sets the value of [source][crate::model::RestoreTableRequest::source].
6828        ///
6829        /// Note that all the setters affecting `source` are
6830        /// mutually exclusive.
6831        pub fn set_source<T: Into<Option<crate::model::restore_table_request::Source>>>(
6832            mut self,
6833            v: T,
6834        ) -> Self {
6835            self.0.request.source = v.into();
6836            self
6837        }
6838
6839        /// Sets the value of [source][crate::model::RestoreTableRequest::source]
6840        /// to hold a `Backup`.
6841        ///
6842        /// Note that all the setters affecting `source` are
6843        /// mutually exclusive.
6844        pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6845            self.0.request = self.0.request.set_backup(v);
6846            self
6847        }
6848    }
6849
6850    #[doc(hidden)]
6851    impl crate::RequestBuilder for RestoreTable {
6852        fn request_options(&mut self) -> &mut crate::RequestOptions {
6853            &mut self.0.options
6854        }
6855    }
6856
6857    /// The request builder for [BigtableTableAdmin::copy_backup][crate::client::BigtableTableAdmin::copy_backup] calls.
6858    ///
6859    /// # Example
6860    /// ```
6861    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::CopyBackup;
6862    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
6863    /// use google_cloud_lro::Poller;
6864    ///
6865    /// let builder = prepare_request_builder();
6866    /// let response = builder.poller().until_done().await?;
6867    /// # Ok(()) }
6868    ///
6869    /// fn prepare_request_builder() -> CopyBackup {
6870    ///   # panic!();
6871    ///   // ... details omitted ...
6872    /// }
6873    /// ```
6874    #[derive(Clone, Debug)]
6875    pub struct CopyBackup(RequestBuilder<crate::model::CopyBackupRequest>);
6876
6877    impl CopyBackup {
6878        pub(crate) fn new(
6879            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
6880        ) -> Self {
6881            Self(RequestBuilder::new(stub))
6882        }
6883
6884        /// Sets the full request, replacing any prior values.
6885        pub fn with_request<V: Into<crate::model::CopyBackupRequest>>(mut self, v: V) -> Self {
6886            self.0.request = v.into();
6887            self
6888        }
6889
6890        /// Sets all the options, replacing any prior values.
6891        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6892            self.0.options = v.into();
6893            self
6894        }
6895
6896        /// Sends the request.
6897        ///
6898        /// # Long running operations
6899        ///
6900        /// This starts, but does not poll, a longrunning operation. More information
6901        /// on [copy_backup][crate::client::BigtableTableAdmin::copy_backup].
6902        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6903            (*self.0.stub)
6904                .copy_backup(self.0.request, self.0.options)
6905                .await
6906                .map(crate::Response::into_body)
6907        }
6908
6909        /// Creates a [Poller][google_cloud_lro::Poller] to work with `copy_backup`.
6910        pub fn poller(
6911            self,
6912        ) -> impl google_cloud_lro::Poller<crate::model::Backup, crate::model::CopyBackupMetadata>
6913        {
6914            type Operation = google_cloud_lro::internal::Operation<
6915                crate::model::Backup,
6916                crate::model::CopyBackupMetadata,
6917            >;
6918            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6919            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6920            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6921            if let Some(ref mut details) = poller_options.tracing {
6922                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::copy_backup::until_done";
6923            }
6924
6925            let stub = self.0.stub.clone();
6926            let mut options = self.0.options.clone();
6927            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6928            let query = move |name| {
6929                let stub = stub.clone();
6930                let options = options.clone();
6931                async {
6932                    let op = GetOperation::new(stub)
6933                        .set_name(name)
6934                        .with_options(options)
6935                        .send()
6936                        .await?;
6937                    Ok(Operation::new(op))
6938                }
6939            };
6940
6941            let start = move || async {
6942                let op = self.send().await?;
6943                Ok(Operation::new(op))
6944            };
6945
6946            use google_cloud_lro::internal::PollerExt;
6947            {
6948                google_cloud_lro::internal::new_poller(
6949                    polling_error_policy,
6950                    polling_backoff_policy,
6951                    start,
6952                    query,
6953                )
6954            }
6955            .with_options(poller_options)
6956        }
6957
6958        /// Sets the value of [parent][crate::model::CopyBackupRequest::parent].
6959        ///
6960        /// This is a **required** field for requests.
6961        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6962            self.0.request.parent = v.into();
6963            self
6964        }
6965
6966        /// Sets the value of [backup_id][crate::model::CopyBackupRequest::backup_id].
6967        ///
6968        /// This is a **required** field for requests.
6969        pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6970            self.0.request.backup_id = v.into();
6971            self
6972        }
6973
6974        /// Sets the value of [source_backup][crate::model::CopyBackupRequest::source_backup].
6975        ///
6976        /// This is a **required** field for requests.
6977        pub fn set_source_backup<T: Into<std::string::String>>(mut self, v: T) -> Self {
6978            self.0.request.source_backup = v.into();
6979            self
6980        }
6981
6982        /// Sets the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
6983        ///
6984        /// This is a **required** field for requests.
6985        pub fn set_expire_time<T>(mut self, v: T) -> Self
6986        where
6987            T: std::convert::Into<wkt::Timestamp>,
6988        {
6989            self.0.request.expire_time = std::option::Option::Some(v.into());
6990            self
6991        }
6992
6993        /// Sets or clears the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
6994        ///
6995        /// This is a **required** field for requests.
6996        pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
6997        where
6998            T: std::convert::Into<wkt::Timestamp>,
6999        {
7000            self.0.request.expire_time = v.map(|x| x.into());
7001            self
7002        }
7003    }
7004
7005    #[doc(hidden)]
7006    impl crate::RequestBuilder for CopyBackup {
7007        fn request_options(&mut self) -> &mut crate::RequestOptions {
7008            &mut self.0.options
7009        }
7010    }
7011
7012    /// The request builder for [BigtableTableAdmin::get_iam_policy][crate::client::BigtableTableAdmin::get_iam_policy] calls.
7013    ///
7014    /// # Example
7015    /// ```
7016    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::GetIamPolicy;
7017    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
7018    ///
7019    /// let builder = prepare_request_builder();
7020    /// let response = builder.send().await?;
7021    /// # Ok(()) }
7022    ///
7023    /// fn prepare_request_builder() -> GetIamPolicy {
7024    ///   # panic!();
7025    ///   // ... details omitted ...
7026    /// }
7027    /// ```
7028    #[derive(Clone, Debug)]
7029    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
7030
7031    impl GetIamPolicy {
7032        pub(crate) fn new(
7033            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7034        ) -> Self {
7035            Self(RequestBuilder::new(stub))
7036        }
7037
7038        /// Sets the full request, replacing any prior values.
7039        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
7040            mut self,
7041            v: V,
7042        ) -> Self {
7043            self.0.request = v.into();
7044            self
7045        }
7046
7047        /// Sets all the options, replacing any prior values.
7048        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7049            self.0.options = v.into();
7050            self
7051        }
7052
7053        /// Sends the request.
7054        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
7055            (*self.0.stub)
7056                .get_iam_policy(self.0.request, self.0.options)
7057                .await
7058                .map(crate::Response::into_body)
7059        }
7060
7061        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
7062        ///
7063        /// This is a **required** field for requests.
7064        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7065            self.0.request.resource = v.into();
7066            self
7067        }
7068
7069        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
7070        pub fn set_options<T>(mut self, v: T) -> Self
7071        where
7072            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
7073        {
7074            self.0.request.options = std::option::Option::Some(v.into());
7075            self
7076        }
7077
7078        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
7079        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
7080        where
7081            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
7082        {
7083            self.0.request.options = v.map(|x| x.into());
7084            self
7085        }
7086    }
7087
7088    #[doc(hidden)]
7089    impl crate::RequestBuilder for GetIamPolicy {
7090        fn request_options(&mut self) -> &mut crate::RequestOptions {
7091            &mut self.0.options
7092        }
7093    }
7094
7095    /// The request builder for [BigtableTableAdmin::set_iam_policy][crate::client::BigtableTableAdmin::set_iam_policy] calls.
7096    ///
7097    /// # Example
7098    /// ```
7099    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::SetIamPolicy;
7100    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
7101    ///
7102    /// let builder = prepare_request_builder();
7103    /// let response = builder.send().await?;
7104    /// # Ok(()) }
7105    ///
7106    /// fn prepare_request_builder() -> SetIamPolicy {
7107    ///   # panic!();
7108    ///   // ... details omitted ...
7109    /// }
7110    /// ```
7111    #[derive(Clone, Debug)]
7112    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
7113
7114    impl SetIamPolicy {
7115        pub(crate) fn new(
7116            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7117        ) -> Self {
7118            Self(RequestBuilder::new(stub))
7119        }
7120
7121        /// Sets the full request, replacing any prior values.
7122        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
7123            mut self,
7124            v: V,
7125        ) -> Self {
7126            self.0.request = v.into();
7127            self
7128        }
7129
7130        /// Sets all the options, replacing any prior values.
7131        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7132            self.0.options = v.into();
7133            self
7134        }
7135
7136        /// Sends the request.
7137        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
7138            (*self.0.stub)
7139                .set_iam_policy(self.0.request, self.0.options)
7140                .await
7141                .map(crate::Response::into_body)
7142        }
7143
7144        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
7145        ///
7146        /// This is a **required** field for requests.
7147        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7148            self.0.request.resource = v.into();
7149            self
7150        }
7151
7152        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
7153        ///
7154        /// This is a **required** field for requests.
7155        pub fn set_policy<T>(mut self, v: T) -> Self
7156        where
7157            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
7158        {
7159            self.0.request.policy = std::option::Option::Some(v.into());
7160            self
7161        }
7162
7163        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
7164        ///
7165        /// This is a **required** field for requests.
7166        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
7167        where
7168            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
7169        {
7170            self.0.request.policy = v.map(|x| x.into());
7171            self
7172        }
7173
7174        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
7175        pub fn set_update_mask<T>(mut self, v: T) -> Self
7176        where
7177            T: std::convert::Into<wkt::FieldMask>,
7178        {
7179            self.0.request.update_mask = std::option::Option::Some(v.into());
7180            self
7181        }
7182
7183        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
7184        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7185        where
7186            T: std::convert::Into<wkt::FieldMask>,
7187        {
7188            self.0.request.update_mask = v.map(|x| x.into());
7189            self
7190        }
7191    }
7192
7193    #[doc(hidden)]
7194    impl crate::RequestBuilder for SetIamPolicy {
7195        fn request_options(&mut self) -> &mut crate::RequestOptions {
7196            &mut self.0.options
7197        }
7198    }
7199
7200    /// The request builder for [BigtableTableAdmin::test_iam_permissions][crate::client::BigtableTableAdmin::test_iam_permissions] calls.
7201    ///
7202    /// # Example
7203    /// ```
7204    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::TestIamPermissions;
7205    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
7206    ///
7207    /// let builder = prepare_request_builder();
7208    /// let response = builder.send().await?;
7209    /// # Ok(()) }
7210    ///
7211    /// fn prepare_request_builder() -> TestIamPermissions {
7212    ///   # panic!();
7213    ///   // ... details omitted ...
7214    /// }
7215    /// ```
7216    #[derive(Clone, Debug)]
7217    pub struct TestIamPermissions(
7218        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
7219    );
7220
7221    impl TestIamPermissions {
7222        pub(crate) fn new(
7223            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7224        ) -> Self {
7225            Self(RequestBuilder::new(stub))
7226        }
7227
7228        /// Sets the full request, replacing any prior values.
7229        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
7230            mut self,
7231            v: V,
7232        ) -> Self {
7233            self.0.request = v.into();
7234            self
7235        }
7236
7237        /// Sets all the options, replacing any prior values.
7238        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7239            self.0.options = v.into();
7240            self
7241        }
7242
7243        /// Sends the request.
7244        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
7245            (*self.0.stub)
7246                .test_iam_permissions(self.0.request, self.0.options)
7247                .await
7248                .map(crate::Response::into_body)
7249        }
7250
7251        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
7252        ///
7253        /// This is a **required** field for requests.
7254        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7255            self.0.request.resource = v.into();
7256            self
7257        }
7258
7259        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
7260        ///
7261        /// This is a **required** field for requests.
7262        pub fn set_permissions<T, V>(mut self, v: T) -> Self
7263        where
7264            T: std::iter::IntoIterator<Item = V>,
7265            V: std::convert::Into<std::string::String>,
7266        {
7267            use std::iter::Iterator;
7268            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
7269            self
7270        }
7271    }
7272
7273    #[doc(hidden)]
7274    impl crate::RequestBuilder for TestIamPermissions {
7275        fn request_options(&mut self) -> &mut crate::RequestOptions {
7276            &mut self.0.options
7277        }
7278    }
7279
7280    /// The request builder for [BigtableTableAdmin::create_schema_bundle][crate::client::BigtableTableAdmin::create_schema_bundle] calls.
7281    ///
7282    /// # Example
7283    /// ```
7284    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::CreateSchemaBundle;
7285    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
7286    /// use google_cloud_lro::Poller;
7287    ///
7288    /// let builder = prepare_request_builder();
7289    /// let response = builder.poller().until_done().await?;
7290    /// # Ok(()) }
7291    ///
7292    /// fn prepare_request_builder() -> CreateSchemaBundle {
7293    ///   # panic!();
7294    ///   // ... details omitted ...
7295    /// }
7296    /// ```
7297    #[derive(Clone, Debug)]
7298    pub struct CreateSchemaBundle(RequestBuilder<crate::model::CreateSchemaBundleRequest>);
7299
7300    impl CreateSchemaBundle {
7301        pub(crate) fn new(
7302            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7303        ) -> Self {
7304            Self(RequestBuilder::new(stub))
7305        }
7306
7307        /// Sets the full request, replacing any prior values.
7308        pub fn with_request<V: Into<crate::model::CreateSchemaBundleRequest>>(
7309            mut self,
7310            v: V,
7311        ) -> Self {
7312            self.0.request = v.into();
7313            self
7314        }
7315
7316        /// Sets all the options, replacing any prior values.
7317        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7318            self.0.options = v.into();
7319            self
7320        }
7321
7322        /// Sends the request.
7323        ///
7324        /// # Long running operations
7325        ///
7326        /// This starts, but does not poll, a longrunning operation. More information
7327        /// on [create_schema_bundle][crate::client::BigtableTableAdmin::create_schema_bundle].
7328        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7329            (*self.0.stub)
7330                .create_schema_bundle(self.0.request, self.0.options)
7331                .await
7332                .map(crate::Response::into_body)
7333        }
7334
7335        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_schema_bundle`.
7336        pub fn poller(
7337            self,
7338        ) -> impl google_cloud_lro::Poller<
7339            crate::model::SchemaBundle,
7340            crate::model::CreateSchemaBundleMetadata,
7341        > {
7342            type Operation = google_cloud_lro::internal::Operation<
7343                crate::model::SchemaBundle,
7344                crate::model::CreateSchemaBundleMetadata,
7345            >;
7346            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7347            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7348            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7349            if let Some(ref mut details) = poller_options.tracing {
7350                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::create_schema_bundle::until_done";
7351            }
7352
7353            let stub = self.0.stub.clone();
7354            let mut options = self.0.options.clone();
7355            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7356            let query = move |name| {
7357                let stub = stub.clone();
7358                let options = options.clone();
7359                async {
7360                    let op = GetOperation::new(stub)
7361                        .set_name(name)
7362                        .with_options(options)
7363                        .send()
7364                        .await?;
7365                    Ok(Operation::new(op))
7366                }
7367            };
7368
7369            let start = move || async {
7370                let op = self.send().await?;
7371                Ok(Operation::new(op))
7372            };
7373
7374            use google_cloud_lro::internal::PollerExt;
7375            {
7376                google_cloud_lro::internal::new_poller(
7377                    polling_error_policy,
7378                    polling_backoff_policy,
7379                    start,
7380                    query,
7381                )
7382            }
7383            .with_options(poller_options)
7384        }
7385
7386        /// Sets the value of [parent][crate::model::CreateSchemaBundleRequest::parent].
7387        ///
7388        /// This is a **required** field for requests.
7389        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7390            self.0.request.parent = v.into();
7391            self
7392        }
7393
7394        /// Sets the value of [schema_bundle_id][crate::model::CreateSchemaBundleRequest::schema_bundle_id].
7395        ///
7396        /// This is a **required** field for requests.
7397        pub fn set_schema_bundle_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7398            self.0.request.schema_bundle_id = v.into();
7399            self
7400        }
7401
7402        /// Sets the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
7403        ///
7404        /// This is a **required** field for requests.
7405        pub fn set_schema_bundle<T>(mut self, v: T) -> Self
7406        where
7407            T: std::convert::Into<crate::model::SchemaBundle>,
7408        {
7409            self.0.request.schema_bundle = std::option::Option::Some(v.into());
7410            self
7411        }
7412
7413        /// Sets or clears the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
7414        ///
7415        /// This is a **required** field for requests.
7416        pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
7417        where
7418            T: std::convert::Into<crate::model::SchemaBundle>,
7419        {
7420            self.0.request.schema_bundle = v.map(|x| x.into());
7421            self
7422        }
7423    }
7424
7425    #[doc(hidden)]
7426    impl crate::RequestBuilder for CreateSchemaBundle {
7427        fn request_options(&mut self) -> &mut crate::RequestOptions {
7428            &mut self.0.options
7429        }
7430    }
7431
7432    /// The request builder for [BigtableTableAdmin::update_schema_bundle][crate::client::BigtableTableAdmin::update_schema_bundle] calls.
7433    ///
7434    /// # Example
7435    /// ```
7436    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::UpdateSchemaBundle;
7437    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
7438    /// use google_cloud_lro::Poller;
7439    ///
7440    /// let builder = prepare_request_builder();
7441    /// let response = builder.poller().until_done().await?;
7442    /// # Ok(()) }
7443    ///
7444    /// fn prepare_request_builder() -> UpdateSchemaBundle {
7445    ///   # panic!();
7446    ///   // ... details omitted ...
7447    /// }
7448    /// ```
7449    #[derive(Clone, Debug)]
7450    pub struct UpdateSchemaBundle(RequestBuilder<crate::model::UpdateSchemaBundleRequest>);
7451
7452    impl UpdateSchemaBundle {
7453        pub(crate) fn new(
7454            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7455        ) -> Self {
7456            Self(RequestBuilder::new(stub))
7457        }
7458
7459        /// Sets the full request, replacing any prior values.
7460        pub fn with_request<V: Into<crate::model::UpdateSchemaBundleRequest>>(
7461            mut self,
7462            v: V,
7463        ) -> Self {
7464            self.0.request = v.into();
7465            self
7466        }
7467
7468        /// Sets all the options, replacing any prior values.
7469        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7470            self.0.options = v.into();
7471            self
7472        }
7473
7474        /// Sends the request.
7475        ///
7476        /// # Long running operations
7477        ///
7478        /// This starts, but does not poll, a longrunning operation. More information
7479        /// on [update_schema_bundle][crate::client::BigtableTableAdmin::update_schema_bundle].
7480        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7481            (*self.0.stub)
7482                .update_schema_bundle(self.0.request, self.0.options)
7483                .await
7484                .map(crate::Response::into_body)
7485        }
7486
7487        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_schema_bundle`.
7488        pub fn poller(
7489            self,
7490        ) -> impl google_cloud_lro::Poller<
7491            crate::model::SchemaBundle,
7492            crate::model::UpdateSchemaBundleMetadata,
7493        > {
7494            type Operation = google_cloud_lro::internal::Operation<
7495                crate::model::SchemaBundle,
7496                crate::model::UpdateSchemaBundleMetadata,
7497            >;
7498            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7499            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7500            let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7501            if let Some(ref mut details) = poller_options.tracing {
7502                details.method_name = "google_cloud_bigtable_admin_v2::client::BigtableTableAdmin::update_schema_bundle::until_done";
7503            }
7504
7505            let stub = self.0.stub.clone();
7506            let mut options = self.0.options.clone();
7507            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7508            let query = move |name| {
7509                let stub = stub.clone();
7510                let options = options.clone();
7511                async {
7512                    let op = GetOperation::new(stub)
7513                        .set_name(name)
7514                        .with_options(options)
7515                        .send()
7516                        .await?;
7517                    Ok(Operation::new(op))
7518                }
7519            };
7520
7521            let start = move || async {
7522                let op = self.send().await?;
7523                Ok(Operation::new(op))
7524            };
7525
7526            use google_cloud_lro::internal::PollerExt;
7527            {
7528                google_cloud_lro::internal::new_poller(
7529                    polling_error_policy,
7530                    polling_backoff_policy,
7531                    start,
7532                    query,
7533                )
7534            }
7535            .with_options(poller_options)
7536        }
7537
7538        /// Sets the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
7539        ///
7540        /// This is a **required** field for requests.
7541        pub fn set_schema_bundle<T>(mut self, v: T) -> Self
7542        where
7543            T: std::convert::Into<crate::model::SchemaBundle>,
7544        {
7545            self.0.request.schema_bundle = std::option::Option::Some(v.into());
7546            self
7547        }
7548
7549        /// Sets or clears the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
7550        ///
7551        /// This is a **required** field for requests.
7552        pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
7553        where
7554            T: std::convert::Into<crate::model::SchemaBundle>,
7555        {
7556            self.0.request.schema_bundle = v.map(|x| x.into());
7557            self
7558        }
7559
7560        /// Sets the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
7561        pub fn set_update_mask<T>(mut self, v: T) -> Self
7562        where
7563            T: std::convert::Into<wkt::FieldMask>,
7564        {
7565            self.0.request.update_mask = std::option::Option::Some(v.into());
7566            self
7567        }
7568
7569        /// Sets or clears the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
7570        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7571        where
7572            T: std::convert::Into<wkt::FieldMask>,
7573        {
7574            self.0.request.update_mask = v.map(|x| x.into());
7575            self
7576        }
7577
7578        /// Sets the value of [ignore_warnings][crate::model::UpdateSchemaBundleRequest::ignore_warnings].
7579        pub fn set_ignore_warnings<T: Into<bool>>(mut self, v: T) -> Self {
7580            self.0.request.ignore_warnings = v.into();
7581            self
7582        }
7583    }
7584
7585    #[doc(hidden)]
7586    impl crate::RequestBuilder for UpdateSchemaBundle {
7587        fn request_options(&mut self) -> &mut crate::RequestOptions {
7588            &mut self.0.options
7589        }
7590    }
7591
7592    /// The request builder for [BigtableTableAdmin::get_schema_bundle][crate::client::BigtableTableAdmin::get_schema_bundle] calls.
7593    ///
7594    /// # Example
7595    /// ```
7596    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::GetSchemaBundle;
7597    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
7598    ///
7599    /// let builder = prepare_request_builder();
7600    /// let response = builder.send().await?;
7601    /// # Ok(()) }
7602    ///
7603    /// fn prepare_request_builder() -> GetSchemaBundle {
7604    ///   # panic!();
7605    ///   // ... details omitted ...
7606    /// }
7607    /// ```
7608    #[derive(Clone, Debug)]
7609    pub struct GetSchemaBundle(RequestBuilder<crate::model::GetSchemaBundleRequest>);
7610
7611    impl GetSchemaBundle {
7612        pub(crate) fn new(
7613            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7614        ) -> Self {
7615            Self(RequestBuilder::new(stub))
7616        }
7617
7618        /// Sets the full request, replacing any prior values.
7619        pub fn with_request<V: Into<crate::model::GetSchemaBundleRequest>>(mut self, v: V) -> Self {
7620            self.0.request = v.into();
7621            self
7622        }
7623
7624        /// Sets all the options, replacing any prior values.
7625        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7626            self.0.options = v.into();
7627            self
7628        }
7629
7630        /// Sends the request.
7631        pub async fn send(self) -> Result<crate::model::SchemaBundle> {
7632            (*self.0.stub)
7633                .get_schema_bundle(self.0.request, self.0.options)
7634                .await
7635                .map(crate::Response::into_body)
7636        }
7637
7638        /// Sets the value of [name][crate::model::GetSchemaBundleRequest::name].
7639        ///
7640        /// This is a **required** field for requests.
7641        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7642            self.0.request.name = v.into();
7643            self
7644        }
7645    }
7646
7647    #[doc(hidden)]
7648    impl crate::RequestBuilder for GetSchemaBundle {
7649        fn request_options(&mut self) -> &mut crate::RequestOptions {
7650            &mut self.0.options
7651        }
7652    }
7653
7654    /// The request builder for [BigtableTableAdmin::list_schema_bundles][crate::client::BigtableTableAdmin::list_schema_bundles] calls.
7655    ///
7656    /// # Example
7657    /// ```
7658    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::ListSchemaBundles;
7659    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
7660    /// use google_cloud_gax::paginator::ItemPaginator;
7661    ///
7662    /// let builder = prepare_request_builder();
7663    /// let mut items = builder.by_item();
7664    /// while let Some(result) = items.next().await {
7665    ///   let item = result?;
7666    /// }
7667    /// # Ok(()) }
7668    ///
7669    /// fn prepare_request_builder() -> ListSchemaBundles {
7670    ///   # panic!();
7671    ///   // ... details omitted ...
7672    /// }
7673    /// ```
7674    #[derive(Clone, Debug)]
7675    pub struct ListSchemaBundles(RequestBuilder<crate::model::ListSchemaBundlesRequest>);
7676
7677    impl ListSchemaBundles {
7678        pub(crate) fn new(
7679            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7680        ) -> Self {
7681            Self(RequestBuilder::new(stub))
7682        }
7683
7684        /// Sets the full request, replacing any prior values.
7685        pub fn with_request<V: Into<crate::model::ListSchemaBundlesRequest>>(
7686            mut self,
7687            v: V,
7688        ) -> Self {
7689            self.0.request = v.into();
7690            self
7691        }
7692
7693        /// Sets all the options, replacing any prior values.
7694        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7695            self.0.options = v.into();
7696            self
7697        }
7698
7699        /// Sends the request.
7700        pub async fn send(self) -> Result<crate::model::ListSchemaBundlesResponse> {
7701            (*self.0.stub)
7702                .list_schema_bundles(self.0.request, self.0.options)
7703                .await
7704                .map(crate::Response::into_body)
7705        }
7706
7707        /// Streams each page in the collection.
7708        pub fn by_page(
7709            self,
7710        ) -> impl google_cloud_gax::paginator::Paginator<
7711            crate::model::ListSchemaBundlesResponse,
7712            crate::Error,
7713        > {
7714            use std::clone::Clone;
7715            let token = self.0.request.page_token.clone();
7716            let execute = move |token: String| {
7717                let mut builder = self.clone();
7718                builder.0.request = builder.0.request.set_page_token(token);
7719                builder.send()
7720            };
7721            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7722        }
7723
7724        /// Streams each item in the collection.
7725        pub fn by_item(
7726            self,
7727        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7728            crate::model::ListSchemaBundlesResponse,
7729            crate::Error,
7730        > {
7731            use google_cloud_gax::paginator::Paginator;
7732            self.by_page().items()
7733        }
7734
7735        /// Sets the value of [parent][crate::model::ListSchemaBundlesRequest::parent].
7736        ///
7737        /// This is a **required** field for requests.
7738        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7739            self.0.request.parent = v.into();
7740            self
7741        }
7742
7743        /// Sets the value of [page_size][crate::model::ListSchemaBundlesRequest::page_size].
7744        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7745            self.0.request.page_size = v.into();
7746            self
7747        }
7748
7749        /// Sets the value of [page_token][crate::model::ListSchemaBundlesRequest::page_token].
7750        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7751            self.0.request.page_token = v.into();
7752            self
7753        }
7754    }
7755
7756    #[doc(hidden)]
7757    impl crate::RequestBuilder for ListSchemaBundles {
7758        fn request_options(&mut self) -> &mut crate::RequestOptions {
7759            &mut self.0.options
7760        }
7761    }
7762
7763    /// The request builder for [BigtableTableAdmin::delete_schema_bundle][crate::client::BigtableTableAdmin::delete_schema_bundle] calls.
7764    ///
7765    /// # Example
7766    /// ```
7767    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::DeleteSchemaBundle;
7768    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
7769    ///
7770    /// let builder = prepare_request_builder();
7771    /// let response = builder.send().await?;
7772    /// # Ok(()) }
7773    ///
7774    /// fn prepare_request_builder() -> DeleteSchemaBundle {
7775    ///   # panic!();
7776    ///   // ... details omitted ...
7777    /// }
7778    /// ```
7779    #[derive(Clone, Debug)]
7780    pub struct DeleteSchemaBundle(RequestBuilder<crate::model::DeleteSchemaBundleRequest>);
7781
7782    impl DeleteSchemaBundle {
7783        pub(crate) fn new(
7784            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7785        ) -> Self {
7786            Self(RequestBuilder::new(stub))
7787        }
7788
7789        /// Sets the full request, replacing any prior values.
7790        pub fn with_request<V: Into<crate::model::DeleteSchemaBundleRequest>>(
7791            mut self,
7792            v: V,
7793        ) -> Self {
7794            self.0.request = v.into();
7795            self
7796        }
7797
7798        /// Sets all the options, replacing any prior values.
7799        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7800            self.0.options = v.into();
7801            self
7802        }
7803
7804        /// Sends the request.
7805        pub async fn send(self) -> Result<()> {
7806            (*self.0.stub)
7807                .delete_schema_bundle(self.0.request, self.0.options)
7808                .await
7809                .map(crate::Response::into_body)
7810        }
7811
7812        /// Sets the value of [name][crate::model::DeleteSchemaBundleRequest::name].
7813        ///
7814        /// This is a **required** field for requests.
7815        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7816            self.0.request.name = v.into();
7817            self
7818        }
7819
7820        /// Sets the value of [etag][crate::model::DeleteSchemaBundleRequest::etag].
7821        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7822            self.0.request.etag = v.into();
7823            self
7824        }
7825    }
7826
7827    #[doc(hidden)]
7828    impl crate::RequestBuilder for DeleteSchemaBundle {
7829        fn request_options(&mut self) -> &mut crate::RequestOptions {
7830            &mut self.0.options
7831        }
7832    }
7833
7834    /// The request builder for [BigtableTableAdmin::list_operations][crate::client::BigtableTableAdmin::list_operations] calls.
7835    ///
7836    /// # Example
7837    /// ```
7838    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::ListOperations;
7839    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
7840    /// use google_cloud_gax::paginator::ItemPaginator;
7841    ///
7842    /// let builder = prepare_request_builder();
7843    /// let mut items = builder.by_item();
7844    /// while let Some(result) = items.next().await {
7845    ///   let item = result?;
7846    /// }
7847    /// # Ok(()) }
7848    ///
7849    /// fn prepare_request_builder() -> ListOperations {
7850    ///   # panic!();
7851    ///   // ... details omitted ...
7852    /// }
7853    /// ```
7854    #[derive(Clone, Debug)]
7855    pub struct ListOperations(
7856        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
7857    );
7858
7859    impl ListOperations {
7860        pub(crate) fn new(
7861            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7862        ) -> Self {
7863            Self(RequestBuilder::new(stub))
7864        }
7865
7866        /// Sets the full request, replacing any prior values.
7867        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
7868            mut self,
7869            v: V,
7870        ) -> Self {
7871            self.0.request = v.into();
7872            self
7873        }
7874
7875        /// Sets all the options, replacing any prior values.
7876        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7877            self.0.options = v.into();
7878            self
7879        }
7880
7881        /// Sends the request.
7882        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
7883            (*self.0.stub)
7884                .list_operations(self.0.request, self.0.options)
7885                .await
7886                .map(crate::Response::into_body)
7887        }
7888
7889        /// Streams each page in the collection.
7890        pub fn by_page(
7891            self,
7892        ) -> impl google_cloud_gax::paginator::Paginator<
7893            google_cloud_longrunning::model::ListOperationsResponse,
7894            crate::Error,
7895        > {
7896            use std::clone::Clone;
7897            let token = self.0.request.page_token.clone();
7898            let execute = move |token: String| {
7899                let mut builder = self.clone();
7900                builder.0.request = builder.0.request.set_page_token(token);
7901                builder.send()
7902            };
7903            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7904        }
7905
7906        /// Streams each item in the collection.
7907        pub fn by_item(
7908            self,
7909        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7910            google_cloud_longrunning::model::ListOperationsResponse,
7911            crate::Error,
7912        > {
7913            use google_cloud_gax::paginator::Paginator;
7914            self.by_page().items()
7915        }
7916
7917        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
7918        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7919            self.0.request.name = v.into();
7920            self
7921        }
7922
7923        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
7924        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7925            self.0.request.filter = v.into();
7926            self
7927        }
7928
7929        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
7930        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7931            self.0.request.page_size = v.into();
7932            self
7933        }
7934
7935        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
7936        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7937            self.0.request.page_token = v.into();
7938            self
7939        }
7940
7941        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
7942        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7943            self.0.request.return_partial_success = v.into();
7944            self
7945        }
7946    }
7947
7948    #[doc(hidden)]
7949    impl crate::RequestBuilder for ListOperations {
7950        fn request_options(&mut self) -> &mut crate::RequestOptions {
7951            &mut self.0.options
7952        }
7953    }
7954
7955    /// The request builder for [BigtableTableAdmin::get_operation][crate::client::BigtableTableAdmin::get_operation] calls.
7956    ///
7957    /// # Example
7958    /// ```
7959    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::GetOperation;
7960    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
7961    ///
7962    /// let builder = prepare_request_builder();
7963    /// let response = builder.send().await?;
7964    /// # Ok(()) }
7965    ///
7966    /// fn prepare_request_builder() -> GetOperation {
7967    ///   # panic!();
7968    ///   // ... details omitted ...
7969    /// }
7970    /// ```
7971    #[derive(Clone, Debug)]
7972    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
7973
7974    impl GetOperation {
7975        pub(crate) fn new(
7976            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
7977        ) -> Self {
7978            Self(RequestBuilder::new(stub))
7979        }
7980
7981        /// Sets the full request, replacing any prior values.
7982        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
7983            mut self,
7984            v: V,
7985        ) -> Self {
7986            self.0.request = v.into();
7987            self
7988        }
7989
7990        /// Sets all the options, replacing any prior values.
7991        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7992            self.0.options = v.into();
7993            self
7994        }
7995
7996        /// Sends the request.
7997        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7998            (*self.0.stub)
7999                .get_operation(self.0.request, self.0.options)
8000                .await
8001                .map(crate::Response::into_body)
8002        }
8003
8004        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
8005        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8006            self.0.request.name = v.into();
8007            self
8008        }
8009    }
8010
8011    #[doc(hidden)]
8012    impl crate::RequestBuilder for GetOperation {
8013        fn request_options(&mut self) -> &mut crate::RequestOptions {
8014            &mut self.0.options
8015        }
8016    }
8017
8018    /// The request builder for [BigtableTableAdmin::delete_operation][crate::client::BigtableTableAdmin::delete_operation] calls.
8019    ///
8020    /// # Example
8021    /// ```
8022    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::DeleteOperation;
8023    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
8024    ///
8025    /// let builder = prepare_request_builder();
8026    /// let response = builder.send().await?;
8027    /// # Ok(()) }
8028    ///
8029    /// fn prepare_request_builder() -> DeleteOperation {
8030    ///   # panic!();
8031    ///   // ... details omitted ...
8032    /// }
8033    /// ```
8034    #[derive(Clone, Debug)]
8035    pub struct DeleteOperation(
8036        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8037    );
8038
8039    impl DeleteOperation {
8040        pub(crate) fn new(
8041            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
8042        ) -> Self {
8043            Self(RequestBuilder::new(stub))
8044        }
8045
8046        /// Sets the full request, replacing any prior values.
8047        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8048            mut self,
8049            v: V,
8050        ) -> Self {
8051            self.0.request = v.into();
8052            self
8053        }
8054
8055        /// Sets all the options, replacing any prior values.
8056        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8057            self.0.options = v.into();
8058            self
8059        }
8060
8061        /// Sends the request.
8062        pub async fn send(self) -> Result<()> {
8063            (*self.0.stub)
8064                .delete_operation(self.0.request, self.0.options)
8065                .await
8066                .map(crate::Response::into_body)
8067        }
8068
8069        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
8070        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8071            self.0.request.name = v.into();
8072            self
8073        }
8074    }
8075
8076    #[doc(hidden)]
8077    impl crate::RequestBuilder for DeleteOperation {
8078        fn request_options(&mut self) -> &mut crate::RequestOptions {
8079            &mut self.0.options
8080        }
8081    }
8082
8083    /// The request builder for [BigtableTableAdmin::cancel_operation][crate::client::BigtableTableAdmin::cancel_operation] calls.
8084    ///
8085    /// # Example
8086    /// ```
8087    /// # use google_cloud_bigtable_admin_v2::builder::bigtable_table_admin::CancelOperation;
8088    /// # async fn sample() -> google_cloud_bigtable_admin_v2::Result<()> {
8089    ///
8090    /// let builder = prepare_request_builder();
8091    /// let response = builder.send().await?;
8092    /// # Ok(()) }
8093    ///
8094    /// fn prepare_request_builder() -> CancelOperation {
8095    ///   # panic!();
8096    ///   // ... details omitted ...
8097    /// }
8098    /// ```
8099    #[derive(Clone, Debug)]
8100    pub struct CancelOperation(
8101        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8102    );
8103
8104    impl CancelOperation {
8105        pub(crate) fn new(
8106            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigtableTableAdmin>,
8107        ) -> Self {
8108            Self(RequestBuilder::new(stub))
8109        }
8110
8111        /// Sets the full request, replacing any prior values.
8112        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
8113            mut self,
8114            v: V,
8115        ) -> Self {
8116            self.0.request = v.into();
8117            self
8118        }
8119
8120        /// Sets all the options, replacing any prior values.
8121        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8122            self.0.options = v.into();
8123            self
8124        }
8125
8126        /// Sends the request.
8127        pub async fn send(self) -> Result<()> {
8128            (*self.0.stub)
8129                .cancel_operation(self.0.request, self.0.options)
8130                .await
8131                .map(crate::Response::into_body)
8132        }
8133
8134        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
8135        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8136            self.0.request.name = v.into();
8137            self
8138        }
8139    }
8140
8141    #[doc(hidden)]
8142    impl crate::RequestBuilder for CancelOperation {
8143        fn request_options(&mut self) -> &mut crate::RequestOptions {
8144            &mut self.0.options
8145        }
8146    }
8147}