google_cloud_bigtable_admin_v2/client.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#![allow(rustdoc::redundant_explicit_links)]
17#![allow(rustdoc::broken_intra_doc_links)]
18
19/// Implements a client for the Cloud Bigtable Admin API.
20///
21/// # Example
22/// ```
23/// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
24/// use google_cloud_gax::paginator::ItemPaginator as _;
25/// async fn sample(
26/// project_id: &str,
27/// instance_id: &str,
28/// ) -> anyhow::Result<()> {
29/// let client = BigtableInstanceAdmin::builder().build().await?;
30/// let mut list = client.list_app_profiles()
31/// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
32/// .by_item();
33/// while let Some(item) = list.next().await.transpose()? {
34/// println!("{:?}", item);
35/// }
36/// Ok(())
37/// }
38/// ```
39///
40/// # Service Description
41///
42/// Service for creating, configuring, and deleting Cloud Bigtable Instances and
43/// Clusters. Provides access to the Instance and Cluster schemas only, not the
44/// tables' metadata or data stored in those tables.
45///
46/// # Configuration
47///
48/// To configure `BigtableInstanceAdmin` use the `with_*` methods in the type returned
49/// by [builder()][BigtableInstanceAdmin::builder]. The default configuration should
50/// work for most applications. Common configuration changes include
51///
52/// * [with_endpoint()]: by default this client uses the global default endpoint
53/// (`https://bigtableadmin.googleapis.com`). Applications using regional
54/// endpoints or running in restricted networks (e.g. a network configured
55// with [Private Google Access with VPC Service Controls]) may want to
56/// override this default.
57/// * [with_credentials()]: by default this client uses
58/// [Application Default Credentials]. Applications using custom
59/// authentication may need to override this default.
60///
61/// [with_endpoint()]: super::builder::bigtable_instance_admin::ClientBuilder::with_endpoint
62/// [with_credentials()]: super::builder::bigtable_instance_admin::ClientBuilder::with_credentials
63/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
64/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
65///
66/// # Pooling and Cloning
67///
68/// `BigtableInstanceAdmin` holds a connection pool internally, it is advised to
69/// create one and reuse it. You do not need to wrap `BigtableInstanceAdmin` in
70/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
71/// already uses an `Arc` internally.
72#[derive(Clone, Debug)]
73pub struct BigtableInstanceAdmin {
74 inner: std::sync::Arc<dyn super::stub::dynamic::BigtableInstanceAdmin>,
75}
76
77impl BigtableInstanceAdmin {
78 /// Returns a builder for [BigtableInstanceAdmin].
79 ///
80 /// ```
81 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
82 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
83 /// let client = BigtableInstanceAdmin::builder().build().await?;
84 /// # Ok(()) }
85 /// ```
86 pub fn builder() -> super::builder::bigtable_instance_admin::ClientBuilder {
87 crate::new_client_builder(super::builder::bigtable_instance_admin::client::Factory)
88 }
89
90 /// Creates a new client from the provided stub.
91 ///
92 /// The most common case for calling this function is in tests mocking the
93 /// client's behavior.
94 pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
95 where
96 T: super::stub::BigtableInstanceAdmin + 'static,
97 {
98 Self { inner: stub.into() }
99 }
100
101 pub(crate) async fn new(
102 config: gaxi::options::ClientConfig,
103 ) -> crate::ClientBuilderResult<Self> {
104 let inner = Self::build_inner(config).await?;
105 Ok(Self { inner })
106 }
107
108 async fn build_inner(
109 conf: gaxi::options::ClientConfig,
110 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::BigtableInstanceAdmin>>
111 {
112 if gaxi::options::tracing_enabled(&conf) {
113 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
114 }
115 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
116 }
117
118 async fn build_transport(
119 conf: gaxi::options::ClientConfig,
120 ) -> crate::ClientBuilderResult<impl super::stub::BigtableInstanceAdmin> {
121 super::transport::BigtableInstanceAdmin::new(conf).await
122 }
123
124 async fn build_with_tracing(
125 conf: gaxi::options::ClientConfig,
126 ) -> crate::ClientBuilderResult<impl super::stub::BigtableInstanceAdmin> {
127 Self::build_transport(conf)
128 .await
129 .map(super::tracing::BigtableInstanceAdmin::new)
130 }
131
132 /// Create an instance within a project.
133 ///
134 /// Note that exactly one of Cluster.serve_nodes and
135 /// Cluster.cluster_config.cluster_autoscaling_config can be set. If
136 /// serve_nodes is set to non-zero, then the cluster is manually scaled. If
137 /// cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
138 /// enabled.
139 ///
140 /// # Long running operations
141 ///
142 /// This method is used to start, and/or poll a [long-running Operation].
143 /// The [Working with long-running operations] chapter in the [user guide]
144 /// covers these operations in detail.
145 ///
146 /// [long-running operation]: https://google.aip.dev/151
147 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
148 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
149 ///
150 /// # Example
151 /// ```
152 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
153 /// use google_cloud_lro::Poller;
154 /// use google_cloud_bigtable_admin_v2::model::Instance;
155 /// use google_cloud_bigtable_admin_v2::Result;
156 /// async fn sample(
157 /// client: &BigtableInstanceAdmin, parent: &str
158 /// ) -> Result<()> {
159 /// let response = client.create_instance()
160 /// .set_parent(parent)
161 /// .set_instance_id("instance_id_value")
162 /// .set_instance(
163 /// Instance::new()/* set fields */
164 /// )
165 /// .poller().until_done().await?;
166 /// println!("response {:?}", response);
167 /// Ok(())
168 /// }
169 /// ```
170 pub fn create_instance(&self) -> super::builder::bigtable_instance_admin::CreateInstance {
171 super::builder::bigtable_instance_admin::CreateInstance::new(self.inner.clone())
172 }
173
174 /// Gets information about an instance.
175 ///
176 /// # Example
177 /// ```
178 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
179 /// use google_cloud_bigtable_admin_v2::Result;
180 /// async fn sample(
181 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str
182 /// ) -> Result<()> {
183 /// let response = client.get_instance()
184 /// .set_name(format!("projects/{project_id}/instances/{instance_id}"))
185 /// .send().await?;
186 /// println!("response {:?}", response);
187 /// Ok(())
188 /// }
189 /// ```
190 pub fn get_instance(&self) -> super::builder::bigtable_instance_admin::GetInstance {
191 super::builder::bigtable_instance_admin::GetInstance::new(self.inner.clone())
192 }
193
194 /// Lists information about instances in a project.
195 ///
196 /// # Example
197 /// ```
198 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
199 /// use google_cloud_bigtable_admin_v2::Result;
200 /// async fn sample(
201 /// client: &BigtableInstanceAdmin
202 /// ) -> Result<()> {
203 /// let response = client.list_instances()
204 /// /* set fields */
205 /// .send().await?;
206 /// println!("response {:?}", response);
207 /// Ok(())
208 /// }
209 /// ```
210 pub fn list_instances(&self) -> super::builder::bigtable_instance_admin::ListInstances {
211 super::builder::bigtable_instance_admin::ListInstances::new(self.inner.clone())
212 }
213
214 /// Updates an instance within a project. This method updates only the display
215 /// name and type for an Instance. To update other Instance properties, such as
216 /// labels, use PartialUpdateInstance.
217 ///
218 /// # Example
219 /// ```
220 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
221 /// use google_cloud_bigtable_admin_v2::Result;
222 /// async fn sample(
223 /// client: &BigtableInstanceAdmin
224 /// ) -> Result<()> {
225 /// let response = client.update_instance()
226 /// /* set fields */
227 /// .send().await?;
228 /// println!("response {:?}", response);
229 /// Ok(())
230 /// }
231 /// ```
232 pub fn update_instance(&self) -> super::builder::bigtable_instance_admin::UpdateInstance {
233 super::builder::bigtable_instance_admin::UpdateInstance::new(self.inner.clone())
234 }
235
236 /// Partially updates an instance within a project. This method can modify all
237 /// fields of an Instance and is the preferred way to update an Instance.
238 ///
239 /// # Long running operations
240 ///
241 /// This method is used to start, and/or poll a [long-running Operation].
242 /// The [Working with long-running operations] chapter in the [user guide]
243 /// covers these operations in detail.
244 ///
245 /// [long-running operation]: https://google.aip.dev/151
246 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
247 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
248 ///
249 /// # Example
250 /// ```
251 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
252 /// use google_cloud_lro::Poller;
253 /// use google_cloud_bigtable_admin_v2::Result;
254 /// async fn sample(
255 /// client: &BigtableInstanceAdmin
256 /// ) -> Result<()> {
257 /// let response = client.partial_update_instance()
258 /// /* set fields */
259 /// .poller().until_done().await?;
260 /// println!("response {:?}", response);
261 /// Ok(())
262 /// }
263 /// ```
264 pub fn partial_update_instance(
265 &self,
266 ) -> super::builder::bigtable_instance_admin::PartialUpdateInstance {
267 super::builder::bigtable_instance_admin::PartialUpdateInstance::new(self.inner.clone())
268 }
269
270 /// Delete an instance from a project.
271 ///
272 /// # Example
273 /// ```
274 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
275 /// use google_cloud_bigtable_admin_v2::Result;
276 /// async fn sample(
277 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str
278 /// ) -> Result<()> {
279 /// client.delete_instance()
280 /// .set_name(format!("projects/{project_id}/instances/{instance_id}"))
281 /// .send().await?;
282 /// Ok(())
283 /// }
284 /// ```
285 pub fn delete_instance(&self) -> super::builder::bigtable_instance_admin::DeleteInstance {
286 super::builder::bigtable_instance_admin::DeleteInstance::new(self.inner.clone())
287 }
288
289 /// Creates a cluster within an instance.
290 ///
291 /// Note that exactly one of Cluster.serve_nodes and
292 /// Cluster.cluster_config.cluster_autoscaling_config can be set. If
293 /// serve_nodes is set to non-zero, then the cluster is manually scaled. If
294 /// cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
295 /// enabled.
296 ///
297 /// # Long running operations
298 ///
299 /// This method is used to start, and/or poll a [long-running Operation].
300 /// The [Working with long-running operations] chapter in the [user guide]
301 /// covers these operations in detail.
302 ///
303 /// [long-running operation]: https://google.aip.dev/151
304 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
305 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
306 ///
307 /// # Example
308 /// ```
309 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
310 /// use google_cloud_lro::Poller;
311 /// use google_cloud_bigtable_admin_v2::model::Cluster;
312 /// use google_cloud_bigtable_admin_v2::Result;
313 /// async fn sample(
314 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str
315 /// ) -> Result<()> {
316 /// let response = client.create_cluster()
317 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
318 /// .set_cluster_id("cluster_id_value")
319 /// .set_cluster(
320 /// Cluster::new()/* set fields */
321 /// )
322 /// .poller().until_done().await?;
323 /// println!("response {:?}", response);
324 /// Ok(())
325 /// }
326 /// ```
327 pub fn create_cluster(&self) -> super::builder::bigtable_instance_admin::CreateCluster {
328 super::builder::bigtable_instance_admin::CreateCluster::new(self.inner.clone())
329 }
330
331 /// Gets information about a cluster.
332 ///
333 /// # Example
334 /// ```
335 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
336 /// use google_cloud_bigtable_admin_v2::Result;
337 /// async fn sample(
338 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, cluster_id: &str
339 /// ) -> Result<()> {
340 /// let response = client.get_cluster()
341 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"))
342 /// .send().await?;
343 /// println!("response {:?}", response);
344 /// Ok(())
345 /// }
346 /// ```
347 pub fn get_cluster(&self) -> super::builder::bigtable_instance_admin::GetCluster {
348 super::builder::bigtable_instance_admin::GetCluster::new(self.inner.clone())
349 }
350
351 /// Lists information about clusters in an instance.
352 ///
353 /// # Example
354 /// ```
355 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
356 /// use google_cloud_bigtable_admin_v2::Result;
357 /// async fn sample(
358 /// client: &BigtableInstanceAdmin
359 /// ) -> Result<()> {
360 /// let response = client.list_clusters()
361 /// /* set fields */
362 /// .send().await?;
363 /// println!("response {:?}", response);
364 /// Ok(())
365 /// }
366 /// ```
367 pub fn list_clusters(&self) -> super::builder::bigtable_instance_admin::ListClusters {
368 super::builder::bigtable_instance_admin::ListClusters::new(self.inner.clone())
369 }
370
371 /// Updates a cluster within an instance.
372 ///
373 /// Note that UpdateCluster does not support updating
374 /// cluster_config.cluster_autoscaling_config. In order to update it, you
375 /// must use PartialUpdateCluster.
376 ///
377 /// # Long running operations
378 ///
379 /// This method is used to start, and/or poll a [long-running Operation].
380 /// The [Working with long-running operations] chapter in the [user guide]
381 /// covers these operations in detail.
382 ///
383 /// [long-running operation]: https://google.aip.dev/151
384 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
385 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
386 ///
387 /// # Example
388 /// ```
389 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
390 /// use google_cloud_lro::Poller;
391 /// use google_cloud_bigtable_admin_v2::Result;
392 /// async fn sample(
393 /// client: &BigtableInstanceAdmin
394 /// ) -> Result<()> {
395 /// let response = client.update_cluster()
396 /// /* set fields */
397 /// .poller().until_done().await?;
398 /// println!("response {:?}", response);
399 /// Ok(())
400 /// }
401 /// ```
402 pub fn update_cluster(&self) -> super::builder::bigtable_instance_admin::UpdateCluster {
403 super::builder::bigtable_instance_admin::UpdateCluster::new(self.inner.clone())
404 }
405
406 /// Partially updates a cluster within a project. This method is the preferred
407 /// way to update a Cluster.
408 ///
409 /// To enable and update autoscaling, set
410 /// cluster_config.cluster_autoscaling_config. When autoscaling is enabled,
411 /// serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it
412 /// are ignored. Note that an update cannot simultaneously set serve_nodes to
413 /// non-zero and cluster_config.cluster_autoscaling_config to non-empty, and
414 /// also specify both in the update_mask.
415 ///
416 /// To disable autoscaling, clear cluster_config.cluster_autoscaling_config,
417 /// and explicitly set a serve_node count via the update_mask.
418 ///
419 /// # Long running operations
420 ///
421 /// This method is used to start, and/or poll a [long-running Operation].
422 /// The [Working with long-running operations] chapter in the [user guide]
423 /// covers these operations in detail.
424 ///
425 /// [long-running operation]: https://google.aip.dev/151
426 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
427 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
428 ///
429 /// # Example
430 /// ```
431 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
432 /// use google_cloud_lro::Poller;
433 /// use google_cloud_bigtable_admin_v2::Result;
434 /// async fn sample(
435 /// client: &BigtableInstanceAdmin
436 /// ) -> Result<()> {
437 /// let response = client.partial_update_cluster()
438 /// /* set fields */
439 /// .poller().until_done().await?;
440 /// println!("response {:?}", response);
441 /// Ok(())
442 /// }
443 /// ```
444 pub fn partial_update_cluster(
445 &self,
446 ) -> super::builder::bigtable_instance_admin::PartialUpdateCluster {
447 super::builder::bigtable_instance_admin::PartialUpdateCluster::new(self.inner.clone())
448 }
449
450 /// Deletes a cluster from an instance.
451 ///
452 /// # Example
453 /// ```
454 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
455 /// use google_cloud_bigtable_admin_v2::Result;
456 /// async fn sample(
457 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, cluster_id: &str
458 /// ) -> Result<()> {
459 /// client.delete_cluster()
460 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"))
461 /// .send().await?;
462 /// Ok(())
463 /// }
464 /// ```
465 pub fn delete_cluster(&self) -> super::builder::bigtable_instance_admin::DeleteCluster {
466 super::builder::bigtable_instance_admin::DeleteCluster::new(self.inner.clone())
467 }
468
469 /// Creates an app profile within an instance.
470 ///
471 /// # Example
472 /// ```
473 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
474 /// use google_cloud_bigtable_admin_v2::model::AppProfile;
475 /// use google_cloud_bigtable_admin_v2::Result;
476 /// async fn sample(
477 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str
478 /// ) -> Result<()> {
479 /// let response = client.create_app_profile()
480 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
481 /// .set_app_profile(
482 /// AppProfile::new()/* set fields */
483 /// )
484 /// .send().await?;
485 /// println!("response {:?}", response);
486 /// Ok(())
487 /// }
488 /// ```
489 pub fn create_app_profile(&self) -> super::builder::bigtable_instance_admin::CreateAppProfile {
490 super::builder::bigtable_instance_admin::CreateAppProfile::new(self.inner.clone())
491 }
492
493 /// Gets information about an app profile.
494 ///
495 /// # Example
496 /// ```
497 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
498 /// use google_cloud_bigtable_admin_v2::Result;
499 /// async fn sample(
500 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, app_profile_id: &str
501 /// ) -> Result<()> {
502 /// let response = client.get_app_profile()
503 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"))
504 /// .send().await?;
505 /// println!("response {:?}", response);
506 /// Ok(())
507 /// }
508 /// ```
509 pub fn get_app_profile(&self) -> super::builder::bigtable_instance_admin::GetAppProfile {
510 super::builder::bigtable_instance_admin::GetAppProfile::new(self.inner.clone())
511 }
512
513 /// Lists information about app profiles in an instance.
514 ///
515 /// # Example
516 /// ```
517 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
518 /// use google_cloud_gax::paginator::ItemPaginator as _;
519 /// use google_cloud_bigtable_admin_v2::Result;
520 /// async fn sample(
521 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str
522 /// ) -> Result<()> {
523 /// let mut list = client.list_app_profiles()
524 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
525 /// .by_item();
526 /// while let Some(item) = list.next().await.transpose()? {
527 /// println!("{:?}", item);
528 /// }
529 /// Ok(())
530 /// }
531 /// ```
532 pub fn list_app_profiles(&self) -> super::builder::bigtable_instance_admin::ListAppProfiles {
533 super::builder::bigtable_instance_admin::ListAppProfiles::new(self.inner.clone())
534 }
535
536 /// Updates an app profile within an instance.
537 ///
538 /// # Long running operations
539 ///
540 /// This method is used to start, and/or poll a [long-running Operation].
541 /// The [Working with long-running operations] chapter in the [user guide]
542 /// covers these operations in detail.
543 ///
544 /// [long-running operation]: https://google.aip.dev/151
545 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
546 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
547 ///
548 /// # Example
549 /// ```
550 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
551 /// use google_cloud_lro::Poller;
552 /// # extern crate wkt as google_cloud_wkt;
553 /// use google_cloud_wkt::FieldMask;
554 /// use google_cloud_bigtable_admin_v2::model::AppProfile;
555 /// use google_cloud_bigtable_admin_v2::Result;
556 /// async fn sample(
557 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, app_profile_id: &str
558 /// ) -> Result<()> {
559 /// let response = client.update_app_profile()
560 /// .set_app_profile(
561 /// AppProfile::new().set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"))/* set fields */
562 /// )
563 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
564 /// .poller().until_done().await?;
565 /// println!("response {:?}", response);
566 /// Ok(())
567 /// }
568 /// ```
569 pub fn update_app_profile(&self) -> super::builder::bigtable_instance_admin::UpdateAppProfile {
570 super::builder::bigtable_instance_admin::UpdateAppProfile::new(self.inner.clone())
571 }
572
573 /// Deletes an app profile from an instance.
574 ///
575 /// # Example
576 /// ```
577 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
578 /// use google_cloud_bigtable_admin_v2::Result;
579 /// async fn sample(
580 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, app_profile_id: &str
581 /// ) -> Result<()> {
582 /// client.delete_app_profile()
583 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"))
584 /// .send().await?;
585 /// Ok(())
586 /// }
587 /// ```
588 pub fn delete_app_profile(&self) -> super::builder::bigtable_instance_admin::DeleteAppProfile {
589 super::builder::bigtable_instance_admin::DeleteAppProfile::new(self.inner.clone())
590 }
591
592 /// Gets the access control policy for an instance resource. Returns an empty
593 /// policy if an instance exists but does not have a policy set.
594 ///
595 /// # Example
596 /// ```
597 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
598 /// use google_cloud_bigtable_admin_v2::Result;
599 /// async fn sample(
600 /// client: &BigtableInstanceAdmin
601 /// ) -> Result<()> {
602 /// let response = client.get_iam_policy()
603 /// /* set fields */
604 /// .send().await?;
605 /// println!("response {:?}", response);
606 /// Ok(())
607 /// }
608 /// ```
609 pub fn get_iam_policy(&self) -> super::builder::bigtable_instance_admin::GetIamPolicy {
610 super::builder::bigtable_instance_admin::GetIamPolicy::new(self.inner.clone())
611 }
612
613 /// Sets the access control policy on an instance resource. Replaces any
614 /// existing policy.
615 ///
616 /// # Example
617 /// ```
618 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
619 /// use google_cloud_bigtable_admin_v2::Result;
620 /// async fn sample(
621 /// client: &BigtableInstanceAdmin
622 /// ) -> Result<()> {
623 /// let response = client.set_iam_policy()
624 /// /* set fields */
625 /// .send().await?;
626 /// println!("response {:?}", response);
627 /// Ok(())
628 /// }
629 /// ```
630 pub fn set_iam_policy(&self) -> super::builder::bigtable_instance_admin::SetIamPolicy {
631 super::builder::bigtable_instance_admin::SetIamPolicy::new(self.inner.clone())
632 }
633
634 /// Returns permissions that the caller has on the specified instance resource.
635 ///
636 /// # Example
637 /// ```
638 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
639 /// use google_cloud_bigtable_admin_v2::Result;
640 /// async fn sample(
641 /// client: &BigtableInstanceAdmin
642 /// ) -> Result<()> {
643 /// let response = client.test_iam_permissions()
644 /// /* set fields */
645 /// .send().await?;
646 /// println!("response {:?}", response);
647 /// Ok(())
648 /// }
649 /// ```
650 pub fn test_iam_permissions(
651 &self,
652 ) -> super::builder::bigtable_instance_admin::TestIamPermissions {
653 super::builder::bigtable_instance_admin::TestIamPermissions::new(self.inner.clone())
654 }
655
656 /// Lists hot tablets in a cluster, within the time range provided. Hot
657 /// tablets are ordered based on CPU usage.
658 ///
659 /// # Example
660 /// ```
661 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
662 /// use google_cloud_gax::paginator::ItemPaginator as _;
663 /// use google_cloud_bigtable_admin_v2::Result;
664 /// async fn sample(
665 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, cluster_id: &str
666 /// ) -> Result<()> {
667 /// let mut list = client.list_hot_tablets()
668 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"))
669 /// .by_item();
670 /// while let Some(item) = list.next().await.transpose()? {
671 /// println!("{:?}", item);
672 /// }
673 /// Ok(())
674 /// }
675 /// ```
676 pub fn list_hot_tablets(&self) -> super::builder::bigtable_instance_admin::ListHotTablets {
677 super::builder::bigtable_instance_admin::ListHotTablets::new(self.inner.clone())
678 }
679
680 /// Creates a logical view within an instance.
681 ///
682 /// # Long running operations
683 ///
684 /// This method is used to start, and/or poll a [long-running Operation].
685 /// The [Working with long-running operations] chapter in the [user guide]
686 /// covers these operations in detail.
687 ///
688 /// [long-running operation]: https://google.aip.dev/151
689 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
690 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
691 ///
692 /// # Example
693 /// ```
694 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
695 /// use google_cloud_lro::Poller;
696 /// use google_cloud_bigtable_admin_v2::model::LogicalView;
697 /// use google_cloud_bigtable_admin_v2::Result;
698 /// async fn sample(
699 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str
700 /// ) -> Result<()> {
701 /// let response = client.create_logical_view()
702 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
703 /// .set_logical_view(
704 /// LogicalView::new()/* set fields */
705 /// )
706 /// .poller().until_done().await?;
707 /// println!("response {:?}", response);
708 /// Ok(())
709 /// }
710 /// ```
711 pub fn create_logical_view(
712 &self,
713 ) -> super::builder::bigtable_instance_admin::CreateLogicalView {
714 super::builder::bigtable_instance_admin::CreateLogicalView::new(self.inner.clone())
715 }
716
717 /// Gets information about a logical view.
718 ///
719 /// # Example
720 /// ```
721 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
722 /// use google_cloud_bigtable_admin_v2::Result;
723 /// async fn sample(
724 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, logical_view_id: &str
725 /// ) -> Result<()> {
726 /// let response = client.get_logical_view()
727 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"))
728 /// .send().await?;
729 /// println!("response {:?}", response);
730 /// Ok(())
731 /// }
732 /// ```
733 pub fn get_logical_view(&self) -> super::builder::bigtable_instance_admin::GetLogicalView {
734 super::builder::bigtable_instance_admin::GetLogicalView::new(self.inner.clone())
735 }
736
737 /// Lists information about logical views in an instance.
738 ///
739 /// # Example
740 /// ```
741 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
742 /// use google_cloud_gax::paginator::ItemPaginator as _;
743 /// use google_cloud_bigtable_admin_v2::Result;
744 /// async fn sample(
745 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str
746 /// ) -> Result<()> {
747 /// let mut list = client.list_logical_views()
748 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
749 /// .by_item();
750 /// while let Some(item) = list.next().await.transpose()? {
751 /// println!("{:?}", item);
752 /// }
753 /// Ok(())
754 /// }
755 /// ```
756 pub fn list_logical_views(&self) -> super::builder::bigtable_instance_admin::ListLogicalViews {
757 super::builder::bigtable_instance_admin::ListLogicalViews::new(self.inner.clone())
758 }
759
760 /// Updates a logical view within an instance.
761 ///
762 /// # Long running operations
763 ///
764 /// This method is used to start, and/or poll a [long-running Operation].
765 /// The [Working with long-running operations] chapter in the [user guide]
766 /// covers these operations in detail.
767 ///
768 /// [long-running operation]: https://google.aip.dev/151
769 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
770 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
771 ///
772 /// # Example
773 /// ```
774 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
775 /// use google_cloud_lro::Poller;
776 /// # extern crate wkt as google_cloud_wkt;
777 /// use google_cloud_wkt::FieldMask;
778 /// use google_cloud_bigtable_admin_v2::model::LogicalView;
779 /// use google_cloud_bigtable_admin_v2::Result;
780 /// async fn sample(
781 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, logical_view_id: &str
782 /// ) -> Result<()> {
783 /// let response = client.update_logical_view()
784 /// .set_logical_view(
785 /// LogicalView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"))/* set fields */
786 /// )
787 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
788 /// .poller().until_done().await?;
789 /// println!("response {:?}", response);
790 /// Ok(())
791 /// }
792 /// ```
793 pub fn update_logical_view(
794 &self,
795 ) -> super::builder::bigtable_instance_admin::UpdateLogicalView {
796 super::builder::bigtable_instance_admin::UpdateLogicalView::new(self.inner.clone())
797 }
798
799 /// Deletes a logical view from an instance.
800 ///
801 /// # Example
802 /// ```
803 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
804 /// use google_cloud_bigtable_admin_v2::Result;
805 /// async fn sample(
806 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, logical_view_id: &str
807 /// ) -> Result<()> {
808 /// client.delete_logical_view()
809 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"))
810 /// .send().await?;
811 /// Ok(())
812 /// }
813 /// ```
814 pub fn delete_logical_view(
815 &self,
816 ) -> super::builder::bigtable_instance_admin::DeleteLogicalView {
817 super::builder::bigtable_instance_admin::DeleteLogicalView::new(self.inner.clone())
818 }
819
820 /// Creates a materialized view within an instance.
821 ///
822 /// # Long running operations
823 ///
824 /// This method is used to start, and/or poll a [long-running Operation].
825 /// The [Working with long-running operations] chapter in the [user guide]
826 /// covers these operations in detail.
827 ///
828 /// [long-running operation]: https://google.aip.dev/151
829 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
830 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
831 ///
832 /// # Example
833 /// ```
834 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
835 /// use google_cloud_lro::Poller;
836 /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
837 /// use google_cloud_bigtable_admin_v2::Result;
838 /// async fn sample(
839 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str
840 /// ) -> Result<()> {
841 /// let response = client.create_materialized_view()
842 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
843 /// .set_materialized_view(
844 /// MaterializedView::new()/* set fields */
845 /// )
846 /// .poller().until_done().await?;
847 /// println!("response {:?}", response);
848 /// Ok(())
849 /// }
850 /// ```
851 pub fn create_materialized_view(
852 &self,
853 ) -> super::builder::bigtable_instance_admin::CreateMaterializedView {
854 super::builder::bigtable_instance_admin::CreateMaterializedView::new(self.inner.clone())
855 }
856
857 /// Gets information about a materialized view.
858 ///
859 /// # Example
860 /// ```
861 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
862 /// use google_cloud_bigtable_admin_v2::Result;
863 /// async fn sample(
864 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, materialized_view_id: &str
865 /// ) -> Result<()> {
866 /// let response = client.get_materialized_view()
867 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"))
868 /// .send().await?;
869 /// println!("response {:?}", response);
870 /// Ok(())
871 /// }
872 /// ```
873 pub fn get_materialized_view(
874 &self,
875 ) -> super::builder::bigtable_instance_admin::GetMaterializedView {
876 super::builder::bigtable_instance_admin::GetMaterializedView::new(self.inner.clone())
877 }
878
879 /// Lists information about materialized views in an instance.
880 ///
881 /// # Example
882 /// ```
883 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
884 /// use google_cloud_gax::paginator::ItemPaginator as _;
885 /// use google_cloud_bigtable_admin_v2::Result;
886 /// async fn sample(
887 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str
888 /// ) -> Result<()> {
889 /// let mut list = client.list_materialized_views()
890 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
891 /// .by_item();
892 /// while let Some(item) = list.next().await.transpose()? {
893 /// println!("{:?}", item);
894 /// }
895 /// Ok(())
896 /// }
897 /// ```
898 pub fn list_materialized_views(
899 &self,
900 ) -> super::builder::bigtable_instance_admin::ListMaterializedViews {
901 super::builder::bigtable_instance_admin::ListMaterializedViews::new(self.inner.clone())
902 }
903
904 /// Updates a materialized view within an instance.
905 ///
906 /// # Long running operations
907 ///
908 /// This method is used to start, and/or poll a [long-running Operation].
909 /// The [Working with long-running operations] chapter in the [user guide]
910 /// covers these operations in detail.
911 ///
912 /// [long-running operation]: https://google.aip.dev/151
913 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
914 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
915 ///
916 /// # Example
917 /// ```
918 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
919 /// use google_cloud_lro::Poller;
920 /// # extern crate wkt as google_cloud_wkt;
921 /// use google_cloud_wkt::FieldMask;
922 /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
923 /// use google_cloud_bigtable_admin_v2::Result;
924 /// async fn sample(
925 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, materialized_view_id: &str
926 /// ) -> Result<()> {
927 /// let response = client.update_materialized_view()
928 /// .set_materialized_view(
929 /// MaterializedView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"))/* set fields */
930 /// )
931 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
932 /// .poller().until_done().await?;
933 /// println!("response {:?}", response);
934 /// Ok(())
935 /// }
936 /// ```
937 pub fn update_materialized_view(
938 &self,
939 ) -> super::builder::bigtable_instance_admin::UpdateMaterializedView {
940 super::builder::bigtable_instance_admin::UpdateMaterializedView::new(self.inner.clone())
941 }
942
943 /// Deletes a materialized view from an instance.
944 ///
945 /// # Example
946 /// ```
947 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
948 /// use google_cloud_bigtable_admin_v2::Result;
949 /// async fn sample(
950 /// client: &BigtableInstanceAdmin, project_id: &str, instance_id: &str, materialized_view_id: &str
951 /// ) -> Result<()> {
952 /// client.delete_materialized_view()
953 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"))
954 /// .send().await?;
955 /// Ok(())
956 /// }
957 /// ```
958 pub fn delete_materialized_view(
959 &self,
960 ) -> super::builder::bigtable_instance_admin::DeleteMaterializedView {
961 super::builder::bigtable_instance_admin::DeleteMaterializedView::new(self.inner.clone())
962 }
963
964 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
965 ///
966 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
967 ///
968 /// # Example
969 /// ```
970 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
971 /// use google_cloud_gax::paginator::ItemPaginator as _;
972 /// use google_cloud_bigtable_admin_v2::Result;
973 /// async fn sample(
974 /// client: &BigtableInstanceAdmin
975 /// ) -> Result<()> {
976 /// let mut list = client.list_operations()
977 /// /* set fields */
978 /// .by_item();
979 /// while let Some(item) = list.next().await.transpose()? {
980 /// println!("{:?}", item);
981 /// }
982 /// Ok(())
983 /// }
984 /// ```
985 pub fn list_operations(&self) -> super::builder::bigtable_instance_admin::ListOperations {
986 super::builder::bigtable_instance_admin::ListOperations::new(self.inner.clone())
987 }
988
989 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
990 ///
991 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
992 ///
993 /// # Example
994 /// ```
995 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
996 /// use google_cloud_bigtable_admin_v2::Result;
997 /// async fn sample(
998 /// client: &BigtableInstanceAdmin
999 /// ) -> Result<()> {
1000 /// let response = client.get_operation()
1001 /// /* set fields */
1002 /// .send().await?;
1003 /// println!("response {:?}", response);
1004 /// Ok(())
1005 /// }
1006 /// ```
1007 pub fn get_operation(&self) -> super::builder::bigtable_instance_admin::GetOperation {
1008 super::builder::bigtable_instance_admin::GetOperation::new(self.inner.clone())
1009 }
1010
1011 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1012 ///
1013 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1014 ///
1015 /// # Example
1016 /// ```
1017 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
1018 /// use google_cloud_bigtable_admin_v2::Result;
1019 /// async fn sample(
1020 /// client: &BigtableInstanceAdmin
1021 /// ) -> Result<()> {
1022 /// client.delete_operation()
1023 /// /* set fields */
1024 /// .send().await?;
1025 /// Ok(())
1026 /// }
1027 /// ```
1028 pub fn delete_operation(&self) -> super::builder::bigtable_instance_admin::DeleteOperation {
1029 super::builder::bigtable_instance_admin::DeleteOperation::new(self.inner.clone())
1030 }
1031
1032 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
1033 ///
1034 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
1035 ///
1036 /// # Example
1037 /// ```
1038 /// # use google_cloud_bigtable_admin_v2::client::BigtableInstanceAdmin;
1039 /// use google_cloud_bigtable_admin_v2::Result;
1040 /// async fn sample(
1041 /// client: &BigtableInstanceAdmin
1042 /// ) -> Result<()> {
1043 /// client.cancel_operation()
1044 /// /* set fields */
1045 /// .send().await?;
1046 /// Ok(())
1047 /// }
1048 /// ```
1049 pub fn cancel_operation(&self) -> super::builder::bigtable_instance_admin::CancelOperation {
1050 super::builder::bigtable_instance_admin::CancelOperation::new(self.inner.clone())
1051 }
1052}
1053
1054/// Implements a client for the Cloud Bigtable Admin API.
1055///
1056/// # Example
1057/// ```
1058/// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1059/// use google_cloud_gax::paginator::ItemPaginator as _;
1060/// async fn sample(
1061/// project_id: &str,
1062/// instance_id: &str,
1063/// ) -> anyhow::Result<()> {
1064/// let client = BigtableTableAdmin::builder().build().await?;
1065/// let mut list = client.list_tables()
1066/// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
1067/// .by_item();
1068/// while let Some(item) = list.next().await.transpose()? {
1069/// println!("{:?}", item);
1070/// }
1071/// Ok(())
1072/// }
1073/// ```
1074///
1075/// # Service Description
1076///
1077/// Service for creating, configuring, and deleting Cloud Bigtable tables.
1078///
1079/// Provides access to the table schemas only, not the data stored within
1080/// the tables.
1081///
1082/// # Configuration
1083///
1084/// To configure `BigtableTableAdmin` use the `with_*` methods in the type returned
1085/// by [builder()][BigtableTableAdmin::builder]. The default configuration should
1086/// work for most applications. Common configuration changes include
1087///
1088/// * [with_endpoint()]: by default this client uses the global default endpoint
1089/// (`https://bigtableadmin.googleapis.com`). Applications using regional
1090/// endpoints or running in restricted networks (e.g. a network configured
1091// with [Private Google Access with VPC Service Controls]) may want to
1092/// override this default.
1093/// * [with_credentials()]: by default this client uses
1094/// [Application Default Credentials]. Applications using custom
1095/// authentication may need to override this default.
1096///
1097/// [with_endpoint()]: super::builder::bigtable_table_admin::ClientBuilder::with_endpoint
1098/// [with_credentials()]: super::builder::bigtable_table_admin::ClientBuilder::with_credentials
1099/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
1100/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
1101///
1102/// # Pooling and Cloning
1103///
1104/// `BigtableTableAdmin` holds a connection pool internally, it is advised to
1105/// create one and reuse it. You do not need to wrap `BigtableTableAdmin` in
1106/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
1107/// already uses an `Arc` internally.
1108#[derive(Clone, Debug)]
1109pub struct BigtableTableAdmin {
1110 inner: std::sync::Arc<dyn super::stub::dynamic::BigtableTableAdmin>,
1111}
1112
1113impl BigtableTableAdmin {
1114 /// Returns a builder for [BigtableTableAdmin].
1115 ///
1116 /// ```
1117 /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1118 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1119 /// let client = BigtableTableAdmin::builder().build().await?;
1120 /// # Ok(()) }
1121 /// ```
1122 pub fn builder() -> super::builder::bigtable_table_admin::ClientBuilder {
1123 crate::new_client_builder(super::builder::bigtable_table_admin::client::Factory)
1124 }
1125
1126 /// Creates a new client from the provided stub.
1127 ///
1128 /// The most common case for calling this function is in tests mocking the
1129 /// client's behavior.
1130 pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
1131 where
1132 T: super::stub::BigtableTableAdmin + 'static,
1133 {
1134 Self { inner: stub.into() }
1135 }
1136
1137 pub(crate) async fn new(
1138 config: gaxi::options::ClientConfig,
1139 ) -> crate::ClientBuilderResult<Self> {
1140 let inner = Self::build_inner(config).await?;
1141 Ok(Self { inner })
1142 }
1143
1144 async fn build_inner(
1145 conf: gaxi::options::ClientConfig,
1146 ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::BigtableTableAdmin>>
1147 {
1148 if gaxi::options::tracing_enabled(&conf) {
1149 return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
1150 }
1151 Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
1152 }
1153
1154 async fn build_transport(
1155 conf: gaxi::options::ClientConfig,
1156 ) -> crate::ClientBuilderResult<impl super::stub::BigtableTableAdmin> {
1157 super::transport::BigtableTableAdmin::new(conf).await
1158 }
1159
1160 async fn build_with_tracing(
1161 conf: gaxi::options::ClientConfig,
1162 ) -> crate::ClientBuilderResult<impl super::stub::BigtableTableAdmin> {
1163 Self::build_transport(conf)
1164 .await
1165 .map(super::tracing::BigtableTableAdmin::new)
1166 }
1167
1168 /// Creates a new table in the specified instance.
1169 /// The table can be created with a full set of initial column families,
1170 /// specified in the request.
1171 ///
1172 /// # Example
1173 /// ```
1174 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1175 /// use google_cloud_bigtable_admin_v2::model::Table;
1176 /// use google_cloud_bigtable_admin_v2::Result;
1177 /// async fn sample(
1178 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str
1179 /// ) -> Result<()> {
1180 /// let response = client.create_table()
1181 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
1182 /// .set_table_id("table_id_value")
1183 /// .set_table(
1184 /// Table::new()/* set fields */
1185 /// )
1186 /// .send().await?;
1187 /// println!("response {:?}", response);
1188 /// Ok(())
1189 /// }
1190 /// ```
1191 pub fn create_table(&self) -> super::builder::bigtable_table_admin::CreateTable {
1192 super::builder::bigtable_table_admin::CreateTable::new(self.inner.clone())
1193 }
1194
1195 /// Creates a new table from the specified snapshot. The target table must
1196 /// not exist. The snapshot and the table must be in the same instance.
1197 ///
1198 /// Note: This is a private alpha release of Cloud Bigtable snapshots. This
1199 /// feature is not currently available to most Cloud Bigtable customers. This
1200 /// feature might be changed in backward-incompatible ways and is not
1201 /// recommended for production use. It is not subject to any SLA or deprecation
1202 /// policy.
1203 ///
1204 /// # Long running operations
1205 ///
1206 /// This method is used to start, and/or poll a [long-running Operation].
1207 /// The [Working with long-running operations] chapter in the [user guide]
1208 /// covers these operations in detail.
1209 ///
1210 /// [long-running operation]: https://google.aip.dev/151
1211 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1212 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1213 ///
1214 /// # Example
1215 /// ```
1216 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1217 /// use google_cloud_lro::Poller;
1218 /// use google_cloud_bigtable_admin_v2::Result;
1219 /// async fn sample(
1220 /// client: &BigtableTableAdmin
1221 /// ) -> Result<()> {
1222 /// let response = client.create_table_from_snapshot()
1223 /// /* set fields */
1224 /// .poller().until_done().await?;
1225 /// println!("response {:?}", response);
1226 /// Ok(())
1227 /// }
1228 /// ```
1229 pub fn create_table_from_snapshot(
1230 &self,
1231 ) -> super::builder::bigtable_table_admin::CreateTableFromSnapshot {
1232 super::builder::bigtable_table_admin::CreateTableFromSnapshot::new(self.inner.clone())
1233 }
1234
1235 /// Lists all tables served from a specified instance.
1236 ///
1237 /// # Example
1238 /// ```
1239 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1240 /// use google_cloud_gax::paginator::ItemPaginator as _;
1241 /// use google_cloud_bigtable_admin_v2::Result;
1242 /// async fn sample(
1243 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str
1244 /// ) -> Result<()> {
1245 /// let mut list = client.list_tables()
1246 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}"))
1247 /// .by_item();
1248 /// while let Some(item) = list.next().await.transpose()? {
1249 /// println!("{:?}", item);
1250 /// }
1251 /// Ok(())
1252 /// }
1253 /// ```
1254 pub fn list_tables(&self) -> super::builder::bigtable_table_admin::ListTables {
1255 super::builder::bigtable_table_admin::ListTables::new(self.inner.clone())
1256 }
1257
1258 /// Gets metadata information about the specified table.
1259 ///
1260 /// # Example
1261 /// ```
1262 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1263 /// use google_cloud_bigtable_admin_v2::Result;
1264 /// async fn sample(
1265 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str
1266 /// ) -> Result<()> {
1267 /// let response = client.get_table()
1268 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"))
1269 /// .send().await?;
1270 /// println!("response {:?}", response);
1271 /// Ok(())
1272 /// }
1273 /// ```
1274 pub fn get_table(&self) -> super::builder::bigtable_table_admin::GetTable {
1275 super::builder::bigtable_table_admin::GetTable::new(self.inner.clone())
1276 }
1277
1278 /// Updates a specified table.
1279 ///
1280 /// # Long running operations
1281 ///
1282 /// This method is used to start, and/or poll a [long-running Operation].
1283 /// The [Working with long-running operations] chapter in the [user guide]
1284 /// covers these operations in detail.
1285 ///
1286 /// [long-running operation]: https://google.aip.dev/151
1287 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1288 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1289 ///
1290 /// # Example
1291 /// ```
1292 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1293 /// use google_cloud_lro::Poller;
1294 /// # extern crate wkt as google_cloud_wkt;
1295 /// use google_cloud_wkt::FieldMask;
1296 /// use google_cloud_bigtable_admin_v2::model::Table;
1297 /// use google_cloud_bigtable_admin_v2::Result;
1298 /// async fn sample(
1299 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str
1300 /// ) -> Result<()> {
1301 /// let response = client.update_table()
1302 /// .set_table(
1303 /// Table::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"))/* set fields */
1304 /// )
1305 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1306 /// .poller().until_done().await?;
1307 /// println!("response {:?}", response);
1308 /// Ok(())
1309 /// }
1310 /// ```
1311 pub fn update_table(&self) -> super::builder::bigtable_table_admin::UpdateTable {
1312 super::builder::bigtable_table_admin::UpdateTable::new(self.inner.clone())
1313 }
1314
1315 /// Permanently deletes a specified table and all of its data.
1316 ///
1317 /// # Example
1318 /// ```
1319 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1320 /// use google_cloud_bigtable_admin_v2::Result;
1321 /// async fn sample(
1322 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str
1323 /// ) -> Result<()> {
1324 /// client.delete_table()
1325 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"))
1326 /// .send().await?;
1327 /// Ok(())
1328 /// }
1329 /// ```
1330 pub fn delete_table(&self) -> super::builder::bigtable_table_admin::DeleteTable {
1331 super::builder::bigtable_table_admin::DeleteTable::new(self.inner.clone())
1332 }
1333
1334 /// Restores a specified table which was accidentally deleted.
1335 ///
1336 /// # Long running operations
1337 ///
1338 /// This method is used to start, and/or poll a [long-running Operation].
1339 /// The [Working with long-running operations] chapter in the [user guide]
1340 /// covers these operations in detail.
1341 ///
1342 /// [long-running operation]: https://google.aip.dev/151
1343 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1344 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1345 ///
1346 /// # Example
1347 /// ```
1348 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1349 /// use google_cloud_lro::Poller;
1350 /// use google_cloud_bigtable_admin_v2::Result;
1351 /// async fn sample(
1352 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str
1353 /// ) -> Result<()> {
1354 /// let response = client.undelete_table()
1355 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"))
1356 /// .poller().until_done().await?;
1357 /// println!("response {:?}", response);
1358 /// Ok(())
1359 /// }
1360 /// ```
1361 pub fn undelete_table(&self) -> super::builder::bigtable_table_admin::UndeleteTable {
1362 super::builder::bigtable_table_admin::UndeleteTable::new(self.inner.clone())
1363 }
1364
1365 /// Creates a new AuthorizedView in a table.
1366 ///
1367 /// # Long running operations
1368 ///
1369 /// This method is used to start, and/or poll a [long-running Operation].
1370 /// The [Working with long-running operations] chapter in the [user guide]
1371 /// covers these operations in detail.
1372 ///
1373 /// [long-running operation]: https://google.aip.dev/151
1374 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1375 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1376 ///
1377 /// # Example
1378 /// ```
1379 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1380 /// use google_cloud_lro::Poller;
1381 /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
1382 /// use google_cloud_bigtable_admin_v2::Result;
1383 /// async fn sample(
1384 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str
1385 /// ) -> Result<()> {
1386 /// let response = client.create_authorized_view()
1387 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"))
1388 /// .set_authorized_view(
1389 /// AuthorizedView::new()/* set fields */
1390 /// )
1391 /// .poller().until_done().await?;
1392 /// println!("response {:?}", response);
1393 /// Ok(())
1394 /// }
1395 /// ```
1396 pub fn create_authorized_view(
1397 &self,
1398 ) -> super::builder::bigtable_table_admin::CreateAuthorizedView {
1399 super::builder::bigtable_table_admin::CreateAuthorizedView::new(self.inner.clone())
1400 }
1401
1402 /// Lists all AuthorizedViews from a specific table.
1403 ///
1404 /// # Example
1405 /// ```
1406 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1407 /// use google_cloud_gax::paginator::ItemPaginator as _;
1408 /// use google_cloud_bigtable_admin_v2::Result;
1409 /// async fn sample(
1410 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str
1411 /// ) -> Result<()> {
1412 /// let mut list = client.list_authorized_views()
1413 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"))
1414 /// .by_item();
1415 /// while let Some(item) = list.next().await.transpose()? {
1416 /// println!("{:?}", item);
1417 /// }
1418 /// Ok(())
1419 /// }
1420 /// ```
1421 pub fn list_authorized_views(
1422 &self,
1423 ) -> super::builder::bigtable_table_admin::ListAuthorizedViews {
1424 super::builder::bigtable_table_admin::ListAuthorizedViews::new(self.inner.clone())
1425 }
1426
1427 /// Gets information from a specified AuthorizedView.
1428 ///
1429 /// # Example
1430 /// ```
1431 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1432 /// use google_cloud_bigtable_admin_v2::Result;
1433 /// async fn sample(
1434 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str, authorized_view_id: &str
1435 /// ) -> Result<()> {
1436 /// let response = client.get_authorized_view()
1437 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"))
1438 /// .send().await?;
1439 /// println!("response {:?}", response);
1440 /// Ok(())
1441 /// }
1442 /// ```
1443 pub fn get_authorized_view(&self) -> super::builder::bigtable_table_admin::GetAuthorizedView {
1444 super::builder::bigtable_table_admin::GetAuthorizedView::new(self.inner.clone())
1445 }
1446
1447 /// Updates an AuthorizedView in a table.
1448 ///
1449 /// # Long running operations
1450 ///
1451 /// This method is used to start, and/or poll a [long-running Operation].
1452 /// The [Working with long-running operations] chapter in the [user guide]
1453 /// covers these operations in detail.
1454 ///
1455 /// [long-running operation]: https://google.aip.dev/151
1456 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1457 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1458 ///
1459 /// # Example
1460 /// ```
1461 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1462 /// use google_cloud_lro::Poller;
1463 /// # extern crate wkt as google_cloud_wkt;
1464 /// use google_cloud_wkt::FieldMask;
1465 /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
1466 /// use google_cloud_bigtable_admin_v2::Result;
1467 /// async fn sample(
1468 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str, authorized_view_id: &str
1469 /// ) -> Result<()> {
1470 /// let response = client.update_authorized_view()
1471 /// .set_authorized_view(
1472 /// AuthorizedView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"))/* set fields */
1473 /// )
1474 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1475 /// .poller().until_done().await?;
1476 /// println!("response {:?}", response);
1477 /// Ok(())
1478 /// }
1479 /// ```
1480 pub fn update_authorized_view(
1481 &self,
1482 ) -> super::builder::bigtable_table_admin::UpdateAuthorizedView {
1483 super::builder::bigtable_table_admin::UpdateAuthorizedView::new(self.inner.clone())
1484 }
1485
1486 /// Permanently deletes a specified AuthorizedView.
1487 ///
1488 /// # Example
1489 /// ```
1490 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1491 /// use google_cloud_bigtable_admin_v2::Result;
1492 /// async fn sample(
1493 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str, authorized_view_id: &str
1494 /// ) -> Result<()> {
1495 /// client.delete_authorized_view()
1496 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"))
1497 /// .send().await?;
1498 /// Ok(())
1499 /// }
1500 /// ```
1501 pub fn delete_authorized_view(
1502 &self,
1503 ) -> super::builder::bigtable_table_admin::DeleteAuthorizedView {
1504 super::builder::bigtable_table_admin::DeleteAuthorizedView::new(self.inner.clone())
1505 }
1506
1507 /// Performs a series of column family modifications on the specified table.
1508 /// Either all or none of the modifications will occur before this method
1509 /// returns, but data requests received prior to that point may see a table
1510 /// where only some modifications have taken effect.
1511 ///
1512 /// # Example
1513 /// ```
1514 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1515 /// use google_cloud_bigtable_admin_v2::Result;
1516 /// async fn sample(
1517 /// client: &BigtableTableAdmin
1518 /// ) -> Result<()> {
1519 /// let response = client.modify_column_families()
1520 /// /* set fields */
1521 /// .send().await?;
1522 /// println!("response {:?}", response);
1523 /// Ok(())
1524 /// }
1525 /// ```
1526 pub fn modify_column_families(
1527 &self,
1528 ) -> super::builder::bigtable_table_admin::ModifyColumnFamilies {
1529 super::builder::bigtable_table_admin::ModifyColumnFamilies::new(self.inner.clone())
1530 }
1531
1532 /// Permanently drop/delete a row range from a specified table. The request can
1533 /// specify whether to delete all rows in a table, or only those that match a
1534 /// particular prefix.
1535 ///
1536 /// # Example
1537 /// ```
1538 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1539 /// use google_cloud_bigtable_admin_v2::Result;
1540 /// async fn sample(
1541 /// client: &BigtableTableAdmin
1542 /// ) -> Result<()> {
1543 /// client.drop_row_range()
1544 /// /* set fields */
1545 /// .send().await?;
1546 /// Ok(())
1547 /// }
1548 /// ```
1549 pub fn drop_row_range(&self) -> super::builder::bigtable_table_admin::DropRowRange {
1550 super::builder::bigtable_table_admin::DropRowRange::new(self.inner.clone())
1551 }
1552
1553 /// Generates a consistency token for a Table, which can be used in
1554 /// CheckConsistency to check whether mutations to the table that finished
1555 /// before this call started have been replicated. The tokens will be available
1556 /// for 90 days.
1557 ///
1558 /// # Example
1559 /// ```
1560 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1561 /// use google_cloud_bigtable_admin_v2::Result;
1562 /// async fn sample(
1563 /// client: &BigtableTableAdmin
1564 /// ) -> Result<()> {
1565 /// let response = client.generate_consistency_token()
1566 /// /* set fields */
1567 /// .send().await?;
1568 /// println!("response {:?}", response);
1569 /// Ok(())
1570 /// }
1571 /// ```
1572 pub fn generate_consistency_token(
1573 &self,
1574 ) -> super::builder::bigtable_table_admin::GenerateConsistencyToken {
1575 super::builder::bigtable_table_admin::GenerateConsistencyToken::new(self.inner.clone())
1576 }
1577
1578 /// Checks replication consistency based on a consistency token, that is, if
1579 /// replication has caught up based on the conditions specified in the token
1580 /// and the check request.
1581 ///
1582 /// # Example
1583 /// ```
1584 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1585 /// use google_cloud_bigtable_admin_v2::Result;
1586 /// async fn sample(
1587 /// client: &BigtableTableAdmin
1588 /// ) -> Result<()> {
1589 /// let response = client.check_consistency()
1590 /// /* set fields */
1591 /// .send().await?;
1592 /// println!("response {:?}", response);
1593 /// Ok(())
1594 /// }
1595 /// ```
1596 pub fn check_consistency(&self) -> super::builder::bigtable_table_admin::CheckConsistency {
1597 super::builder::bigtable_table_admin::CheckConsistency::new(self.inner.clone())
1598 }
1599
1600 /// Creates a new snapshot in the specified cluster from the specified
1601 /// source table. The cluster and the table must be in the same instance.
1602 ///
1603 /// Note: This is a private alpha release of Cloud Bigtable snapshots. This
1604 /// feature is not currently available to most Cloud Bigtable customers. This
1605 /// feature might be changed in backward-incompatible ways and is not
1606 /// recommended for production use. It is not subject to any SLA or deprecation
1607 /// policy.
1608 ///
1609 /// # Long running operations
1610 ///
1611 /// This method is used to start, and/or poll a [long-running Operation].
1612 /// The [Working with long-running operations] chapter in the [user guide]
1613 /// covers these operations in detail.
1614 ///
1615 /// [long-running operation]: https://google.aip.dev/151
1616 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1617 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1618 ///
1619 /// # Example
1620 /// ```
1621 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1622 /// use google_cloud_lro::Poller;
1623 /// use google_cloud_bigtable_admin_v2::Result;
1624 /// async fn sample(
1625 /// client: &BigtableTableAdmin
1626 /// ) -> Result<()> {
1627 /// let response = client.snapshot_table()
1628 /// /* set fields */
1629 /// .poller().until_done().await?;
1630 /// println!("response {:?}", response);
1631 /// Ok(())
1632 /// }
1633 /// ```
1634 pub fn snapshot_table(&self) -> super::builder::bigtable_table_admin::SnapshotTable {
1635 super::builder::bigtable_table_admin::SnapshotTable::new(self.inner.clone())
1636 }
1637
1638 /// Gets metadata information about the specified snapshot.
1639 ///
1640 /// Note: This is a private alpha release of Cloud Bigtable snapshots. This
1641 /// feature is not currently available to most Cloud Bigtable customers. This
1642 /// feature might be changed in backward-incompatible ways and is not
1643 /// recommended for production use. It is not subject to any SLA or deprecation
1644 /// policy.
1645 ///
1646 /// # Example
1647 /// ```
1648 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1649 /// use google_cloud_bigtable_admin_v2::Result;
1650 /// async fn sample(
1651 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, cluster_id: &str, snapshot_id: &str
1652 /// ) -> Result<()> {
1653 /// let response = client.get_snapshot()
1654 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"))
1655 /// .send().await?;
1656 /// println!("response {:?}", response);
1657 /// Ok(())
1658 /// }
1659 /// ```
1660 pub fn get_snapshot(&self) -> super::builder::bigtable_table_admin::GetSnapshot {
1661 super::builder::bigtable_table_admin::GetSnapshot::new(self.inner.clone())
1662 }
1663
1664 /// Lists all snapshots associated with the specified cluster.
1665 ///
1666 /// Note: This is a private alpha release of Cloud Bigtable snapshots. This
1667 /// feature is not currently available to most Cloud Bigtable customers. This
1668 /// feature might be changed in backward-incompatible ways and is not
1669 /// recommended for production use. It is not subject to any SLA or deprecation
1670 /// policy.
1671 ///
1672 /// # Example
1673 /// ```
1674 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1675 /// use google_cloud_gax::paginator::ItemPaginator as _;
1676 /// use google_cloud_bigtable_admin_v2::Result;
1677 /// async fn sample(
1678 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, cluster_id: &str
1679 /// ) -> Result<()> {
1680 /// let mut list = client.list_snapshots()
1681 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"))
1682 /// .by_item();
1683 /// while let Some(item) = list.next().await.transpose()? {
1684 /// println!("{:?}", item);
1685 /// }
1686 /// Ok(())
1687 /// }
1688 /// ```
1689 pub fn list_snapshots(&self) -> super::builder::bigtable_table_admin::ListSnapshots {
1690 super::builder::bigtable_table_admin::ListSnapshots::new(self.inner.clone())
1691 }
1692
1693 /// Permanently deletes the specified snapshot.
1694 ///
1695 /// Note: This is a private alpha release of Cloud Bigtable snapshots. This
1696 /// feature is not currently available to most Cloud Bigtable customers. This
1697 /// feature might be changed in backward-incompatible ways and is not
1698 /// recommended for production use. It is not subject to any SLA or deprecation
1699 /// policy.
1700 ///
1701 /// # Example
1702 /// ```
1703 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1704 /// use google_cloud_bigtable_admin_v2::Result;
1705 /// async fn sample(
1706 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, cluster_id: &str, snapshot_id: &str
1707 /// ) -> Result<()> {
1708 /// client.delete_snapshot()
1709 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"))
1710 /// .send().await?;
1711 /// Ok(())
1712 /// }
1713 /// ```
1714 pub fn delete_snapshot(&self) -> super::builder::bigtable_table_admin::DeleteSnapshot {
1715 super::builder::bigtable_table_admin::DeleteSnapshot::new(self.inner.clone())
1716 }
1717
1718 /// Starts creating a new Cloud Bigtable Backup. The returned backup
1719 /// [long-running operation][google.longrunning.Operation] can be used to
1720 /// track creation of the backup. The
1721 /// [metadata][google.longrunning.Operation.metadata] field type is
1722 /// [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The
1723 /// [response][google.longrunning.Operation.response] field type is
1724 /// [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the
1725 /// returned operation will stop the creation and delete the backup.
1726 ///
1727 /// [google.bigtable.admin.v2.Backup]: crate::model::Backup
1728 /// [google.bigtable.admin.v2.CreateBackupMetadata]: crate::model::CreateBackupMetadata
1729 /// [google.longrunning.Operation]: google_cloud_longrunning::model::Operation
1730 /// [google.longrunning.Operation.metadata]: google_cloud_longrunning::model::Operation::metadata
1731 /// [google.longrunning.Operation.response]: google_cloud_longrunning::model::Operation::result
1732 ///
1733 /// # Long running operations
1734 ///
1735 /// This method is used to start, and/or poll a [long-running Operation].
1736 /// The [Working with long-running operations] chapter in the [user guide]
1737 /// covers these operations in detail.
1738 ///
1739 /// [long-running operation]: https://google.aip.dev/151
1740 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1741 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1742 ///
1743 /// # Example
1744 /// ```
1745 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1746 /// use google_cloud_lro::Poller;
1747 /// use google_cloud_bigtable_admin_v2::model::Backup;
1748 /// use google_cloud_bigtable_admin_v2::Result;
1749 /// async fn sample(
1750 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, cluster_id: &str
1751 /// ) -> Result<()> {
1752 /// let response = client.create_backup()
1753 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"))
1754 /// .set_backup_id("backup_id_value")
1755 /// .set_backup(
1756 /// Backup::new()/* set fields */
1757 /// )
1758 /// .poller().until_done().await?;
1759 /// println!("response {:?}", response);
1760 /// Ok(())
1761 /// }
1762 /// ```
1763 pub fn create_backup(&self) -> super::builder::bigtable_table_admin::CreateBackup {
1764 super::builder::bigtable_table_admin::CreateBackup::new(self.inner.clone())
1765 }
1766
1767 /// Gets metadata on a pending or completed Cloud Bigtable Backup.
1768 ///
1769 /// # Example
1770 /// ```
1771 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1772 /// use google_cloud_bigtable_admin_v2::Result;
1773 /// async fn sample(
1774 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, cluster_id: &str, backup_id: &str
1775 /// ) -> Result<()> {
1776 /// let response = client.get_backup()
1777 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"))
1778 /// .send().await?;
1779 /// println!("response {:?}", response);
1780 /// Ok(())
1781 /// }
1782 /// ```
1783 pub fn get_backup(&self) -> super::builder::bigtable_table_admin::GetBackup {
1784 super::builder::bigtable_table_admin::GetBackup::new(self.inner.clone())
1785 }
1786
1787 /// Updates a pending or completed Cloud Bigtable Backup.
1788 ///
1789 /// # Example
1790 /// ```
1791 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1792 /// # extern crate wkt as google_cloud_wkt;
1793 /// use google_cloud_wkt::FieldMask;
1794 /// use google_cloud_bigtable_admin_v2::model::Backup;
1795 /// use google_cloud_bigtable_admin_v2::Result;
1796 /// async fn sample(
1797 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, cluster_id: &str, backup_id: &str
1798 /// ) -> Result<()> {
1799 /// let response = client.update_backup()
1800 /// .set_backup(
1801 /// Backup::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"))/* set fields */
1802 /// )
1803 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1804 /// .send().await?;
1805 /// println!("response {:?}", response);
1806 /// Ok(())
1807 /// }
1808 /// ```
1809 pub fn update_backup(&self) -> super::builder::bigtable_table_admin::UpdateBackup {
1810 super::builder::bigtable_table_admin::UpdateBackup::new(self.inner.clone())
1811 }
1812
1813 /// Deletes a pending or completed Cloud Bigtable backup.
1814 ///
1815 /// # Example
1816 /// ```
1817 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1818 /// use google_cloud_bigtable_admin_v2::Result;
1819 /// async fn sample(
1820 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, cluster_id: &str, backup_id: &str
1821 /// ) -> Result<()> {
1822 /// client.delete_backup()
1823 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"))
1824 /// .send().await?;
1825 /// Ok(())
1826 /// }
1827 /// ```
1828 pub fn delete_backup(&self) -> super::builder::bigtable_table_admin::DeleteBackup {
1829 super::builder::bigtable_table_admin::DeleteBackup::new(self.inner.clone())
1830 }
1831
1832 /// Lists Cloud Bigtable backups. Returns both completed and pending
1833 /// backups.
1834 ///
1835 /// # Example
1836 /// ```
1837 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1838 /// use google_cloud_gax::paginator::ItemPaginator as _;
1839 /// use google_cloud_bigtable_admin_v2::Result;
1840 /// async fn sample(
1841 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, cluster_id: &str
1842 /// ) -> Result<()> {
1843 /// let mut list = client.list_backups()
1844 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"))
1845 /// .by_item();
1846 /// while let Some(item) = list.next().await.transpose()? {
1847 /// println!("{:?}", item);
1848 /// }
1849 /// Ok(())
1850 /// }
1851 /// ```
1852 pub fn list_backups(&self) -> super::builder::bigtable_table_admin::ListBackups {
1853 super::builder::bigtable_table_admin::ListBackups::new(self.inner.clone())
1854 }
1855
1856 /// Create a new table by restoring from a completed backup. The
1857 /// returned table [long-running operation][google.longrunning.Operation] can
1858 /// be used to track the progress of the operation, and to cancel it. The
1859 /// [metadata][google.longrunning.Operation.metadata] field type is
1860 /// [RestoreTableMetadata][google.bigtable.admin.v2.RestoreTableMetadata]. The
1861 /// [response][google.longrunning.Operation.response] type is
1862 /// [Table][google.bigtable.admin.v2.Table], if successful.
1863 ///
1864 /// [google.bigtable.admin.v2.RestoreTableMetadata]: crate::model::RestoreTableMetadata
1865 /// [google.bigtable.admin.v2.Table]: crate::model::Table
1866 /// [google.longrunning.Operation]: google_cloud_longrunning::model::Operation
1867 /// [google.longrunning.Operation.metadata]: google_cloud_longrunning::model::Operation::metadata
1868 /// [google.longrunning.Operation.response]: google_cloud_longrunning::model::Operation::result
1869 ///
1870 /// # Long running operations
1871 ///
1872 /// This method is used to start, and/or poll a [long-running Operation].
1873 /// The [Working with long-running operations] chapter in the [user guide]
1874 /// covers these operations in detail.
1875 ///
1876 /// [long-running operation]: https://google.aip.dev/151
1877 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1878 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1879 ///
1880 /// # Example
1881 /// ```
1882 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1883 /// use google_cloud_lro::Poller;
1884 /// use google_cloud_bigtable_admin_v2::Result;
1885 /// async fn sample(
1886 /// client: &BigtableTableAdmin
1887 /// ) -> Result<()> {
1888 /// let response = client.restore_table()
1889 /// /* set fields */
1890 /// .poller().until_done().await?;
1891 /// println!("response {:?}", response);
1892 /// Ok(())
1893 /// }
1894 /// ```
1895 pub fn restore_table(&self) -> super::builder::bigtable_table_admin::RestoreTable {
1896 super::builder::bigtable_table_admin::RestoreTable::new(self.inner.clone())
1897 }
1898
1899 /// Copy a Cloud Bigtable backup to a new backup in the destination cluster
1900 /// located in the destination instance and project.
1901 ///
1902 /// # Long running operations
1903 ///
1904 /// This method is used to start, and/or poll a [long-running Operation].
1905 /// The [Working with long-running operations] chapter in the [user guide]
1906 /// covers these operations in detail.
1907 ///
1908 /// [long-running operation]: https://google.aip.dev/151
1909 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1910 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1911 ///
1912 /// # Example
1913 /// ```
1914 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1915 /// use google_cloud_lro::Poller;
1916 /// use google_cloud_bigtable_admin_v2::Result;
1917 /// async fn sample(
1918 /// client: &BigtableTableAdmin
1919 /// ) -> Result<()> {
1920 /// let response = client.copy_backup()
1921 /// /* set fields */
1922 /// .poller().until_done().await?;
1923 /// println!("response {:?}", response);
1924 /// Ok(())
1925 /// }
1926 /// ```
1927 pub fn copy_backup(&self) -> super::builder::bigtable_table_admin::CopyBackup {
1928 super::builder::bigtable_table_admin::CopyBackup::new(self.inner.clone())
1929 }
1930
1931 /// Gets the access control policy for a Bigtable resource.
1932 /// Returns an empty policy if the resource exists but does not have a policy
1933 /// set.
1934 ///
1935 /// # Example
1936 /// ```
1937 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1938 /// use google_cloud_bigtable_admin_v2::Result;
1939 /// async fn sample(
1940 /// client: &BigtableTableAdmin
1941 /// ) -> Result<()> {
1942 /// let response = client.get_iam_policy()
1943 /// /* set fields */
1944 /// .send().await?;
1945 /// println!("response {:?}", response);
1946 /// Ok(())
1947 /// }
1948 /// ```
1949 pub fn get_iam_policy(&self) -> super::builder::bigtable_table_admin::GetIamPolicy {
1950 super::builder::bigtable_table_admin::GetIamPolicy::new(self.inner.clone())
1951 }
1952
1953 /// Sets the access control policy on a Bigtable resource.
1954 /// Replaces any existing policy.
1955 ///
1956 /// # Example
1957 /// ```
1958 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1959 /// use google_cloud_bigtable_admin_v2::Result;
1960 /// async fn sample(
1961 /// client: &BigtableTableAdmin
1962 /// ) -> Result<()> {
1963 /// let response = client.set_iam_policy()
1964 /// /* set fields */
1965 /// .send().await?;
1966 /// println!("response {:?}", response);
1967 /// Ok(())
1968 /// }
1969 /// ```
1970 pub fn set_iam_policy(&self) -> super::builder::bigtable_table_admin::SetIamPolicy {
1971 super::builder::bigtable_table_admin::SetIamPolicy::new(self.inner.clone())
1972 }
1973
1974 /// Returns permissions that the caller has on the specified Bigtable
1975 /// resource.
1976 ///
1977 /// # Example
1978 /// ```
1979 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
1980 /// use google_cloud_bigtable_admin_v2::Result;
1981 /// async fn sample(
1982 /// client: &BigtableTableAdmin
1983 /// ) -> Result<()> {
1984 /// let response = client.test_iam_permissions()
1985 /// /* set fields */
1986 /// .send().await?;
1987 /// println!("response {:?}", response);
1988 /// Ok(())
1989 /// }
1990 /// ```
1991 pub fn test_iam_permissions(&self) -> super::builder::bigtable_table_admin::TestIamPermissions {
1992 super::builder::bigtable_table_admin::TestIamPermissions::new(self.inner.clone())
1993 }
1994
1995 /// Creates a new schema bundle in the specified table.
1996 ///
1997 /// # Long running operations
1998 ///
1999 /// This method is used to start, and/or poll a [long-running Operation].
2000 /// The [Working with long-running operations] chapter in the [user guide]
2001 /// covers these operations in detail.
2002 ///
2003 /// [long-running operation]: https://google.aip.dev/151
2004 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2005 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2006 ///
2007 /// # Example
2008 /// ```
2009 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
2010 /// use google_cloud_lro::Poller;
2011 /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
2012 /// use google_cloud_bigtable_admin_v2::Result;
2013 /// async fn sample(
2014 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str
2015 /// ) -> Result<()> {
2016 /// let response = client.create_schema_bundle()
2017 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"))
2018 /// .set_schema_bundle(
2019 /// SchemaBundle::new()/* set fields */
2020 /// )
2021 /// .poller().until_done().await?;
2022 /// println!("response {:?}", response);
2023 /// Ok(())
2024 /// }
2025 /// ```
2026 pub fn create_schema_bundle(&self) -> super::builder::bigtable_table_admin::CreateSchemaBundle {
2027 super::builder::bigtable_table_admin::CreateSchemaBundle::new(self.inner.clone())
2028 }
2029
2030 /// Updates a schema bundle in the specified table.
2031 ///
2032 /// # Long running operations
2033 ///
2034 /// This method is used to start, and/or poll a [long-running Operation].
2035 /// The [Working with long-running operations] chapter in the [user guide]
2036 /// covers these operations in detail.
2037 ///
2038 /// [long-running operation]: https://google.aip.dev/151
2039 /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2040 /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2041 ///
2042 /// # Example
2043 /// ```
2044 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
2045 /// use google_cloud_lro::Poller;
2046 /// # extern crate wkt as google_cloud_wkt;
2047 /// use google_cloud_wkt::FieldMask;
2048 /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
2049 /// use google_cloud_bigtable_admin_v2::Result;
2050 /// async fn sample(
2051 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str, schema_bundle_id: &str
2052 /// ) -> Result<()> {
2053 /// let response = client.update_schema_bundle()
2054 /// .set_schema_bundle(
2055 /// SchemaBundle::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"))/* set fields */
2056 /// )
2057 /// .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
2058 /// .poller().until_done().await?;
2059 /// println!("response {:?}", response);
2060 /// Ok(())
2061 /// }
2062 /// ```
2063 pub fn update_schema_bundle(&self) -> super::builder::bigtable_table_admin::UpdateSchemaBundle {
2064 super::builder::bigtable_table_admin::UpdateSchemaBundle::new(self.inner.clone())
2065 }
2066
2067 /// Gets metadata information about the specified schema bundle.
2068 ///
2069 /// # Example
2070 /// ```
2071 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
2072 /// use google_cloud_bigtable_admin_v2::Result;
2073 /// async fn sample(
2074 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str, schema_bundle_id: &str
2075 /// ) -> Result<()> {
2076 /// let response = client.get_schema_bundle()
2077 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"))
2078 /// .send().await?;
2079 /// println!("response {:?}", response);
2080 /// Ok(())
2081 /// }
2082 /// ```
2083 pub fn get_schema_bundle(&self) -> super::builder::bigtable_table_admin::GetSchemaBundle {
2084 super::builder::bigtable_table_admin::GetSchemaBundle::new(self.inner.clone())
2085 }
2086
2087 /// Lists all schema bundles associated with the specified table.
2088 ///
2089 /// # Example
2090 /// ```
2091 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
2092 /// use google_cloud_gax::paginator::ItemPaginator as _;
2093 /// use google_cloud_bigtable_admin_v2::Result;
2094 /// async fn sample(
2095 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str
2096 /// ) -> Result<()> {
2097 /// let mut list = client.list_schema_bundles()
2098 /// .set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"))
2099 /// .by_item();
2100 /// while let Some(item) = list.next().await.transpose()? {
2101 /// println!("{:?}", item);
2102 /// }
2103 /// Ok(())
2104 /// }
2105 /// ```
2106 pub fn list_schema_bundles(&self) -> super::builder::bigtable_table_admin::ListSchemaBundles {
2107 super::builder::bigtable_table_admin::ListSchemaBundles::new(self.inner.clone())
2108 }
2109
2110 /// Deletes a schema bundle in the specified table.
2111 ///
2112 /// # Example
2113 /// ```
2114 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
2115 /// use google_cloud_bigtable_admin_v2::Result;
2116 /// async fn sample(
2117 /// client: &BigtableTableAdmin, project_id: &str, instance_id: &str, table_id: &str, schema_bundle_id: &str
2118 /// ) -> Result<()> {
2119 /// client.delete_schema_bundle()
2120 /// .set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"))
2121 /// .send().await?;
2122 /// Ok(())
2123 /// }
2124 /// ```
2125 pub fn delete_schema_bundle(&self) -> super::builder::bigtable_table_admin::DeleteSchemaBundle {
2126 super::builder::bigtable_table_admin::DeleteSchemaBundle::new(self.inner.clone())
2127 }
2128
2129 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2130 ///
2131 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2132 ///
2133 /// # Example
2134 /// ```
2135 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
2136 /// use google_cloud_gax::paginator::ItemPaginator as _;
2137 /// use google_cloud_bigtable_admin_v2::Result;
2138 /// async fn sample(
2139 /// client: &BigtableTableAdmin
2140 /// ) -> Result<()> {
2141 /// let mut list = client.list_operations()
2142 /// /* set fields */
2143 /// .by_item();
2144 /// while let Some(item) = list.next().await.transpose()? {
2145 /// println!("{:?}", item);
2146 /// }
2147 /// Ok(())
2148 /// }
2149 /// ```
2150 pub fn list_operations(&self) -> super::builder::bigtable_table_admin::ListOperations {
2151 super::builder::bigtable_table_admin::ListOperations::new(self.inner.clone())
2152 }
2153
2154 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2155 ///
2156 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2157 ///
2158 /// # Example
2159 /// ```
2160 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
2161 /// use google_cloud_bigtable_admin_v2::Result;
2162 /// async fn sample(
2163 /// client: &BigtableTableAdmin
2164 /// ) -> Result<()> {
2165 /// let response = client.get_operation()
2166 /// /* set fields */
2167 /// .send().await?;
2168 /// println!("response {:?}", response);
2169 /// Ok(())
2170 /// }
2171 /// ```
2172 pub fn get_operation(&self) -> super::builder::bigtable_table_admin::GetOperation {
2173 super::builder::bigtable_table_admin::GetOperation::new(self.inner.clone())
2174 }
2175
2176 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2177 ///
2178 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2179 ///
2180 /// # Example
2181 /// ```
2182 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
2183 /// use google_cloud_bigtable_admin_v2::Result;
2184 /// async fn sample(
2185 /// client: &BigtableTableAdmin
2186 /// ) -> Result<()> {
2187 /// client.delete_operation()
2188 /// /* set fields */
2189 /// .send().await?;
2190 /// Ok(())
2191 /// }
2192 /// ```
2193 pub fn delete_operation(&self) -> super::builder::bigtable_table_admin::DeleteOperation {
2194 super::builder::bigtable_table_admin::DeleteOperation::new(self.inner.clone())
2195 }
2196
2197 /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2198 ///
2199 /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2200 ///
2201 /// # Example
2202 /// ```
2203 /// # use google_cloud_bigtable_admin_v2::client::BigtableTableAdmin;
2204 /// use google_cloud_bigtable_admin_v2::Result;
2205 /// async fn sample(
2206 /// client: &BigtableTableAdmin
2207 /// ) -> Result<()> {
2208 /// client.cancel_operation()
2209 /// /* set fields */
2210 /// .send().await?;
2211 /// Ok(())
2212 /// }
2213 /// ```
2214 pub fn cancel_operation(&self) -> super::builder::bigtable_table_admin::CancelOperation {
2215 super::builder::bigtable_table_admin::CancelOperation::new(self.inner.clone())
2216 }
2217}