Skip to main content

google_cloud_bigtable_admin_v2/
model.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#![allow(rustdoc::bare_urls)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![allow(rustdoc::invalid_html_tags)]
20#![allow(rustdoc::redundant_explicit_links)]
21#![no_implicit_prelude]
22extern crate async_trait;
23extern crate bytes;
24extern crate gaxi;
25extern crate google_cloud_gax;
26extern crate google_cloud_iam_v1;
27extern crate google_cloud_longrunning;
28extern crate google_cloud_lro;
29extern crate google_cloud_rpc;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37mod debug;
38mod deserialize;
39mod serialize;
40
41/// Request message for BigtableInstanceAdmin.CreateInstance.
42#[derive(Clone, Default, PartialEq)]
43#[non_exhaustive]
44pub struct CreateInstanceRequest {
45    /// Required. The unique name of the project in which to create the new
46    /// instance. Values are of the form `projects/{project}`.
47    pub parent: std::string::String,
48
49    /// Required. The ID to be used when referring to the new instance within its
50    /// project, e.g., just `myinstance` rather than
51    /// `projects/myproject/instances/myinstance`.
52    pub instance_id: std::string::String,
53
54    /// Required. The instance to create.
55    /// Fields marked `OutputOnly` must be left blank.
56    pub instance: std::option::Option<crate::model::Instance>,
57
58    /// Required. The clusters to be created within the instance, mapped by desired
59    /// cluster ID, e.g., just `mycluster` rather than
60    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
61    /// Fields marked `OutputOnly` must be left blank.
62    pub clusters: std::collections::HashMap<std::string::String, crate::model::Cluster>,
63
64    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
65}
66
67impl CreateInstanceRequest {
68    /// Creates a new default instance.
69    pub fn new() -> Self {
70        std::default::Default::default()
71    }
72
73    /// Sets the value of [parent][crate::model::CreateInstanceRequest::parent].
74    ///
75    /// # Example
76    /// ```ignore,no_run
77    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
78    /// let x = CreateInstanceRequest::new().set_parent("example");
79    /// ```
80    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
81        self.parent = v.into();
82        self
83    }
84
85    /// Sets the value of [instance_id][crate::model::CreateInstanceRequest::instance_id].
86    ///
87    /// # Example
88    /// ```ignore,no_run
89    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
90    /// let x = CreateInstanceRequest::new().set_instance_id("example");
91    /// ```
92    pub fn set_instance_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
93        self.instance_id = v.into();
94        self
95    }
96
97    /// Sets the value of [instance][crate::model::CreateInstanceRequest::instance].
98    ///
99    /// # Example
100    /// ```ignore,no_run
101    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
102    /// use google_cloud_bigtable_admin_v2::model::Instance;
103    /// let x = CreateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
104    /// ```
105    pub fn set_instance<T>(mut self, v: T) -> Self
106    where
107        T: std::convert::Into<crate::model::Instance>,
108    {
109        self.instance = std::option::Option::Some(v.into());
110        self
111    }
112
113    /// Sets or clears the value of [instance][crate::model::CreateInstanceRequest::instance].
114    ///
115    /// # Example
116    /// ```ignore,no_run
117    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
118    /// use google_cloud_bigtable_admin_v2::model::Instance;
119    /// let x = CreateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
120    /// let x = CreateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
121    /// ```
122    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
123    where
124        T: std::convert::Into<crate::model::Instance>,
125    {
126        self.instance = v.map(|x| x.into());
127        self
128    }
129
130    /// Sets the value of [clusters][crate::model::CreateInstanceRequest::clusters].
131    ///
132    /// # Example
133    /// ```ignore,no_run
134    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
135    /// use google_cloud_bigtable_admin_v2::model::Cluster;
136    /// let x = CreateInstanceRequest::new().set_clusters([
137    ///     ("key0", Cluster::default()/* use setters */),
138    ///     ("key1", Cluster::default()/* use (different) setters */),
139    /// ]);
140    /// ```
141    pub fn set_clusters<T, K, V>(mut self, v: T) -> Self
142    where
143        T: std::iter::IntoIterator<Item = (K, V)>,
144        K: std::convert::Into<std::string::String>,
145        V: std::convert::Into<crate::model::Cluster>,
146    {
147        use std::iter::Iterator;
148        self.clusters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
149        self
150    }
151}
152
153impl wkt::message::Message for CreateInstanceRequest {
154    fn typename() -> &'static str {
155        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceRequest"
156    }
157}
158
159/// Request message for BigtableInstanceAdmin.GetInstance.
160#[derive(Clone, Default, PartialEq)]
161#[non_exhaustive]
162pub struct GetInstanceRequest {
163    /// Required. The unique name of the requested instance. Values are of the form
164    /// `projects/{project}/instances/{instance}`.
165    pub name: std::string::String,
166
167    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
168}
169
170impl GetInstanceRequest {
171    /// Creates a new default instance.
172    pub fn new() -> Self {
173        std::default::Default::default()
174    }
175
176    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
177    ///
178    /// # Example
179    /// ```ignore,no_run
180    /// # use google_cloud_bigtable_admin_v2::model::GetInstanceRequest;
181    /// # let project_id = "project_id";
182    /// # let instance_id = "instance_id";
183    /// let x = GetInstanceRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}"));
184    /// ```
185    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
186        self.name = v.into();
187        self
188    }
189}
190
191impl wkt::message::Message for GetInstanceRequest {
192    fn typename() -> &'static str {
193        "type.googleapis.com/google.bigtable.admin.v2.GetInstanceRequest"
194    }
195}
196
197/// Request message for BigtableInstanceAdmin.ListInstances.
198#[derive(Clone, Default, PartialEq)]
199#[non_exhaustive]
200pub struct ListInstancesRequest {
201    /// Required. The unique name of the project for which a list of instances is
202    /// requested. Values are of the form `projects/{project}`.
203    pub parent: std::string::String,
204
205    /// DEPRECATED: This field is unused and ignored.
206    pub page_token: std::string::String,
207
208    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
209}
210
211impl ListInstancesRequest {
212    /// Creates a new default instance.
213    pub fn new() -> Self {
214        std::default::Default::default()
215    }
216
217    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
218    ///
219    /// # Example
220    /// ```ignore,no_run
221    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
222    /// let x = ListInstancesRequest::new().set_parent("example");
223    /// ```
224    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
225        self.parent = v.into();
226        self
227    }
228
229    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
230    ///
231    /// # Example
232    /// ```ignore,no_run
233    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
234    /// let x = ListInstancesRequest::new().set_page_token("example");
235    /// ```
236    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
237        self.page_token = v.into();
238        self
239    }
240}
241
242impl wkt::message::Message for ListInstancesRequest {
243    fn typename() -> &'static str {
244        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesRequest"
245    }
246}
247
248/// Response message for BigtableInstanceAdmin.ListInstances.
249#[derive(Clone, Default, PartialEq)]
250#[non_exhaustive]
251pub struct ListInstancesResponse {
252    /// The list of requested instances.
253    pub instances: std::vec::Vec<crate::model::Instance>,
254
255    /// Locations from which Instance information could not be retrieved,
256    /// due to an outage or some other transient condition.
257    /// Instances whose Clusters are all in one of the failed locations
258    /// may be missing from `instances`, and Instances with at least one
259    /// Cluster in a failed location may only have partial information returned.
260    /// Values are of the form `projects/<project>/locations/<zone_id>`
261    pub failed_locations: std::vec::Vec<std::string::String>,
262
263    /// DEPRECATED: This field is unused and ignored.
264    pub next_page_token: std::string::String,
265
266    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
267}
268
269impl ListInstancesResponse {
270    /// Creates a new default instance.
271    pub fn new() -> Self {
272        std::default::Default::default()
273    }
274
275    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
276    ///
277    /// # Example
278    /// ```ignore,no_run
279    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
280    /// use google_cloud_bigtable_admin_v2::model::Instance;
281    /// let x = ListInstancesResponse::new()
282    ///     .set_instances([
283    ///         Instance::default()/* use setters */,
284    ///         Instance::default()/* use (different) setters */,
285    ///     ]);
286    /// ```
287    pub fn set_instances<T, V>(mut self, v: T) -> Self
288    where
289        T: std::iter::IntoIterator<Item = V>,
290        V: std::convert::Into<crate::model::Instance>,
291    {
292        use std::iter::Iterator;
293        self.instances = v.into_iter().map(|i| i.into()).collect();
294        self
295    }
296
297    /// Sets the value of [failed_locations][crate::model::ListInstancesResponse::failed_locations].
298    ///
299    /// # Example
300    /// ```ignore,no_run
301    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
302    /// let x = ListInstancesResponse::new().set_failed_locations(["a", "b", "c"]);
303    /// ```
304    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
305    where
306        T: std::iter::IntoIterator<Item = V>,
307        V: std::convert::Into<std::string::String>,
308    {
309        use std::iter::Iterator;
310        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
311        self
312    }
313
314    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
315    ///
316    /// # Example
317    /// ```ignore,no_run
318    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
319    /// let x = ListInstancesResponse::new().set_next_page_token("example");
320    /// ```
321    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
322        self.next_page_token = v.into();
323        self
324    }
325}
326
327impl wkt::message::Message for ListInstancesResponse {
328    fn typename() -> &'static str {
329        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesResponse"
330    }
331}
332
333/// Request message for BigtableInstanceAdmin.PartialUpdateInstance.
334#[derive(Clone, Default, PartialEq)]
335#[non_exhaustive]
336pub struct PartialUpdateInstanceRequest {
337    /// Required. The Instance which will (partially) replace the current value.
338    pub instance: std::option::Option<crate::model::Instance>,
339
340    /// Required. The subset of Instance fields which should be replaced.
341    /// Must be explicitly set.
342    pub update_mask: std::option::Option<wkt::FieldMask>,
343
344    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
345}
346
347impl PartialUpdateInstanceRequest {
348    /// Creates a new default instance.
349    pub fn new() -> Self {
350        std::default::Default::default()
351    }
352
353    /// Sets the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
354    ///
355    /// # Example
356    /// ```ignore,no_run
357    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
358    /// use google_cloud_bigtable_admin_v2::model::Instance;
359    /// let x = PartialUpdateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
360    /// ```
361    pub fn set_instance<T>(mut self, v: T) -> Self
362    where
363        T: std::convert::Into<crate::model::Instance>,
364    {
365        self.instance = std::option::Option::Some(v.into());
366        self
367    }
368
369    /// Sets or clears the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
370    ///
371    /// # Example
372    /// ```ignore,no_run
373    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
374    /// use google_cloud_bigtable_admin_v2::model::Instance;
375    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
376    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
377    /// ```
378    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
379    where
380        T: std::convert::Into<crate::model::Instance>,
381    {
382        self.instance = v.map(|x| x.into());
383        self
384    }
385
386    /// Sets the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
387    ///
388    /// # Example
389    /// ```ignore,no_run
390    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
391    /// use wkt::FieldMask;
392    /// let x = PartialUpdateInstanceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
393    /// ```
394    pub fn set_update_mask<T>(mut self, v: T) -> Self
395    where
396        T: std::convert::Into<wkt::FieldMask>,
397    {
398        self.update_mask = std::option::Option::Some(v.into());
399        self
400    }
401
402    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
403    ///
404    /// # Example
405    /// ```ignore,no_run
406    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
407    /// use wkt::FieldMask;
408    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
409    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
410    /// ```
411    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
412    where
413        T: std::convert::Into<wkt::FieldMask>,
414    {
415        self.update_mask = v.map(|x| x.into());
416        self
417    }
418}
419
420impl wkt::message::Message for PartialUpdateInstanceRequest {
421    fn typename() -> &'static str {
422        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateInstanceRequest"
423    }
424}
425
426/// Request message for BigtableInstanceAdmin.DeleteInstance.
427#[derive(Clone, Default, PartialEq)]
428#[non_exhaustive]
429pub struct DeleteInstanceRequest {
430    /// Required. The unique name of the instance to be deleted.
431    /// Values are of the form `projects/{project}/instances/{instance}`.
432    pub name: std::string::String,
433
434    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
435}
436
437impl DeleteInstanceRequest {
438    /// Creates a new default instance.
439    pub fn new() -> Self {
440        std::default::Default::default()
441    }
442
443    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
444    ///
445    /// # Example
446    /// ```ignore,no_run
447    /// # use google_cloud_bigtable_admin_v2::model::DeleteInstanceRequest;
448    /// # let project_id = "project_id";
449    /// # let instance_id = "instance_id";
450    /// let x = DeleteInstanceRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}"));
451    /// ```
452    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
453        self.name = v.into();
454        self
455    }
456}
457
458impl wkt::message::Message for DeleteInstanceRequest {
459    fn typename() -> &'static str {
460        "type.googleapis.com/google.bigtable.admin.v2.DeleteInstanceRequest"
461    }
462}
463
464/// Request message for BigtableInstanceAdmin.CreateCluster.
465#[derive(Clone, Default, PartialEq)]
466#[non_exhaustive]
467pub struct CreateClusterRequest {
468    /// Required. The unique name of the instance in which to create the new
469    /// cluster. Values are of the form `projects/{project}/instances/{instance}`.
470    pub parent: std::string::String,
471
472    /// Required. The ID to be used when referring to the new cluster within its
473    /// instance, e.g., just `mycluster` rather than
474    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
475    pub cluster_id: std::string::String,
476
477    /// Required. The cluster to be created.
478    /// Fields marked `OutputOnly` must be left blank.
479    pub cluster: std::option::Option<crate::model::Cluster>,
480
481    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
482}
483
484impl CreateClusterRequest {
485    /// Creates a new default instance.
486    pub fn new() -> Self {
487        std::default::Default::default()
488    }
489
490    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
491    ///
492    /// # Example
493    /// ```ignore,no_run
494    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
495    /// # let project_id = "project_id";
496    /// # let instance_id = "instance_id";
497    /// let x = CreateClusterRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
498    /// ```
499    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
500        self.parent = v.into();
501        self
502    }
503
504    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
505    ///
506    /// # Example
507    /// ```ignore,no_run
508    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
509    /// let x = CreateClusterRequest::new().set_cluster_id("example");
510    /// ```
511    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
512        self.cluster_id = v.into();
513        self
514    }
515
516    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
517    ///
518    /// # Example
519    /// ```ignore,no_run
520    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
521    /// use google_cloud_bigtable_admin_v2::model::Cluster;
522    /// let x = CreateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
523    /// ```
524    pub fn set_cluster<T>(mut self, v: T) -> Self
525    where
526        T: std::convert::Into<crate::model::Cluster>,
527    {
528        self.cluster = std::option::Option::Some(v.into());
529        self
530    }
531
532    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
533    ///
534    /// # Example
535    /// ```ignore,no_run
536    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
537    /// use google_cloud_bigtable_admin_v2::model::Cluster;
538    /// let x = CreateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
539    /// let x = CreateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
540    /// ```
541    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
542    where
543        T: std::convert::Into<crate::model::Cluster>,
544    {
545        self.cluster = v.map(|x| x.into());
546        self
547    }
548}
549
550impl wkt::message::Message for CreateClusterRequest {
551    fn typename() -> &'static str {
552        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterRequest"
553    }
554}
555
556/// Request message for BigtableInstanceAdmin.GetCluster.
557#[derive(Clone, Default, PartialEq)]
558#[non_exhaustive]
559pub struct GetClusterRequest {
560    /// Required. The unique name of the requested cluster. Values are of the form
561    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
562    pub name: std::string::String,
563
564    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
565}
566
567impl GetClusterRequest {
568    /// Creates a new default instance.
569    pub fn new() -> Self {
570        std::default::Default::default()
571    }
572
573    /// Sets the value of [name][crate::model::GetClusterRequest::name].
574    ///
575    /// # Example
576    /// ```ignore,no_run
577    /// # use google_cloud_bigtable_admin_v2::model::GetClusterRequest;
578    /// # let project_id = "project_id";
579    /// # let instance_id = "instance_id";
580    /// # let cluster_id = "cluster_id";
581    /// let x = GetClusterRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
582    /// ```
583    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
584        self.name = v.into();
585        self
586    }
587}
588
589impl wkt::message::Message for GetClusterRequest {
590    fn typename() -> &'static str {
591        "type.googleapis.com/google.bigtable.admin.v2.GetClusterRequest"
592    }
593}
594
595/// Request message for BigtableInstanceAdmin.ListClusters.
596#[derive(Clone, Default, PartialEq)]
597#[non_exhaustive]
598pub struct ListClustersRequest {
599    /// Required. The unique name of the instance for which a list of clusters is
600    /// requested. Values are of the form
601    /// `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list
602    /// Clusters for all Instances in a project, e.g.,
603    /// `projects/myproject/instances/-`.
604    pub parent: std::string::String,
605
606    /// DEPRECATED: This field is unused and ignored.
607    pub page_token: std::string::String,
608
609    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
610}
611
612impl ListClustersRequest {
613    /// Creates a new default instance.
614    pub fn new() -> Self {
615        std::default::Default::default()
616    }
617
618    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
619    ///
620    /// # Example
621    /// ```ignore,no_run
622    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
623    /// # let project_id = "project_id";
624    /// # let instance_id = "instance_id";
625    /// let x = ListClustersRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
626    /// ```
627    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
628        self.parent = v.into();
629        self
630    }
631
632    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
633    ///
634    /// # Example
635    /// ```ignore,no_run
636    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
637    /// let x = ListClustersRequest::new().set_page_token("example");
638    /// ```
639    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
640        self.page_token = v.into();
641        self
642    }
643}
644
645impl wkt::message::Message for ListClustersRequest {
646    fn typename() -> &'static str {
647        "type.googleapis.com/google.bigtable.admin.v2.ListClustersRequest"
648    }
649}
650
651/// Response message for BigtableInstanceAdmin.ListClusters.
652#[derive(Clone, Default, PartialEq)]
653#[non_exhaustive]
654pub struct ListClustersResponse {
655    /// The list of requested clusters.
656    pub clusters: std::vec::Vec<crate::model::Cluster>,
657
658    /// Locations from which Cluster information could not be retrieved,
659    /// due to an outage or some other transient condition.
660    /// Clusters from these locations may be missing from `clusters`,
661    /// or may only have partial information returned.
662    /// Values are of the form `projects/<project>/locations/<zone_id>`
663    pub failed_locations: std::vec::Vec<std::string::String>,
664
665    /// DEPRECATED: This field is unused and ignored.
666    pub next_page_token: std::string::String,
667
668    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
669}
670
671impl ListClustersResponse {
672    /// Creates a new default instance.
673    pub fn new() -> Self {
674        std::default::Default::default()
675    }
676
677    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
678    ///
679    /// # Example
680    /// ```ignore,no_run
681    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
682    /// use google_cloud_bigtable_admin_v2::model::Cluster;
683    /// let x = ListClustersResponse::new()
684    ///     .set_clusters([
685    ///         Cluster::default()/* use setters */,
686    ///         Cluster::default()/* use (different) setters */,
687    ///     ]);
688    /// ```
689    pub fn set_clusters<T, V>(mut self, v: T) -> Self
690    where
691        T: std::iter::IntoIterator<Item = V>,
692        V: std::convert::Into<crate::model::Cluster>,
693    {
694        use std::iter::Iterator;
695        self.clusters = v.into_iter().map(|i| i.into()).collect();
696        self
697    }
698
699    /// Sets the value of [failed_locations][crate::model::ListClustersResponse::failed_locations].
700    ///
701    /// # Example
702    /// ```ignore,no_run
703    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
704    /// let x = ListClustersResponse::new().set_failed_locations(["a", "b", "c"]);
705    /// ```
706    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
707    where
708        T: std::iter::IntoIterator<Item = V>,
709        V: std::convert::Into<std::string::String>,
710    {
711        use std::iter::Iterator;
712        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
713        self
714    }
715
716    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
717    ///
718    /// # Example
719    /// ```ignore,no_run
720    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
721    /// let x = ListClustersResponse::new().set_next_page_token("example");
722    /// ```
723    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
724        self.next_page_token = v.into();
725        self
726    }
727}
728
729impl wkt::message::Message for ListClustersResponse {
730    fn typename() -> &'static str {
731        "type.googleapis.com/google.bigtable.admin.v2.ListClustersResponse"
732    }
733}
734
735/// Request message for BigtableInstanceAdmin.DeleteCluster.
736#[derive(Clone, Default, PartialEq)]
737#[non_exhaustive]
738pub struct DeleteClusterRequest {
739    /// Required. The unique name of the cluster to be deleted. Values are of the
740    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
741    pub name: std::string::String,
742
743    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
744}
745
746impl DeleteClusterRequest {
747    /// Creates a new default instance.
748    pub fn new() -> Self {
749        std::default::Default::default()
750    }
751
752    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
753    ///
754    /// # Example
755    /// ```ignore,no_run
756    /// # use google_cloud_bigtable_admin_v2::model::DeleteClusterRequest;
757    /// # let project_id = "project_id";
758    /// # let instance_id = "instance_id";
759    /// # let cluster_id = "cluster_id";
760    /// let x = DeleteClusterRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
761    /// ```
762    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
763        self.name = v.into();
764        self
765    }
766}
767
768impl wkt::message::Message for DeleteClusterRequest {
769    fn typename() -> &'static str {
770        "type.googleapis.com/google.bigtable.admin.v2.DeleteClusterRequest"
771    }
772}
773
774/// The metadata for the Operation returned by CreateInstance.
775#[derive(Clone, Default, PartialEq)]
776#[non_exhaustive]
777pub struct CreateInstanceMetadata {
778    /// The request that prompted the initiation of this CreateInstance operation.
779    pub original_request: std::option::Option<crate::model::CreateInstanceRequest>,
780
781    /// The time at which the original request was received.
782    pub request_time: std::option::Option<wkt::Timestamp>,
783
784    /// The time at which the operation failed or was completed successfully.
785    pub finish_time: std::option::Option<wkt::Timestamp>,
786
787    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
788}
789
790impl CreateInstanceMetadata {
791    /// Creates a new default instance.
792    pub fn new() -> Self {
793        std::default::Default::default()
794    }
795
796    /// Sets the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
797    ///
798    /// # Example
799    /// ```ignore,no_run
800    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
801    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
802    /// let x = CreateInstanceMetadata::new().set_original_request(CreateInstanceRequest::default()/* use setters */);
803    /// ```
804    pub fn set_original_request<T>(mut self, v: T) -> Self
805    where
806        T: std::convert::Into<crate::model::CreateInstanceRequest>,
807    {
808        self.original_request = std::option::Option::Some(v.into());
809        self
810    }
811
812    /// Sets or clears the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
813    ///
814    /// # Example
815    /// ```ignore,no_run
816    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
817    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
818    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(Some(CreateInstanceRequest::default()/* use setters */));
819    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(None::<CreateInstanceRequest>);
820    /// ```
821    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
822    where
823        T: std::convert::Into<crate::model::CreateInstanceRequest>,
824    {
825        self.original_request = v.map(|x| x.into());
826        self
827    }
828
829    /// Sets the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
830    ///
831    /// # Example
832    /// ```ignore,no_run
833    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
834    /// use wkt::Timestamp;
835    /// let x = CreateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
836    /// ```
837    pub fn set_request_time<T>(mut self, v: T) -> Self
838    where
839        T: std::convert::Into<wkt::Timestamp>,
840    {
841        self.request_time = std::option::Option::Some(v.into());
842        self
843    }
844
845    /// Sets or clears the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
846    ///
847    /// # Example
848    /// ```ignore,no_run
849    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
850    /// use wkt::Timestamp;
851    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
852    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
853    /// ```
854    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
855    where
856        T: std::convert::Into<wkt::Timestamp>,
857    {
858        self.request_time = v.map(|x| x.into());
859        self
860    }
861
862    /// Sets the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
863    ///
864    /// # Example
865    /// ```ignore,no_run
866    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
867    /// use wkt::Timestamp;
868    /// let x = CreateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
869    /// ```
870    pub fn set_finish_time<T>(mut self, v: T) -> Self
871    where
872        T: std::convert::Into<wkt::Timestamp>,
873    {
874        self.finish_time = std::option::Option::Some(v.into());
875        self
876    }
877
878    /// Sets or clears the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
879    ///
880    /// # Example
881    /// ```ignore,no_run
882    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
883    /// use wkt::Timestamp;
884    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
885    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
886    /// ```
887    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
888    where
889        T: std::convert::Into<wkt::Timestamp>,
890    {
891        self.finish_time = v.map(|x| x.into());
892        self
893    }
894}
895
896impl wkt::message::Message for CreateInstanceMetadata {
897    fn typename() -> &'static str {
898        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceMetadata"
899    }
900}
901
902/// The metadata for the Operation returned by UpdateInstance.
903#[derive(Clone, Default, PartialEq)]
904#[non_exhaustive]
905pub struct UpdateInstanceMetadata {
906    /// The request that prompted the initiation of this UpdateInstance operation.
907    pub original_request: std::option::Option<crate::model::PartialUpdateInstanceRequest>,
908
909    /// The time at which the original request was received.
910    pub request_time: std::option::Option<wkt::Timestamp>,
911
912    /// The time at which the operation failed or was completed successfully.
913    pub finish_time: std::option::Option<wkt::Timestamp>,
914
915    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
916}
917
918impl UpdateInstanceMetadata {
919    /// Creates a new default instance.
920    pub fn new() -> Self {
921        std::default::Default::default()
922    }
923
924    /// Sets the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
925    ///
926    /// # Example
927    /// ```ignore,no_run
928    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
929    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
930    /// let x = UpdateInstanceMetadata::new().set_original_request(PartialUpdateInstanceRequest::default()/* use setters */);
931    /// ```
932    pub fn set_original_request<T>(mut self, v: T) -> Self
933    where
934        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
935    {
936        self.original_request = std::option::Option::Some(v.into());
937        self
938    }
939
940    /// Sets or clears the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
941    ///
942    /// # Example
943    /// ```ignore,no_run
944    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
945    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
946    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(Some(PartialUpdateInstanceRequest::default()/* use setters */));
947    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(None::<PartialUpdateInstanceRequest>);
948    /// ```
949    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
950    where
951        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
952    {
953        self.original_request = v.map(|x| x.into());
954        self
955    }
956
957    /// Sets the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
958    ///
959    /// # Example
960    /// ```ignore,no_run
961    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
962    /// use wkt::Timestamp;
963    /// let x = UpdateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
964    /// ```
965    pub fn set_request_time<T>(mut self, v: T) -> Self
966    where
967        T: std::convert::Into<wkt::Timestamp>,
968    {
969        self.request_time = std::option::Option::Some(v.into());
970        self
971    }
972
973    /// Sets or clears the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
974    ///
975    /// # Example
976    /// ```ignore,no_run
977    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
978    /// use wkt::Timestamp;
979    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
980    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
981    /// ```
982    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
983    where
984        T: std::convert::Into<wkt::Timestamp>,
985    {
986        self.request_time = v.map(|x| x.into());
987        self
988    }
989
990    /// Sets the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
991    ///
992    /// # Example
993    /// ```ignore,no_run
994    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
995    /// use wkt::Timestamp;
996    /// let x = UpdateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
997    /// ```
998    pub fn set_finish_time<T>(mut self, v: T) -> Self
999    where
1000        T: std::convert::Into<wkt::Timestamp>,
1001    {
1002        self.finish_time = std::option::Option::Some(v.into());
1003        self
1004    }
1005
1006    /// Sets or clears the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
1007    ///
1008    /// # Example
1009    /// ```ignore,no_run
1010    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
1011    /// use wkt::Timestamp;
1012    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1013    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1014    /// ```
1015    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1016    where
1017        T: std::convert::Into<wkt::Timestamp>,
1018    {
1019        self.finish_time = v.map(|x| x.into());
1020        self
1021    }
1022}
1023
1024impl wkt::message::Message for UpdateInstanceMetadata {
1025    fn typename() -> &'static str {
1026        "type.googleapis.com/google.bigtable.admin.v2.UpdateInstanceMetadata"
1027    }
1028}
1029
1030/// The metadata for the Operation returned by CreateCluster.
1031#[derive(Clone, Default, PartialEq)]
1032#[non_exhaustive]
1033pub struct CreateClusterMetadata {
1034    /// The request that prompted the initiation of this CreateCluster operation.
1035    pub original_request: std::option::Option<crate::model::CreateClusterRequest>,
1036
1037    /// The time at which the original request was received.
1038    pub request_time: std::option::Option<wkt::Timestamp>,
1039
1040    /// The time at which the operation failed or was completed successfully.
1041    pub finish_time: std::option::Option<wkt::Timestamp>,
1042
1043    /// Keys: the full `name` of each table that existed in the instance when
1044    /// CreateCluster was first called, i.e.
1045    /// `projects/<project>/instances/<instance>/tables/<table>`. Any table added
1046    /// to the instance by a later API call will be created in the new cluster by
1047    /// that API call, not this one.
1048    ///
1049    /// Values: information on how much of a table's data has been copied to the
1050    /// newly-created cluster so far.
1051    pub tables: std::collections::HashMap<
1052        std::string::String,
1053        crate::model::create_cluster_metadata::TableProgress,
1054    >,
1055
1056    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1057}
1058
1059impl CreateClusterMetadata {
1060    /// Creates a new default instance.
1061    pub fn new() -> Self {
1062        std::default::Default::default()
1063    }
1064
1065    /// Sets the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1066    ///
1067    /// # Example
1068    /// ```ignore,no_run
1069    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1070    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1071    /// let x = CreateClusterMetadata::new().set_original_request(CreateClusterRequest::default()/* use setters */);
1072    /// ```
1073    pub fn set_original_request<T>(mut self, v: T) -> Self
1074    where
1075        T: std::convert::Into<crate::model::CreateClusterRequest>,
1076    {
1077        self.original_request = std::option::Option::Some(v.into());
1078        self
1079    }
1080
1081    /// Sets or clears the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1082    ///
1083    /// # Example
1084    /// ```ignore,no_run
1085    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1086    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1087    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(Some(CreateClusterRequest::default()/* use setters */));
1088    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(None::<CreateClusterRequest>);
1089    /// ```
1090    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1091    where
1092        T: std::convert::Into<crate::model::CreateClusterRequest>,
1093    {
1094        self.original_request = v.map(|x| x.into());
1095        self
1096    }
1097
1098    /// Sets the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1099    ///
1100    /// # Example
1101    /// ```ignore,no_run
1102    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1103    /// use wkt::Timestamp;
1104    /// let x = CreateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1105    /// ```
1106    pub fn set_request_time<T>(mut self, v: T) -> Self
1107    where
1108        T: std::convert::Into<wkt::Timestamp>,
1109    {
1110        self.request_time = std::option::Option::Some(v.into());
1111        self
1112    }
1113
1114    /// Sets or clears the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1115    ///
1116    /// # Example
1117    /// ```ignore,no_run
1118    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1119    /// use wkt::Timestamp;
1120    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1121    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1122    /// ```
1123    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1124    where
1125        T: std::convert::Into<wkt::Timestamp>,
1126    {
1127        self.request_time = v.map(|x| x.into());
1128        self
1129    }
1130
1131    /// Sets the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1132    ///
1133    /// # Example
1134    /// ```ignore,no_run
1135    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1136    /// use wkt::Timestamp;
1137    /// let x = CreateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1138    /// ```
1139    pub fn set_finish_time<T>(mut self, v: T) -> Self
1140    where
1141        T: std::convert::Into<wkt::Timestamp>,
1142    {
1143        self.finish_time = std::option::Option::Some(v.into());
1144        self
1145    }
1146
1147    /// Sets or clears the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1148    ///
1149    /// # Example
1150    /// ```ignore,no_run
1151    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1152    /// use wkt::Timestamp;
1153    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1154    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1155    /// ```
1156    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1157    where
1158        T: std::convert::Into<wkt::Timestamp>,
1159    {
1160        self.finish_time = v.map(|x| x.into());
1161        self
1162    }
1163
1164    /// Sets the value of [tables][crate::model::CreateClusterMetadata::tables].
1165    ///
1166    /// # Example
1167    /// ```ignore,no_run
1168    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1169    /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1170    /// let x = CreateClusterMetadata::new().set_tables([
1171    ///     ("key0", TableProgress::default()/* use setters */),
1172    ///     ("key1", TableProgress::default()/* use (different) setters */),
1173    /// ]);
1174    /// ```
1175    pub fn set_tables<T, K, V>(mut self, v: T) -> Self
1176    where
1177        T: std::iter::IntoIterator<Item = (K, V)>,
1178        K: std::convert::Into<std::string::String>,
1179        V: std::convert::Into<crate::model::create_cluster_metadata::TableProgress>,
1180    {
1181        use std::iter::Iterator;
1182        self.tables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1183        self
1184    }
1185}
1186
1187impl wkt::message::Message for CreateClusterMetadata {
1188    fn typename() -> &'static str {
1189        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata"
1190    }
1191}
1192
1193/// Defines additional types related to [CreateClusterMetadata].
1194pub mod create_cluster_metadata {
1195    #[allow(unused_imports)]
1196    use super::*;
1197
1198    /// Progress info for copying a table's data to the new cluster.
1199    #[derive(Clone, Default, PartialEq)]
1200    #[non_exhaustive]
1201    pub struct TableProgress {
1202        /// Estimate of the size of the table to be copied.
1203        pub estimated_size_bytes: i64,
1204
1205        /// Estimate of the number of bytes copied so far for this table.
1206        /// This will eventually reach 'estimated_size_bytes' unless the table copy
1207        /// is CANCELLED.
1208        pub estimated_copied_bytes: i64,
1209
1210        #[allow(missing_docs)]
1211        pub state: crate::model::create_cluster_metadata::table_progress::State,
1212
1213        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1214    }
1215
1216    impl TableProgress {
1217        /// Creates a new default instance.
1218        pub fn new() -> Self {
1219            std::default::Default::default()
1220        }
1221
1222        /// Sets the value of [estimated_size_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_size_bytes].
1223        ///
1224        /// # Example
1225        /// ```ignore,no_run
1226        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1227        /// let x = TableProgress::new().set_estimated_size_bytes(42);
1228        /// ```
1229        pub fn set_estimated_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1230            self.estimated_size_bytes = v.into();
1231            self
1232        }
1233
1234        /// Sets the value of [estimated_copied_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_copied_bytes].
1235        ///
1236        /// # Example
1237        /// ```ignore,no_run
1238        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1239        /// let x = TableProgress::new().set_estimated_copied_bytes(42);
1240        /// ```
1241        pub fn set_estimated_copied_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1242            self.estimated_copied_bytes = v.into();
1243            self
1244        }
1245
1246        /// Sets the value of [state][crate::model::create_cluster_metadata::TableProgress::state].
1247        ///
1248        /// # Example
1249        /// ```ignore,no_run
1250        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1251        /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::table_progress::State;
1252        /// let x0 = TableProgress::new().set_state(State::Pending);
1253        /// let x1 = TableProgress::new().set_state(State::Copying);
1254        /// let x2 = TableProgress::new().set_state(State::Completed);
1255        /// ```
1256        pub fn set_state<
1257            T: std::convert::Into<crate::model::create_cluster_metadata::table_progress::State>,
1258        >(
1259            mut self,
1260            v: T,
1261        ) -> Self {
1262            self.state = v.into();
1263            self
1264        }
1265    }
1266
1267    impl wkt::message::Message for TableProgress {
1268        fn typename() -> &'static str {
1269            "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata.TableProgress"
1270        }
1271    }
1272
1273    /// Defines additional types related to [TableProgress].
1274    pub mod table_progress {
1275        #[allow(unused_imports)]
1276        use super::*;
1277
1278        /// Enum for [State].
1279        ///
1280        /// # Working with unknown values
1281        ///
1282        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1283        /// additional enum variants at any time. Adding new variants is not considered
1284        /// a breaking change. Applications should write their code in anticipation of:
1285        ///
1286        /// - New values appearing in future releases of the client library, **and**
1287        /// - New values received dynamically, without application changes.
1288        ///
1289        /// Please consult the [Working with enums] section in the user guide for some
1290        /// guidelines.
1291        ///
1292        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1293        #[derive(Clone, Debug, PartialEq)]
1294        #[non_exhaustive]
1295        pub enum State {
1296            #[allow(missing_docs)]
1297            Unspecified,
1298            /// The table has not yet begun copying to the new cluster.
1299            Pending,
1300            /// The table is actively being copied to the new cluster.
1301            Copying,
1302            /// The table has been fully copied to the new cluster.
1303            Completed,
1304            /// The table was deleted before it finished copying to the new cluster.
1305            /// Note that tables deleted after completion will stay marked as
1306            /// COMPLETED, not CANCELLED.
1307            Cancelled,
1308            /// If set, the enum was initialized with an unknown value.
1309            ///
1310            /// Applications can examine the value using [State::value] or
1311            /// [State::name].
1312            UnknownValue(state::UnknownValue),
1313        }
1314
1315        #[doc(hidden)]
1316        pub mod state {
1317            #[allow(unused_imports)]
1318            use super::*;
1319            #[derive(Clone, Debug, PartialEq)]
1320            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1321        }
1322
1323        impl State {
1324            /// Gets the enum value.
1325            ///
1326            /// Returns `None` if the enum contains an unknown value deserialized from
1327            /// the string representation of enums.
1328            pub fn value(&self) -> std::option::Option<i32> {
1329                match self {
1330                    Self::Unspecified => std::option::Option::Some(0),
1331                    Self::Pending => std::option::Option::Some(1),
1332                    Self::Copying => std::option::Option::Some(2),
1333                    Self::Completed => std::option::Option::Some(3),
1334                    Self::Cancelled => std::option::Option::Some(4),
1335                    Self::UnknownValue(u) => u.0.value(),
1336                }
1337            }
1338
1339            /// Gets the enum value as a string.
1340            ///
1341            /// Returns `None` if the enum contains an unknown value deserialized from
1342            /// the integer representation of enums.
1343            pub fn name(&self) -> std::option::Option<&str> {
1344                match self {
1345                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1346                    Self::Pending => std::option::Option::Some("PENDING"),
1347                    Self::Copying => std::option::Option::Some("COPYING"),
1348                    Self::Completed => std::option::Option::Some("COMPLETED"),
1349                    Self::Cancelled => std::option::Option::Some("CANCELLED"),
1350                    Self::UnknownValue(u) => u.0.name(),
1351                }
1352            }
1353        }
1354
1355        impl std::default::Default for State {
1356            fn default() -> Self {
1357                use std::convert::From;
1358                Self::from(0)
1359            }
1360        }
1361
1362        impl std::fmt::Display for State {
1363            fn fmt(
1364                &self,
1365                f: &mut std::fmt::Formatter<'_>,
1366            ) -> std::result::Result<(), std::fmt::Error> {
1367                wkt::internal::display_enum(f, self.name(), self.value())
1368            }
1369        }
1370
1371        impl std::convert::From<i32> for State {
1372            fn from(value: i32) -> Self {
1373                match value {
1374                    0 => Self::Unspecified,
1375                    1 => Self::Pending,
1376                    2 => Self::Copying,
1377                    3 => Self::Completed,
1378                    4 => Self::Cancelled,
1379                    _ => Self::UnknownValue(state::UnknownValue(
1380                        wkt::internal::UnknownEnumValue::Integer(value),
1381                    )),
1382                }
1383            }
1384        }
1385
1386        impl std::convert::From<&str> for State {
1387            fn from(value: &str) -> Self {
1388                use std::string::ToString;
1389                match value {
1390                    "STATE_UNSPECIFIED" => Self::Unspecified,
1391                    "PENDING" => Self::Pending,
1392                    "COPYING" => Self::Copying,
1393                    "COMPLETED" => Self::Completed,
1394                    "CANCELLED" => Self::Cancelled,
1395                    _ => Self::UnknownValue(state::UnknownValue(
1396                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1397                    )),
1398                }
1399            }
1400        }
1401
1402        impl serde::ser::Serialize for State {
1403            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1404            where
1405                S: serde::Serializer,
1406            {
1407                match self {
1408                    Self::Unspecified => serializer.serialize_i32(0),
1409                    Self::Pending => serializer.serialize_i32(1),
1410                    Self::Copying => serializer.serialize_i32(2),
1411                    Self::Completed => serializer.serialize_i32(3),
1412                    Self::Cancelled => serializer.serialize_i32(4),
1413                    Self::UnknownValue(u) => u.0.serialize(serializer),
1414                }
1415            }
1416        }
1417
1418        impl<'de> serde::de::Deserialize<'de> for State {
1419            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1420            where
1421                D: serde::Deserializer<'de>,
1422            {
1423                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1424                    ".google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State",
1425                ))
1426            }
1427        }
1428    }
1429}
1430
1431/// The metadata for the Operation returned by UpdateCluster.
1432#[derive(Clone, Default, PartialEq)]
1433#[non_exhaustive]
1434pub struct UpdateClusterMetadata {
1435    /// The request that prompted the initiation of this UpdateCluster operation.
1436    pub original_request: std::option::Option<crate::model::Cluster>,
1437
1438    /// The time at which the original request was received.
1439    pub request_time: std::option::Option<wkt::Timestamp>,
1440
1441    /// The time at which the operation failed or was completed successfully.
1442    pub finish_time: std::option::Option<wkt::Timestamp>,
1443
1444    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1445}
1446
1447impl UpdateClusterMetadata {
1448    /// Creates a new default instance.
1449    pub fn new() -> Self {
1450        std::default::Default::default()
1451    }
1452
1453    /// Sets the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1454    ///
1455    /// # Example
1456    /// ```ignore,no_run
1457    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1458    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1459    /// let x = UpdateClusterMetadata::new().set_original_request(Cluster::default()/* use setters */);
1460    /// ```
1461    pub fn set_original_request<T>(mut self, v: T) -> Self
1462    where
1463        T: std::convert::Into<crate::model::Cluster>,
1464    {
1465        self.original_request = std::option::Option::Some(v.into());
1466        self
1467    }
1468
1469    /// Sets or clears the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1470    ///
1471    /// # Example
1472    /// ```ignore,no_run
1473    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1474    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1475    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(Some(Cluster::default()/* use setters */));
1476    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(None::<Cluster>);
1477    /// ```
1478    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1479    where
1480        T: std::convert::Into<crate::model::Cluster>,
1481    {
1482        self.original_request = v.map(|x| x.into());
1483        self
1484    }
1485
1486    /// Sets the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1487    ///
1488    /// # Example
1489    /// ```ignore,no_run
1490    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1491    /// use wkt::Timestamp;
1492    /// let x = UpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1493    /// ```
1494    pub fn set_request_time<T>(mut self, v: T) -> Self
1495    where
1496        T: std::convert::Into<wkt::Timestamp>,
1497    {
1498        self.request_time = std::option::Option::Some(v.into());
1499        self
1500    }
1501
1502    /// Sets or clears the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1503    ///
1504    /// # Example
1505    /// ```ignore,no_run
1506    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1507    /// use wkt::Timestamp;
1508    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1509    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1510    /// ```
1511    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1512    where
1513        T: std::convert::Into<wkt::Timestamp>,
1514    {
1515        self.request_time = v.map(|x| x.into());
1516        self
1517    }
1518
1519    /// Sets the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1520    ///
1521    /// # Example
1522    /// ```ignore,no_run
1523    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1524    /// use wkt::Timestamp;
1525    /// let x = UpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1526    /// ```
1527    pub fn set_finish_time<T>(mut self, v: T) -> Self
1528    where
1529        T: std::convert::Into<wkt::Timestamp>,
1530    {
1531        self.finish_time = std::option::Option::Some(v.into());
1532        self
1533    }
1534
1535    /// Sets or clears the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1536    ///
1537    /// # Example
1538    /// ```ignore,no_run
1539    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1540    /// use wkt::Timestamp;
1541    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1542    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1543    /// ```
1544    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1545    where
1546        T: std::convert::Into<wkt::Timestamp>,
1547    {
1548        self.finish_time = v.map(|x| x.into());
1549        self
1550    }
1551}
1552
1553impl wkt::message::Message for UpdateClusterMetadata {
1554    fn typename() -> &'static str {
1555        "type.googleapis.com/google.bigtable.admin.v2.UpdateClusterMetadata"
1556    }
1557}
1558
1559/// The metadata for the Operation returned by PartialUpdateCluster.
1560#[derive(Clone, Default, PartialEq)]
1561#[non_exhaustive]
1562pub struct PartialUpdateClusterMetadata {
1563    /// The time at which the original request was received.
1564    pub request_time: std::option::Option<wkt::Timestamp>,
1565
1566    /// The time at which the operation failed or was completed successfully.
1567    pub finish_time: std::option::Option<wkt::Timestamp>,
1568
1569    /// The original request for PartialUpdateCluster.
1570    pub original_request: std::option::Option<crate::model::PartialUpdateClusterRequest>,
1571
1572    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1573}
1574
1575impl PartialUpdateClusterMetadata {
1576    /// Creates a new default instance.
1577    pub fn new() -> Self {
1578        std::default::Default::default()
1579    }
1580
1581    /// Sets the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1582    ///
1583    /// # Example
1584    /// ```ignore,no_run
1585    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1586    /// use wkt::Timestamp;
1587    /// let x = PartialUpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1588    /// ```
1589    pub fn set_request_time<T>(mut self, v: T) -> Self
1590    where
1591        T: std::convert::Into<wkt::Timestamp>,
1592    {
1593        self.request_time = std::option::Option::Some(v.into());
1594        self
1595    }
1596
1597    /// Sets or clears the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1598    ///
1599    /// # Example
1600    /// ```ignore,no_run
1601    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1602    /// use wkt::Timestamp;
1603    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1604    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1605    /// ```
1606    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1607    where
1608        T: std::convert::Into<wkt::Timestamp>,
1609    {
1610        self.request_time = v.map(|x| x.into());
1611        self
1612    }
1613
1614    /// Sets the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1615    ///
1616    /// # Example
1617    /// ```ignore,no_run
1618    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1619    /// use wkt::Timestamp;
1620    /// let x = PartialUpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1621    /// ```
1622    pub fn set_finish_time<T>(mut self, v: T) -> Self
1623    where
1624        T: std::convert::Into<wkt::Timestamp>,
1625    {
1626        self.finish_time = std::option::Option::Some(v.into());
1627        self
1628    }
1629
1630    /// Sets or clears the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1631    ///
1632    /// # Example
1633    /// ```ignore,no_run
1634    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1635    /// use wkt::Timestamp;
1636    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1637    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1638    /// ```
1639    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1640    where
1641        T: std::convert::Into<wkt::Timestamp>,
1642    {
1643        self.finish_time = v.map(|x| x.into());
1644        self
1645    }
1646
1647    /// Sets the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1648    ///
1649    /// # Example
1650    /// ```ignore,no_run
1651    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1652    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1653    /// let x = PartialUpdateClusterMetadata::new().set_original_request(PartialUpdateClusterRequest::default()/* use setters */);
1654    /// ```
1655    pub fn set_original_request<T>(mut self, v: T) -> Self
1656    where
1657        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1658    {
1659        self.original_request = std::option::Option::Some(v.into());
1660        self
1661    }
1662
1663    /// Sets or clears the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1664    ///
1665    /// # Example
1666    /// ```ignore,no_run
1667    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1668    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1669    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(Some(PartialUpdateClusterRequest::default()/* use setters */));
1670    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(None::<PartialUpdateClusterRequest>);
1671    /// ```
1672    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1673    where
1674        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1675    {
1676        self.original_request = v.map(|x| x.into());
1677        self
1678    }
1679}
1680
1681impl wkt::message::Message for PartialUpdateClusterMetadata {
1682    fn typename() -> &'static str {
1683        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterMetadata"
1684    }
1685}
1686
1687/// Request message for BigtableInstanceAdmin.PartialUpdateCluster.
1688#[derive(Clone, Default, PartialEq)]
1689#[non_exhaustive]
1690pub struct PartialUpdateClusterRequest {
1691    /// Required. The Cluster which contains the partial updates to be applied,
1692    /// subject to the update_mask.
1693    pub cluster: std::option::Option<crate::model::Cluster>,
1694
1695    /// Required. The subset of Cluster fields which should be replaced.
1696    pub update_mask: std::option::Option<wkt::FieldMask>,
1697
1698    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1699}
1700
1701impl PartialUpdateClusterRequest {
1702    /// Creates a new default instance.
1703    pub fn new() -> Self {
1704        std::default::Default::default()
1705    }
1706
1707    /// Sets the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1708    ///
1709    /// # Example
1710    /// ```ignore,no_run
1711    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1712    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1713    /// let x = PartialUpdateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
1714    /// ```
1715    pub fn set_cluster<T>(mut self, v: T) -> Self
1716    where
1717        T: std::convert::Into<crate::model::Cluster>,
1718    {
1719        self.cluster = std::option::Option::Some(v.into());
1720        self
1721    }
1722
1723    /// Sets or clears the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1724    ///
1725    /// # Example
1726    /// ```ignore,no_run
1727    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1728    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1729    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
1730    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
1731    /// ```
1732    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1733    where
1734        T: std::convert::Into<crate::model::Cluster>,
1735    {
1736        self.cluster = v.map(|x| x.into());
1737        self
1738    }
1739
1740    /// Sets the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1741    ///
1742    /// # Example
1743    /// ```ignore,no_run
1744    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1745    /// use wkt::FieldMask;
1746    /// let x = PartialUpdateClusterRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1747    /// ```
1748    pub fn set_update_mask<T>(mut self, v: T) -> Self
1749    where
1750        T: std::convert::Into<wkt::FieldMask>,
1751    {
1752        self.update_mask = std::option::Option::Some(v.into());
1753        self
1754    }
1755
1756    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1757    ///
1758    /// # Example
1759    /// ```ignore,no_run
1760    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1761    /// use wkt::FieldMask;
1762    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1763    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1764    /// ```
1765    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1766    where
1767        T: std::convert::Into<wkt::FieldMask>,
1768    {
1769        self.update_mask = v.map(|x| x.into());
1770        self
1771    }
1772}
1773
1774impl wkt::message::Message for PartialUpdateClusterRequest {
1775    fn typename() -> &'static str {
1776        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterRequest"
1777    }
1778}
1779
1780/// Request message for BigtableInstanceAdmin.CreateAppProfile.
1781#[derive(Clone, Default, PartialEq)]
1782#[non_exhaustive]
1783pub struct CreateAppProfileRequest {
1784    /// Required. The unique name of the instance in which to create the new app
1785    /// profile. Values are of the form `projects/{project}/instances/{instance}`.
1786    pub parent: std::string::String,
1787
1788    /// Required. The ID to be used when referring to the new app profile within
1789    /// its instance, e.g., just `myprofile` rather than
1790    /// `projects/myproject/instances/myinstance/appProfiles/myprofile`.
1791    pub app_profile_id: std::string::String,
1792
1793    /// Required. The app profile to be created.
1794    /// Fields marked `OutputOnly` will be ignored.
1795    pub app_profile: std::option::Option<crate::model::AppProfile>,
1796
1797    /// If true, ignore safety checks when creating the app profile.
1798    pub ignore_warnings: bool,
1799
1800    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1801}
1802
1803impl CreateAppProfileRequest {
1804    /// Creates a new default instance.
1805    pub fn new() -> Self {
1806        std::default::Default::default()
1807    }
1808
1809    /// Sets the value of [parent][crate::model::CreateAppProfileRequest::parent].
1810    ///
1811    /// # Example
1812    /// ```ignore,no_run
1813    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1814    /// # let project_id = "project_id";
1815    /// # let instance_id = "instance_id";
1816    /// let x = CreateAppProfileRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
1817    /// ```
1818    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1819        self.parent = v.into();
1820        self
1821    }
1822
1823    /// Sets the value of [app_profile_id][crate::model::CreateAppProfileRequest::app_profile_id].
1824    ///
1825    /// # Example
1826    /// ```ignore,no_run
1827    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1828    /// let x = CreateAppProfileRequest::new().set_app_profile_id("example");
1829    /// ```
1830    pub fn set_app_profile_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1831        self.app_profile_id = v.into();
1832        self
1833    }
1834
1835    /// Sets the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1836    ///
1837    /// # Example
1838    /// ```ignore,no_run
1839    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1840    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1841    /// let x = CreateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
1842    /// ```
1843    pub fn set_app_profile<T>(mut self, v: T) -> Self
1844    where
1845        T: std::convert::Into<crate::model::AppProfile>,
1846    {
1847        self.app_profile = std::option::Option::Some(v.into());
1848        self
1849    }
1850
1851    /// Sets or clears the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1852    ///
1853    /// # Example
1854    /// ```ignore,no_run
1855    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1856    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1857    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
1858    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
1859    /// ```
1860    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1861    where
1862        T: std::convert::Into<crate::model::AppProfile>,
1863    {
1864        self.app_profile = v.map(|x| x.into());
1865        self
1866    }
1867
1868    /// Sets the value of [ignore_warnings][crate::model::CreateAppProfileRequest::ignore_warnings].
1869    ///
1870    /// # Example
1871    /// ```ignore,no_run
1872    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1873    /// let x = CreateAppProfileRequest::new().set_ignore_warnings(true);
1874    /// ```
1875    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1876        self.ignore_warnings = v.into();
1877        self
1878    }
1879}
1880
1881impl wkt::message::Message for CreateAppProfileRequest {
1882    fn typename() -> &'static str {
1883        "type.googleapis.com/google.bigtable.admin.v2.CreateAppProfileRequest"
1884    }
1885}
1886
1887/// Request message for BigtableInstanceAdmin.GetAppProfile.
1888#[derive(Clone, Default, PartialEq)]
1889#[non_exhaustive]
1890pub struct GetAppProfileRequest {
1891    /// Required. The unique name of the requested app profile. Values are of the
1892    /// form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
1893    pub name: std::string::String,
1894
1895    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1896}
1897
1898impl GetAppProfileRequest {
1899    /// Creates a new default instance.
1900    pub fn new() -> Self {
1901        std::default::Default::default()
1902    }
1903
1904    /// Sets the value of [name][crate::model::GetAppProfileRequest::name].
1905    ///
1906    /// # Example
1907    /// ```ignore,no_run
1908    /// # use google_cloud_bigtable_admin_v2::model::GetAppProfileRequest;
1909    /// # let project_id = "project_id";
1910    /// # let instance_id = "instance_id";
1911    /// # let app_profile_id = "app_profile_id";
1912    /// let x = GetAppProfileRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"));
1913    /// ```
1914    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1915        self.name = v.into();
1916        self
1917    }
1918}
1919
1920impl wkt::message::Message for GetAppProfileRequest {
1921    fn typename() -> &'static str {
1922        "type.googleapis.com/google.bigtable.admin.v2.GetAppProfileRequest"
1923    }
1924}
1925
1926/// Request message for BigtableInstanceAdmin.ListAppProfiles.
1927#[derive(Clone, Default, PartialEq)]
1928#[non_exhaustive]
1929pub struct ListAppProfilesRequest {
1930    /// Required. The unique name of the instance for which a list of app profiles
1931    /// is requested. Values are of the form
1932    /// `projects/{project}/instances/{instance}`.
1933    /// Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
1934    /// e.g., `projects/myproject/instances/-`.
1935    pub parent: std::string::String,
1936
1937    /// Maximum number of results per page.
1938    ///
1939    /// A page_size of zero lets the server choose the number of items to return.
1940    /// A page_size which is strictly positive will return at most that many items.
1941    /// A negative page_size will cause an error.
1942    ///
1943    /// Following the first request, subsequent paginated calls are not required
1944    /// to pass a page_size. If a page_size is set in subsequent calls, it must
1945    /// match the page_size given in the first request.
1946    pub page_size: i32,
1947
1948    /// The value of `next_page_token` returned by a previous call.
1949    pub page_token: std::string::String,
1950
1951    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1952}
1953
1954impl ListAppProfilesRequest {
1955    /// Creates a new default instance.
1956    pub fn new() -> Self {
1957        std::default::Default::default()
1958    }
1959
1960    /// Sets the value of [parent][crate::model::ListAppProfilesRequest::parent].
1961    ///
1962    /// # Example
1963    /// ```ignore,no_run
1964    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1965    /// # let project_id = "project_id";
1966    /// # let instance_id = "instance_id";
1967    /// let x = ListAppProfilesRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
1968    /// ```
1969    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1970        self.parent = v.into();
1971        self
1972    }
1973
1974    /// Sets the value of [page_size][crate::model::ListAppProfilesRequest::page_size].
1975    ///
1976    /// # Example
1977    /// ```ignore,no_run
1978    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1979    /// let x = ListAppProfilesRequest::new().set_page_size(42);
1980    /// ```
1981    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1982        self.page_size = v.into();
1983        self
1984    }
1985
1986    /// Sets the value of [page_token][crate::model::ListAppProfilesRequest::page_token].
1987    ///
1988    /// # Example
1989    /// ```ignore,no_run
1990    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1991    /// let x = ListAppProfilesRequest::new().set_page_token("example");
1992    /// ```
1993    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1994        self.page_token = v.into();
1995        self
1996    }
1997}
1998
1999impl wkt::message::Message for ListAppProfilesRequest {
2000    fn typename() -> &'static str {
2001        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesRequest"
2002    }
2003}
2004
2005/// Response message for BigtableInstanceAdmin.ListAppProfiles.
2006#[derive(Clone, Default, PartialEq)]
2007#[non_exhaustive]
2008pub struct ListAppProfilesResponse {
2009    /// The list of requested app profiles.
2010    pub app_profiles: std::vec::Vec<crate::model::AppProfile>,
2011
2012    /// Set if not all app profiles could be returned in a single response.
2013    /// Pass this value to `page_token` in another request to get the next
2014    /// page of results.
2015    pub next_page_token: std::string::String,
2016
2017    /// Locations from which AppProfile information could not be retrieved,
2018    /// due to an outage or some other transient condition.
2019    /// AppProfiles from these locations may be missing from `app_profiles`.
2020    /// Values are of the form `projects/<project>/locations/<zone_id>`
2021    pub failed_locations: std::vec::Vec<std::string::String>,
2022
2023    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2024}
2025
2026impl ListAppProfilesResponse {
2027    /// Creates a new default instance.
2028    pub fn new() -> Self {
2029        std::default::Default::default()
2030    }
2031
2032    /// Sets the value of [app_profiles][crate::model::ListAppProfilesResponse::app_profiles].
2033    ///
2034    /// # Example
2035    /// ```ignore,no_run
2036    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2037    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2038    /// let x = ListAppProfilesResponse::new()
2039    ///     .set_app_profiles([
2040    ///         AppProfile::default()/* use setters */,
2041    ///         AppProfile::default()/* use (different) setters */,
2042    ///     ]);
2043    /// ```
2044    pub fn set_app_profiles<T, V>(mut self, v: T) -> Self
2045    where
2046        T: std::iter::IntoIterator<Item = V>,
2047        V: std::convert::Into<crate::model::AppProfile>,
2048    {
2049        use std::iter::Iterator;
2050        self.app_profiles = v.into_iter().map(|i| i.into()).collect();
2051        self
2052    }
2053
2054    /// Sets the value of [next_page_token][crate::model::ListAppProfilesResponse::next_page_token].
2055    ///
2056    /// # Example
2057    /// ```ignore,no_run
2058    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2059    /// let x = ListAppProfilesResponse::new().set_next_page_token("example");
2060    /// ```
2061    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2062        self.next_page_token = v.into();
2063        self
2064    }
2065
2066    /// Sets the value of [failed_locations][crate::model::ListAppProfilesResponse::failed_locations].
2067    ///
2068    /// # Example
2069    /// ```ignore,no_run
2070    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2071    /// let x = ListAppProfilesResponse::new().set_failed_locations(["a", "b", "c"]);
2072    /// ```
2073    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
2074    where
2075        T: std::iter::IntoIterator<Item = V>,
2076        V: std::convert::Into<std::string::String>,
2077    {
2078        use std::iter::Iterator;
2079        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
2080        self
2081    }
2082}
2083
2084impl wkt::message::Message for ListAppProfilesResponse {
2085    fn typename() -> &'static str {
2086        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesResponse"
2087    }
2088}
2089
2090#[doc(hidden)]
2091impl google_cloud_gax::paginator::internal::PageableResponse for ListAppProfilesResponse {
2092    type PageItem = crate::model::AppProfile;
2093
2094    fn items(self) -> std::vec::Vec<Self::PageItem> {
2095        self.app_profiles
2096    }
2097
2098    fn next_page_token(&self) -> std::string::String {
2099        use std::clone::Clone;
2100        self.next_page_token.clone()
2101    }
2102}
2103
2104/// Request message for BigtableInstanceAdmin.UpdateAppProfile.
2105#[derive(Clone, Default, PartialEq)]
2106#[non_exhaustive]
2107pub struct UpdateAppProfileRequest {
2108    /// Required. The app profile which will (partially) replace the current value.
2109    pub app_profile: std::option::Option<crate::model::AppProfile>,
2110
2111    /// Required. The subset of app profile fields which should be replaced.
2112    /// If unset, all fields will be replaced.
2113    pub update_mask: std::option::Option<wkt::FieldMask>,
2114
2115    /// If true, ignore safety checks when updating the app profile.
2116    pub ignore_warnings: bool,
2117
2118    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2119}
2120
2121impl UpdateAppProfileRequest {
2122    /// Creates a new default instance.
2123    pub fn new() -> Self {
2124        std::default::Default::default()
2125    }
2126
2127    /// Sets the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2128    ///
2129    /// # Example
2130    /// ```ignore,no_run
2131    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2132    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2133    /// let x = UpdateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
2134    /// ```
2135    pub fn set_app_profile<T>(mut self, v: T) -> Self
2136    where
2137        T: std::convert::Into<crate::model::AppProfile>,
2138    {
2139        self.app_profile = std::option::Option::Some(v.into());
2140        self
2141    }
2142
2143    /// Sets or clears the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2144    ///
2145    /// # Example
2146    /// ```ignore,no_run
2147    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2148    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2149    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
2150    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
2151    /// ```
2152    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
2153    where
2154        T: std::convert::Into<crate::model::AppProfile>,
2155    {
2156        self.app_profile = v.map(|x| x.into());
2157        self
2158    }
2159
2160    /// Sets the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2161    ///
2162    /// # Example
2163    /// ```ignore,no_run
2164    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2165    /// use wkt::FieldMask;
2166    /// let x = UpdateAppProfileRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2167    /// ```
2168    pub fn set_update_mask<T>(mut self, v: T) -> Self
2169    where
2170        T: std::convert::Into<wkt::FieldMask>,
2171    {
2172        self.update_mask = std::option::Option::Some(v.into());
2173        self
2174    }
2175
2176    /// Sets or clears the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2177    ///
2178    /// # Example
2179    /// ```ignore,no_run
2180    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2181    /// use wkt::FieldMask;
2182    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2183    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2184    /// ```
2185    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2186    where
2187        T: std::convert::Into<wkt::FieldMask>,
2188    {
2189        self.update_mask = v.map(|x| x.into());
2190        self
2191    }
2192
2193    /// Sets the value of [ignore_warnings][crate::model::UpdateAppProfileRequest::ignore_warnings].
2194    ///
2195    /// # Example
2196    /// ```ignore,no_run
2197    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2198    /// let x = UpdateAppProfileRequest::new().set_ignore_warnings(true);
2199    /// ```
2200    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2201        self.ignore_warnings = v.into();
2202        self
2203    }
2204}
2205
2206impl wkt::message::Message for UpdateAppProfileRequest {
2207    fn typename() -> &'static str {
2208        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileRequest"
2209    }
2210}
2211
2212/// Request message for BigtableInstanceAdmin.DeleteAppProfile.
2213#[derive(Clone, Default, PartialEq)]
2214#[non_exhaustive]
2215pub struct DeleteAppProfileRequest {
2216    /// Required. The unique name of the app profile to be deleted. Values are of
2217    /// the form
2218    /// `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
2219    pub name: std::string::String,
2220
2221    /// Required. If true, ignore safety checks when deleting the app profile.
2222    pub ignore_warnings: bool,
2223
2224    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2225}
2226
2227impl DeleteAppProfileRequest {
2228    /// Creates a new default instance.
2229    pub fn new() -> Self {
2230        std::default::Default::default()
2231    }
2232
2233    /// Sets the value of [name][crate::model::DeleteAppProfileRequest::name].
2234    ///
2235    /// # Example
2236    /// ```ignore,no_run
2237    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2238    /// # let project_id = "project_id";
2239    /// # let instance_id = "instance_id";
2240    /// # let app_profile_id = "app_profile_id";
2241    /// let x = DeleteAppProfileRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"));
2242    /// ```
2243    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2244        self.name = v.into();
2245        self
2246    }
2247
2248    /// Sets the value of [ignore_warnings][crate::model::DeleteAppProfileRequest::ignore_warnings].
2249    ///
2250    /// # Example
2251    /// ```ignore,no_run
2252    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2253    /// let x = DeleteAppProfileRequest::new().set_ignore_warnings(true);
2254    /// ```
2255    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2256        self.ignore_warnings = v.into();
2257        self
2258    }
2259}
2260
2261impl wkt::message::Message for DeleteAppProfileRequest {
2262    fn typename() -> &'static str {
2263        "type.googleapis.com/google.bigtable.admin.v2.DeleteAppProfileRequest"
2264    }
2265}
2266
2267/// The metadata for the Operation returned by UpdateAppProfile.
2268#[derive(Clone, Default, PartialEq)]
2269#[non_exhaustive]
2270pub struct UpdateAppProfileMetadata {
2271    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2272}
2273
2274impl UpdateAppProfileMetadata {
2275    /// Creates a new default instance.
2276    pub fn new() -> Self {
2277        std::default::Default::default()
2278    }
2279}
2280
2281impl wkt::message::Message for UpdateAppProfileMetadata {
2282    fn typename() -> &'static str {
2283        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileMetadata"
2284    }
2285}
2286
2287/// Request message for BigtableInstanceAdmin.ListHotTablets.
2288#[derive(Clone, Default, PartialEq)]
2289#[non_exhaustive]
2290pub struct ListHotTabletsRequest {
2291    /// Required. The cluster name to list hot tablets.
2292    /// Value is in the following form:
2293    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
2294    pub parent: std::string::String,
2295
2296    /// The start time to list hot tablets. The hot tablets in the response will
2297    /// have start times between the requested start time and end time. Start time
2298    /// defaults to Now if it is unset, and end time defaults to Now - 24 hours if
2299    /// it is unset. The start time should be less than the end time, and the
2300    /// maximum allowed time range between start time and end time is 48 hours.
2301    /// Start time and end time should have values between Now and Now - 14 days.
2302    pub start_time: std::option::Option<wkt::Timestamp>,
2303
2304    /// The end time to list hot tablets.
2305    pub end_time: std::option::Option<wkt::Timestamp>,
2306
2307    /// Maximum number of results per page.
2308    ///
2309    /// A page_size that is empty or zero lets the server choose the number of
2310    /// items to return. A page_size which is strictly positive will return at most
2311    /// that many items. A negative page_size will cause an error.
2312    ///
2313    /// Following the first request, subsequent paginated calls do not need a
2314    /// page_size field. If a page_size is set in subsequent calls, it must match
2315    /// the page_size given in the first request.
2316    pub page_size: i32,
2317
2318    /// The value of `next_page_token` returned by a previous call.
2319    pub page_token: std::string::String,
2320
2321    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2322}
2323
2324impl ListHotTabletsRequest {
2325    /// Creates a new default instance.
2326    pub fn new() -> Self {
2327        std::default::Default::default()
2328    }
2329
2330    /// Sets the value of [parent][crate::model::ListHotTabletsRequest::parent].
2331    ///
2332    /// # Example
2333    /// ```ignore,no_run
2334    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2335    /// # let project_id = "project_id";
2336    /// # let instance_id = "instance_id";
2337    /// # let cluster_id = "cluster_id";
2338    /// let x = ListHotTabletsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
2339    /// ```
2340    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2341        self.parent = v.into();
2342        self
2343    }
2344
2345    /// Sets the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2346    ///
2347    /// # Example
2348    /// ```ignore,no_run
2349    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2350    /// use wkt::Timestamp;
2351    /// let x = ListHotTabletsRequest::new().set_start_time(Timestamp::default()/* use setters */);
2352    /// ```
2353    pub fn set_start_time<T>(mut self, v: T) -> Self
2354    where
2355        T: std::convert::Into<wkt::Timestamp>,
2356    {
2357        self.start_time = std::option::Option::Some(v.into());
2358        self
2359    }
2360
2361    /// Sets or clears the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2362    ///
2363    /// # Example
2364    /// ```ignore,no_run
2365    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2366    /// use wkt::Timestamp;
2367    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2368    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(None::<Timestamp>);
2369    /// ```
2370    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2371    where
2372        T: std::convert::Into<wkt::Timestamp>,
2373    {
2374        self.start_time = v.map(|x| x.into());
2375        self
2376    }
2377
2378    /// Sets the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2379    ///
2380    /// # Example
2381    /// ```ignore,no_run
2382    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2383    /// use wkt::Timestamp;
2384    /// let x = ListHotTabletsRequest::new().set_end_time(Timestamp::default()/* use setters */);
2385    /// ```
2386    pub fn set_end_time<T>(mut self, v: T) -> Self
2387    where
2388        T: std::convert::Into<wkt::Timestamp>,
2389    {
2390        self.end_time = std::option::Option::Some(v.into());
2391        self
2392    }
2393
2394    /// Sets or clears the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2395    ///
2396    /// # Example
2397    /// ```ignore,no_run
2398    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2399    /// use wkt::Timestamp;
2400    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2401    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(None::<Timestamp>);
2402    /// ```
2403    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2404    where
2405        T: std::convert::Into<wkt::Timestamp>,
2406    {
2407        self.end_time = v.map(|x| x.into());
2408        self
2409    }
2410
2411    /// Sets the value of [page_size][crate::model::ListHotTabletsRequest::page_size].
2412    ///
2413    /// # Example
2414    /// ```ignore,no_run
2415    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2416    /// let x = ListHotTabletsRequest::new().set_page_size(42);
2417    /// ```
2418    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2419        self.page_size = v.into();
2420        self
2421    }
2422
2423    /// Sets the value of [page_token][crate::model::ListHotTabletsRequest::page_token].
2424    ///
2425    /// # Example
2426    /// ```ignore,no_run
2427    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2428    /// let x = ListHotTabletsRequest::new().set_page_token("example");
2429    /// ```
2430    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2431        self.page_token = v.into();
2432        self
2433    }
2434}
2435
2436impl wkt::message::Message for ListHotTabletsRequest {
2437    fn typename() -> &'static str {
2438        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsRequest"
2439    }
2440}
2441
2442/// Response message for BigtableInstanceAdmin.ListHotTablets.
2443#[derive(Clone, Default, PartialEq)]
2444#[non_exhaustive]
2445pub struct ListHotTabletsResponse {
2446    /// List of hot tablets in the tables of the requested cluster that fall
2447    /// within the requested time range. Hot tablets are ordered by node cpu usage
2448    /// percent. If there are multiple hot tablets that correspond to the same
2449    /// tablet within a 15-minute interval, only the hot tablet with the highest
2450    /// node cpu usage will be included in the response.
2451    pub hot_tablets: std::vec::Vec<crate::model::HotTablet>,
2452
2453    /// Set if not all hot tablets could be returned in a single response.
2454    /// Pass this value to `page_token` in another request to get the next
2455    /// page of results.
2456    pub next_page_token: std::string::String,
2457
2458    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2459}
2460
2461impl ListHotTabletsResponse {
2462    /// Creates a new default instance.
2463    pub fn new() -> Self {
2464        std::default::Default::default()
2465    }
2466
2467    /// Sets the value of [hot_tablets][crate::model::ListHotTabletsResponse::hot_tablets].
2468    ///
2469    /// # Example
2470    /// ```ignore,no_run
2471    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2472    /// use google_cloud_bigtable_admin_v2::model::HotTablet;
2473    /// let x = ListHotTabletsResponse::new()
2474    ///     .set_hot_tablets([
2475    ///         HotTablet::default()/* use setters */,
2476    ///         HotTablet::default()/* use (different) setters */,
2477    ///     ]);
2478    /// ```
2479    pub fn set_hot_tablets<T, V>(mut self, v: T) -> Self
2480    where
2481        T: std::iter::IntoIterator<Item = V>,
2482        V: std::convert::Into<crate::model::HotTablet>,
2483    {
2484        use std::iter::Iterator;
2485        self.hot_tablets = v.into_iter().map(|i| i.into()).collect();
2486        self
2487    }
2488
2489    /// Sets the value of [next_page_token][crate::model::ListHotTabletsResponse::next_page_token].
2490    ///
2491    /// # Example
2492    /// ```ignore,no_run
2493    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2494    /// let x = ListHotTabletsResponse::new().set_next_page_token("example");
2495    /// ```
2496    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2497        self.next_page_token = v.into();
2498        self
2499    }
2500}
2501
2502impl wkt::message::Message for ListHotTabletsResponse {
2503    fn typename() -> &'static str {
2504        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsResponse"
2505    }
2506}
2507
2508#[doc(hidden)]
2509impl google_cloud_gax::paginator::internal::PageableResponse for ListHotTabletsResponse {
2510    type PageItem = crate::model::HotTablet;
2511
2512    fn items(self) -> std::vec::Vec<Self::PageItem> {
2513        self.hot_tablets
2514    }
2515
2516    fn next_page_token(&self) -> std::string::String {
2517        use std::clone::Clone;
2518        self.next_page_token.clone()
2519    }
2520}
2521
2522/// Request message for BigtableInstanceAdmin.CreateLogicalView.
2523#[derive(Clone, Default, PartialEq)]
2524#[non_exhaustive]
2525pub struct CreateLogicalViewRequest {
2526    /// Required. The parent instance where this logical view will be created.
2527    /// Format: `projects/{project}/instances/{instance}`.
2528    pub parent: std::string::String,
2529
2530    /// Required. The ID to use for the logical view, which will become the final
2531    /// component of the logical view's resource name.
2532    pub logical_view_id: std::string::String,
2533
2534    /// Required. The logical view to create.
2535    pub logical_view: std::option::Option<crate::model::LogicalView>,
2536
2537    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2538}
2539
2540impl CreateLogicalViewRequest {
2541    /// Creates a new default instance.
2542    pub fn new() -> Self {
2543        std::default::Default::default()
2544    }
2545
2546    /// Sets the value of [parent][crate::model::CreateLogicalViewRequest::parent].
2547    ///
2548    /// # Example
2549    /// ```ignore,no_run
2550    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2551    /// # let project_id = "project_id";
2552    /// # let instance_id = "instance_id";
2553    /// let x = CreateLogicalViewRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
2554    /// ```
2555    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2556        self.parent = v.into();
2557        self
2558    }
2559
2560    /// Sets the value of [logical_view_id][crate::model::CreateLogicalViewRequest::logical_view_id].
2561    ///
2562    /// # Example
2563    /// ```ignore,no_run
2564    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2565    /// let x = CreateLogicalViewRequest::new().set_logical_view_id("example");
2566    /// ```
2567    pub fn set_logical_view_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2568        self.logical_view_id = v.into();
2569        self
2570    }
2571
2572    /// Sets the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2573    ///
2574    /// # Example
2575    /// ```ignore,no_run
2576    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2577    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2578    /// let x = CreateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
2579    /// ```
2580    pub fn set_logical_view<T>(mut self, v: T) -> Self
2581    where
2582        T: std::convert::Into<crate::model::LogicalView>,
2583    {
2584        self.logical_view = std::option::Option::Some(v.into());
2585        self
2586    }
2587
2588    /// Sets or clears the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2589    ///
2590    /// # Example
2591    /// ```ignore,no_run
2592    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2593    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2594    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
2595    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
2596    /// ```
2597    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2598    where
2599        T: std::convert::Into<crate::model::LogicalView>,
2600    {
2601        self.logical_view = v.map(|x| x.into());
2602        self
2603    }
2604}
2605
2606impl wkt::message::Message for CreateLogicalViewRequest {
2607    fn typename() -> &'static str {
2608        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewRequest"
2609    }
2610}
2611
2612/// The metadata for the Operation returned by CreateLogicalView.
2613#[derive(Clone, Default, PartialEq)]
2614#[non_exhaustive]
2615pub struct CreateLogicalViewMetadata {
2616    /// The request that prompted the initiation of this CreateLogicalView
2617    /// operation.
2618    pub original_request: std::option::Option<crate::model::CreateLogicalViewRequest>,
2619
2620    /// The time at which this operation started.
2621    pub start_time: std::option::Option<wkt::Timestamp>,
2622
2623    /// If set, the time at which this operation finished or was canceled.
2624    pub end_time: std::option::Option<wkt::Timestamp>,
2625
2626    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2627}
2628
2629impl CreateLogicalViewMetadata {
2630    /// Creates a new default instance.
2631    pub fn new() -> Self {
2632        std::default::Default::default()
2633    }
2634
2635    /// Sets the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
2636    ///
2637    /// # Example
2638    /// ```ignore,no_run
2639    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2640    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2641    /// let x = CreateLogicalViewMetadata::new().set_original_request(CreateLogicalViewRequest::default()/* use setters */);
2642    /// ```
2643    pub fn set_original_request<T>(mut self, v: T) -> Self
2644    where
2645        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
2646    {
2647        self.original_request = std::option::Option::Some(v.into());
2648        self
2649    }
2650
2651    /// Sets or clears the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
2652    ///
2653    /// # Example
2654    /// ```ignore,no_run
2655    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2656    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2657    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(Some(CreateLogicalViewRequest::default()/* use setters */));
2658    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(None::<CreateLogicalViewRequest>);
2659    /// ```
2660    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
2661    where
2662        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
2663    {
2664        self.original_request = v.map(|x| x.into());
2665        self
2666    }
2667
2668    /// Sets the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
2669    ///
2670    /// # Example
2671    /// ```ignore,no_run
2672    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2673    /// use wkt::Timestamp;
2674    /// let x = CreateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
2675    /// ```
2676    pub fn set_start_time<T>(mut self, v: T) -> Self
2677    where
2678        T: std::convert::Into<wkt::Timestamp>,
2679    {
2680        self.start_time = std::option::Option::Some(v.into());
2681        self
2682    }
2683
2684    /// Sets or clears the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
2685    ///
2686    /// # Example
2687    /// ```ignore,no_run
2688    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2689    /// use wkt::Timestamp;
2690    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2691    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
2692    /// ```
2693    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2694    where
2695        T: std::convert::Into<wkt::Timestamp>,
2696    {
2697        self.start_time = v.map(|x| x.into());
2698        self
2699    }
2700
2701    /// Sets the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
2702    ///
2703    /// # Example
2704    /// ```ignore,no_run
2705    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2706    /// use wkt::Timestamp;
2707    /// let x = CreateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
2708    /// ```
2709    pub fn set_end_time<T>(mut self, v: T) -> Self
2710    where
2711        T: std::convert::Into<wkt::Timestamp>,
2712    {
2713        self.end_time = std::option::Option::Some(v.into());
2714        self
2715    }
2716
2717    /// Sets or clears the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
2718    ///
2719    /// # Example
2720    /// ```ignore,no_run
2721    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2722    /// use wkt::Timestamp;
2723    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2724    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
2725    /// ```
2726    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2727    where
2728        T: std::convert::Into<wkt::Timestamp>,
2729    {
2730        self.end_time = v.map(|x| x.into());
2731        self
2732    }
2733}
2734
2735impl wkt::message::Message for CreateLogicalViewMetadata {
2736    fn typename() -> &'static str {
2737        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewMetadata"
2738    }
2739}
2740
2741/// Request message for BigtableInstanceAdmin.GetLogicalView.
2742#[derive(Clone, Default, PartialEq)]
2743#[non_exhaustive]
2744pub struct GetLogicalViewRequest {
2745    /// Required. The unique name of the requested logical view. Values are of the
2746    /// form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2747    pub name: std::string::String,
2748
2749    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2750}
2751
2752impl GetLogicalViewRequest {
2753    /// Creates a new default instance.
2754    pub fn new() -> Self {
2755        std::default::Default::default()
2756    }
2757
2758    /// Sets the value of [name][crate::model::GetLogicalViewRequest::name].
2759    ///
2760    /// # Example
2761    /// ```ignore,no_run
2762    /// # use google_cloud_bigtable_admin_v2::model::GetLogicalViewRequest;
2763    /// # let project_id = "project_id";
2764    /// # let instance_id = "instance_id";
2765    /// # let logical_view_id = "logical_view_id";
2766    /// let x = GetLogicalViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"));
2767    /// ```
2768    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2769        self.name = v.into();
2770        self
2771    }
2772}
2773
2774impl wkt::message::Message for GetLogicalViewRequest {
2775    fn typename() -> &'static str {
2776        "type.googleapis.com/google.bigtable.admin.v2.GetLogicalViewRequest"
2777    }
2778}
2779
2780/// Request message for BigtableInstanceAdmin.ListLogicalViews.
2781#[derive(Clone, Default, PartialEq)]
2782#[non_exhaustive]
2783pub struct ListLogicalViewsRequest {
2784    /// Required. The unique name of the instance for which the list of logical
2785    /// views is requested. Values are of the form
2786    /// `projects/{project}/instances/{instance}`.
2787    pub parent: std::string::String,
2788
2789    /// Optional. The maximum number of logical views to return. The service may
2790    /// return fewer than this value
2791    pub page_size: i32,
2792
2793    /// Optional. A page token, received from a previous `ListLogicalViews` call.
2794    /// Provide this to retrieve the subsequent page.
2795    ///
2796    /// When paginating, all other parameters provided to `ListLogicalViews` must
2797    /// match the call that provided the page token.
2798    pub page_token: std::string::String,
2799
2800    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2801}
2802
2803impl ListLogicalViewsRequest {
2804    /// Creates a new default instance.
2805    pub fn new() -> Self {
2806        std::default::Default::default()
2807    }
2808
2809    /// Sets the value of [parent][crate::model::ListLogicalViewsRequest::parent].
2810    ///
2811    /// # Example
2812    /// ```ignore,no_run
2813    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2814    /// # let project_id = "project_id";
2815    /// # let instance_id = "instance_id";
2816    /// let x = ListLogicalViewsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
2817    /// ```
2818    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2819        self.parent = v.into();
2820        self
2821    }
2822
2823    /// Sets the value of [page_size][crate::model::ListLogicalViewsRequest::page_size].
2824    ///
2825    /// # Example
2826    /// ```ignore,no_run
2827    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2828    /// let x = ListLogicalViewsRequest::new().set_page_size(42);
2829    /// ```
2830    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2831        self.page_size = v.into();
2832        self
2833    }
2834
2835    /// Sets the value of [page_token][crate::model::ListLogicalViewsRequest::page_token].
2836    ///
2837    /// # Example
2838    /// ```ignore,no_run
2839    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2840    /// let x = ListLogicalViewsRequest::new().set_page_token("example");
2841    /// ```
2842    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2843        self.page_token = v.into();
2844        self
2845    }
2846}
2847
2848impl wkt::message::Message for ListLogicalViewsRequest {
2849    fn typename() -> &'static str {
2850        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsRequest"
2851    }
2852}
2853
2854/// Response message for BigtableInstanceAdmin.ListLogicalViews.
2855#[derive(Clone, Default, PartialEq)]
2856#[non_exhaustive]
2857pub struct ListLogicalViewsResponse {
2858    /// The list of requested logical views.
2859    pub logical_views: std::vec::Vec<crate::model::LogicalView>,
2860
2861    /// A token, which can be sent as `page_token` to retrieve the next page.
2862    /// If this field is omitted, there are no subsequent pages.
2863    pub next_page_token: std::string::String,
2864
2865    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2866}
2867
2868impl ListLogicalViewsResponse {
2869    /// Creates a new default instance.
2870    pub fn new() -> Self {
2871        std::default::Default::default()
2872    }
2873
2874    /// Sets the value of [logical_views][crate::model::ListLogicalViewsResponse::logical_views].
2875    ///
2876    /// # Example
2877    /// ```ignore,no_run
2878    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
2879    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2880    /// let x = ListLogicalViewsResponse::new()
2881    ///     .set_logical_views([
2882    ///         LogicalView::default()/* use setters */,
2883    ///         LogicalView::default()/* use (different) setters */,
2884    ///     ]);
2885    /// ```
2886    pub fn set_logical_views<T, V>(mut self, v: T) -> Self
2887    where
2888        T: std::iter::IntoIterator<Item = V>,
2889        V: std::convert::Into<crate::model::LogicalView>,
2890    {
2891        use std::iter::Iterator;
2892        self.logical_views = v.into_iter().map(|i| i.into()).collect();
2893        self
2894    }
2895
2896    /// Sets the value of [next_page_token][crate::model::ListLogicalViewsResponse::next_page_token].
2897    ///
2898    /// # Example
2899    /// ```ignore,no_run
2900    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
2901    /// let x = ListLogicalViewsResponse::new().set_next_page_token("example");
2902    /// ```
2903    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2904        self.next_page_token = v.into();
2905        self
2906    }
2907}
2908
2909impl wkt::message::Message for ListLogicalViewsResponse {
2910    fn typename() -> &'static str {
2911        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsResponse"
2912    }
2913}
2914
2915#[doc(hidden)]
2916impl google_cloud_gax::paginator::internal::PageableResponse for ListLogicalViewsResponse {
2917    type PageItem = crate::model::LogicalView;
2918
2919    fn items(self) -> std::vec::Vec<Self::PageItem> {
2920        self.logical_views
2921    }
2922
2923    fn next_page_token(&self) -> std::string::String {
2924        use std::clone::Clone;
2925        self.next_page_token.clone()
2926    }
2927}
2928
2929/// Request message for BigtableInstanceAdmin.UpdateLogicalView.
2930#[derive(Clone, Default, PartialEq)]
2931#[non_exhaustive]
2932pub struct UpdateLogicalViewRequest {
2933    /// Required. The logical view to update.
2934    ///
2935    /// The logical view's `name` field is used to identify the view to update.
2936    /// Format:
2937    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2938    pub logical_view: std::option::Option<crate::model::LogicalView>,
2939
2940    /// Optional. The list of fields to update.
2941    pub update_mask: std::option::Option<wkt::FieldMask>,
2942
2943    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2944}
2945
2946impl UpdateLogicalViewRequest {
2947    /// Creates a new default instance.
2948    pub fn new() -> Self {
2949        std::default::Default::default()
2950    }
2951
2952    /// Sets the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2953    ///
2954    /// # Example
2955    /// ```ignore,no_run
2956    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2957    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2958    /// let x = UpdateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
2959    /// ```
2960    pub fn set_logical_view<T>(mut self, v: T) -> Self
2961    where
2962        T: std::convert::Into<crate::model::LogicalView>,
2963    {
2964        self.logical_view = std::option::Option::Some(v.into());
2965        self
2966    }
2967
2968    /// Sets or clears the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2969    ///
2970    /// # Example
2971    /// ```ignore,no_run
2972    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2973    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2974    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
2975    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
2976    /// ```
2977    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2978    where
2979        T: std::convert::Into<crate::model::LogicalView>,
2980    {
2981        self.logical_view = v.map(|x| x.into());
2982        self
2983    }
2984
2985    /// Sets the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
2986    ///
2987    /// # Example
2988    /// ```ignore,no_run
2989    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2990    /// use wkt::FieldMask;
2991    /// let x = UpdateLogicalViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2992    /// ```
2993    pub fn set_update_mask<T>(mut self, v: T) -> Self
2994    where
2995        T: std::convert::Into<wkt::FieldMask>,
2996    {
2997        self.update_mask = std::option::Option::Some(v.into());
2998        self
2999    }
3000
3001    /// Sets or clears the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
3002    ///
3003    /// # Example
3004    /// ```ignore,no_run
3005    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3006    /// use wkt::FieldMask;
3007    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3008    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3009    /// ```
3010    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3011    where
3012        T: std::convert::Into<wkt::FieldMask>,
3013    {
3014        self.update_mask = v.map(|x| x.into());
3015        self
3016    }
3017}
3018
3019impl wkt::message::Message for UpdateLogicalViewRequest {
3020    fn typename() -> &'static str {
3021        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewRequest"
3022    }
3023}
3024
3025/// The metadata for the Operation returned by UpdateLogicalView.
3026#[derive(Clone, Default, PartialEq)]
3027#[non_exhaustive]
3028pub struct UpdateLogicalViewMetadata {
3029    /// The request that prompted the initiation of this UpdateLogicalView
3030    /// operation.
3031    pub original_request: std::option::Option<crate::model::UpdateLogicalViewRequest>,
3032
3033    /// The time at which this operation was started.
3034    pub start_time: std::option::Option<wkt::Timestamp>,
3035
3036    /// If set, the time at which this operation finished or was canceled.
3037    pub end_time: std::option::Option<wkt::Timestamp>,
3038
3039    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3040}
3041
3042impl UpdateLogicalViewMetadata {
3043    /// Creates a new default instance.
3044    pub fn new() -> Self {
3045        std::default::Default::default()
3046    }
3047
3048    /// Sets the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
3049    ///
3050    /// # Example
3051    /// ```ignore,no_run
3052    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3053    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3054    /// let x = UpdateLogicalViewMetadata::new().set_original_request(UpdateLogicalViewRequest::default()/* use setters */);
3055    /// ```
3056    pub fn set_original_request<T>(mut self, v: T) -> Self
3057    where
3058        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
3059    {
3060        self.original_request = std::option::Option::Some(v.into());
3061        self
3062    }
3063
3064    /// Sets or clears the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
3065    ///
3066    /// # Example
3067    /// ```ignore,no_run
3068    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3069    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3070    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(Some(UpdateLogicalViewRequest::default()/* use setters */));
3071    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(None::<UpdateLogicalViewRequest>);
3072    /// ```
3073    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3074    where
3075        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
3076    {
3077        self.original_request = v.map(|x| x.into());
3078        self
3079    }
3080
3081    /// Sets the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3082    ///
3083    /// # Example
3084    /// ```ignore,no_run
3085    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3086    /// use wkt::Timestamp;
3087    /// let x = UpdateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3088    /// ```
3089    pub fn set_start_time<T>(mut self, v: T) -> Self
3090    where
3091        T: std::convert::Into<wkt::Timestamp>,
3092    {
3093        self.start_time = std::option::Option::Some(v.into());
3094        self
3095    }
3096
3097    /// Sets or clears the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3098    ///
3099    /// # Example
3100    /// ```ignore,no_run
3101    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3102    /// use wkt::Timestamp;
3103    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3104    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3105    /// ```
3106    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3107    where
3108        T: std::convert::Into<wkt::Timestamp>,
3109    {
3110        self.start_time = v.map(|x| x.into());
3111        self
3112    }
3113
3114    /// Sets the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3115    ///
3116    /// # Example
3117    /// ```ignore,no_run
3118    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3119    /// use wkt::Timestamp;
3120    /// let x = UpdateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3121    /// ```
3122    pub fn set_end_time<T>(mut self, v: T) -> Self
3123    where
3124        T: std::convert::Into<wkt::Timestamp>,
3125    {
3126        self.end_time = std::option::Option::Some(v.into());
3127        self
3128    }
3129
3130    /// Sets or clears the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3131    ///
3132    /// # Example
3133    /// ```ignore,no_run
3134    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3135    /// use wkt::Timestamp;
3136    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3137    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3138    /// ```
3139    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3140    where
3141        T: std::convert::Into<wkt::Timestamp>,
3142    {
3143        self.end_time = v.map(|x| x.into());
3144        self
3145    }
3146}
3147
3148impl wkt::message::Message for UpdateLogicalViewMetadata {
3149    fn typename() -> &'static str {
3150        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewMetadata"
3151    }
3152}
3153
3154/// Request message for BigtableInstanceAdmin.DeleteLogicalView.
3155#[derive(Clone, Default, PartialEq)]
3156#[non_exhaustive]
3157pub struct DeleteLogicalViewRequest {
3158    /// Required. The unique name of the logical view to be deleted.
3159    /// Format:
3160    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
3161    pub name: std::string::String,
3162
3163    /// Optional. The current etag of the logical view.
3164    /// If an etag is provided and does not match the current etag of the
3165    /// logical view, deletion will be blocked and an ABORTED error will be
3166    /// returned.
3167    pub etag: std::string::String,
3168
3169    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3170}
3171
3172impl DeleteLogicalViewRequest {
3173    /// Creates a new default instance.
3174    pub fn new() -> Self {
3175        std::default::Default::default()
3176    }
3177
3178    /// Sets the value of [name][crate::model::DeleteLogicalViewRequest::name].
3179    ///
3180    /// # Example
3181    /// ```ignore,no_run
3182    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3183    /// # let project_id = "project_id";
3184    /// # let instance_id = "instance_id";
3185    /// # let logical_view_id = "logical_view_id";
3186    /// let x = DeleteLogicalViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"));
3187    /// ```
3188    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3189        self.name = v.into();
3190        self
3191    }
3192
3193    /// Sets the value of [etag][crate::model::DeleteLogicalViewRequest::etag].
3194    ///
3195    /// # Example
3196    /// ```ignore,no_run
3197    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3198    /// let x = DeleteLogicalViewRequest::new().set_etag("example");
3199    /// ```
3200    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3201        self.etag = v.into();
3202        self
3203    }
3204}
3205
3206impl wkt::message::Message for DeleteLogicalViewRequest {
3207    fn typename() -> &'static str {
3208        "type.googleapis.com/google.bigtable.admin.v2.DeleteLogicalViewRequest"
3209    }
3210}
3211
3212/// Request message for BigtableInstanceAdmin.CreateMaterializedView.
3213#[derive(Clone, Default, PartialEq)]
3214#[non_exhaustive]
3215pub struct CreateMaterializedViewRequest {
3216    /// Required. The parent instance where this materialized view will be created.
3217    /// Format: `projects/{project}/instances/{instance}`.
3218    pub parent: std::string::String,
3219
3220    /// Required. The ID to use for the materialized view, which will become the
3221    /// final component of the materialized view's resource name.
3222    pub materialized_view_id: std::string::String,
3223
3224    /// Required. The materialized view to create.
3225    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3226
3227    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3228}
3229
3230impl CreateMaterializedViewRequest {
3231    /// Creates a new default instance.
3232    pub fn new() -> Self {
3233        std::default::Default::default()
3234    }
3235
3236    /// Sets the value of [parent][crate::model::CreateMaterializedViewRequest::parent].
3237    ///
3238    /// # Example
3239    /// ```ignore,no_run
3240    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3241    /// # let project_id = "project_id";
3242    /// # let instance_id = "instance_id";
3243    /// let x = CreateMaterializedViewRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
3244    /// ```
3245    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3246        self.parent = v.into();
3247        self
3248    }
3249
3250    /// Sets the value of [materialized_view_id][crate::model::CreateMaterializedViewRequest::materialized_view_id].
3251    ///
3252    /// # Example
3253    /// ```ignore,no_run
3254    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3255    /// let x = CreateMaterializedViewRequest::new().set_materialized_view_id("example");
3256    /// ```
3257    pub fn set_materialized_view_id<T: std::convert::Into<std::string::String>>(
3258        mut self,
3259        v: T,
3260    ) -> Self {
3261        self.materialized_view_id = v.into();
3262        self
3263    }
3264
3265    /// Sets the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3266    ///
3267    /// # Example
3268    /// ```ignore,no_run
3269    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3270    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3271    /// let x = CreateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3272    /// ```
3273    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3274    where
3275        T: std::convert::Into<crate::model::MaterializedView>,
3276    {
3277        self.materialized_view = std::option::Option::Some(v.into());
3278        self
3279    }
3280
3281    /// Sets or clears the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3282    ///
3283    /// # Example
3284    /// ```ignore,no_run
3285    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3286    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3287    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3288    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3289    /// ```
3290    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3291    where
3292        T: std::convert::Into<crate::model::MaterializedView>,
3293    {
3294        self.materialized_view = v.map(|x| x.into());
3295        self
3296    }
3297}
3298
3299impl wkt::message::Message for CreateMaterializedViewRequest {
3300    fn typename() -> &'static str {
3301        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewRequest"
3302    }
3303}
3304
3305/// The metadata for the Operation returned by CreateMaterializedView.
3306#[derive(Clone, Default, PartialEq)]
3307#[non_exhaustive]
3308pub struct CreateMaterializedViewMetadata {
3309    /// The request that prompted the initiation of this CreateMaterializedView
3310    /// operation.
3311    pub original_request: std::option::Option<crate::model::CreateMaterializedViewRequest>,
3312
3313    /// The time at which this operation started.
3314    pub start_time: std::option::Option<wkt::Timestamp>,
3315
3316    /// If set, the time at which this operation finished or was canceled.
3317    pub end_time: std::option::Option<wkt::Timestamp>,
3318
3319    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3320}
3321
3322impl CreateMaterializedViewMetadata {
3323    /// Creates a new default instance.
3324    pub fn new() -> Self {
3325        std::default::Default::default()
3326    }
3327
3328    /// Sets the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3329    ///
3330    /// # Example
3331    /// ```ignore,no_run
3332    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3333    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3334    /// let x = CreateMaterializedViewMetadata::new().set_original_request(CreateMaterializedViewRequest::default()/* use setters */);
3335    /// ```
3336    pub fn set_original_request<T>(mut self, v: T) -> Self
3337    where
3338        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3339    {
3340        self.original_request = std::option::Option::Some(v.into());
3341        self
3342    }
3343
3344    /// Sets or clears the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3345    ///
3346    /// # Example
3347    /// ```ignore,no_run
3348    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3349    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3350    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(Some(CreateMaterializedViewRequest::default()/* use setters */));
3351    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(None::<CreateMaterializedViewRequest>);
3352    /// ```
3353    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3354    where
3355        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3356    {
3357        self.original_request = v.map(|x| x.into());
3358        self
3359    }
3360
3361    /// Sets the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3362    ///
3363    /// # Example
3364    /// ```ignore,no_run
3365    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3366    /// use wkt::Timestamp;
3367    /// let x = CreateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3368    /// ```
3369    pub fn set_start_time<T>(mut self, v: T) -> Self
3370    where
3371        T: std::convert::Into<wkt::Timestamp>,
3372    {
3373        self.start_time = std::option::Option::Some(v.into());
3374        self
3375    }
3376
3377    /// Sets or clears the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3378    ///
3379    /// # Example
3380    /// ```ignore,no_run
3381    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3382    /// use wkt::Timestamp;
3383    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3384    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3385    /// ```
3386    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3387    where
3388        T: std::convert::Into<wkt::Timestamp>,
3389    {
3390        self.start_time = v.map(|x| x.into());
3391        self
3392    }
3393
3394    /// Sets the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3395    ///
3396    /// # Example
3397    /// ```ignore,no_run
3398    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3399    /// use wkt::Timestamp;
3400    /// let x = CreateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3401    /// ```
3402    pub fn set_end_time<T>(mut self, v: T) -> Self
3403    where
3404        T: std::convert::Into<wkt::Timestamp>,
3405    {
3406        self.end_time = std::option::Option::Some(v.into());
3407        self
3408    }
3409
3410    /// Sets or clears the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3411    ///
3412    /// # Example
3413    /// ```ignore,no_run
3414    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3415    /// use wkt::Timestamp;
3416    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3417    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3418    /// ```
3419    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3420    where
3421        T: std::convert::Into<wkt::Timestamp>,
3422    {
3423        self.end_time = v.map(|x| x.into());
3424        self
3425    }
3426}
3427
3428impl wkt::message::Message for CreateMaterializedViewMetadata {
3429    fn typename() -> &'static str {
3430        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewMetadata"
3431    }
3432}
3433
3434/// Request message for BigtableInstanceAdmin.GetMaterializedView.
3435#[derive(Clone, Default, PartialEq)]
3436#[non_exhaustive]
3437pub struct GetMaterializedViewRequest {
3438    /// Required. The unique name of the requested materialized view. Values are of
3439    /// the form
3440    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3441    pub name: std::string::String,
3442
3443    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3444}
3445
3446impl GetMaterializedViewRequest {
3447    /// Creates a new default instance.
3448    pub fn new() -> Self {
3449        std::default::Default::default()
3450    }
3451
3452    /// Sets the value of [name][crate::model::GetMaterializedViewRequest::name].
3453    ///
3454    /// # Example
3455    /// ```ignore,no_run
3456    /// # use google_cloud_bigtable_admin_v2::model::GetMaterializedViewRequest;
3457    /// # let project_id = "project_id";
3458    /// # let instance_id = "instance_id";
3459    /// # let materialized_view_id = "materialized_view_id";
3460    /// let x = GetMaterializedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"));
3461    /// ```
3462    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3463        self.name = v.into();
3464        self
3465    }
3466}
3467
3468impl wkt::message::Message for GetMaterializedViewRequest {
3469    fn typename() -> &'static str {
3470        "type.googleapis.com/google.bigtable.admin.v2.GetMaterializedViewRequest"
3471    }
3472}
3473
3474/// Request message for BigtableInstanceAdmin.ListMaterializedViews.
3475#[derive(Clone, Default, PartialEq)]
3476#[non_exhaustive]
3477pub struct ListMaterializedViewsRequest {
3478    /// Required. The unique name of the instance for which the list of
3479    /// materialized views is requested. Values are of the form
3480    /// `projects/{project}/instances/{instance}`.
3481    pub parent: std::string::String,
3482
3483    /// Optional. The maximum number of materialized views to return. The service
3484    /// may return fewer than this value
3485    pub page_size: i32,
3486
3487    /// Optional. A page token, received from a previous `ListMaterializedViews`
3488    /// call. Provide this to retrieve the subsequent page.
3489    ///
3490    /// When paginating, all other parameters provided to `ListMaterializedViews`
3491    /// must match the call that provided the page token.
3492    pub page_token: std::string::String,
3493
3494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3495}
3496
3497impl ListMaterializedViewsRequest {
3498    /// Creates a new default instance.
3499    pub fn new() -> Self {
3500        std::default::Default::default()
3501    }
3502
3503    /// Sets the value of [parent][crate::model::ListMaterializedViewsRequest::parent].
3504    ///
3505    /// # Example
3506    /// ```ignore,no_run
3507    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3508    /// # let project_id = "project_id";
3509    /// # let instance_id = "instance_id";
3510    /// let x = ListMaterializedViewsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
3511    /// ```
3512    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3513        self.parent = v.into();
3514        self
3515    }
3516
3517    /// Sets the value of [page_size][crate::model::ListMaterializedViewsRequest::page_size].
3518    ///
3519    /// # Example
3520    /// ```ignore,no_run
3521    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3522    /// let x = ListMaterializedViewsRequest::new().set_page_size(42);
3523    /// ```
3524    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3525        self.page_size = v.into();
3526        self
3527    }
3528
3529    /// Sets the value of [page_token][crate::model::ListMaterializedViewsRequest::page_token].
3530    ///
3531    /// # Example
3532    /// ```ignore,no_run
3533    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3534    /// let x = ListMaterializedViewsRequest::new().set_page_token("example");
3535    /// ```
3536    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3537        self.page_token = v.into();
3538        self
3539    }
3540}
3541
3542impl wkt::message::Message for ListMaterializedViewsRequest {
3543    fn typename() -> &'static str {
3544        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsRequest"
3545    }
3546}
3547
3548/// Response message for BigtableInstanceAdmin.ListMaterializedViews.
3549#[derive(Clone, Default, PartialEq)]
3550#[non_exhaustive]
3551pub struct ListMaterializedViewsResponse {
3552    /// The list of requested materialized views.
3553    pub materialized_views: std::vec::Vec<crate::model::MaterializedView>,
3554
3555    /// A token, which can be sent as `page_token` to retrieve the next page.
3556    /// If this field is omitted, there are no subsequent pages.
3557    pub next_page_token: std::string::String,
3558
3559    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3560}
3561
3562impl ListMaterializedViewsResponse {
3563    /// Creates a new default instance.
3564    pub fn new() -> Self {
3565        std::default::Default::default()
3566    }
3567
3568    /// Sets the value of [materialized_views][crate::model::ListMaterializedViewsResponse::materialized_views].
3569    ///
3570    /// # Example
3571    /// ```ignore,no_run
3572    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
3573    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3574    /// let x = ListMaterializedViewsResponse::new()
3575    ///     .set_materialized_views([
3576    ///         MaterializedView::default()/* use setters */,
3577    ///         MaterializedView::default()/* use (different) setters */,
3578    ///     ]);
3579    /// ```
3580    pub fn set_materialized_views<T, V>(mut self, v: T) -> Self
3581    where
3582        T: std::iter::IntoIterator<Item = V>,
3583        V: std::convert::Into<crate::model::MaterializedView>,
3584    {
3585        use std::iter::Iterator;
3586        self.materialized_views = v.into_iter().map(|i| i.into()).collect();
3587        self
3588    }
3589
3590    /// Sets the value of [next_page_token][crate::model::ListMaterializedViewsResponse::next_page_token].
3591    ///
3592    /// # Example
3593    /// ```ignore,no_run
3594    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
3595    /// let x = ListMaterializedViewsResponse::new().set_next_page_token("example");
3596    /// ```
3597    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3598        self.next_page_token = v.into();
3599        self
3600    }
3601}
3602
3603impl wkt::message::Message for ListMaterializedViewsResponse {
3604    fn typename() -> &'static str {
3605        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsResponse"
3606    }
3607}
3608
3609#[doc(hidden)]
3610impl google_cloud_gax::paginator::internal::PageableResponse for ListMaterializedViewsResponse {
3611    type PageItem = crate::model::MaterializedView;
3612
3613    fn items(self) -> std::vec::Vec<Self::PageItem> {
3614        self.materialized_views
3615    }
3616
3617    fn next_page_token(&self) -> std::string::String {
3618        use std::clone::Clone;
3619        self.next_page_token.clone()
3620    }
3621}
3622
3623/// Request message for BigtableInstanceAdmin.UpdateMaterializedView.
3624#[derive(Clone, Default, PartialEq)]
3625#[non_exhaustive]
3626pub struct UpdateMaterializedViewRequest {
3627    /// Required. The materialized view to update.
3628    ///
3629    /// The materialized view's `name` field is used to identify the view to
3630    /// update. Format:
3631    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3632    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3633
3634    /// Optional. The list of fields to update.
3635    pub update_mask: std::option::Option<wkt::FieldMask>,
3636
3637    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3638}
3639
3640impl UpdateMaterializedViewRequest {
3641    /// Creates a new default instance.
3642    pub fn new() -> Self {
3643        std::default::Default::default()
3644    }
3645
3646    /// Sets the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3647    ///
3648    /// # Example
3649    /// ```ignore,no_run
3650    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3651    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3652    /// let x = UpdateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3653    /// ```
3654    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3655    where
3656        T: std::convert::Into<crate::model::MaterializedView>,
3657    {
3658        self.materialized_view = std::option::Option::Some(v.into());
3659        self
3660    }
3661
3662    /// Sets or clears the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3663    ///
3664    /// # Example
3665    /// ```ignore,no_run
3666    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3667    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3668    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3669    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3670    /// ```
3671    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3672    where
3673        T: std::convert::Into<crate::model::MaterializedView>,
3674    {
3675        self.materialized_view = v.map(|x| x.into());
3676        self
3677    }
3678
3679    /// Sets the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3680    ///
3681    /// # Example
3682    /// ```ignore,no_run
3683    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3684    /// use wkt::FieldMask;
3685    /// let x = UpdateMaterializedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3686    /// ```
3687    pub fn set_update_mask<T>(mut self, v: T) -> Self
3688    where
3689        T: std::convert::Into<wkt::FieldMask>,
3690    {
3691        self.update_mask = std::option::Option::Some(v.into());
3692        self
3693    }
3694
3695    /// Sets or clears the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3696    ///
3697    /// # Example
3698    /// ```ignore,no_run
3699    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3700    /// use wkt::FieldMask;
3701    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3702    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3703    /// ```
3704    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3705    where
3706        T: std::convert::Into<wkt::FieldMask>,
3707    {
3708        self.update_mask = v.map(|x| x.into());
3709        self
3710    }
3711}
3712
3713impl wkt::message::Message for UpdateMaterializedViewRequest {
3714    fn typename() -> &'static str {
3715        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewRequest"
3716    }
3717}
3718
3719/// The metadata for the Operation returned by UpdateMaterializedView.
3720#[derive(Clone, Default, PartialEq)]
3721#[non_exhaustive]
3722pub struct UpdateMaterializedViewMetadata {
3723    /// The request that prompted the initiation of this UpdateMaterializedView
3724    /// operation.
3725    pub original_request: std::option::Option<crate::model::UpdateMaterializedViewRequest>,
3726
3727    /// The time at which this operation was started.
3728    pub start_time: std::option::Option<wkt::Timestamp>,
3729
3730    /// If set, the time at which this operation finished or was canceled.
3731    pub end_time: std::option::Option<wkt::Timestamp>,
3732
3733    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3734}
3735
3736impl UpdateMaterializedViewMetadata {
3737    /// Creates a new default instance.
3738    pub fn new() -> Self {
3739        std::default::Default::default()
3740    }
3741
3742    /// Sets the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
3743    ///
3744    /// # Example
3745    /// ```ignore,no_run
3746    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3747    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3748    /// let x = UpdateMaterializedViewMetadata::new().set_original_request(UpdateMaterializedViewRequest::default()/* use setters */);
3749    /// ```
3750    pub fn set_original_request<T>(mut self, v: T) -> Self
3751    where
3752        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
3753    {
3754        self.original_request = std::option::Option::Some(v.into());
3755        self
3756    }
3757
3758    /// Sets or clears the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
3759    ///
3760    /// # Example
3761    /// ```ignore,no_run
3762    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3763    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3764    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(Some(UpdateMaterializedViewRequest::default()/* use setters */));
3765    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(None::<UpdateMaterializedViewRequest>);
3766    /// ```
3767    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3768    where
3769        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
3770    {
3771        self.original_request = v.map(|x| x.into());
3772        self
3773    }
3774
3775    /// Sets the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
3776    ///
3777    /// # Example
3778    /// ```ignore,no_run
3779    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3780    /// use wkt::Timestamp;
3781    /// let x = UpdateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3782    /// ```
3783    pub fn set_start_time<T>(mut self, v: T) -> Self
3784    where
3785        T: std::convert::Into<wkt::Timestamp>,
3786    {
3787        self.start_time = std::option::Option::Some(v.into());
3788        self
3789    }
3790
3791    /// Sets or clears the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
3792    ///
3793    /// # Example
3794    /// ```ignore,no_run
3795    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3796    /// use wkt::Timestamp;
3797    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3798    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3799    /// ```
3800    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3801    where
3802        T: std::convert::Into<wkt::Timestamp>,
3803    {
3804        self.start_time = v.map(|x| x.into());
3805        self
3806    }
3807
3808    /// Sets the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
3809    ///
3810    /// # Example
3811    /// ```ignore,no_run
3812    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3813    /// use wkt::Timestamp;
3814    /// let x = UpdateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3815    /// ```
3816    pub fn set_end_time<T>(mut self, v: T) -> Self
3817    where
3818        T: std::convert::Into<wkt::Timestamp>,
3819    {
3820        self.end_time = std::option::Option::Some(v.into());
3821        self
3822    }
3823
3824    /// Sets or clears the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
3825    ///
3826    /// # Example
3827    /// ```ignore,no_run
3828    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3829    /// use wkt::Timestamp;
3830    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3831    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3832    /// ```
3833    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3834    where
3835        T: std::convert::Into<wkt::Timestamp>,
3836    {
3837        self.end_time = v.map(|x| x.into());
3838        self
3839    }
3840}
3841
3842impl wkt::message::Message for UpdateMaterializedViewMetadata {
3843    fn typename() -> &'static str {
3844        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewMetadata"
3845    }
3846}
3847
3848/// Request message for BigtableInstanceAdmin.DeleteMaterializedView.
3849#[derive(Clone, Default, PartialEq)]
3850#[non_exhaustive]
3851pub struct DeleteMaterializedViewRequest {
3852    /// Required. The unique name of the materialized view to be deleted.
3853    /// Format:
3854    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3855    pub name: std::string::String,
3856
3857    /// Optional. The current etag of the materialized view.
3858    /// If an etag is provided and does not match the current etag of the
3859    /// materialized view, deletion will be blocked and an ABORTED error will be
3860    /// returned.
3861    pub etag: std::string::String,
3862
3863    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3864}
3865
3866impl DeleteMaterializedViewRequest {
3867    /// Creates a new default instance.
3868    pub fn new() -> Self {
3869        std::default::Default::default()
3870    }
3871
3872    /// Sets the value of [name][crate::model::DeleteMaterializedViewRequest::name].
3873    ///
3874    /// # Example
3875    /// ```ignore,no_run
3876    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
3877    /// # let project_id = "project_id";
3878    /// # let instance_id = "instance_id";
3879    /// # let materialized_view_id = "materialized_view_id";
3880    /// let x = DeleteMaterializedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"));
3881    /// ```
3882    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3883        self.name = v.into();
3884        self
3885    }
3886
3887    /// Sets the value of [etag][crate::model::DeleteMaterializedViewRequest::etag].
3888    ///
3889    /// # Example
3890    /// ```ignore,no_run
3891    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
3892    /// let x = DeleteMaterializedViewRequest::new().set_etag("example");
3893    /// ```
3894    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3895        self.etag = v.into();
3896        self
3897    }
3898}
3899
3900impl wkt::message::Message for DeleteMaterializedViewRequest {
3901    fn typename() -> &'static str {
3902        "type.googleapis.com/google.bigtable.admin.v2.DeleteMaterializedViewRequest"
3903    }
3904}
3905
3906/// The request for
3907/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
3908///
3909/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
3910#[derive(Clone, Default, PartialEq)]
3911#[non_exhaustive]
3912pub struct RestoreTableRequest {
3913    /// Required. The name of the instance in which to create the restored
3914    /// table. Values are of the form `projects/<project>/instances/<instance>`.
3915    pub parent: std::string::String,
3916
3917    /// Required. The id of the table to create and restore to. This
3918    /// table must not already exist. The `table_id` appended to
3919    /// `parent` forms the full table name of the form
3920    /// `projects/<project>/instances/<instance>/tables/<table_id>`.
3921    pub table_id: std::string::String,
3922
3923    /// Required. The source from which to restore.
3924    pub source: std::option::Option<crate::model::restore_table_request::Source>,
3925
3926    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3927}
3928
3929impl RestoreTableRequest {
3930    /// Creates a new default instance.
3931    pub fn new() -> Self {
3932        std::default::Default::default()
3933    }
3934
3935    /// Sets the value of [parent][crate::model::RestoreTableRequest::parent].
3936    ///
3937    /// # Example
3938    /// ```ignore,no_run
3939    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3940    /// # let project_id = "project_id";
3941    /// # let instance_id = "instance_id";
3942    /// let x = RestoreTableRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
3943    /// ```
3944    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3945        self.parent = v.into();
3946        self
3947    }
3948
3949    /// Sets the value of [table_id][crate::model::RestoreTableRequest::table_id].
3950    ///
3951    /// # Example
3952    /// ```ignore,no_run
3953    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3954    /// let x = RestoreTableRequest::new().set_table_id("example");
3955    /// ```
3956    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3957        self.table_id = v.into();
3958        self
3959    }
3960
3961    /// Sets the value of [source][crate::model::RestoreTableRequest::source].
3962    ///
3963    /// Note that all the setters affecting `source` are mutually
3964    /// exclusive.
3965    ///
3966    /// # Example
3967    /// ```ignore,no_run
3968    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3969    /// use google_cloud_bigtable_admin_v2::model::restore_table_request::Source;
3970    /// let x = RestoreTableRequest::new().set_source(Some(Source::Backup("example".to_string())));
3971    /// ```
3972    pub fn set_source<
3973        T: std::convert::Into<std::option::Option<crate::model::restore_table_request::Source>>,
3974    >(
3975        mut self,
3976        v: T,
3977    ) -> Self {
3978        self.source = v.into();
3979        self
3980    }
3981
3982    /// The value of [source][crate::model::RestoreTableRequest::source]
3983    /// if it holds a `Backup`, `None` if the field is not set or
3984    /// holds a different branch.
3985    pub fn backup(&self) -> std::option::Option<&std::string::String> {
3986        #[allow(unreachable_patterns)]
3987        self.source.as_ref().and_then(|v| match v {
3988            crate::model::restore_table_request::Source::Backup(v) => std::option::Option::Some(v),
3989            _ => std::option::Option::None,
3990        })
3991    }
3992
3993    /// Sets the value of [source][crate::model::RestoreTableRequest::source]
3994    /// to hold a `Backup`.
3995    ///
3996    /// Note that all the setters affecting `source` are
3997    /// mutually exclusive.
3998    ///
3999    /// # Example
4000    /// ```ignore,no_run
4001    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
4002    /// # let project_id = "project_id";
4003    /// # let instance_id = "instance_id";
4004    /// # let cluster_id = "cluster_id";
4005    /// # let backup_id = "backup_id";
4006    /// let x = RestoreTableRequest::new().set_backup(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
4007    /// assert!(x.backup().is_some());
4008    /// ```
4009    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4010        self.source = std::option::Option::Some(
4011            crate::model::restore_table_request::Source::Backup(v.into()),
4012        );
4013        self
4014    }
4015}
4016
4017impl wkt::message::Message for RestoreTableRequest {
4018    fn typename() -> &'static str {
4019        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableRequest"
4020    }
4021}
4022
4023/// Defines additional types related to [RestoreTableRequest].
4024pub mod restore_table_request {
4025    #[allow(unused_imports)]
4026    use super::*;
4027
4028    /// Required. The source from which to restore.
4029    #[derive(Clone, Debug, PartialEq)]
4030    #[non_exhaustive]
4031    pub enum Source {
4032        /// Name of the backup from which to restore.  Values are of the form
4033        /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
4034        Backup(std::string::String),
4035    }
4036}
4037
4038/// Metadata type for the long-running operation returned by
4039/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
4040///
4041/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
4042#[derive(Clone, Default, PartialEq)]
4043#[non_exhaustive]
4044pub struct RestoreTableMetadata {
4045    /// Name of the table being created and restored to.
4046    pub name: std::string::String,
4047
4048    /// The type of the restore source.
4049    pub source_type: crate::model::RestoreSourceType,
4050
4051    /// If exists, the name of the long-running operation that will be used to
4052    /// track the post-restore optimization process to optimize the performance of
4053    /// the restored table. The metadata type of the long-running operation is
4054    /// [OptimizeRestoreTableMetadata][]. The response type is
4055    /// [Empty][google.protobuf.Empty]. This long-running operation may be
4056    /// automatically created by the system if applicable after the
4057    /// RestoreTable long-running operation completes successfully. This operation
4058    /// may not be created if the table is already optimized or the restore was
4059    /// not successful.
4060    pub optimize_table_operation_name: std::string::String,
4061
4062    /// The progress of the
4063    /// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]
4064    /// operation.
4065    ///
4066    /// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
4067    pub progress: std::option::Option<crate::model::OperationProgress>,
4068
4069    /// Information about the source used to restore the table, as specified by
4070    /// `source` in
4071    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
4072    ///
4073    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
4074    pub source_info: std::option::Option<crate::model::restore_table_metadata::SourceInfo>,
4075
4076    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4077}
4078
4079impl RestoreTableMetadata {
4080    /// Creates a new default instance.
4081    pub fn new() -> Self {
4082        std::default::Default::default()
4083    }
4084
4085    /// Sets the value of [name][crate::model::RestoreTableMetadata::name].
4086    ///
4087    /// # Example
4088    /// ```ignore,no_run
4089    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4090    /// let x = RestoreTableMetadata::new().set_name("example");
4091    /// ```
4092    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4093        self.name = v.into();
4094        self
4095    }
4096
4097    /// Sets the value of [source_type][crate::model::RestoreTableMetadata::source_type].
4098    ///
4099    /// # Example
4100    /// ```ignore,no_run
4101    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4102    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
4103    /// let x0 = RestoreTableMetadata::new().set_source_type(RestoreSourceType::Backup);
4104    /// ```
4105    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
4106        mut self,
4107        v: T,
4108    ) -> Self {
4109        self.source_type = v.into();
4110        self
4111    }
4112
4113    /// Sets the value of [optimize_table_operation_name][crate::model::RestoreTableMetadata::optimize_table_operation_name].
4114    ///
4115    /// # Example
4116    /// ```ignore,no_run
4117    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4118    /// let x = RestoreTableMetadata::new().set_optimize_table_operation_name("example");
4119    /// ```
4120    pub fn set_optimize_table_operation_name<T: std::convert::Into<std::string::String>>(
4121        mut self,
4122        v: T,
4123    ) -> Self {
4124        self.optimize_table_operation_name = v.into();
4125        self
4126    }
4127
4128    /// Sets the value of [progress][crate::model::RestoreTableMetadata::progress].
4129    ///
4130    /// # Example
4131    /// ```ignore,no_run
4132    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4133    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4134    /// let x = RestoreTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4135    /// ```
4136    pub fn set_progress<T>(mut self, v: T) -> Self
4137    where
4138        T: std::convert::Into<crate::model::OperationProgress>,
4139    {
4140        self.progress = std::option::Option::Some(v.into());
4141        self
4142    }
4143
4144    /// Sets or clears the value of [progress][crate::model::RestoreTableMetadata::progress].
4145    ///
4146    /// # Example
4147    /// ```ignore,no_run
4148    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4149    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4150    /// let x = RestoreTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4151    /// let x = RestoreTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4152    /// ```
4153    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4154    where
4155        T: std::convert::Into<crate::model::OperationProgress>,
4156    {
4157        self.progress = v.map(|x| x.into());
4158        self
4159    }
4160
4161    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info].
4162    ///
4163    /// Note that all the setters affecting `source_info` are mutually
4164    /// exclusive.
4165    ///
4166    /// # Example
4167    /// ```ignore,no_run
4168    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4169    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4170    /// let x = RestoreTableMetadata::new().set_source_info(Some(
4171    ///     google_cloud_bigtable_admin_v2::model::restore_table_metadata::SourceInfo::BackupInfo(BackupInfo::default().into())));
4172    /// ```
4173    pub fn set_source_info<
4174        T: std::convert::Into<std::option::Option<crate::model::restore_table_metadata::SourceInfo>>,
4175    >(
4176        mut self,
4177        v: T,
4178    ) -> Self {
4179        self.source_info = v.into();
4180        self
4181    }
4182
4183    /// The value of [source_info][crate::model::RestoreTableMetadata::source_info]
4184    /// if it holds a `BackupInfo`, `None` if the field is not set or
4185    /// holds a different branch.
4186    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
4187        #[allow(unreachable_patterns)]
4188        self.source_info.as_ref().and_then(|v| match v {
4189            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v) => {
4190                std::option::Option::Some(v)
4191            }
4192            _ => std::option::Option::None,
4193        })
4194    }
4195
4196    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info]
4197    /// to hold a `BackupInfo`.
4198    ///
4199    /// Note that all the setters affecting `source_info` are
4200    /// mutually exclusive.
4201    ///
4202    /// # Example
4203    /// ```ignore,no_run
4204    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4205    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4206    /// let x = RestoreTableMetadata::new().set_backup_info(BackupInfo::default()/* use setters */);
4207    /// assert!(x.backup_info().is_some());
4208    /// ```
4209    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
4210        mut self,
4211        v: T,
4212    ) -> Self {
4213        self.source_info = std::option::Option::Some(
4214            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v.into()),
4215        );
4216        self
4217    }
4218}
4219
4220impl wkt::message::Message for RestoreTableMetadata {
4221    fn typename() -> &'static str {
4222        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableMetadata"
4223    }
4224}
4225
4226/// Defines additional types related to [RestoreTableMetadata].
4227pub mod restore_table_metadata {
4228    #[allow(unused_imports)]
4229    use super::*;
4230
4231    /// Information about the source used to restore the table, as specified by
4232    /// `source` in
4233    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
4234    ///
4235    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
4236    #[derive(Clone, Debug, PartialEq)]
4237    #[non_exhaustive]
4238    pub enum SourceInfo {
4239        #[allow(missing_docs)]
4240        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
4241    }
4242}
4243
4244/// Metadata type for the long-running operation used to track the progress
4245/// of optimizations performed on a newly restored table. This long-running
4246/// operation is automatically created by the system after the successful
4247/// completion of a table restore, and cannot be cancelled.
4248#[derive(Clone, Default, PartialEq)]
4249#[non_exhaustive]
4250pub struct OptimizeRestoredTableMetadata {
4251    /// Name of the restored table being optimized.
4252    pub name: std::string::String,
4253
4254    /// The progress of the post-restore optimizations.
4255    pub progress: std::option::Option<crate::model::OperationProgress>,
4256
4257    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4258}
4259
4260impl OptimizeRestoredTableMetadata {
4261    /// Creates a new default instance.
4262    pub fn new() -> Self {
4263        std::default::Default::default()
4264    }
4265
4266    /// Sets the value of [name][crate::model::OptimizeRestoredTableMetadata::name].
4267    ///
4268    /// # Example
4269    /// ```ignore,no_run
4270    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4271    /// let x = OptimizeRestoredTableMetadata::new().set_name("example");
4272    /// ```
4273    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4274        self.name = v.into();
4275        self
4276    }
4277
4278    /// Sets the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4279    ///
4280    /// # Example
4281    /// ```ignore,no_run
4282    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4283    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4284    /// let x = OptimizeRestoredTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4285    /// ```
4286    pub fn set_progress<T>(mut self, v: T) -> Self
4287    where
4288        T: std::convert::Into<crate::model::OperationProgress>,
4289    {
4290        self.progress = std::option::Option::Some(v.into());
4291        self
4292    }
4293
4294    /// Sets or clears the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4295    ///
4296    /// # Example
4297    /// ```ignore,no_run
4298    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4299    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4300    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4301    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4302    /// ```
4303    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4304    where
4305        T: std::convert::Into<crate::model::OperationProgress>,
4306    {
4307        self.progress = v.map(|x| x.into());
4308        self
4309    }
4310}
4311
4312impl wkt::message::Message for OptimizeRestoredTableMetadata {
4313    fn typename() -> &'static str {
4314        "type.googleapis.com/google.bigtable.admin.v2.OptimizeRestoredTableMetadata"
4315    }
4316}
4317
4318/// Request message for
4319/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
4320///
4321/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]: crate::client::BigtableTableAdmin::create_table
4322#[derive(Clone, Default, PartialEq)]
4323#[non_exhaustive]
4324pub struct CreateTableRequest {
4325    /// Required. The unique name of the instance in which to create the table.
4326    /// Values are of the form `projects/{project}/instances/{instance}`.
4327    pub parent: std::string::String,
4328
4329    /// Required. The name by which the new table should be referred to within the
4330    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4331    /// Maximum 50 characters.
4332    pub table_id: std::string::String,
4333
4334    /// Required. The Table to create.
4335    pub table: std::option::Option<crate::model::Table>,
4336
4337    /// The optional list of row keys that will be used to initially split the
4338    /// table into several tablets (tablets are similar to HBase regions).
4339    /// Given two split keys, `s1` and `s2`, three tablets will be created,
4340    /// spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
4341    ///
4342    /// Example:
4343    ///
4344    /// * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
4345    ///   `"other", "zz"]`
4346    /// * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
4347    /// * Key assignment:
4348    ///   - Tablet 1 `[, apple)                => {"a"}.`
4349    ///   - Tablet 2 `[apple, customer_1)      => {"apple", "custom"}.`
4350    ///   - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
4351    ///   - Tablet 4 `[customer_2, other)      => {"customer_2"}.`
4352    ///   - Tablet 5 `[other, )                => {"other", "zz"}.`
4353    pub initial_splits: std::vec::Vec<crate::model::create_table_request::Split>,
4354
4355    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4356}
4357
4358impl CreateTableRequest {
4359    /// Creates a new default instance.
4360    pub fn new() -> Self {
4361        std::default::Default::default()
4362    }
4363
4364    /// Sets the value of [parent][crate::model::CreateTableRequest::parent].
4365    ///
4366    /// # Example
4367    /// ```ignore,no_run
4368    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4369    /// # let project_id = "project_id";
4370    /// # let instance_id = "instance_id";
4371    /// let x = CreateTableRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
4372    /// ```
4373    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4374        self.parent = v.into();
4375        self
4376    }
4377
4378    /// Sets the value of [table_id][crate::model::CreateTableRequest::table_id].
4379    ///
4380    /// # Example
4381    /// ```ignore,no_run
4382    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4383    /// let x = CreateTableRequest::new().set_table_id("example");
4384    /// ```
4385    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4386        self.table_id = v.into();
4387        self
4388    }
4389
4390    /// Sets the value of [table][crate::model::CreateTableRequest::table].
4391    ///
4392    /// # Example
4393    /// ```ignore,no_run
4394    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4395    /// use google_cloud_bigtable_admin_v2::model::Table;
4396    /// let x = CreateTableRequest::new().set_table(Table::default()/* use setters */);
4397    /// ```
4398    pub fn set_table<T>(mut self, v: T) -> Self
4399    where
4400        T: std::convert::Into<crate::model::Table>,
4401    {
4402        self.table = std::option::Option::Some(v.into());
4403        self
4404    }
4405
4406    /// Sets or clears the value of [table][crate::model::CreateTableRequest::table].
4407    ///
4408    /// # Example
4409    /// ```ignore,no_run
4410    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4411    /// use google_cloud_bigtable_admin_v2::model::Table;
4412    /// let x = CreateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
4413    /// let x = CreateTableRequest::new().set_or_clear_table(None::<Table>);
4414    /// ```
4415    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4416    where
4417        T: std::convert::Into<crate::model::Table>,
4418    {
4419        self.table = v.map(|x| x.into());
4420        self
4421    }
4422
4423    /// Sets the value of [initial_splits][crate::model::CreateTableRequest::initial_splits].
4424    ///
4425    /// # Example
4426    /// ```ignore,no_run
4427    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4428    /// use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4429    /// let x = CreateTableRequest::new()
4430    ///     .set_initial_splits([
4431    ///         Split::default()/* use setters */,
4432    ///         Split::default()/* use (different) setters */,
4433    ///     ]);
4434    /// ```
4435    pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
4436    where
4437        T: std::iter::IntoIterator<Item = V>,
4438        V: std::convert::Into<crate::model::create_table_request::Split>,
4439    {
4440        use std::iter::Iterator;
4441        self.initial_splits = v.into_iter().map(|i| i.into()).collect();
4442        self
4443    }
4444}
4445
4446impl wkt::message::Message for CreateTableRequest {
4447    fn typename() -> &'static str {
4448        "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest"
4449    }
4450}
4451
4452/// Defines additional types related to [CreateTableRequest].
4453pub mod create_table_request {
4454    #[allow(unused_imports)]
4455    use super::*;
4456
4457    /// An initial split point for a newly created table.
4458    #[derive(Clone, Default, PartialEq)]
4459    #[non_exhaustive]
4460    pub struct Split {
4461        /// Row key to use as an initial tablet boundary.
4462        pub key: ::bytes::Bytes,
4463
4464        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4465    }
4466
4467    impl Split {
4468        /// Creates a new default instance.
4469        pub fn new() -> Self {
4470            std::default::Default::default()
4471        }
4472
4473        /// Sets the value of [key][crate::model::create_table_request::Split::key].
4474        ///
4475        /// # Example
4476        /// ```ignore,no_run
4477        /// # use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4478        /// let x = Split::new().set_key(bytes::Bytes::from_static(b"example"));
4479        /// ```
4480        pub fn set_key<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4481            self.key = v.into();
4482            self
4483        }
4484    }
4485
4486    impl wkt::message::Message for Split {
4487        fn typename() -> &'static str {
4488            "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest.Split"
4489        }
4490    }
4491}
4492
4493/// Request message for
4494/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
4495///
4496/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4497/// feature is not currently available to most Cloud Bigtable customers. This
4498/// feature might be changed in backward-incompatible ways and is not recommended
4499/// for production use. It is not subject to any SLA or deprecation policy.
4500///
4501/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]: crate::client::BigtableTableAdmin::create_table_from_snapshot
4502#[derive(Clone, Default, PartialEq)]
4503#[non_exhaustive]
4504pub struct CreateTableFromSnapshotRequest {
4505    /// Required. The unique name of the instance in which to create the table.
4506    /// Values are of the form `projects/{project}/instances/{instance}`.
4507    pub parent: std::string::String,
4508
4509    /// Required. The name by which the new table should be referred to within the
4510    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4511    pub table_id: std::string::String,
4512
4513    /// Required. The unique name of the snapshot from which to restore the table.
4514    /// The snapshot and the table must be in the same instance. Values are of the
4515    /// form
4516    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
4517    pub source_snapshot: std::string::String,
4518
4519    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4520}
4521
4522impl CreateTableFromSnapshotRequest {
4523    /// Creates a new default instance.
4524    pub fn new() -> Self {
4525        std::default::Default::default()
4526    }
4527
4528    /// Sets the value of [parent][crate::model::CreateTableFromSnapshotRequest::parent].
4529    ///
4530    /// # Example
4531    /// ```ignore,no_run
4532    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4533    /// # let project_id = "project_id";
4534    /// # let instance_id = "instance_id";
4535    /// let x = CreateTableFromSnapshotRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
4536    /// ```
4537    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4538        self.parent = v.into();
4539        self
4540    }
4541
4542    /// Sets the value of [table_id][crate::model::CreateTableFromSnapshotRequest::table_id].
4543    ///
4544    /// # Example
4545    /// ```ignore,no_run
4546    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4547    /// let x = CreateTableFromSnapshotRequest::new().set_table_id("example");
4548    /// ```
4549    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4550        self.table_id = v.into();
4551        self
4552    }
4553
4554    /// Sets the value of [source_snapshot][crate::model::CreateTableFromSnapshotRequest::source_snapshot].
4555    ///
4556    /// # Example
4557    /// ```ignore,no_run
4558    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4559    /// # let project_id = "project_id";
4560    /// # let instance_id = "instance_id";
4561    /// # let cluster_id = "cluster_id";
4562    /// # let snapshot_id = "snapshot_id";
4563    /// let x = CreateTableFromSnapshotRequest::new().set_source_snapshot(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
4564    /// ```
4565    pub fn set_source_snapshot<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4566        self.source_snapshot = v.into();
4567        self
4568    }
4569}
4570
4571impl wkt::message::Message for CreateTableFromSnapshotRequest {
4572    fn typename() -> &'static str {
4573        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotRequest"
4574    }
4575}
4576
4577/// Request message for
4578/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
4579///
4580/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]: crate::client::BigtableTableAdmin::drop_row_range
4581#[derive(Clone, Default, PartialEq)]
4582#[non_exhaustive]
4583pub struct DropRowRangeRequest {
4584    /// Required. The unique name of the table on which to drop a range of rows.
4585    /// Values are of the form
4586    /// `projects/{project}/instances/{instance}/tables/{table}`.
4587    pub name: std::string::String,
4588
4589    /// Delete all rows or by prefix.
4590    pub target: std::option::Option<crate::model::drop_row_range_request::Target>,
4591
4592    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4593}
4594
4595impl DropRowRangeRequest {
4596    /// Creates a new default instance.
4597    pub fn new() -> Self {
4598        std::default::Default::default()
4599    }
4600
4601    /// Sets the value of [name][crate::model::DropRowRangeRequest::name].
4602    ///
4603    /// # Example
4604    /// ```ignore,no_run
4605    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4606    /// # let project_id = "project_id";
4607    /// # let instance_id = "instance_id";
4608    /// # let table_id = "table_id";
4609    /// let x = DropRowRangeRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
4610    /// ```
4611    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4612        self.name = v.into();
4613        self
4614    }
4615
4616    /// Sets the value of [target][crate::model::DropRowRangeRequest::target].
4617    ///
4618    /// Note that all the setters affecting `target` are mutually
4619    /// exclusive.
4620    ///
4621    /// # Example
4622    /// ```ignore,no_run
4623    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4624    /// use google_cloud_bigtable_admin_v2::model::drop_row_range_request::Target;
4625    /// let x = DropRowRangeRequest::new().set_target(Some(Target::RowKeyPrefix(bytes::Bytes::from_static(b"example"))));
4626    /// ```
4627    pub fn set_target<
4628        T: std::convert::Into<std::option::Option<crate::model::drop_row_range_request::Target>>,
4629    >(
4630        mut self,
4631        v: T,
4632    ) -> Self {
4633        self.target = v.into();
4634        self
4635    }
4636
4637    /// The value of [target][crate::model::DropRowRangeRequest::target]
4638    /// if it holds a `RowKeyPrefix`, `None` if the field is not set or
4639    /// holds a different branch.
4640    pub fn row_key_prefix(&self) -> std::option::Option<&::bytes::Bytes> {
4641        #[allow(unreachable_patterns)]
4642        self.target.as_ref().and_then(|v| match v {
4643            crate::model::drop_row_range_request::Target::RowKeyPrefix(v) => {
4644                std::option::Option::Some(v)
4645            }
4646            _ => std::option::Option::None,
4647        })
4648    }
4649
4650    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
4651    /// to hold a `RowKeyPrefix`.
4652    ///
4653    /// Note that all the setters affecting `target` are
4654    /// mutually exclusive.
4655    ///
4656    /// # Example
4657    /// ```ignore,no_run
4658    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4659    /// let x = DropRowRangeRequest::new().set_row_key_prefix(bytes::Bytes::from_static(b"example"));
4660    /// assert!(x.row_key_prefix().is_some());
4661    /// assert!(x.delete_all_data_from_table().is_none());
4662    /// ```
4663    pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4664        self.target = std::option::Option::Some(
4665            crate::model::drop_row_range_request::Target::RowKeyPrefix(v.into()),
4666        );
4667        self
4668    }
4669
4670    /// The value of [target][crate::model::DropRowRangeRequest::target]
4671    /// if it holds a `DeleteAllDataFromTable`, `None` if the field is not set or
4672    /// holds a different branch.
4673    pub fn delete_all_data_from_table(&self) -> std::option::Option<&bool> {
4674        #[allow(unreachable_patterns)]
4675        self.target.as_ref().and_then(|v| match v {
4676            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v) => {
4677                std::option::Option::Some(v)
4678            }
4679            _ => std::option::Option::None,
4680        })
4681    }
4682
4683    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
4684    /// to hold a `DeleteAllDataFromTable`.
4685    ///
4686    /// Note that all the setters affecting `target` are
4687    /// mutually exclusive.
4688    ///
4689    /// # Example
4690    /// ```ignore,no_run
4691    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4692    /// let x = DropRowRangeRequest::new().set_delete_all_data_from_table(true);
4693    /// assert!(x.delete_all_data_from_table().is_some());
4694    /// assert!(x.row_key_prefix().is_none());
4695    /// ```
4696    pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4697        self.target = std::option::Option::Some(
4698            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v.into()),
4699        );
4700        self
4701    }
4702}
4703
4704impl wkt::message::Message for DropRowRangeRequest {
4705    fn typename() -> &'static str {
4706        "type.googleapis.com/google.bigtable.admin.v2.DropRowRangeRequest"
4707    }
4708}
4709
4710/// Defines additional types related to [DropRowRangeRequest].
4711pub mod drop_row_range_request {
4712    #[allow(unused_imports)]
4713    use super::*;
4714
4715    /// Delete all rows or by prefix.
4716    #[derive(Clone, Debug, PartialEq)]
4717    #[non_exhaustive]
4718    pub enum Target {
4719        /// Delete all rows that start with this row key prefix. Prefix cannot be
4720        /// zero length.
4721        RowKeyPrefix(::bytes::Bytes),
4722        /// Delete all rows in the table. Setting this to false is a no-op.
4723        DeleteAllDataFromTable(bool),
4724    }
4725}
4726
4727/// Request message for
4728/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
4729///
4730/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
4731#[derive(Clone, Default, PartialEq)]
4732#[non_exhaustive]
4733pub struct ListTablesRequest {
4734    /// Required. The unique name of the instance for which tables should be
4735    /// listed. Values are of the form `projects/{project}/instances/{instance}`.
4736    pub parent: std::string::String,
4737
4738    /// The view to be applied to the returned tables' fields.
4739    /// NAME_ONLY view (default) and REPLICATION_VIEW are supported.
4740    pub view: crate::model::table::View,
4741
4742    /// Maximum number of results per page.
4743    ///
4744    /// A page_size of zero lets the server choose the number of items to return.
4745    /// A page_size which is strictly positive will return at most that many items.
4746    /// A negative page_size will cause an error.
4747    ///
4748    /// Following the first request, subsequent paginated calls are not required
4749    /// to pass a page_size. If a page_size is set in subsequent calls, it must
4750    /// match the page_size given in the first request.
4751    pub page_size: i32,
4752
4753    /// The value of `next_page_token` returned by a previous call.
4754    pub page_token: std::string::String,
4755
4756    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4757}
4758
4759impl ListTablesRequest {
4760    /// Creates a new default instance.
4761    pub fn new() -> Self {
4762        std::default::Default::default()
4763    }
4764
4765    /// Sets the value of [parent][crate::model::ListTablesRequest::parent].
4766    ///
4767    /// # Example
4768    /// ```ignore,no_run
4769    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4770    /// # let project_id = "project_id";
4771    /// # let instance_id = "instance_id";
4772    /// let x = ListTablesRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
4773    /// ```
4774    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4775        self.parent = v.into();
4776        self
4777    }
4778
4779    /// Sets the value of [view][crate::model::ListTablesRequest::view].
4780    ///
4781    /// # Example
4782    /// ```ignore,no_run
4783    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4784    /// use google_cloud_bigtable_admin_v2::model::table::View;
4785    /// let x0 = ListTablesRequest::new().set_view(View::NameOnly);
4786    /// let x1 = ListTablesRequest::new().set_view(View::SchemaView);
4787    /// let x2 = ListTablesRequest::new().set_view(View::ReplicationView);
4788    /// ```
4789    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
4790        self.view = v.into();
4791        self
4792    }
4793
4794    /// Sets the value of [page_size][crate::model::ListTablesRequest::page_size].
4795    ///
4796    /// # Example
4797    /// ```ignore,no_run
4798    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4799    /// let x = ListTablesRequest::new().set_page_size(42);
4800    /// ```
4801    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4802        self.page_size = v.into();
4803        self
4804    }
4805
4806    /// Sets the value of [page_token][crate::model::ListTablesRequest::page_token].
4807    ///
4808    /// # Example
4809    /// ```ignore,no_run
4810    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4811    /// let x = ListTablesRequest::new().set_page_token("example");
4812    /// ```
4813    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4814        self.page_token = v.into();
4815        self
4816    }
4817}
4818
4819impl wkt::message::Message for ListTablesRequest {
4820    fn typename() -> &'static str {
4821        "type.googleapis.com/google.bigtable.admin.v2.ListTablesRequest"
4822    }
4823}
4824
4825/// Response message for
4826/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
4827///
4828/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
4829#[derive(Clone, Default, PartialEq)]
4830#[non_exhaustive]
4831pub struct ListTablesResponse {
4832    /// The tables present in the requested instance.
4833    pub tables: std::vec::Vec<crate::model::Table>,
4834
4835    /// Set if not all tables could be returned in a single response.
4836    /// Pass this value to `page_token` in another request to get the next
4837    /// page of results.
4838    pub next_page_token: std::string::String,
4839
4840    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4841}
4842
4843impl ListTablesResponse {
4844    /// Creates a new default instance.
4845    pub fn new() -> Self {
4846        std::default::Default::default()
4847    }
4848
4849    /// Sets the value of [tables][crate::model::ListTablesResponse::tables].
4850    ///
4851    /// # Example
4852    /// ```ignore,no_run
4853    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
4854    /// use google_cloud_bigtable_admin_v2::model::Table;
4855    /// let x = ListTablesResponse::new()
4856    ///     .set_tables([
4857    ///         Table::default()/* use setters */,
4858    ///         Table::default()/* use (different) setters */,
4859    ///     ]);
4860    /// ```
4861    pub fn set_tables<T, V>(mut self, v: T) -> Self
4862    where
4863        T: std::iter::IntoIterator<Item = V>,
4864        V: std::convert::Into<crate::model::Table>,
4865    {
4866        use std::iter::Iterator;
4867        self.tables = v.into_iter().map(|i| i.into()).collect();
4868        self
4869    }
4870
4871    /// Sets the value of [next_page_token][crate::model::ListTablesResponse::next_page_token].
4872    ///
4873    /// # Example
4874    /// ```ignore,no_run
4875    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
4876    /// let x = ListTablesResponse::new().set_next_page_token("example");
4877    /// ```
4878    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4879        self.next_page_token = v.into();
4880        self
4881    }
4882}
4883
4884impl wkt::message::Message for ListTablesResponse {
4885    fn typename() -> &'static str {
4886        "type.googleapis.com/google.bigtable.admin.v2.ListTablesResponse"
4887    }
4888}
4889
4890#[doc(hidden)]
4891impl google_cloud_gax::paginator::internal::PageableResponse for ListTablesResponse {
4892    type PageItem = crate::model::Table;
4893
4894    fn items(self) -> std::vec::Vec<Self::PageItem> {
4895        self.tables
4896    }
4897
4898    fn next_page_token(&self) -> std::string::String {
4899        use std::clone::Clone;
4900        self.next_page_token.clone()
4901    }
4902}
4903
4904/// Request message for
4905/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
4906///
4907/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable]: crate::client::BigtableTableAdmin::get_table
4908#[derive(Clone, Default, PartialEq)]
4909#[non_exhaustive]
4910pub struct GetTableRequest {
4911    /// Required. The unique name of the requested table.
4912    /// Values are of the form
4913    /// `projects/{project}/instances/{instance}/tables/{table}`.
4914    pub name: std::string::String,
4915
4916    /// The view to be applied to the returned table's fields.
4917    /// Defaults to `SCHEMA_VIEW` if unspecified.
4918    pub view: crate::model::table::View,
4919
4920    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4921}
4922
4923impl GetTableRequest {
4924    /// Creates a new default instance.
4925    pub fn new() -> Self {
4926        std::default::Default::default()
4927    }
4928
4929    /// Sets the value of [name][crate::model::GetTableRequest::name].
4930    ///
4931    /// # Example
4932    /// ```ignore,no_run
4933    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
4934    /// # let project_id = "project_id";
4935    /// # let instance_id = "instance_id";
4936    /// # let table_id = "table_id";
4937    /// let x = GetTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
4938    /// ```
4939    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4940        self.name = v.into();
4941        self
4942    }
4943
4944    /// Sets the value of [view][crate::model::GetTableRequest::view].
4945    ///
4946    /// # Example
4947    /// ```ignore,no_run
4948    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
4949    /// use google_cloud_bigtable_admin_v2::model::table::View;
4950    /// let x0 = GetTableRequest::new().set_view(View::NameOnly);
4951    /// let x1 = GetTableRequest::new().set_view(View::SchemaView);
4952    /// let x2 = GetTableRequest::new().set_view(View::ReplicationView);
4953    /// ```
4954    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
4955        self.view = v.into();
4956        self
4957    }
4958}
4959
4960impl wkt::message::Message for GetTableRequest {
4961    fn typename() -> &'static str {
4962        "type.googleapis.com/google.bigtable.admin.v2.GetTableRequest"
4963    }
4964}
4965
4966/// The request for
4967/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
4968///
4969/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
4970#[derive(Clone, Default, PartialEq)]
4971#[non_exhaustive]
4972pub struct UpdateTableRequest {
4973    /// Required. The table to update.
4974    /// The table's `name` field is used to identify the table to update.
4975    pub table: std::option::Option<crate::model::Table>,
4976
4977    /// Required. The list of fields to update.
4978    /// A mask specifying which fields (e.g. `change_stream_config`) in the `table`
4979    /// field should be updated. This mask is relative to the `table` field, not to
4980    /// the request message. The wildcard (*) path is currently not supported.
4981    /// Currently UpdateTable is only supported for the following fields:
4982    ///
4983    /// * `change_stream_config`
4984    /// * `change_stream_config.retention_period`
4985    /// * `deletion_protection`
4986    /// * `row_key_schema`
4987    ///
4988    /// If `column_families` is set in `update_mask`, it will return an
4989    /// UNIMPLEMENTED error.
4990    pub update_mask: std::option::Option<wkt::FieldMask>,
4991
4992    /// Optional. If true, ignore safety checks when updating the table.
4993    pub ignore_warnings: bool,
4994
4995    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4996}
4997
4998impl UpdateTableRequest {
4999    /// Creates a new default instance.
5000    pub fn new() -> Self {
5001        std::default::Default::default()
5002    }
5003
5004    /// Sets the value of [table][crate::model::UpdateTableRequest::table].
5005    ///
5006    /// # Example
5007    /// ```ignore,no_run
5008    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5009    /// use google_cloud_bigtable_admin_v2::model::Table;
5010    /// let x = UpdateTableRequest::new().set_table(Table::default()/* use setters */);
5011    /// ```
5012    pub fn set_table<T>(mut self, v: T) -> Self
5013    where
5014        T: std::convert::Into<crate::model::Table>,
5015    {
5016        self.table = std::option::Option::Some(v.into());
5017        self
5018    }
5019
5020    /// Sets or clears the value of [table][crate::model::UpdateTableRequest::table].
5021    ///
5022    /// # Example
5023    /// ```ignore,no_run
5024    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5025    /// use google_cloud_bigtable_admin_v2::model::Table;
5026    /// let x = UpdateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
5027    /// let x = UpdateTableRequest::new().set_or_clear_table(None::<Table>);
5028    /// ```
5029    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
5030    where
5031        T: std::convert::Into<crate::model::Table>,
5032    {
5033        self.table = v.map(|x| x.into());
5034        self
5035    }
5036
5037    /// Sets the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
5038    ///
5039    /// # Example
5040    /// ```ignore,no_run
5041    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5042    /// use wkt::FieldMask;
5043    /// let x = UpdateTableRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5044    /// ```
5045    pub fn set_update_mask<T>(mut self, v: T) -> Self
5046    where
5047        T: std::convert::Into<wkt::FieldMask>,
5048    {
5049        self.update_mask = std::option::Option::Some(v.into());
5050        self
5051    }
5052
5053    /// Sets or clears the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
5054    ///
5055    /// # Example
5056    /// ```ignore,no_run
5057    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5058    /// use wkt::FieldMask;
5059    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5060    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5061    /// ```
5062    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5063    where
5064        T: std::convert::Into<wkt::FieldMask>,
5065    {
5066        self.update_mask = v.map(|x| x.into());
5067        self
5068    }
5069
5070    /// Sets the value of [ignore_warnings][crate::model::UpdateTableRequest::ignore_warnings].
5071    ///
5072    /// # Example
5073    /// ```ignore,no_run
5074    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5075    /// let x = UpdateTableRequest::new().set_ignore_warnings(true);
5076    /// ```
5077    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5078        self.ignore_warnings = v.into();
5079        self
5080    }
5081}
5082
5083impl wkt::message::Message for UpdateTableRequest {
5084    fn typename() -> &'static str {
5085        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableRequest"
5086    }
5087}
5088
5089/// Metadata type for the operation returned by
5090/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
5091///
5092/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
5093#[derive(Clone, Default, PartialEq)]
5094#[non_exhaustive]
5095pub struct UpdateTableMetadata {
5096    /// The name of the table being updated.
5097    pub name: std::string::String,
5098
5099    /// The time at which this operation started.
5100    pub start_time: std::option::Option<wkt::Timestamp>,
5101
5102    /// If set, the time at which this operation finished or was canceled.
5103    pub end_time: std::option::Option<wkt::Timestamp>,
5104
5105    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5106}
5107
5108impl UpdateTableMetadata {
5109    /// Creates a new default instance.
5110    pub fn new() -> Self {
5111        std::default::Default::default()
5112    }
5113
5114    /// Sets the value of [name][crate::model::UpdateTableMetadata::name].
5115    ///
5116    /// # Example
5117    /// ```ignore,no_run
5118    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5119    /// let x = UpdateTableMetadata::new().set_name("example");
5120    /// ```
5121    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5122        self.name = v.into();
5123        self
5124    }
5125
5126    /// Sets the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5127    ///
5128    /// # Example
5129    /// ```ignore,no_run
5130    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5131    /// use wkt::Timestamp;
5132    /// let x = UpdateTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5133    /// ```
5134    pub fn set_start_time<T>(mut self, v: T) -> Self
5135    where
5136        T: std::convert::Into<wkt::Timestamp>,
5137    {
5138        self.start_time = std::option::Option::Some(v.into());
5139        self
5140    }
5141
5142    /// Sets or clears the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5143    ///
5144    /// # Example
5145    /// ```ignore,no_run
5146    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5147    /// use wkt::Timestamp;
5148    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5149    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5150    /// ```
5151    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5152    where
5153        T: std::convert::Into<wkt::Timestamp>,
5154    {
5155        self.start_time = v.map(|x| x.into());
5156        self
5157    }
5158
5159    /// Sets the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5160    ///
5161    /// # Example
5162    /// ```ignore,no_run
5163    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5164    /// use wkt::Timestamp;
5165    /// let x = UpdateTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5166    /// ```
5167    pub fn set_end_time<T>(mut self, v: T) -> Self
5168    where
5169        T: std::convert::Into<wkt::Timestamp>,
5170    {
5171        self.end_time = std::option::Option::Some(v.into());
5172        self
5173    }
5174
5175    /// Sets or clears the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5176    ///
5177    /// # Example
5178    /// ```ignore,no_run
5179    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5180    /// use wkt::Timestamp;
5181    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5182    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5183    /// ```
5184    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5185    where
5186        T: std::convert::Into<wkt::Timestamp>,
5187    {
5188        self.end_time = v.map(|x| x.into());
5189        self
5190    }
5191}
5192
5193impl wkt::message::Message for UpdateTableMetadata {
5194    fn typename() -> &'static str {
5195        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableMetadata"
5196    }
5197}
5198
5199/// Request message for
5200/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
5201///
5202/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]: crate::client::BigtableTableAdmin::delete_table
5203#[derive(Clone, Default, PartialEq)]
5204#[non_exhaustive]
5205pub struct DeleteTableRequest {
5206    /// Required. The unique name of the table to be deleted.
5207    /// Values are of the form
5208    /// `projects/{project}/instances/{instance}/tables/{table}`.
5209    pub name: std::string::String,
5210
5211    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5212}
5213
5214impl DeleteTableRequest {
5215    /// Creates a new default instance.
5216    pub fn new() -> Self {
5217        std::default::Default::default()
5218    }
5219
5220    /// Sets the value of [name][crate::model::DeleteTableRequest::name].
5221    ///
5222    /// # Example
5223    /// ```ignore,no_run
5224    /// # use google_cloud_bigtable_admin_v2::model::DeleteTableRequest;
5225    /// # let project_id = "project_id";
5226    /// # let instance_id = "instance_id";
5227    /// # let table_id = "table_id";
5228    /// let x = DeleteTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5229    /// ```
5230    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5231        self.name = v.into();
5232        self
5233    }
5234}
5235
5236impl wkt::message::Message for DeleteTableRequest {
5237    fn typename() -> &'static str {
5238        "type.googleapis.com/google.bigtable.admin.v2.DeleteTableRequest"
5239    }
5240}
5241
5242/// Request message for
5243/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
5244///
5245/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5246#[derive(Clone, Default, PartialEq)]
5247#[non_exhaustive]
5248pub struct UndeleteTableRequest {
5249    /// Required. The unique name of the table to be restored.
5250    /// Values are of the form
5251    /// `projects/{project}/instances/{instance}/tables/{table}`.
5252    pub name: std::string::String,
5253
5254    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5255}
5256
5257impl UndeleteTableRequest {
5258    /// Creates a new default instance.
5259    pub fn new() -> Self {
5260        std::default::Default::default()
5261    }
5262
5263    /// Sets the value of [name][crate::model::UndeleteTableRequest::name].
5264    ///
5265    /// # Example
5266    /// ```ignore,no_run
5267    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableRequest;
5268    /// # let project_id = "project_id";
5269    /// # let instance_id = "instance_id";
5270    /// # let table_id = "table_id";
5271    /// let x = UndeleteTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5272    /// ```
5273    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5274        self.name = v.into();
5275        self
5276    }
5277}
5278
5279impl wkt::message::Message for UndeleteTableRequest {
5280    fn typename() -> &'static str {
5281        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableRequest"
5282    }
5283}
5284
5285/// Metadata type for the operation returned by
5286/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
5287///
5288/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5289#[derive(Clone, Default, PartialEq)]
5290#[non_exhaustive]
5291pub struct UndeleteTableMetadata {
5292    /// The name of the table being restored.
5293    pub name: std::string::String,
5294
5295    /// The time at which this operation started.
5296    pub start_time: std::option::Option<wkt::Timestamp>,
5297
5298    /// If set, the time at which this operation finished or was cancelled.
5299    pub end_time: std::option::Option<wkt::Timestamp>,
5300
5301    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5302}
5303
5304impl UndeleteTableMetadata {
5305    /// Creates a new default instance.
5306    pub fn new() -> Self {
5307        std::default::Default::default()
5308    }
5309
5310    /// Sets the value of [name][crate::model::UndeleteTableMetadata::name].
5311    ///
5312    /// # Example
5313    /// ```ignore,no_run
5314    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5315    /// let x = UndeleteTableMetadata::new().set_name("example");
5316    /// ```
5317    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5318        self.name = v.into();
5319        self
5320    }
5321
5322    /// Sets the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5323    ///
5324    /// # Example
5325    /// ```ignore,no_run
5326    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5327    /// use wkt::Timestamp;
5328    /// let x = UndeleteTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5329    /// ```
5330    pub fn set_start_time<T>(mut self, v: T) -> Self
5331    where
5332        T: std::convert::Into<wkt::Timestamp>,
5333    {
5334        self.start_time = std::option::Option::Some(v.into());
5335        self
5336    }
5337
5338    /// Sets or clears the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5339    ///
5340    /// # Example
5341    /// ```ignore,no_run
5342    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5343    /// use wkt::Timestamp;
5344    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5345    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5346    /// ```
5347    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5348    where
5349        T: std::convert::Into<wkt::Timestamp>,
5350    {
5351        self.start_time = v.map(|x| x.into());
5352        self
5353    }
5354
5355    /// Sets the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5356    ///
5357    /// # Example
5358    /// ```ignore,no_run
5359    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5360    /// use wkt::Timestamp;
5361    /// let x = UndeleteTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5362    /// ```
5363    pub fn set_end_time<T>(mut self, v: T) -> Self
5364    where
5365        T: std::convert::Into<wkt::Timestamp>,
5366    {
5367        self.end_time = std::option::Option::Some(v.into());
5368        self
5369    }
5370
5371    /// Sets or clears the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5372    ///
5373    /// # Example
5374    /// ```ignore,no_run
5375    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5376    /// use wkt::Timestamp;
5377    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5378    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5379    /// ```
5380    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5381    where
5382        T: std::convert::Into<wkt::Timestamp>,
5383    {
5384        self.end_time = v.map(|x| x.into());
5385        self
5386    }
5387}
5388
5389impl wkt::message::Message for UndeleteTableMetadata {
5390    fn typename() -> &'static str {
5391        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableMetadata"
5392    }
5393}
5394
5395/// Request message for
5396/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
5397///
5398/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]: crate::client::BigtableTableAdmin::modify_column_families
5399#[derive(Clone, Default, PartialEq)]
5400#[non_exhaustive]
5401pub struct ModifyColumnFamiliesRequest {
5402    /// Required. The unique name of the table whose families should be modified.
5403    /// Values are of the form
5404    /// `projects/{project}/instances/{instance}/tables/{table}`.
5405    pub name: std::string::String,
5406
5407    /// Required. Modifications to be atomically applied to the specified table's
5408    /// families. Entries are applied in order, meaning that earlier modifications
5409    /// can be masked by later ones (in the case of repeated updates to the same
5410    /// family, for example).
5411    pub modifications: std::vec::Vec<crate::model::modify_column_families_request::Modification>,
5412
5413    /// Optional. If true, ignore safety checks when modifying the column families.
5414    pub ignore_warnings: bool,
5415
5416    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5417}
5418
5419impl ModifyColumnFamiliesRequest {
5420    /// Creates a new default instance.
5421    pub fn new() -> Self {
5422        std::default::Default::default()
5423    }
5424
5425    /// Sets the value of [name][crate::model::ModifyColumnFamiliesRequest::name].
5426    ///
5427    /// # Example
5428    /// ```ignore,no_run
5429    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5430    /// # let project_id = "project_id";
5431    /// # let instance_id = "instance_id";
5432    /// # let table_id = "table_id";
5433    /// let x = ModifyColumnFamiliesRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5434    /// ```
5435    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5436        self.name = v.into();
5437        self
5438    }
5439
5440    /// Sets the value of [modifications][crate::model::ModifyColumnFamiliesRequest::modifications].
5441    ///
5442    /// # Example
5443    /// ```ignore,no_run
5444    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5445    /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5446    /// let x = ModifyColumnFamiliesRequest::new()
5447    ///     .set_modifications([
5448    ///         Modification::default()/* use setters */,
5449    ///         Modification::default()/* use (different) setters */,
5450    ///     ]);
5451    /// ```
5452    pub fn set_modifications<T, V>(mut self, v: T) -> Self
5453    where
5454        T: std::iter::IntoIterator<Item = V>,
5455        V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
5456    {
5457        use std::iter::Iterator;
5458        self.modifications = v.into_iter().map(|i| i.into()).collect();
5459        self
5460    }
5461
5462    /// Sets the value of [ignore_warnings][crate::model::ModifyColumnFamiliesRequest::ignore_warnings].
5463    ///
5464    /// # Example
5465    /// ```ignore,no_run
5466    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5467    /// let x = ModifyColumnFamiliesRequest::new().set_ignore_warnings(true);
5468    /// ```
5469    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5470        self.ignore_warnings = v.into();
5471        self
5472    }
5473}
5474
5475impl wkt::message::Message for ModifyColumnFamiliesRequest {
5476    fn typename() -> &'static str {
5477        "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest"
5478    }
5479}
5480
5481/// Defines additional types related to [ModifyColumnFamiliesRequest].
5482pub mod modify_column_families_request {
5483    #[allow(unused_imports)]
5484    use super::*;
5485
5486    /// A create, update, or delete of a particular column family.
5487    #[derive(Clone, Default, PartialEq)]
5488    #[non_exhaustive]
5489    pub struct Modification {
5490        /// The ID of the column family to be modified.
5491        pub id: std::string::String,
5492
5493        /// Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update`
5494        /// mod should be updated, ignored for other modification types. If unset or
5495        /// empty, we treat it as updating `gc_rule` to be backward compatible.
5496        pub update_mask: std::option::Option<wkt::FieldMask>,
5497
5498        /// Column family modifications.
5499        pub r#mod:
5500            std::option::Option<crate::model::modify_column_families_request::modification::Mod>,
5501
5502        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5503    }
5504
5505    impl Modification {
5506        /// Creates a new default instance.
5507        pub fn new() -> Self {
5508            std::default::Default::default()
5509        }
5510
5511        /// Sets the value of [id][crate::model::modify_column_families_request::Modification::id].
5512        ///
5513        /// # Example
5514        /// ```ignore,no_run
5515        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5516        /// let x = Modification::new().set_id("example");
5517        /// ```
5518        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5519            self.id = v.into();
5520            self
5521        }
5522
5523        /// Sets the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5524        ///
5525        /// # Example
5526        /// ```ignore,no_run
5527        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5528        /// use wkt::FieldMask;
5529        /// let x = Modification::new().set_update_mask(FieldMask::default()/* use setters */);
5530        /// ```
5531        pub fn set_update_mask<T>(mut self, v: T) -> Self
5532        where
5533            T: std::convert::Into<wkt::FieldMask>,
5534        {
5535            self.update_mask = std::option::Option::Some(v.into());
5536            self
5537        }
5538
5539        /// Sets or clears the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5540        ///
5541        /// # Example
5542        /// ```ignore,no_run
5543        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5544        /// use wkt::FieldMask;
5545        /// let x = Modification::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5546        /// let x = Modification::new().set_or_clear_update_mask(None::<FieldMask>);
5547        /// ```
5548        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5549        where
5550            T: std::convert::Into<wkt::FieldMask>,
5551        {
5552            self.update_mask = v.map(|x| x.into());
5553            self
5554        }
5555
5556        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::mod].
5557        ///
5558        /// Note that all the setters affecting `r#mod` are mutually
5559        /// exclusive.
5560        ///
5561        /// # Example
5562        /// ```ignore,no_run
5563        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5564        /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::modification::Mod;
5565        /// let x = Modification::new().set_mod(Some(Mod::Drop(true)));
5566        /// ```
5567        pub fn set_mod<
5568            T: std::convert::Into<
5569                    std::option::Option<
5570                        crate::model::modify_column_families_request::modification::Mod,
5571                    >,
5572                >,
5573        >(
5574            mut self,
5575            v: T,
5576        ) -> Self {
5577            self.r#mod = v.into();
5578            self
5579        }
5580
5581        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5582        /// if it holds a `Create`, `None` if the field is not set or
5583        /// holds a different branch.
5584        pub fn create(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
5585            #[allow(unreachable_patterns)]
5586            self.r#mod.as_ref().and_then(|v| match v {
5587                crate::model::modify_column_families_request::modification::Mod::Create(v) => {
5588                    std::option::Option::Some(v)
5589                }
5590                _ => std::option::Option::None,
5591            })
5592        }
5593
5594        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5595        /// to hold a `Create`.
5596        ///
5597        /// Note that all the setters affecting `r#mod` are
5598        /// mutually exclusive.
5599        ///
5600        /// # Example
5601        /// ```ignore,no_run
5602        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5603        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
5604        /// let x = Modification::new().set_create(ColumnFamily::default()/* use setters */);
5605        /// assert!(x.create().is_some());
5606        /// assert!(x.update().is_none());
5607        /// assert!(x.drop().is_none());
5608        /// ```
5609        pub fn set_create<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
5610            mut self,
5611            v: T,
5612        ) -> Self {
5613            self.r#mod = std::option::Option::Some(
5614                crate::model::modify_column_families_request::modification::Mod::Create(v.into()),
5615            );
5616            self
5617        }
5618
5619        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5620        /// if it holds a `Update`, `None` if the field is not set or
5621        /// holds a different branch.
5622        pub fn update(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
5623            #[allow(unreachable_patterns)]
5624            self.r#mod.as_ref().and_then(|v| match v {
5625                crate::model::modify_column_families_request::modification::Mod::Update(v) => {
5626                    std::option::Option::Some(v)
5627                }
5628                _ => std::option::Option::None,
5629            })
5630        }
5631
5632        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5633        /// to hold a `Update`.
5634        ///
5635        /// Note that all the setters affecting `r#mod` are
5636        /// mutually exclusive.
5637        ///
5638        /// # Example
5639        /// ```ignore,no_run
5640        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5641        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
5642        /// let x = Modification::new().set_update(ColumnFamily::default()/* use setters */);
5643        /// assert!(x.update().is_some());
5644        /// assert!(x.create().is_none());
5645        /// assert!(x.drop().is_none());
5646        /// ```
5647        pub fn set_update<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
5648            mut self,
5649            v: T,
5650        ) -> Self {
5651            self.r#mod = std::option::Option::Some(
5652                crate::model::modify_column_families_request::modification::Mod::Update(v.into()),
5653            );
5654            self
5655        }
5656
5657        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5658        /// if it holds a `Drop`, `None` if the field is not set or
5659        /// holds a different branch.
5660        pub fn drop(&self) -> std::option::Option<&bool> {
5661            #[allow(unreachable_patterns)]
5662            self.r#mod.as_ref().and_then(|v| match v {
5663                crate::model::modify_column_families_request::modification::Mod::Drop(v) => {
5664                    std::option::Option::Some(v)
5665                }
5666                _ => std::option::Option::None,
5667            })
5668        }
5669
5670        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5671        /// to hold a `Drop`.
5672        ///
5673        /// Note that all the setters affecting `r#mod` are
5674        /// mutually exclusive.
5675        ///
5676        /// # Example
5677        /// ```ignore,no_run
5678        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5679        /// let x = Modification::new().set_drop(true);
5680        /// assert!(x.drop().is_some());
5681        /// assert!(x.create().is_none());
5682        /// assert!(x.update().is_none());
5683        /// ```
5684        pub fn set_drop<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5685            self.r#mod = std::option::Option::Some(
5686                crate::model::modify_column_families_request::modification::Mod::Drop(v.into()),
5687            );
5688            self
5689        }
5690    }
5691
5692    impl wkt::message::Message for Modification {
5693        fn typename() -> &'static str {
5694            "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification"
5695        }
5696    }
5697
5698    /// Defines additional types related to [Modification].
5699    pub mod modification {
5700        #[allow(unused_imports)]
5701        use super::*;
5702
5703        /// Column family modifications.
5704        #[derive(Clone, Debug, PartialEq)]
5705        #[non_exhaustive]
5706        pub enum Mod {
5707            /// Create a new column family with the specified schema, or fail if
5708            /// one already exists with the given ID.
5709            Create(std::boxed::Box<crate::model::ColumnFamily>),
5710            /// Update an existing column family to the specified schema, or fail
5711            /// if no column family exists with the given ID.
5712            Update(std::boxed::Box<crate::model::ColumnFamily>),
5713            /// Drop (delete) the column family with the given ID, or fail if no such
5714            /// family exists.
5715            Drop(bool),
5716        }
5717    }
5718}
5719
5720/// Request message for
5721/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
5722///
5723/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
5724#[derive(Clone, Default, PartialEq)]
5725#[non_exhaustive]
5726pub struct GenerateConsistencyTokenRequest {
5727    /// Required. The unique name of the Table for which to create a consistency
5728    /// token. Values are of the form
5729    /// `projects/{project}/instances/{instance}/tables/{table}`.
5730    pub name: std::string::String,
5731
5732    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5733}
5734
5735impl GenerateConsistencyTokenRequest {
5736    /// Creates a new default instance.
5737    pub fn new() -> Self {
5738        std::default::Default::default()
5739    }
5740
5741    /// Sets the value of [name][crate::model::GenerateConsistencyTokenRequest::name].
5742    ///
5743    /// # Example
5744    /// ```ignore,no_run
5745    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenRequest;
5746    /// # let project_id = "project_id";
5747    /// # let instance_id = "instance_id";
5748    /// # let table_id = "table_id";
5749    /// let x = GenerateConsistencyTokenRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5750    /// ```
5751    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5752        self.name = v.into();
5753        self
5754    }
5755}
5756
5757impl wkt::message::Message for GenerateConsistencyTokenRequest {
5758    fn typename() -> &'static str {
5759        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenRequest"
5760    }
5761}
5762
5763/// Response message for
5764/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
5765///
5766/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
5767#[derive(Clone, Default, PartialEq)]
5768#[non_exhaustive]
5769pub struct GenerateConsistencyTokenResponse {
5770    /// The generated consistency token.
5771    pub consistency_token: std::string::String,
5772
5773    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5774}
5775
5776impl GenerateConsistencyTokenResponse {
5777    /// Creates a new default instance.
5778    pub fn new() -> Self {
5779        std::default::Default::default()
5780    }
5781
5782    /// Sets the value of [consistency_token][crate::model::GenerateConsistencyTokenResponse::consistency_token].
5783    ///
5784    /// # Example
5785    /// ```ignore,no_run
5786    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenResponse;
5787    /// let x = GenerateConsistencyTokenResponse::new().set_consistency_token("example");
5788    /// ```
5789    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
5790        mut self,
5791        v: T,
5792    ) -> Self {
5793        self.consistency_token = v.into();
5794        self
5795    }
5796}
5797
5798impl wkt::message::Message for GenerateConsistencyTokenResponse {
5799    fn typename() -> &'static str {
5800        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenResponse"
5801    }
5802}
5803
5804/// Request message for
5805/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
5806///
5807/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
5808#[derive(Clone, Default, PartialEq)]
5809#[non_exhaustive]
5810pub struct CheckConsistencyRequest {
5811    /// Required. The unique name of the Table for which to check replication
5812    /// consistency. Values are of the form
5813    /// `projects/{project}/instances/{instance}/tables/{table}`.
5814    pub name: std::string::String,
5815
5816    /// Required. The token created using GenerateConsistencyToken for the Table.
5817    pub consistency_token: std::string::String,
5818
5819    /// Which type of read needs to consistently observe which type of write?
5820    /// Default: `standard_read_remote_writes`
5821    pub mode: std::option::Option<crate::model::check_consistency_request::Mode>,
5822
5823    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5824}
5825
5826impl CheckConsistencyRequest {
5827    /// Creates a new default instance.
5828    pub fn new() -> Self {
5829        std::default::Default::default()
5830    }
5831
5832    /// Sets the value of [name][crate::model::CheckConsistencyRequest::name].
5833    ///
5834    /// # Example
5835    /// ```ignore,no_run
5836    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5837    /// # let project_id = "project_id";
5838    /// # let instance_id = "instance_id";
5839    /// # let table_id = "table_id";
5840    /// let x = CheckConsistencyRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5841    /// ```
5842    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5843        self.name = v.into();
5844        self
5845    }
5846
5847    /// Sets the value of [consistency_token][crate::model::CheckConsistencyRequest::consistency_token].
5848    ///
5849    /// # Example
5850    /// ```ignore,no_run
5851    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5852    /// let x = CheckConsistencyRequest::new().set_consistency_token("example");
5853    /// ```
5854    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
5855        mut self,
5856        v: T,
5857    ) -> Self {
5858        self.consistency_token = v.into();
5859        self
5860    }
5861
5862    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode].
5863    ///
5864    /// Note that all the setters affecting `mode` are mutually
5865    /// exclusive.
5866    ///
5867    /// # Example
5868    /// ```ignore,no_run
5869    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5870    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
5871    /// let x = CheckConsistencyRequest::new().set_mode(Some(
5872    ///     google_cloud_bigtable_admin_v2::model::check_consistency_request::Mode::StandardReadRemoteWrites(StandardReadRemoteWrites::default().into())));
5873    /// ```
5874    pub fn set_mode<
5875        T: std::convert::Into<std::option::Option<crate::model::check_consistency_request::Mode>>,
5876    >(
5877        mut self,
5878        v: T,
5879    ) -> Self {
5880        self.mode = v.into();
5881        self
5882    }
5883
5884    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
5885    /// if it holds a `StandardReadRemoteWrites`, `None` if the field is not set or
5886    /// holds a different branch.
5887    pub fn standard_read_remote_writes(
5888        &self,
5889    ) -> std::option::Option<&std::boxed::Box<crate::model::StandardReadRemoteWrites>> {
5890        #[allow(unreachable_patterns)]
5891        self.mode.as_ref().and_then(|v| match v {
5892            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v) => {
5893                std::option::Option::Some(v)
5894            }
5895            _ => std::option::Option::None,
5896        })
5897    }
5898
5899    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5900    /// to hold a `StandardReadRemoteWrites`.
5901    ///
5902    /// Note that all the setters affecting `mode` are
5903    /// mutually exclusive.
5904    ///
5905    /// # Example
5906    /// ```ignore,no_run
5907    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5908    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
5909    /// let x = CheckConsistencyRequest::new().set_standard_read_remote_writes(StandardReadRemoteWrites::default()/* use setters */);
5910    /// assert!(x.standard_read_remote_writes().is_some());
5911    /// assert!(x.data_boost_read_local_writes().is_none());
5912    /// ```
5913    pub fn set_standard_read_remote_writes<
5914        T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
5915    >(
5916        mut self,
5917        v: T,
5918    ) -> Self {
5919        self.mode = std::option::Option::Some(
5920            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v.into()),
5921        );
5922        self
5923    }
5924
5925    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
5926    /// if it holds a `DataBoostReadLocalWrites`, `None` if the field is not set or
5927    /// holds a different branch.
5928    pub fn data_boost_read_local_writes(
5929        &self,
5930    ) -> std::option::Option<&std::boxed::Box<crate::model::DataBoostReadLocalWrites>> {
5931        #[allow(unreachable_patterns)]
5932        self.mode.as_ref().and_then(|v| match v {
5933            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v) => {
5934                std::option::Option::Some(v)
5935            }
5936            _ => std::option::Option::None,
5937        })
5938    }
5939
5940    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5941    /// to hold a `DataBoostReadLocalWrites`.
5942    ///
5943    /// Note that all the setters affecting `mode` are
5944    /// mutually exclusive.
5945    ///
5946    /// # Example
5947    /// ```ignore,no_run
5948    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5949    /// use google_cloud_bigtable_admin_v2::model::DataBoostReadLocalWrites;
5950    /// let x = CheckConsistencyRequest::new().set_data_boost_read_local_writes(DataBoostReadLocalWrites::default()/* use setters */);
5951    /// assert!(x.data_boost_read_local_writes().is_some());
5952    /// assert!(x.standard_read_remote_writes().is_none());
5953    /// ```
5954    pub fn set_data_boost_read_local_writes<
5955        T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
5956    >(
5957        mut self,
5958        v: T,
5959    ) -> Self {
5960        self.mode = std::option::Option::Some(
5961            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v.into()),
5962        );
5963        self
5964    }
5965}
5966
5967impl wkt::message::Message for CheckConsistencyRequest {
5968    fn typename() -> &'static str {
5969        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyRequest"
5970    }
5971}
5972
5973/// Defines additional types related to [CheckConsistencyRequest].
5974pub mod check_consistency_request {
5975    #[allow(unused_imports)]
5976    use super::*;
5977
5978    /// Which type of read needs to consistently observe which type of write?
5979    /// Default: `standard_read_remote_writes`
5980    #[derive(Clone, Debug, PartialEq)]
5981    #[non_exhaustive]
5982    pub enum Mode {
5983        /// Checks that reads using an app profile with `StandardIsolation` can
5984        /// see all writes committed before the token was created, even if the
5985        /// read and write target different clusters.
5986        StandardReadRemoteWrites(std::boxed::Box<crate::model::StandardReadRemoteWrites>),
5987        /// Checks that reads using an app profile with `DataBoostIsolationReadOnly`
5988        /// can see all writes committed before the token was created, but only if
5989        /// the read and write target the same cluster.
5990        DataBoostReadLocalWrites(std::boxed::Box<crate::model::DataBoostReadLocalWrites>),
5991    }
5992}
5993
5994/// Checks that all writes before the consistency token was generated are
5995/// replicated in every cluster and readable.
5996#[derive(Clone, Default, PartialEq)]
5997#[non_exhaustive]
5998pub struct StandardReadRemoteWrites {
5999    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6000}
6001
6002impl StandardReadRemoteWrites {
6003    /// Creates a new default instance.
6004    pub fn new() -> Self {
6005        std::default::Default::default()
6006    }
6007}
6008
6009impl wkt::message::Message for StandardReadRemoteWrites {
6010    fn typename() -> &'static str {
6011        "type.googleapis.com/google.bigtable.admin.v2.StandardReadRemoteWrites"
6012    }
6013}
6014
6015/// Checks that all writes before the consistency token was generated in the same
6016/// cluster are readable by Databoost.
6017#[derive(Clone, Default, PartialEq)]
6018#[non_exhaustive]
6019pub struct DataBoostReadLocalWrites {
6020    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6021}
6022
6023impl DataBoostReadLocalWrites {
6024    /// Creates a new default instance.
6025    pub fn new() -> Self {
6026        std::default::Default::default()
6027    }
6028}
6029
6030impl wkt::message::Message for DataBoostReadLocalWrites {
6031    fn typename() -> &'static str {
6032        "type.googleapis.com/google.bigtable.admin.v2.DataBoostReadLocalWrites"
6033    }
6034}
6035
6036/// Response message for
6037/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
6038///
6039/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
6040#[derive(Clone, Default, PartialEq)]
6041#[non_exhaustive]
6042pub struct CheckConsistencyResponse {
6043    /// True only if the token is consistent. A token is consistent if replication
6044    /// has caught up with the restrictions specified in the request.
6045    pub consistent: bool,
6046
6047    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6048}
6049
6050impl CheckConsistencyResponse {
6051    /// Creates a new default instance.
6052    pub fn new() -> Self {
6053        std::default::Default::default()
6054    }
6055
6056    /// Sets the value of [consistent][crate::model::CheckConsistencyResponse::consistent].
6057    ///
6058    /// # Example
6059    /// ```ignore,no_run
6060    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyResponse;
6061    /// let x = CheckConsistencyResponse::new().set_consistent(true);
6062    /// ```
6063    pub fn set_consistent<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6064        self.consistent = v.into();
6065        self
6066    }
6067}
6068
6069impl wkt::message::Message for CheckConsistencyResponse {
6070    fn typename() -> &'static str {
6071        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyResponse"
6072    }
6073}
6074
6075/// Request message for
6076/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
6077///
6078/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6079/// feature is not currently available to most Cloud Bigtable customers. This
6080/// feature might be changed in backward-incompatible ways and is not recommended
6081/// for production use. It is not subject to any SLA or deprecation policy.
6082///
6083/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]: crate::client::BigtableTableAdmin::snapshot_table
6084#[derive(Clone, Default, PartialEq)]
6085#[non_exhaustive]
6086pub struct SnapshotTableRequest {
6087    /// Required. The unique name of the table to have the snapshot taken.
6088    /// Values are of the form
6089    /// `projects/{project}/instances/{instance}/tables/{table}`.
6090    pub name: std::string::String,
6091
6092    /// Required. The name of the cluster where the snapshot will be created in.
6093    /// Values are of the form
6094    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
6095    pub cluster: std::string::String,
6096
6097    /// Required. The ID by which the new snapshot should be referred to within the
6098    /// parent cluster, e.g., `mysnapshot` of the form:
6099    /// `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than
6100    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
6101    pub snapshot_id: std::string::String,
6102
6103    /// The amount of time that the new snapshot can stay active after it is
6104    /// created. Once 'ttl' expires, the snapshot will get deleted. The maximum
6105    /// amount of time a snapshot can stay active is 7 days. If 'ttl' is not
6106    /// specified, the default value of 24 hours will be used.
6107    pub ttl: std::option::Option<wkt::Duration>,
6108
6109    /// Description of the snapshot.
6110    pub description: std::string::String,
6111
6112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6113}
6114
6115impl SnapshotTableRequest {
6116    /// Creates a new default instance.
6117    pub fn new() -> Self {
6118        std::default::Default::default()
6119    }
6120
6121    /// Sets the value of [name][crate::model::SnapshotTableRequest::name].
6122    ///
6123    /// # Example
6124    /// ```ignore,no_run
6125    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6126    /// # let project_id = "project_id";
6127    /// # let instance_id = "instance_id";
6128    /// # let table_id = "table_id";
6129    /// let x = SnapshotTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
6130    /// ```
6131    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6132        self.name = v.into();
6133        self
6134    }
6135
6136    /// Sets the value of [cluster][crate::model::SnapshotTableRequest::cluster].
6137    ///
6138    /// # Example
6139    /// ```ignore,no_run
6140    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6141    /// # let project_id = "project_id";
6142    /// # let instance_id = "instance_id";
6143    /// # let cluster_id = "cluster_id";
6144    /// let x = SnapshotTableRequest::new().set_cluster(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
6145    /// ```
6146    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6147        self.cluster = v.into();
6148        self
6149    }
6150
6151    /// Sets the value of [snapshot_id][crate::model::SnapshotTableRequest::snapshot_id].
6152    ///
6153    /// # Example
6154    /// ```ignore,no_run
6155    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6156    /// let x = SnapshotTableRequest::new().set_snapshot_id("example");
6157    /// ```
6158    pub fn set_snapshot_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6159        self.snapshot_id = v.into();
6160        self
6161    }
6162
6163    /// Sets the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6164    ///
6165    /// # Example
6166    /// ```ignore,no_run
6167    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6168    /// use wkt::Duration;
6169    /// let x = SnapshotTableRequest::new().set_ttl(Duration::default()/* use setters */);
6170    /// ```
6171    pub fn set_ttl<T>(mut self, v: T) -> Self
6172    where
6173        T: std::convert::Into<wkt::Duration>,
6174    {
6175        self.ttl = std::option::Option::Some(v.into());
6176        self
6177    }
6178
6179    /// Sets or clears the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6180    ///
6181    /// # Example
6182    /// ```ignore,no_run
6183    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6184    /// use wkt::Duration;
6185    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(Some(Duration::default()/* use setters */));
6186    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(None::<Duration>);
6187    /// ```
6188    pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
6189    where
6190        T: std::convert::Into<wkt::Duration>,
6191    {
6192        self.ttl = v.map(|x| x.into());
6193        self
6194    }
6195
6196    /// Sets the value of [description][crate::model::SnapshotTableRequest::description].
6197    ///
6198    /// # Example
6199    /// ```ignore,no_run
6200    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6201    /// let x = SnapshotTableRequest::new().set_description("example");
6202    /// ```
6203    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6204        self.description = v.into();
6205        self
6206    }
6207}
6208
6209impl wkt::message::Message for SnapshotTableRequest {
6210    fn typename() -> &'static str {
6211        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableRequest"
6212    }
6213}
6214
6215/// Request message for
6216/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
6217///
6218/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6219/// feature is not currently available to most Cloud Bigtable customers. This
6220/// feature might be changed in backward-incompatible ways and is not recommended
6221/// for production use. It is not subject to any SLA or deprecation policy.
6222///
6223/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]: crate::client::BigtableTableAdmin::get_snapshot
6224#[derive(Clone, Default, PartialEq)]
6225#[non_exhaustive]
6226pub struct GetSnapshotRequest {
6227    /// Required. The unique name of the requested snapshot.
6228    /// Values are of the form
6229    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6230    pub name: std::string::String,
6231
6232    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6233}
6234
6235impl GetSnapshotRequest {
6236    /// Creates a new default instance.
6237    pub fn new() -> Self {
6238        std::default::Default::default()
6239    }
6240
6241    /// Sets the value of [name][crate::model::GetSnapshotRequest::name].
6242    ///
6243    /// # Example
6244    /// ```ignore,no_run
6245    /// # use google_cloud_bigtable_admin_v2::model::GetSnapshotRequest;
6246    /// # let project_id = "project_id";
6247    /// # let instance_id = "instance_id";
6248    /// # let cluster_id = "cluster_id";
6249    /// # let snapshot_id = "snapshot_id";
6250    /// let x = GetSnapshotRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
6251    /// ```
6252    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6253        self.name = v.into();
6254        self
6255    }
6256}
6257
6258impl wkt::message::Message for GetSnapshotRequest {
6259    fn typename() -> &'static str {
6260        "type.googleapis.com/google.bigtable.admin.v2.GetSnapshotRequest"
6261    }
6262}
6263
6264/// Request message for
6265/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6266///
6267/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6268/// feature is not currently available to most Cloud Bigtable customers. This
6269/// feature might be changed in backward-incompatible ways and is not recommended
6270/// for production use. It is not subject to any SLA or deprecation policy.
6271///
6272/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6273#[derive(Clone, Default, PartialEq)]
6274#[non_exhaustive]
6275pub struct ListSnapshotsRequest {
6276    /// Required. The unique name of the cluster for which snapshots should be
6277    /// listed. Values are of the form
6278    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
6279    /// Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
6280    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
6281    pub parent: std::string::String,
6282
6283    /// The maximum number of snapshots to return per page.
6284    /// CURRENTLY UNIMPLEMENTED AND IGNORED.
6285    pub page_size: i32,
6286
6287    /// The value of `next_page_token` returned by a previous call.
6288    pub page_token: std::string::String,
6289
6290    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6291}
6292
6293impl ListSnapshotsRequest {
6294    /// Creates a new default instance.
6295    pub fn new() -> Self {
6296        std::default::Default::default()
6297    }
6298
6299    /// Sets the value of [parent][crate::model::ListSnapshotsRequest::parent].
6300    ///
6301    /// # Example
6302    /// ```ignore,no_run
6303    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6304    /// # let project_id = "project_id";
6305    /// # let instance_id = "instance_id";
6306    /// # let cluster_id = "cluster_id";
6307    /// let x = ListSnapshotsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
6308    /// ```
6309    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6310        self.parent = v.into();
6311        self
6312    }
6313
6314    /// Sets the value of [page_size][crate::model::ListSnapshotsRequest::page_size].
6315    ///
6316    /// # Example
6317    /// ```ignore,no_run
6318    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6319    /// let x = ListSnapshotsRequest::new().set_page_size(42);
6320    /// ```
6321    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6322        self.page_size = v.into();
6323        self
6324    }
6325
6326    /// Sets the value of [page_token][crate::model::ListSnapshotsRequest::page_token].
6327    ///
6328    /// # Example
6329    /// ```ignore,no_run
6330    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6331    /// let x = ListSnapshotsRequest::new().set_page_token("example");
6332    /// ```
6333    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6334        self.page_token = v.into();
6335        self
6336    }
6337}
6338
6339impl wkt::message::Message for ListSnapshotsRequest {
6340    fn typename() -> &'static str {
6341        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsRequest"
6342    }
6343}
6344
6345/// Response message for
6346/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6347///
6348/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6349/// feature is not currently available to most Cloud Bigtable customers. This
6350/// feature might be changed in backward-incompatible ways and is not recommended
6351/// for production use. It is not subject to any SLA or deprecation policy.
6352///
6353/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6354#[derive(Clone, Default, PartialEq)]
6355#[non_exhaustive]
6356pub struct ListSnapshotsResponse {
6357    /// The snapshots present in the requested cluster.
6358    pub snapshots: std::vec::Vec<crate::model::Snapshot>,
6359
6360    /// Set if not all snapshots could be returned in a single response.
6361    /// Pass this value to `page_token` in another request to get the next
6362    /// page of results.
6363    pub next_page_token: std::string::String,
6364
6365    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6366}
6367
6368impl ListSnapshotsResponse {
6369    /// Creates a new default instance.
6370    pub fn new() -> Self {
6371        std::default::Default::default()
6372    }
6373
6374    /// Sets the value of [snapshots][crate::model::ListSnapshotsResponse::snapshots].
6375    ///
6376    /// # Example
6377    /// ```ignore,no_run
6378    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6379    /// use google_cloud_bigtable_admin_v2::model::Snapshot;
6380    /// let x = ListSnapshotsResponse::new()
6381    ///     .set_snapshots([
6382    ///         Snapshot::default()/* use setters */,
6383    ///         Snapshot::default()/* use (different) setters */,
6384    ///     ]);
6385    /// ```
6386    pub fn set_snapshots<T, V>(mut self, v: T) -> Self
6387    where
6388        T: std::iter::IntoIterator<Item = V>,
6389        V: std::convert::Into<crate::model::Snapshot>,
6390    {
6391        use std::iter::Iterator;
6392        self.snapshots = v.into_iter().map(|i| i.into()).collect();
6393        self
6394    }
6395
6396    /// Sets the value of [next_page_token][crate::model::ListSnapshotsResponse::next_page_token].
6397    ///
6398    /// # Example
6399    /// ```ignore,no_run
6400    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6401    /// let x = ListSnapshotsResponse::new().set_next_page_token("example");
6402    /// ```
6403    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6404        self.next_page_token = v.into();
6405        self
6406    }
6407}
6408
6409impl wkt::message::Message for ListSnapshotsResponse {
6410    fn typename() -> &'static str {
6411        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsResponse"
6412    }
6413}
6414
6415#[doc(hidden)]
6416impl google_cloud_gax::paginator::internal::PageableResponse for ListSnapshotsResponse {
6417    type PageItem = crate::model::Snapshot;
6418
6419    fn items(self) -> std::vec::Vec<Self::PageItem> {
6420        self.snapshots
6421    }
6422
6423    fn next_page_token(&self) -> std::string::String {
6424        use std::clone::Clone;
6425        self.next_page_token.clone()
6426    }
6427}
6428
6429/// Request message for
6430/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
6431///
6432/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6433/// feature is not currently available to most Cloud Bigtable customers. This
6434/// feature might be changed in backward-incompatible ways and is not recommended
6435/// for production use. It is not subject to any SLA or deprecation policy.
6436///
6437/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]: crate::client::BigtableTableAdmin::delete_snapshot
6438#[derive(Clone, Default, PartialEq)]
6439#[non_exhaustive]
6440pub struct DeleteSnapshotRequest {
6441    /// Required. The unique name of the snapshot to be deleted.
6442    /// Values are of the form
6443    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6444    pub name: std::string::String,
6445
6446    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6447}
6448
6449impl DeleteSnapshotRequest {
6450    /// Creates a new default instance.
6451    pub fn new() -> Self {
6452        std::default::Default::default()
6453    }
6454
6455    /// Sets the value of [name][crate::model::DeleteSnapshotRequest::name].
6456    ///
6457    /// # Example
6458    /// ```ignore,no_run
6459    /// # use google_cloud_bigtable_admin_v2::model::DeleteSnapshotRequest;
6460    /// # let project_id = "project_id";
6461    /// # let instance_id = "instance_id";
6462    /// # let cluster_id = "cluster_id";
6463    /// # let snapshot_id = "snapshot_id";
6464    /// let x = DeleteSnapshotRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
6465    /// ```
6466    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6467        self.name = v.into();
6468        self
6469    }
6470}
6471
6472impl wkt::message::Message for DeleteSnapshotRequest {
6473    fn typename() -> &'static str {
6474        "type.googleapis.com/google.bigtable.admin.v2.DeleteSnapshotRequest"
6475    }
6476}
6477
6478/// The metadata for the Operation returned by SnapshotTable.
6479///
6480/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6481/// feature is not currently available to most Cloud Bigtable customers. This
6482/// feature might be changed in backward-incompatible ways and is not recommended
6483/// for production use. It is not subject to any SLA or deprecation policy.
6484#[derive(Clone, Default, PartialEq)]
6485#[non_exhaustive]
6486pub struct SnapshotTableMetadata {
6487    /// The request that prompted the initiation of this SnapshotTable operation.
6488    pub original_request: std::option::Option<crate::model::SnapshotTableRequest>,
6489
6490    /// The time at which the original request was received.
6491    pub request_time: std::option::Option<wkt::Timestamp>,
6492
6493    /// The time at which the operation failed or was completed successfully.
6494    pub finish_time: std::option::Option<wkt::Timestamp>,
6495
6496    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6497}
6498
6499impl SnapshotTableMetadata {
6500    /// Creates a new default instance.
6501    pub fn new() -> Self {
6502        std::default::Default::default()
6503    }
6504
6505    /// Sets the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6506    ///
6507    /// # Example
6508    /// ```ignore,no_run
6509    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6510    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6511    /// let x = SnapshotTableMetadata::new().set_original_request(SnapshotTableRequest::default()/* use setters */);
6512    /// ```
6513    pub fn set_original_request<T>(mut self, v: T) -> Self
6514    where
6515        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6516    {
6517        self.original_request = std::option::Option::Some(v.into());
6518        self
6519    }
6520
6521    /// Sets or clears the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6522    ///
6523    /// # Example
6524    /// ```ignore,no_run
6525    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6526    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6527    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(Some(SnapshotTableRequest::default()/* use setters */));
6528    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(None::<SnapshotTableRequest>);
6529    /// ```
6530    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6531    where
6532        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6533    {
6534        self.original_request = v.map(|x| x.into());
6535        self
6536    }
6537
6538    /// Sets the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6539    ///
6540    /// # Example
6541    /// ```ignore,no_run
6542    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6543    /// use wkt::Timestamp;
6544    /// let x = SnapshotTableMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6545    /// ```
6546    pub fn set_request_time<T>(mut self, v: T) -> Self
6547    where
6548        T: std::convert::Into<wkt::Timestamp>,
6549    {
6550        self.request_time = std::option::Option::Some(v.into());
6551        self
6552    }
6553
6554    /// Sets or clears the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6555    ///
6556    /// # Example
6557    /// ```ignore,no_run
6558    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6559    /// use wkt::Timestamp;
6560    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
6561    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(None::<Timestamp>);
6562    /// ```
6563    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
6564    where
6565        T: std::convert::Into<wkt::Timestamp>,
6566    {
6567        self.request_time = v.map(|x| x.into());
6568        self
6569    }
6570
6571    /// Sets the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
6572    ///
6573    /// # Example
6574    /// ```ignore,no_run
6575    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6576    /// use wkt::Timestamp;
6577    /// let x = SnapshotTableMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
6578    /// ```
6579    pub fn set_finish_time<T>(mut self, v: T) -> Self
6580    where
6581        T: std::convert::Into<wkt::Timestamp>,
6582    {
6583        self.finish_time = std::option::Option::Some(v.into());
6584        self
6585    }
6586
6587    /// Sets or clears the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
6588    ///
6589    /// # Example
6590    /// ```ignore,no_run
6591    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6592    /// use wkt::Timestamp;
6593    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
6594    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
6595    /// ```
6596    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
6597    where
6598        T: std::convert::Into<wkt::Timestamp>,
6599    {
6600        self.finish_time = v.map(|x| x.into());
6601        self
6602    }
6603}
6604
6605impl wkt::message::Message for SnapshotTableMetadata {
6606    fn typename() -> &'static str {
6607        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableMetadata"
6608    }
6609}
6610
6611/// The metadata for the Operation returned by CreateTableFromSnapshot.
6612///
6613/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6614/// feature is not currently available to most Cloud Bigtable customers. This
6615/// feature might be changed in backward-incompatible ways and is not recommended
6616/// for production use. It is not subject to any SLA or deprecation policy.
6617#[derive(Clone, Default, PartialEq)]
6618#[non_exhaustive]
6619pub struct CreateTableFromSnapshotMetadata {
6620    /// The request that prompted the initiation of this CreateTableFromSnapshot
6621    /// operation.
6622    pub original_request: std::option::Option<crate::model::CreateTableFromSnapshotRequest>,
6623
6624    /// The time at which the original request was received.
6625    pub request_time: std::option::Option<wkt::Timestamp>,
6626
6627    /// The time at which the operation failed or was completed successfully.
6628    pub finish_time: std::option::Option<wkt::Timestamp>,
6629
6630    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6631}
6632
6633impl CreateTableFromSnapshotMetadata {
6634    /// Creates a new default instance.
6635    pub fn new() -> Self {
6636        std::default::Default::default()
6637    }
6638
6639    /// Sets the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
6640    ///
6641    /// # Example
6642    /// ```ignore,no_run
6643    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6644    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
6645    /// let x = CreateTableFromSnapshotMetadata::new().set_original_request(CreateTableFromSnapshotRequest::default()/* use setters */);
6646    /// ```
6647    pub fn set_original_request<T>(mut self, v: T) -> Self
6648    where
6649        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
6650    {
6651        self.original_request = std::option::Option::Some(v.into());
6652        self
6653    }
6654
6655    /// Sets or clears the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
6656    ///
6657    /// # Example
6658    /// ```ignore,no_run
6659    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6660    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
6661    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(Some(CreateTableFromSnapshotRequest::default()/* use setters */));
6662    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(None::<CreateTableFromSnapshotRequest>);
6663    /// ```
6664    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6665    where
6666        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
6667    {
6668        self.original_request = v.map(|x| x.into());
6669        self
6670    }
6671
6672    /// Sets the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
6673    ///
6674    /// # Example
6675    /// ```ignore,no_run
6676    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6677    /// use wkt::Timestamp;
6678    /// let x = CreateTableFromSnapshotMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6679    /// ```
6680    pub fn set_request_time<T>(mut self, v: T) -> Self
6681    where
6682        T: std::convert::Into<wkt::Timestamp>,
6683    {
6684        self.request_time = std::option::Option::Some(v.into());
6685        self
6686    }
6687
6688    /// Sets or clears the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
6689    ///
6690    /// # Example
6691    /// ```ignore,no_run
6692    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6693    /// use wkt::Timestamp;
6694    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
6695    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(None::<Timestamp>);
6696    /// ```
6697    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
6698    where
6699        T: std::convert::Into<wkt::Timestamp>,
6700    {
6701        self.request_time = v.map(|x| x.into());
6702        self
6703    }
6704
6705    /// Sets the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
6706    ///
6707    /// # Example
6708    /// ```ignore,no_run
6709    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6710    /// use wkt::Timestamp;
6711    /// let x = CreateTableFromSnapshotMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
6712    /// ```
6713    pub fn set_finish_time<T>(mut self, v: T) -> Self
6714    where
6715        T: std::convert::Into<wkt::Timestamp>,
6716    {
6717        self.finish_time = std::option::Option::Some(v.into());
6718        self
6719    }
6720
6721    /// Sets or clears the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
6722    ///
6723    /// # Example
6724    /// ```ignore,no_run
6725    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6726    /// use wkt::Timestamp;
6727    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
6728    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
6729    /// ```
6730    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
6731    where
6732        T: std::convert::Into<wkt::Timestamp>,
6733    {
6734        self.finish_time = v.map(|x| x.into());
6735        self
6736    }
6737}
6738
6739impl wkt::message::Message for CreateTableFromSnapshotMetadata {
6740    fn typename() -> &'static str {
6741        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotMetadata"
6742    }
6743}
6744
6745/// The request for
6746/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
6747///
6748/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
6749#[derive(Clone, Default, PartialEq)]
6750#[non_exhaustive]
6751pub struct CreateBackupRequest {
6752    /// Required. This must be one of the clusters in the instance in which this
6753    /// table is located. The backup will be stored in this cluster. Values are
6754    /// of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
6755    pub parent: std::string::String,
6756
6757    /// Required. The id of the backup to be created. The `backup_id` along with
6758    /// the parent `parent` are combined as {parent}/backups/{backup_id} to create
6759    /// the full backup name, of the form:
6760    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
6761    /// This string must be between 1 and 50 characters in length and match the
6762    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
6763    pub backup_id: std::string::String,
6764
6765    /// Required. The backup to create.
6766    pub backup: std::option::Option<crate::model::Backup>,
6767
6768    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6769}
6770
6771impl CreateBackupRequest {
6772    /// Creates a new default instance.
6773    pub fn new() -> Self {
6774        std::default::Default::default()
6775    }
6776
6777    /// Sets the value of [parent][crate::model::CreateBackupRequest::parent].
6778    ///
6779    /// # Example
6780    /// ```ignore,no_run
6781    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6782    /// # let project_id = "project_id";
6783    /// # let instance_id = "instance_id";
6784    /// # let cluster_id = "cluster_id";
6785    /// let x = CreateBackupRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
6786    /// ```
6787    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6788        self.parent = v.into();
6789        self
6790    }
6791
6792    /// Sets the value of [backup_id][crate::model::CreateBackupRequest::backup_id].
6793    ///
6794    /// # Example
6795    /// ```ignore,no_run
6796    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6797    /// let x = CreateBackupRequest::new().set_backup_id("example");
6798    /// ```
6799    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6800        self.backup_id = v.into();
6801        self
6802    }
6803
6804    /// Sets the value of [backup][crate::model::CreateBackupRequest::backup].
6805    ///
6806    /// # Example
6807    /// ```ignore,no_run
6808    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6809    /// use google_cloud_bigtable_admin_v2::model::Backup;
6810    /// let x = CreateBackupRequest::new().set_backup(Backup::default()/* use setters */);
6811    /// ```
6812    pub fn set_backup<T>(mut self, v: T) -> Self
6813    where
6814        T: std::convert::Into<crate::model::Backup>,
6815    {
6816        self.backup = std::option::Option::Some(v.into());
6817        self
6818    }
6819
6820    /// Sets or clears the value of [backup][crate::model::CreateBackupRequest::backup].
6821    ///
6822    /// # Example
6823    /// ```ignore,no_run
6824    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6825    /// use google_cloud_bigtable_admin_v2::model::Backup;
6826    /// let x = CreateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
6827    /// let x = CreateBackupRequest::new().set_or_clear_backup(None::<Backup>);
6828    /// ```
6829    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6830    where
6831        T: std::convert::Into<crate::model::Backup>,
6832    {
6833        self.backup = v.map(|x| x.into());
6834        self
6835    }
6836}
6837
6838impl wkt::message::Message for CreateBackupRequest {
6839    fn typename() -> &'static str {
6840        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupRequest"
6841    }
6842}
6843
6844/// Metadata type for the operation returned by
6845/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
6846///
6847/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
6848#[derive(Clone, Default, PartialEq)]
6849#[non_exhaustive]
6850pub struct CreateBackupMetadata {
6851    /// The name of the backup being created.
6852    pub name: std::string::String,
6853
6854    /// The name of the table the backup is created from.
6855    pub source_table: std::string::String,
6856
6857    /// The time at which this operation started.
6858    pub start_time: std::option::Option<wkt::Timestamp>,
6859
6860    /// If set, the time at which this operation finished or was cancelled.
6861    pub end_time: std::option::Option<wkt::Timestamp>,
6862
6863    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6864}
6865
6866impl CreateBackupMetadata {
6867    /// Creates a new default instance.
6868    pub fn new() -> Self {
6869        std::default::Default::default()
6870    }
6871
6872    /// Sets the value of [name][crate::model::CreateBackupMetadata::name].
6873    ///
6874    /// # Example
6875    /// ```ignore,no_run
6876    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6877    /// let x = CreateBackupMetadata::new().set_name("example");
6878    /// ```
6879    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6880        self.name = v.into();
6881        self
6882    }
6883
6884    /// Sets the value of [source_table][crate::model::CreateBackupMetadata::source_table].
6885    ///
6886    /// # Example
6887    /// ```ignore,no_run
6888    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6889    /// let x = CreateBackupMetadata::new().set_source_table("example");
6890    /// ```
6891    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6892        self.source_table = v.into();
6893        self
6894    }
6895
6896    /// Sets the value of [start_time][crate::model::CreateBackupMetadata::start_time].
6897    ///
6898    /// # Example
6899    /// ```ignore,no_run
6900    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6901    /// use wkt::Timestamp;
6902    /// let x = CreateBackupMetadata::new().set_start_time(Timestamp::default()/* use setters */);
6903    /// ```
6904    pub fn set_start_time<T>(mut self, v: T) -> Self
6905    where
6906        T: std::convert::Into<wkt::Timestamp>,
6907    {
6908        self.start_time = std::option::Option::Some(v.into());
6909        self
6910    }
6911
6912    /// Sets or clears the value of [start_time][crate::model::CreateBackupMetadata::start_time].
6913    ///
6914    /// # Example
6915    /// ```ignore,no_run
6916    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6917    /// use wkt::Timestamp;
6918    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
6919    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(None::<Timestamp>);
6920    /// ```
6921    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6922    where
6923        T: std::convert::Into<wkt::Timestamp>,
6924    {
6925        self.start_time = v.map(|x| x.into());
6926        self
6927    }
6928
6929    /// Sets the value of [end_time][crate::model::CreateBackupMetadata::end_time].
6930    ///
6931    /// # Example
6932    /// ```ignore,no_run
6933    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6934    /// use wkt::Timestamp;
6935    /// let x = CreateBackupMetadata::new().set_end_time(Timestamp::default()/* use setters */);
6936    /// ```
6937    pub fn set_end_time<T>(mut self, v: T) -> Self
6938    where
6939        T: std::convert::Into<wkt::Timestamp>,
6940    {
6941        self.end_time = std::option::Option::Some(v.into());
6942        self
6943    }
6944
6945    /// Sets or clears the value of [end_time][crate::model::CreateBackupMetadata::end_time].
6946    ///
6947    /// # Example
6948    /// ```ignore,no_run
6949    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6950    /// use wkt::Timestamp;
6951    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
6952    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(None::<Timestamp>);
6953    /// ```
6954    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6955    where
6956        T: std::convert::Into<wkt::Timestamp>,
6957    {
6958        self.end_time = v.map(|x| x.into());
6959        self
6960    }
6961}
6962
6963impl wkt::message::Message for CreateBackupMetadata {
6964    fn typename() -> &'static str {
6965        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupMetadata"
6966    }
6967}
6968
6969/// The request for
6970/// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup].
6971///
6972/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]: crate::client::BigtableTableAdmin::update_backup
6973#[derive(Clone, Default, PartialEq)]
6974#[non_exhaustive]
6975pub struct UpdateBackupRequest {
6976    /// Required. The backup to update. `backup.name`, and the fields to be updated
6977    /// as specified by `update_mask` are required. Other fields are ignored.
6978    /// Update is only supported for the following fields:
6979    ///
6980    /// * `backup.expire_time`.
6981    pub backup: std::option::Option<crate::model::Backup>,
6982
6983    /// Required. A mask specifying which fields (e.g. `expire_time`) in the
6984    /// Backup resource should be updated. This mask is relative to the Backup
6985    /// resource, not to the request message. The field mask must always be
6986    /// specified; this prevents any future fields from being erased accidentally
6987    /// by clients that do not know about them.
6988    pub update_mask: std::option::Option<wkt::FieldMask>,
6989
6990    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6991}
6992
6993impl UpdateBackupRequest {
6994    /// Creates a new default instance.
6995    pub fn new() -> Self {
6996        std::default::Default::default()
6997    }
6998
6999    /// Sets the value of [backup][crate::model::UpdateBackupRequest::backup].
7000    ///
7001    /// # Example
7002    /// ```ignore,no_run
7003    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7004    /// use google_cloud_bigtable_admin_v2::model::Backup;
7005    /// let x = UpdateBackupRequest::new().set_backup(Backup::default()/* use setters */);
7006    /// ```
7007    pub fn set_backup<T>(mut self, v: T) -> Self
7008    where
7009        T: std::convert::Into<crate::model::Backup>,
7010    {
7011        self.backup = std::option::Option::Some(v.into());
7012        self
7013    }
7014
7015    /// Sets or clears the value of [backup][crate::model::UpdateBackupRequest::backup].
7016    ///
7017    /// # Example
7018    /// ```ignore,no_run
7019    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7020    /// use google_cloud_bigtable_admin_v2::model::Backup;
7021    /// let x = UpdateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
7022    /// let x = UpdateBackupRequest::new().set_or_clear_backup(None::<Backup>);
7023    /// ```
7024    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
7025    where
7026        T: std::convert::Into<crate::model::Backup>,
7027    {
7028        self.backup = v.map(|x| x.into());
7029        self
7030    }
7031
7032    /// Sets the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
7033    ///
7034    /// # Example
7035    /// ```ignore,no_run
7036    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7037    /// use wkt::FieldMask;
7038    /// let x = UpdateBackupRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7039    /// ```
7040    pub fn set_update_mask<T>(mut self, v: T) -> Self
7041    where
7042        T: std::convert::Into<wkt::FieldMask>,
7043    {
7044        self.update_mask = std::option::Option::Some(v.into());
7045        self
7046    }
7047
7048    /// Sets or clears the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
7049    ///
7050    /// # Example
7051    /// ```ignore,no_run
7052    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7053    /// use wkt::FieldMask;
7054    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7055    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7056    /// ```
7057    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7058    where
7059        T: std::convert::Into<wkt::FieldMask>,
7060    {
7061        self.update_mask = v.map(|x| x.into());
7062        self
7063    }
7064}
7065
7066impl wkt::message::Message for UpdateBackupRequest {
7067    fn typename() -> &'static str {
7068        "type.googleapis.com/google.bigtable.admin.v2.UpdateBackupRequest"
7069    }
7070}
7071
7072/// The request for
7073/// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup].
7074///
7075/// [google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]: crate::client::BigtableTableAdmin::get_backup
7076#[derive(Clone, Default, PartialEq)]
7077#[non_exhaustive]
7078pub struct GetBackupRequest {
7079    /// Required. Name of the backup.
7080    /// Values are of the form
7081    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
7082    pub name: std::string::String,
7083
7084    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7085}
7086
7087impl GetBackupRequest {
7088    /// Creates a new default instance.
7089    pub fn new() -> Self {
7090        std::default::Default::default()
7091    }
7092
7093    /// Sets the value of [name][crate::model::GetBackupRequest::name].
7094    ///
7095    /// # Example
7096    /// ```ignore,no_run
7097    /// # use google_cloud_bigtable_admin_v2::model::GetBackupRequest;
7098    /// # let project_id = "project_id";
7099    /// # let instance_id = "instance_id";
7100    /// # let cluster_id = "cluster_id";
7101    /// # let backup_id = "backup_id";
7102    /// let x = GetBackupRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7103    /// ```
7104    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7105        self.name = v.into();
7106        self
7107    }
7108}
7109
7110impl wkt::message::Message for GetBackupRequest {
7111    fn typename() -> &'static str {
7112        "type.googleapis.com/google.bigtable.admin.v2.GetBackupRequest"
7113    }
7114}
7115
7116/// The request for
7117/// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup].
7118///
7119/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]: crate::client::BigtableTableAdmin::delete_backup
7120#[derive(Clone, Default, PartialEq)]
7121#[non_exhaustive]
7122pub struct DeleteBackupRequest {
7123    /// Required. Name of the backup to delete.
7124    /// Values are of the form
7125    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
7126    pub name: std::string::String,
7127
7128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7129}
7130
7131impl DeleteBackupRequest {
7132    /// Creates a new default instance.
7133    pub fn new() -> Self {
7134        std::default::Default::default()
7135    }
7136
7137    /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
7138    ///
7139    /// # Example
7140    /// ```ignore,no_run
7141    /// # use google_cloud_bigtable_admin_v2::model::DeleteBackupRequest;
7142    /// # let project_id = "project_id";
7143    /// # let instance_id = "instance_id";
7144    /// # let cluster_id = "cluster_id";
7145    /// # let backup_id = "backup_id";
7146    /// let x = DeleteBackupRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7147    /// ```
7148    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7149        self.name = v.into();
7150        self
7151    }
7152}
7153
7154impl wkt::message::Message for DeleteBackupRequest {
7155    fn typename() -> &'static str {
7156        "type.googleapis.com/google.bigtable.admin.v2.DeleteBackupRequest"
7157    }
7158}
7159
7160/// The request for
7161/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
7162///
7163/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7164#[derive(Clone, Default, PartialEq)]
7165#[non_exhaustive]
7166pub struct ListBackupsRequest {
7167    /// Required. The cluster to list backups from.  Values are of the
7168    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
7169    /// Use `{cluster} = '-'` to list backups for all clusters in an instance,
7170    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
7171    pub parent: std::string::String,
7172
7173    /// A filter expression that filters backups listed in the response.
7174    /// The expression must specify the field name, a comparison operator,
7175    /// and the value that you want to use for filtering. The value must be a
7176    /// string, a number, or a boolean. The comparison operator must be
7177    /// <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is
7178    /// roughly synonymous with equality. Filter rules are case insensitive.
7179    ///
7180    /// The fields eligible for filtering are:
7181    ///
7182    /// * `name`
7183    /// * `source_table`
7184    /// * `state`
7185    /// * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7186    /// * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7187    /// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7188    /// * `size_bytes`
7189    ///
7190    /// To filter on multiple expressions, provide each separate expression within
7191    /// parentheses. By default, each expression is an AND expression. However,
7192    /// you can include AND, OR, and NOT expressions explicitly.
7193    ///
7194    /// Some examples of using filters are:
7195    ///
7196    /// * `name:"exact"` --> The backup's name is the string "exact".
7197    /// * `name:howl` --> The backup's name contains the string "howl".
7198    /// * `source_table:prod`
7199    ///   --> The source_table's name contains the string "prod".
7200    /// * `state:CREATING` --> The backup is pending creation.
7201    /// * `state:READY` --> The backup is fully created and ready for use.
7202    /// * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")`
7203    ///   --> The backup name contains the string "howl" and start_time
7204    ///   of the backup is before 2018-03-28T14:50:00Z.
7205    /// * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
7206    pub filter: std::string::String,
7207
7208    /// An expression for specifying the sort order of the results of the request.
7209    /// The string value should specify one or more fields in
7210    /// [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at
7211    /// <https://aip.dev/132#ordering>.
7212    ///
7213    /// Fields supported are:
7214    ///
7215    /// * name
7216    /// * source_table
7217    /// * expire_time
7218    /// * start_time
7219    /// * end_time
7220    /// * size_bytes
7221    /// * state
7222    ///
7223    /// For example, "start_time". The default sorting order is ascending.
7224    /// To specify descending order for the field, a suffix " desc" should
7225    /// be appended to the field name. For example, "start_time desc".
7226    /// Redundant space characters in the syntax are insigificant.
7227    ///
7228    /// If order_by is empty, results will be sorted by `start_time` in descending
7229    /// order starting from the most recently created backup.
7230    ///
7231    /// [google.bigtable.admin.v2.Backup]: crate::model::Backup
7232    pub order_by: std::string::String,
7233
7234    /// Number of backups to be returned in the response. If 0 or
7235    /// less, defaults to the server's maximum allowed page size.
7236    pub page_size: i32,
7237
7238    /// If non-empty, `page_token` should contain a
7239    /// [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token]
7240    /// from a previous
7241    /// [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the
7242    /// same `parent` and with the same `filter`.
7243    ///
7244    /// [google.bigtable.admin.v2.ListBackupsResponse]: crate::model::ListBackupsResponse
7245    /// [google.bigtable.admin.v2.ListBackupsResponse.next_page_token]: crate::model::ListBackupsResponse::next_page_token
7246    pub page_token: std::string::String,
7247
7248    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7249}
7250
7251impl ListBackupsRequest {
7252    /// Creates a new default instance.
7253    pub fn new() -> Self {
7254        std::default::Default::default()
7255    }
7256
7257    /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
7258    ///
7259    /// # Example
7260    /// ```ignore,no_run
7261    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7262    /// # let project_id = "project_id";
7263    /// # let instance_id = "instance_id";
7264    /// # let cluster_id = "cluster_id";
7265    /// let x = ListBackupsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
7266    /// ```
7267    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7268        self.parent = v.into();
7269        self
7270    }
7271
7272    /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
7273    ///
7274    /// # Example
7275    /// ```ignore,no_run
7276    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7277    /// let x = ListBackupsRequest::new().set_filter("example");
7278    /// ```
7279    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7280        self.filter = v.into();
7281        self
7282    }
7283
7284    /// Sets the value of [order_by][crate::model::ListBackupsRequest::order_by].
7285    ///
7286    /// # Example
7287    /// ```ignore,no_run
7288    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7289    /// let x = ListBackupsRequest::new().set_order_by("example");
7290    /// ```
7291    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7292        self.order_by = v.into();
7293        self
7294    }
7295
7296    /// Sets the value of [page_size][crate::model::ListBackupsRequest::page_size].
7297    ///
7298    /// # Example
7299    /// ```ignore,no_run
7300    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7301    /// let x = ListBackupsRequest::new().set_page_size(42);
7302    /// ```
7303    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7304        self.page_size = v.into();
7305        self
7306    }
7307
7308    /// Sets the value of [page_token][crate::model::ListBackupsRequest::page_token].
7309    ///
7310    /// # Example
7311    /// ```ignore,no_run
7312    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7313    /// let x = ListBackupsRequest::new().set_page_token("example");
7314    /// ```
7315    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7316        self.page_token = v.into();
7317        self
7318    }
7319}
7320
7321impl wkt::message::Message for ListBackupsRequest {
7322    fn typename() -> &'static str {
7323        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsRequest"
7324    }
7325}
7326
7327/// The response for
7328/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
7329///
7330/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7331#[derive(Clone, Default, PartialEq)]
7332#[non_exhaustive]
7333pub struct ListBackupsResponse {
7334    /// The list of matching backups.
7335    pub backups: std::vec::Vec<crate::model::Backup>,
7336
7337    /// `next_page_token` can be sent in a subsequent
7338    /// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call
7339    /// to fetch more of the matching backups.
7340    ///
7341    /// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7342    pub next_page_token: std::string::String,
7343
7344    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7345}
7346
7347impl ListBackupsResponse {
7348    /// Creates a new default instance.
7349    pub fn new() -> Self {
7350        std::default::Default::default()
7351    }
7352
7353    /// Sets the value of [backups][crate::model::ListBackupsResponse::backups].
7354    ///
7355    /// # Example
7356    /// ```ignore,no_run
7357    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7358    /// use google_cloud_bigtable_admin_v2::model::Backup;
7359    /// let x = ListBackupsResponse::new()
7360    ///     .set_backups([
7361    ///         Backup::default()/* use setters */,
7362    ///         Backup::default()/* use (different) setters */,
7363    ///     ]);
7364    /// ```
7365    pub fn set_backups<T, V>(mut self, v: T) -> Self
7366    where
7367        T: std::iter::IntoIterator<Item = V>,
7368        V: std::convert::Into<crate::model::Backup>,
7369    {
7370        use std::iter::Iterator;
7371        self.backups = v.into_iter().map(|i| i.into()).collect();
7372        self
7373    }
7374
7375    /// Sets the value of [next_page_token][crate::model::ListBackupsResponse::next_page_token].
7376    ///
7377    /// # Example
7378    /// ```ignore,no_run
7379    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7380    /// let x = ListBackupsResponse::new().set_next_page_token("example");
7381    /// ```
7382    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7383        self.next_page_token = v.into();
7384        self
7385    }
7386}
7387
7388impl wkt::message::Message for ListBackupsResponse {
7389    fn typename() -> &'static str {
7390        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsResponse"
7391    }
7392}
7393
7394#[doc(hidden)]
7395impl google_cloud_gax::paginator::internal::PageableResponse for ListBackupsResponse {
7396    type PageItem = crate::model::Backup;
7397
7398    fn items(self) -> std::vec::Vec<Self::PageItem> {
7399        self.backups
7400    }
7401
7402    fn next_page_token(&self) -> std::string::String {
7403        use std::clone::Clone;
7404        self.next_page_token.clone()
7405    }
7406}
7407
7408/// The request for
7409/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7410///
7411/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7412#[derive(Clone, Default, PartialEq)]
7413#[non_exhaustive]
7414pub struct CopyBackupRequest {
7415    /// Required. The name of the destination cluster that will contain the backup
7416    /// copy. The cluster must already exist. Values are of the form:
7417    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
7418    pub parent: std::string::String,
7419
7420    /// Required. The id of the new backup. The `backup_id` along with `parent`
7421    /// are combined as {parent}/backups/{backup_id} to create the full backup
7422    /// name, of the form:
7423    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
7424    /// This string must be between 1 and 50 characters in length and match the
7425    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
7426    pub backup_id: std::string::String,
7427
7428    /// Required. The source backup to be copied from.
7429    /// The source backup needs to be in READY state for it to be copied.
7430    /// Copying a copied backup is not allowed.
7431    /// Once CopyBackup is in progress, the source backup cannot be deleted or
7432    /// cleaned up on expiration until CopyBackup is finished.
7433    /// Values are of the form:
7434    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7435    pub source_backup: std::string::String,
7436
7437    /// Required. Required. The expiration time of the copied backup with
7438    /// microsecond granularity that must be at least 6 hours and at most 30 days
7439    /// from the time the request is received. Once the `expire_time` has
7440    /// passed, Cloud Bigtable will delete the backup and free the resources used
7441    /// by the backup.
7442    pub expire_time: std::option::Option<wkt::Timestamp>,
7443
7444    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7445}
7446
7447impl CopyBackupRequest {
7448    /// Creates a new default instance.
7449    pub fn new() -> Self {
7450        std::default::Default::default()
7451    }
7452
7453    /// Sets the value of [parent][crate::model::CopyBackupRequest::parent].
7454    ///
7455    /// # Example
7456    /// ```ignore,no_run
7457    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7458    /// # let project_id = "project_id";
7459    /// # let instance_id = "instance_id";
7460    /// # let cluster_id = "cluster_id";
7461    /// let x = CopyBackupRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
7462    /// ```
7463    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7464        self.parent = v.into();
7465        self
7466    }
7467
7468    /// Sets the value of [backup_id][crate::model::CopyBackupRequest::backup_id].
7469    ///
7470    /// # Example
7471    /// ```ignore,no_run
7472    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7473    /// let x = CopyBackupRequest::new().set_backup_id("example");
7474    /// ```
7475    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7476        self.backup_id = v.into();
7477        self
7478    }
7479
7480    /// Sets the value of [source_backup][crate::model::CopyBackupRequest::source_backup].
7481    ///
7482    /// # Example
7483    /// ```ignore,no_run
7484    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7485    /// # let project_id = "project_id";
7486    /// # let instance_id = "instance_id";
7487    /// # let cluster_id = "cluster_id";
7488    /// # let backup_id = "backup_id";
7489    /// let x = CopyBackupRequest::new().set_source_backup(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7490    /// ```
7491    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7492        self.source_backup = v.into();
7493        self
7494    }
7495
7496    /// Sets the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7497    ///
7498    /// # Example
7499    /// ```ignore,no_run
7500    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7501    /// use wkt::Timestamp;
7502    /// let x = CopyBackupRequest::new().set_expire_time(Timestamp::default()/* use setters */);
7503    /// ```
7504    pub fn set_expire_time<T>(mut self, v: T) -> Self
7505    where
7506        T: std::convert::Into<wkt::Timestamp>,
7507    {
7508        self.expire_time = std::option::Option::Some(v.into());
7509        self
7510    }
7511
7512    /// Sets or clears the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7513    ///
7514    /// # Example
7515    /// ```ignore,no_run
7516    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7517    /// use wkt::Timestamp;
7518    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
7519    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(None::<Timestamp>);
7520    /// ```
7521    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
7522    where
7523        T: std::convert::Into<wkt::Timestamp>,
7524    {
7525        self.expire_time = v.map(|x| x.into());
7526        self
7527    }
7528}
7529
7530impl wkt::message::Message for CopyBackupRequest {
7531    fn typename() -> &'static str {
7532        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupRequest"
7533    }
7534}
7535
7536/// Metadata type for the google.longrunning.Operation returned by
7537/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7538///
7539/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7540#[derive(Clone, Default, PartialEq)]
7541#[non_exhaustive]
7542pub struct CopyBackupMetadata {
7543    /// The name of the backup being created through the copy operation.
7544    /// Values are of the form
7545    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7546    pub name: std::string::String,
7547
7548    /// Information about the source backup that is being copied from.
7549    pub source_backup_info: std::option::Option<crate::model::BackupInfo>,
7550
7551    /// The progress of the
7552    /// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]
7553    /// operation.
7554    ///
7555    /// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7556    pub progress: std::option::Option<crate::model::OperationProgress>,
7557
7558    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7559}
7560
7561impl CopyBackupMetadata {
7562    /// Creates a new default instance.
7563    pub fn new() -> Self {
7564        std::default::Default::default()
7565    }
7566
7567    /// Sets the value of [name][crate::model::CopyBackupMetadata::name].
7568    ///
7569    /// # Example
7570    /// ```ignore,no_run
7571    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7572    /// # let project_id = "project_id";
7573    /// # let instance_id = "instance_id";
7574    /// # let cluster_id = "cluster_id";
7575    /// # let backup_id = "backup_id";
7576    /// let x = CopyBackupMetadata::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7577    /// ```
7578    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7579        self.name = v.into();
7580        self
7581    }
7582
7583    /// Sets the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
7584    ///
7585    /// # Example
7586    /// ```ignore,no_run
7587    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7588    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
7589    /// let x = CopyBackupMetadata::new().set_source_backup_info(BackupInfo::default()/* use setters */);
7590    /// ```
7591    pub fn set_source_backup_info<T>(mut self, v: T) -> Self
7592    where
7593        T: std::convert::Into<crate::model::BackupInfo>,
7594    {
7595        self.source_backup_info = std::option::Option::Some(v.into());
7596        self
7597    }
7598
7599    /// Sets or clears the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
7600    ///
7601    /// # Example
7602    /// ```ignore,no_run
7603    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7604    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
7605    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(Some(BackupInfo::default()/* use setters */));
7606    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(None::<BackupInfo>);
7607    /// ```
7608    pub fn set_or_clear_source_backup_info<T>(mut self, v: std::option::Option<T>) -> Self
7609    where
7610        T: std::convert::Into<crate::model::BackupInfo>,
7611    {
7612        self.source_backup_info = v.map(|x| x.into());
7613        self
7614    }
7615
7616    /// Sets the value of [progress][crate::model::CopyBackupMetadata::progress].
7617    ///
7618    /// # Example
7619    /// ```ignore,no_run
7620    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7621    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
7622    /// let x = CopyBackupMetadata::new().set_progress(OperationProgress::default()/* use setters */);
7623    /// ```
7624    pub fn set_progress<T>(mut self, v: T) -> Self
7625    where
7626        T: std::convert::Into<crate::model::OperationProgress>,
7627    {
7628        self.progress = std::option::Option::Some(v.into());
7629        self
7630    }
7631
7632    /// Sets or clears the value of [progress][crate::model::CopyBackupMetadata::progress].
7633    ///
7634    /// # Example
7635    /// ```ignore,no_run
7636    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7637    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
7638    /// let x = CopyBackupMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
7639    /// let x = CopyBackupMetadata::new().set_or_clear_progress(None::<OperationProgress>);
7640    /// ```
7641    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
7642    where
7643        T: std::convert::Into<crate::model::OperationProgress>,
7644    {
7645        self.progress = v.map(|x| x.into());
7646        self
7647    }
7648}
7649
7650impl wkt::message::Message for CopyBackupMetadata {
7651    fn typename() -> &'static str {
7652        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupMetadata"
7653    }
7654}
7655
7656/// The request for
7657/// [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]
7658///
7659/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]: crate::client::BigtableTableAdmin::create_authorized_view
7660#[derive(Clone, Default, PartialEq)]
7661#[non_exhaustive]
7662pub struct CreateAuthorizedViewRequest {
7663    /// Required. This is the name of the table the AuthorizedView belongs to.
7664    /// Values are of the form
7665    /// `projects/{project}/instances/{instance}/tables/{table}`.
7666    pub parent: std::string::String,
7667
7668    /// Required. The id of the AuthorizedView to create. This AuthorizedView must
7669    /// not already exist. The `authorized_view_id` appended to `parent` forms the
7670    /// full AuthorizedView name of the form
7671    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
7672    pub authorized_view_id: std::string::String,
7673
7674    /// Required. The AuthorizedView to create.
7675    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
7676
7677    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7678}
7679
7680impl CreateAuthorizedViewRequest {
7681    /// Creates a new default instance.
7682    pub fn new() -> Self {
7683        std::default::Default::default()
7684    }
7685
7686    /// Sets the value of [parent][crate::model::CreateAuthorizedViewRequest::parent].
7687    ///
7688    /// # Example
7689    /// ```ignore,no_run
7690    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7691    /// # let project_id = "project_id";
7692    /// # let instance_id = "instance_id";
7693    /// # let table_id = "table_id";
7694    /// let x = CreateAuthorizedViewRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
7695    /// ```
7696    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7697        self.parent = v.into();
7698        self
7699    }
7700
7701    /// Sets the value of [authorized_view_id][crate::model::CreateAuthorizedViewRequest::authorized_view_id].
7702    ///
7703    /// # Example
7704    /// ```ignore,no_run
7705    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7706    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view_id("example");
7707    /// ```
7708    pub fn set_authorized_view_id<T: std::convert::Into<std::string::String>>(
7709        mut self,
7710        v: T,
7711    ) -> Self {
7712        self.authorized_view_id = v.into();
7713        self
7714    }
7715
7716    /// Sets the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
7717    ///
7718    /// # Example
7719    /// ```ignore,no_run
7720    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7721    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7722    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
7723    /// ```
7724    pub fn set_authorized_view<T>(mut self, v: T) -> Self
7725    where
7726        T: std::convert::Into<crate::model::AuthorizedView>,
7727    {
7728        self.authorized_view = std::option::Option::Some(v.into());
7729        self
7730    }
7731
7732    /// Sets or clears the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
7733    ///
7734    /// # Example
7735    /// ```ignore,no_run
7736    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7737    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7738    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
7739    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
7740    /// ```
7741    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
7742    where
7743        T: std::convert::Into<crate::model::AuthorizedView>,
7744    {
7745        self.authorized_view = v.map(|x| x.into());
7746        self
7747    }
7748}
7749
7750impl wkt::message::Message for CreateAuthorizedViewRequest {
7751    fn typename() -> &'static str {
7752        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewRequest"
7753    }
7754}
7755
7756/// The metadata for the Operation returned by CreateAuthorizedView.
7757#[derive(Clone, Default, PartialEq)]
7758#[non_exhaustive]
7759pub struct CreateAuthorizedViewMetadata {
7760    /// The request that prompted the initiation of this CreateAuthorizedView
7761    /// operation.
7762    pub original_request: std::option::Option<crate::model::CreateAuthorizedViewRequest>,
7763
7764    /// The time at which the original request was received.
7765    pub request_time: std::option::Option<wkt::Timestamp>,
7766
7767    /// The time at which the operation failed or was completed successfully.
7768    pub finish_time: std::option::Option<wkt::Timestamp>,
7769
7770    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7771}
7772
7773impl CreateAuthorizedViewMetadata {
7774    /// Creates a new default instance.
7775    pub fn new() -> Self {
7776        std::default::Default::default()
7777    }
7778
7779    /// Sets the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
7780    ///
7781    /// # Example
7782    /// ```ignore,no_run
7783    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7784    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7785    /// let x = CreateAuthorizedViewMetadata::new().set_original_request(CreateAuthorizedViewRequest::default()/* use setters */);
7786    /// ```
7787    pub fn set_original_request<T>(mut self, v: T) -> Self
7788    where
7789        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
7790    {
7791        self.original_request = std::option::Option::Some(v.into());
7792        self
7793    }
7794
7795    /// Sets or clears the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
7796    ///
7797    /// # Example
7798    /// ```ignore,no_run
7799    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7800    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7801    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(CreateAuthorizedViewRequest::default()/* use setters */));
7802    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<CreateAuthorizedViewRequest>);
7803    /// ```
7804    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
7805    where
7806        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
7807    {
7808        self.original_request = v.map(|x| x.into());
7809        self
7810    }
7811
7812    /// Sets the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
7813    ///
7814    /// # Example
7815    /// ```ignore,no_run
7816    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7817    /// use wkt::Timestamp;
7818    /// let x = CreateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
7819    /// ```
7820    pub fn set_request_time<T>(mut self, v: T) -> Self
7821    where
7822        T: std::convert::Into<wkt::Timestamp>,
7823    {
7824        self.request_time = std::option::Option::Some(v.into());
7825        self
7826    }
7827
7828    /// Sets or clears the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
7829    ///
7830    /// # Example
7831    /// ```ignore,no_run
7832    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7833    /// use wkt::Timestamp;
7834    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
7835    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
7836    /// ```
7837    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
7838    where
7839        T: std::convert::Into<wkt::Timestamp>,
7840    {
7841        self.request_time = v.map(|x| x.into());
7842        self
7843    }
7844
7845    /// Sets the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
7846    ///
7847    /// # Example
7848    /// ```ignore,no_run
7849    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7850    /// use wkt::Timestamp;
7851    /// let x = CreateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
7852    /// ```
7853    pub fn set_finish_time<T>(mut self, v: T) -> Self
7854    where
7855        T: std::convert::Into<wkt::Timestamp>,
7856    {
7857        self.finish_time = std::option::Option::Some(v.into());
7858        self
7859    }
7860
7861    /// Sets or clears the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
7862    ///
7863    /// # Example
7864    /// ```ignore,no_run
7865    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7866    /// use wkt::Timestamp;
7867    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
7868    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
7869    /// ```
7870    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
7871    where
7872        T: std::convert::Into<wkt::Timestamp>,
7873    {
7874        self.finish_time = v.map(|x| x.into());
7875        self
7876    }
7877}
7878
7879impl wkt::message::Message for CreateAuthorizedViewMetadata {
7880    fn typename() -> &'static str {
7881        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewMetadata"
7882    }
7883}
7884
7885/// Request message for
7886/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
7887///
7888/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
7889#[derive(Clone, Default, PartialEq)]
7890#[non_exhaustive]
7891pub struct ListAuthorizedViewsRequest {
7892    /// Required. The unique name of the table for which AuthorizedViews should be
7893    /// listed. Values are of the form
7894    /// `projects/{project}/instances/{instance}/tables/{table}`.
7895    pub parent: std::string::String,
7896
7897    /// Optional. Maximum number of results per page.
7898    ///
7899    /// A page_size of zero lets the server choose the number of items to return.
7900    /// A page_size which is strictly positive will return at most that many items.
7901    /// A negative page_size will cause an error.
7902    ///
7903    /// Following the first request, subsequent paginated calls are not required
7904    /// to pass a page_size. If a page_size is set in subsequent calls, it must
7905    /// match the page_size given in the first request.
7906    pub page_size: i32,
7907
7908    /// Optional. The value of `next_page_token` returned by a previous call.
7909    pub page_token: std::string::String,
7910
7911    /// Optional. The resource_view to be applied to the returned AuthorizedViews'
7912    /// fields. Default to NAME_ONLY.
7913    pub view: crate::model::authorized_view::ResponseView,
7914
7915    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7916}
7917
7918impl ListAuthorizedViewsRequest {
7919    /// Creates a new default instance.
7920    pub fn new() -> Self {
7921        std::default::Default::default()
7922    }
7923
7924    /// Sets the value of [parent][crate::model::ListAuthorizedViewsRequest::parent].
7925    ///
7926    /// # Example
7927    /// ```ignore,no_run
7928    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7929    /// # let project_id = "project_id";
7930    /// # let instance_id = "instance_id";
7931    /// # let table_id = "table_id";
7932    /// let x = ListAuthorizedViewsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
7933    /// ```
7934    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7935        self.parent = v.into();
7936        self
7937    }
7938
7939    /// Sets the value of [page_size][crate::model::ListAuthorizedViewsRequest::page_size].
7940    ///
7941    /// # Example
7942    /// ```ignore,no_run
7943    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7944    /// let x = ListAuthorizedViewsRequest::new().set_page_size(42);
7945    /// ```
7946    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7947        self.page_size = v.into();
7948        self
7949    }
7950
7951    /// Sets the value of [page_token][crate::model::ListAuthorizedViewsRequest::page_token].
7952    ///
7953    /// # Example
7954    /// ```ignore,no_run
7955    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7956    /// let x = ListAuthorizedViewsRequest::new().set_page_token("example");
7957    /// ```
7958    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7959        self.page_token = v.into();
7960        self
7961    }
7962
7963    /// Sets the value of [view][crate::model::ListAuthorizedViewsRequest::view].
7964    ///
7965    /// # Example
7966    /// ```ignore,no_run
7967    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7968    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
7969    /// let x0 = ListAuthorizedViewsRequest::new().set_view(ResponseView::NameOnly);
7970    /// let x1 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Basic);
7971    /// let x2 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Full);
7972    /// ```
7973    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
7974        mut self,
7975        v: T,
7976    ) -> Self {
7977        self.view = v.into();
7978        self
7979    }
7980}
7981
7982impl wkt::message::Message for ListAuthorizedViewsRequest {
7983    fn typename() -> &'static str {
7984        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsRequest"
7985    }
7986}
7987
7988/// Response message for
7989/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
7990///
7991/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
7992#[derive(Clone, Default, PartialEq)]
7993#[non_exhaustive]
7994pub struct ListAuthorizedViewsResponse {
7995    /// The AuthorizedViews present in the requested table.
7996    pub authorized_views: std::vec::Vec<crate::model::AuthorizedView>,
7997
7998    /// Set if not all tables could be returned in a single response.
7999    /// Pass this value to `page_token` in another request to get the next
8000    /// page of results.
8001    pub next_page_token: std::string::String,
8002
8003    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8004}
8005
8006impl ListAuthorizedViewsResponse {
8007    /// Creates a new default instance.
8008    pub fn new() -> Self {
8009        std::default::Default::default()
8010    }
8011
8012    /// Sets the value of [authorized_views][crate::model::ListAuthorizedViewsResponse::authorized_views].
8013    ///
8014    /// # Example
8015    /// ```ignore,no_run
8016    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
8017    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8018    /// let x = ListAuthorizedViewsResponse::new()
8019    ///     .set_authorized_views([
8020    ///         AuthorizedView::default()/* use setters */,
8021    ///         AuthorizedView::default()/* use (different) setters */,
8022    ///     ]);
8023    /// ```
8024    pub fn set_authorized_views<T, V>(mut self, v: T) -> Self
8025    where
8026        T: std::iter::IntoIterator<Item = V>,
8027        V: std::convert::Into<crate::model::AuthorizedView>,
8028    {
8029        use std::iter::Iterator;
8030        self.authorized_views = v.into_iter().map(|i| i.into()).collect();
8031        self
8032    }
8033
8034    /// Sets the value of [next_page_token][crate::model::ListAuthorizedViewsResponse::next_page_token].
8035    ///
8036    /// # Example
8037    /// ```ignore,no_run
8038    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
8039    /// let x = ListAuthorizedViewsResponse::new().set_next_page_token("example");
8040    /// ```
8041    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8042        self.next_page_token = v.into();
8043        self
8044    }
8045}
8046
8047impl wkt::message::Message for ListAuthorizedViewsResponse {
8048    fn typename() -> &'static str {
8049        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsResponse"
8050    }
8051}
8052
8053#[doc(hidden)]
8054impl google_cloud_gax::paginator::internal::PageableResponse for ListAuthorizedViewsResponse {
8055    type PageItem = crate::model::AuthorizedView;
8056
8057    fn items(self) -> std::vec::Vec<Self::PageItem> {
8058        self.authorized_views
8059    }
8060
8061    fn next_page_token(&self) -> std::string::String {
8062        use std::clone::Clone;
8063        self.next_page_token.clone()
8064    }
8065}
8066
8067/// Request message for
8068/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]
8069///
8070/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]: crate::client::BigtableTableAdmin::get_authorized_view
8071#[derive(Clone, Default, PartialEq)]
8072#[non_exhaustive]
8073pub struct GetAuthorizedViewRequest {
8074    /// Required. The unique name of the requested AuthorizedView.
8075    /// Values are of the form
8076    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8077    pub name: std::string::String,
8078
8079    /// Optional. The resource_view to be applied to the returned AuthorizedView's
8080    /// fields. Default to BASIC.
8081    pub view: crate::model::authorized_view::ResponseView,
8082
8083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8084}
8085
8086impl GetAuthorizedViewRequest {
8087    /// Creates a new default instance.
8088    pub fn new() -> Self {
8089        std::default::Default::default()
8090    }
8091
8092    /// Sets the value of [name][crate::model::GetAuthorizedViewRequest::name].
8093    ///
8094    /// # Example
8095    /// ```ignore,no_run
8096    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
8097    /// # let project_id = "project_id";
8098    /// # let instance_id = "instance_id";
8099    /// # let table_id = "table_id";
8100    /// # let authorized_view_id = "authorized_view_id";
8101    /// let x = GetAuthorizedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"));
8102    /// ```
8103    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8104        self.name = v.into();
8105        self
8106    }
8107
8108    /// Sets the value of [view][crate::model::GetAuthorizedViewRequest::view].
8109    ///
8110    /// # Example
8111    /// ```ignore,no_run
8112    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
8113    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
8114    /// let x0 = GetAuthorizedViewRequest::new().set_view(ResponseView::NameOnly);
8115    /// let x1 = GetAuthorizedViewRequest::new().set_view(ResponseView::Basic);
8116    /// let x2 = GetAuthorizedViewRequest::new().set_view(ResponseView::Full);
8117    /// ```
8118    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
8119        mut self,
8120        v: T,
8121    ) -> Self {
8122        self.view = v.into();
8123        self
8124    }
8125}
8126
8127impl wkt::message::Message for GetAuthorizedViewRequest {
8128    fn typename() -> &'static str {
8129        "type.googleapis.com/google.bigtable.admin.v2.GetAuthorizedViewRequest"
8130    }
8131}
8132
8133/// The request for
8134/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
8135///
8136/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
8137#[derive(Clone, Default, PartialEq)]
8138#[non_exhaustive]
8139pub struct UpdateAuthorizedViewRequest {
8140    /// Required. The AuthorizedView to update. The `name` in `authorized_view` is
8141    /// used to identify the AuthorizedView. AuthorizedView name must in this
8142    /// format:
8143    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8144    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
8145
8146    /// Optional. The list of fields to update.
8147    /// A mask specifying which fields in the AuthorizedView resource should be
8148    /// updated. This mask is relative to the AuthorizedView resource, not to the
8149    /// request message. A field will be overwritten if it is in the mask. If
8150    /// empty, all fields set in the request will be overwritten. A special value
8151    /// `*` means to overwrite all fields (including fields not set in the
8152    /// request).
8153    pub update_mask: std::option::Option<wkt::FieldMask>,
8154
8155    /// Optional. If true, ignore the safety checks when updating the
8156    /// AuthorizedView.
8157    pub ignore_warnings: bool,
8158
8159    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8160}
8161
8162impl UpdateAuthorizedViewRequest {
8163    /// Creates a new default instance.
8164    pub fn new() -> Self {
8165        std::default::Default::default()
8166    }
8167
8168    /// Sets the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
8169    ///
8170    /// # Example
8171    /// ```ignore,no_run
8172    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8173    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8174    /// let x = UpdateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
8175    /// ```
8176    pub fn set_authorized_view<T>(mut self, v: T) -> Self
8177    where
8178        T: std::convert::Into<crate::model::AuthorizedView>,
8179    {
8180        self.authorized_view = std::option::Option::Some(v.into());
8181        self
8182    }
8183
8184    /// Sets or clears the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
8185    ///
8186    /// # Example
8187    /// ```ignore,no_run
8188    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8189    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8190    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
8191    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
8192    /// ```
8193    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
8194    where
8195        T: std::convert::Into<crate::model::AuthorizedView>,
8196    {
8197        self.authorized_view = v.map(|x| x.into());
8198        self
8199    }
8200
8201    /// Sets the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
8202    ///
8203    /// # Example
8204    /// ```ignore,no_run
8205    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8206    /// use wkt::FieldMask;
8207    /// let x = UpdateAuthorizedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8208    /// ```
8209    pub fn set_update_mask<T>(mut self, v: T) -> Self
8210    where
8211        T: std::convert::Into<wkt::FieldMask>,
8212    {
8213        self.update_mask = std::option::Option::Some(v.into());
8214        self
8215    }
8216
8217    /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
8218    ///
8219    /// # Example
8220    /// ```ignore,no_run
8221    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8222    /// use wkt::FieldMask;
8223    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8224    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8225    /// ```
8226    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8227    where
8228        T: std::convert::Into<wkt::FieldMask>,
8229    {
8230        self.update_mask = v.map(|x| x.into());
8231        self
8232    }
8233
8234    /// Sets the value of [ignore_warnings][crate::model::UpdateAuthorizedViewRequest::ignore_warnings].
8235    ///
8236    /// # Example
8237    /// ```ignore,no_run
8238    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8239    /// let x = UpdateAuthorizedViewRequest::new().set_ignore_warnings(true);
8240    /// ```
8241    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8242        self.ignore_warnings = v.into();
8243        self
8244    }
8245}
8246
8247impl wkt::message::Message for UpdateAuthorizedViewRequest {
8248    fn typename() -> &'static str {
8249        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewRequest"
8250    }
8251}
8252
8253/// Metadata for the google.longrunning.Operation returned by
8254/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
8255///
8256/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
8257#[derive(Clone, Default, PartialEq)]
8258#[non_exhaustive]
8259pub struct UpdateAuthorizedViewMetadata {
8260    /// The request that prompted the initiation of this UpdateAuthorizedView
8261    /// operation.
8262    pub original_request: std::option::Option<crate::model::UpdateAuthorizedViewRequest>,
8263
8264    /// The time at which the original request was received.
8265    pub request_time: std::option::Option<wkt::Timestamp>,
8266
8267    /// The time at which the operation failed or was completed successfully.
8268    pub finish_time: std::option::Option<wkt::Timestamp>,
8269
8270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8271}
8272
8273impl UpdateAuthorizedViewMetadata {
8274    /// Creates a new default instance.
8275    pub fn new() -> Self {
8276        std::default::Default::default()
8277    }
8278
8279    /// Sets the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8280    ///
8281    /// # Example
8282    /// ```ignore,no_run
8283    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8284    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8285    /// let x = UpdateAuthorizedViewMetadata::new().set_original_request(UpdateAuthorizedViewRequest::default()/* use setters */);
8286    /// ```
8287    pub fn set_original_request<T>(mut self, v: T) -> Self
8288    where
8289        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8290    {
8291        self.original_request = std::option::Option::Some(v.into());
8292        self
8293    }
8294
8295    /// Sets or clears the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8296    ///
8297    /// # Example
8298    /// ```ignore,no_run
8299    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8300    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8301    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(UpdateAuthorizedViewRequest::default()/* use setters */));
8302    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<UpdateAuthorizedViewRequest>);
8303    /// ```
8304    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
8305    where
8306        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8307    {
8308        self.original_request = v.map(|x| x.into());
8309        self
8310    }
8311
8312    /// Sets the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8313    ///
8314    /// # Example
8315    /// ```ignore,no_run
8316    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8317    /// use wkt::Timestamp;
8318    /// let x = UpdateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
8319    /// ```
8320    pub fn set_request_time<T>(mut self, v: T) -> Self
8321    where
8322        T: std::convert::Into<wkt::Timestamp>,
8323    {
8324        self.request_time = std::option::Option::Some(v.into());
8325        self
8326    }
8327
8328    /// Sets or clears the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8329    ///
8330    /// # Example
8331    /// ```ignore,no_run
8332    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8333    /// use wkt::Timestamp;
8334    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
8335    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
8336    /// ```
8337    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
8338    where
8339        T: std::convert::Into<wkt::Timestamp>,
8340    {
8341        self.request_time = v.map(|x| x.into());
8342        self
8343    }
8344
8345    /// Sets the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8346    ///
8347    /// # Example
8348    /// ```ignore,no_run
8349    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8350    /// use wkt::Timestamp;
8351    /// let x = UpdateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
8352    /// ```
8353    pub fn set_finish_time<T>(mut self, v: T) -> Self
8354    where
8355        T: std::convert::Into<wkt::Timestamp>,
8356    {
8357        self.finish_time = std::option::Option::Some(v.into());
8358        self
8359    }
8360
8361    /// Sets or clears the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8362    ///
8363    /// # Example
8364    /// ```ignore,no_run
8365    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8366    /// use wkt::Timestamp;
8367    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
8368    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
8369    /// ```
8370    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
8371    where
8372        T: std::convert::Into<wkt::Timestamp>,
8373    {
8374        self.finish_time = v.map(|x| x.into());
8375        self
8376    }
8377}
8378
8379impl wkt::message::Message for UpdateAuthorizedViewMetadata {
8380    fn typename() -> &'static str {
8381        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewMetadata"
8382    }
8383}
8384
8385/// Request message for
8386/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]
8387///
8388/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]: crate::client::BigtableTableAdmin::delete_authorized_view
8389#[derive(Clone, Default, PartialEq)]
8390#[non_exhaustive]
8391pub struct DeleteAuthorizedViewRequest {
8392    /// Required. The unique name of the AuthorizedView to be deleted.
8393    /// Values are of the form
8394    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8395    pub name: std::string::String,
8396
8397    /// Optional. The current etag of the AuthorizedView.
8398    /// If an etag is provided and does not match the current etag of the
8399    /// AuthorizedView, deletion will be blocked and an ABORTED error will be
8400    /// returned.
8401    pub etag: std::string::String,
8402
8403    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8404}
8405
8406impl DeleteAuthorizedViewRequest {
8407    /// Creates a new default instance.
8408    pub fn new() -> Self {
8409        std::default::Default::default()
8410    }
8411
8412    /// Sets the value of [name][crate::model::DeleteAuthorizedViewRequest::name].
8413    ///
8414    /// # Example
8415    /// ```ignore,no_run
8416    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8417    /// # let project_id = "project_id";
8418    /// # let instance_id = "instance_id";
8419    /// # let table_id = "table_id";
8420    /// # let authorized_view_id = "authorized_view_id";
8421    /// let x = DeleteAuthorizedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"));
8422    /// ```
8423    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8424        self.name = v.into();
8425        self
8426    }
8427
8428    /// Sets the value of [etag][crate::model::DeleteAuthorizedViewRequest::etag].
8429    ///
8430    /// # Example
8431    /// ```ignore,no_run
8432    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8433    /// let x = DeleteAuthorizedViewRequest::new().set_etag("example");
8434    /// ```
8435    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8436        self.etag = v.into();
8437        self
8438    }
8439}
8440
8441impl wkt::message::Message for DeleteAuthorizedViewRequest {
8442    fn typename() -> &'static str {
8443        "type.googleapis.com/google.bigtable.admin.v2.DeleteAuthorizedViewRequest"
8444    }
8445}
8446
8447/// The request for
8448/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8449///
8450/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8451#[derive(Clone, Default, PartialEq)]
8452#[non_exhaustive]
8453pub struct CreateSchemaBundleRequest {
8454    /// Required. The parent resource where this schema bundle will be created.
8455    /// Values are of the form
8456    /// `projects/{project}/instances/{instance}/tables/{table}`.
8457    pub parent: std::string::String,
8458
8459    /// Required. The unique ID to use for the schema bundle, which will become the
8460    /// final component of the schema bundle's resource name.
8461    pub schema_bundle_id: std::string::String,
8462
8463    /// Required. The schema bundle to create.
8464    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8465
8466    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8467}
8468
8469impl CreateSchemaBundleRequest {
8470    /// Creates a new default instance.
8471    pub fn new() -> Self {
8472        std::default::Default::default()
8473    }
8474
8475    /// Sets the value of [parent][crate::model::CreateSchemaBundleRequest::parent].
8476    ///
8477    /// # Example
8478    /// ```ignore,no_run
8479    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8480    /// # let project_id = "project_id";
8481    /// # let instance_id = "instance_id";
8482    /// # let table_id = "table_id";
8483    /// let x = CreateSchemaBundleRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
8484    /// ```
8485    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8486        self.parent = v.into();
8487        self
8488    }
8489
8490    /// Sets the value of [schema_bundle_id][crate::model::CreateSchemaBundleRequest::schema_bundle_id].
8491    ///
8492    /// # Example
8493    /// ```ignore,no_run
8494    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8495    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle_id("example");
8496    /// ```
8497    pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
8498        mut self,
8499        v: T,
8500    ) -> Self {
8501        self.schema_bundle_id = v.into();
8502        self
8503    }
8504
8505    /// Sets the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8506    ///
8507    /// # Example
8508    /// ```ignore,no_run
8509    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8510    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8511    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8512    /// ```
8513    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8514    where
8515        T: std::convert::Into<crate::model::SchemaBundle>,
8516    {
8517        self.schema_bundle = std::option::Option::Some(v.into());
8518        self
8519    }
8520
8521    /// Sets or clears the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8522    ///
8523    /// # Example
8524    /// ```ignore,no_run
8525    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8526    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8527    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8528    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8529    /// ```
8530    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8531    where
8532        T: std::convert::Into<crate::model::SchemaBundle>,
8533    {
8534        self.schema_bundle = v.map(|x| x.into());
8535        self
8536    }
8537}
8538
8539impl wkt::message::Message for CreateSchemaBundleRequest {
8540    fn typename() -> &'static str {
8541        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleRequest"
8542    }
8543}
8544
8545/// The metadata for the Operation returned by
8546/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8547///
8548/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8549#[derive(Clone, Default, PartialEq)]
8550#[non_exhaustive]
8551pub struct CreateSchemaBundleMetadata {
8552    /// The unique name identifying this schema bundle.
8553    /// Values are of the form
8554    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8555    pub name: std::string::String,
8556
8557    /// The time at which this operation started.
8558    pub start_time: std::option::Option<wkt::Timestamp>,
8559
8560    /// If set, the time at which this operation finished or was canceled.
8561    pub end_time: std::option::Option<wkt::Timestamp>,
8562
8563    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8564}
8565
8566impl CreateSchemaBundleMetadata {
8567    /// Creates a new default instance.
8568    pub fn new() -> Self {
8569        std::default::Default::default()
8570    }
8571
8572    /// Sets the value of [name][crate::model::CreateSchemaBundleMetadata::name].
8573    ///
8574    /// # Example
8575    /// ```ignore,no_run
8576    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8577    /// let x = CreateSchemaBundleMetadata::new().set_name("example");
8578    /// ```
8579    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8580        self.name = v.into();
8581        self
8582    }
8583
8584    /// Sets the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
8585    ///
8586    /// # Example
8587    /// ```ignore,no_run
8588    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8589    /// use wkt::Timestamp;
8590    /// let x = CreateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
8591    /// ```
8592    pub fn set_start_time<T>(mut self, v: T) -> Self
8593    where
8594        T: std::convert::Into<wkt::Timestamp>,
8595    {
8596        self.start_time = std::option::Option::Some(v.into());
8597        self
8598    }
8599
8600    /// Sets or clears the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
8601    ///
8602    /// # Example
8603    /// ```ignore,no_run
8604    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8605    /// use wkt::Timestamp;
8606    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8607    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
8608    /// ```
8609    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8610    where
8611        T: std::convert::Into<wkt::Timestamp>,
8612    {
8613        self.start_time = v.map(|x| x.into());
8614        self
8615    }
8616
8617    /// Sets the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
8618    ///
8619    /// # Example
8620    /// ```ignore,no_run
8621    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8622    /// use wkt::Timestamp;
8623    /// let x = CreateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8624    /// ```
8625    pub fn set_end_time<T>(mut self, v: T) -> Self
8626    where
8627        T: std::convert::Into<wkt::Timestamp>,
8628    {
8629        self.end_time = std::option::Option::Some(v.into());
8630        self
8631    }
8632
8633    /// Sets or clears the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
8634    ///
8635    /// # Example
8636    /// ```ignore,no_run
8637    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8638    /// use wkt::Timestamp;
8639    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8640    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8641    /// ```
8642    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8643    where
8644        T: std::convert::Into<wkt::Timestamp>,
8645    {
8646        self.end_time = v.map(|x| x.into());
8647        self
8648    }
8649}
8650
8651impl wkt::message::Message for CreateSchemaBundleMetadata {
8652    fn typename() -> &'static str {
8653        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleMetadata"
8654    }
8655}
8656
8657/// The request for
8658/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
8659///
8660/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
8661#[derive(Clone, Default, PartialEq)]
8662#[non_exhaustive]
8663pub struct UpdateSchemaBundleRequest {
8664    /// Required. The schema bundle to update.
8665    ///
8666    /// The schema bundle's `name` field is used to identify the schema bundle to
8667    /// update. Values are of the form
8668    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8669    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8670
8671    /// Optional. The list of fields to update.
8672    pub update_mask: std::option::Option<wkt::FieldMask>,
8673
8674    /// Optional. If set, ignore the safety checks when updating the Schema Bundle.
8675    /// The safety checks are:
8676    ///
8677    /// - The new Schema Bundle is backwards compatible with the existing Schema
8678    ///   Bundle.
8679    pub ignore_warnings: bool,
8680
8681    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8682}
8683
8684impl UpdateSchemaBundleRequest {
8685    /// Creates a new default instance.
8686    pub fn new() -> Self {
8687        std::default::Default::default()
8688    }
8689
8690    /// Sets the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
8691    ///
8692    /// # Example
8693    /// ```ignore,no_run
8694    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8695    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8696    /// let x = UpdateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8697    /// ```
8698    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8699    where
8700        T: std::convert::Into<crate::model::SchemaBundle>,
8701    {
8702        self.schema_bundle = std::option::Option::Some(v.into());
8703        self
8704    }
8705
8706    /// Sets or clears the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
8707    ///
8708    /// # Example
8709    /// ```ignore,no_run
8710    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8711    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8712    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8713    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8714    /// ```
8715    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8716    where
8717        T: std::convert::Into<crate::model::SchemaBundle>,
8718    {
8719        self.schema_bundle = v.map(|x| x.into());
8720        self
8721    }
8722
8723    /// Sets the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
8724    ///
8725    /// # Example
8726    /// ```ignore,no_run
8727    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8728    /// use wkt::FieldMask;
8729    /// let x = UpdateSchemaBundleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8730    /// ```
8731    pub fn set_update_mask<T>(mut self, v: T) -> Self
8732    where
8733        T: std::convert::Into<wkt::FieldMask>,
8734    {
8735        self.update_mask = std::option::Option::Some(v.into());
8736        self
8737    }
8738
8739    /// Sets or clears the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
8740    ///
8741    /// # Example
8742    /// ```ignore,no_run
8743    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8744    /// use wkt::FieldMask;
8745    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8746    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8747    /// ```
8748    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8749    where
8750        T: std::convert::Into<wkt::FieldMask>,
8751    {
8752        self.update_mask = v.map(|x| x.into());
8753        self
8754    }
8755
8756    /// Sets the value of [ignore_warnings][crate::model::UpdateSchemaBundleRequest::ignore_warnings].
8757    ///
8758    /// # Example
8759    /// ```ignore,no_run
8760    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8761    /// let x = UpdateSchemaBundleRequest::new().set_ignore_warnings(true);
8762    /// ```
8763    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8764        self.ignore_warnings = v.into();
8765        self
8766    }
8767}
8768
8769impl wkt::message::Message for UpdateSchemaBundleRequest {
8770    fn typename() -> &'static str {
8771        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleRequest"
8772    }
8773}
8774
8775/// The metadata for the Operation returned by
8776/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
8777///
8778/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
8779#[derive(Clone, Default, PartialEq)]
8780#[non_exhaustive]
8781pub struct UpdateSchemaBundleMetadata {
8782    /// The unique name identifying this schema bundle.
8783    /// Values are of the form
8784    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8785    pub name: std::string::String,
8786
8787    /// The time at which this operation started.
8788    pub start_time: std::option::Option<wkt::Timestamp>,
8789
8790    /// If set, the time at which this operation finished or was canceled.
8791    pub end_time: std::option::Option<wkt::Timestamp>,
8792
8793    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8794}
8795
8796impl UpdateSchemaBundleMetadata {
8797    /// Creates a new default instance.
8798    pub fn new() -> Self {
8799        std::default::Default::default()
8800    }
8801
8802    /// Sets the value of [name][crate::model::UpdateSchemaBundleMetadata::name].
8803    ///
8804    /// # Example
8805    /// ```ignore,no_run
8806    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8807    /// let x = UpdateSchemaBundleMetadata::new().set_name("example");
8808    /// ```
8809    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8810        self.name = v.into();
8811        self
8812    }
8813
8814    /// Sets the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
8815    ///
8816    /// # Example
8817    /// ```ignore,no_run
8818    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8819    /// use wkt::Timestamp;
8820    /// let x = UpdateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
8821    /// ```
8822    pub fn set_start_time<T>(mut self, v: T) -> Self
8823    where
8824        T: std::convert::Into<wkt::Timestamp>,
8825    {
8826        self.start_time = std::option::Option::Some(v.into());
8827        self
8828    }
8829
8830    /// Sets or clears the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
8831    ///
8832    /// # Example
8833    /// ```ignore,no_run
8834    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8835    /// use wkt::Timestamp;
8836    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8837    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
8838    /// ```
8839    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8840    where
8841        T: std::convert::Into<wkt::Timestamp>,
8842    {
8843        self.start_time = v.map(|x| x.into());
8844        self
8845    }
8846
8847    /// Sets the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
8848    ///
8849    /// # Example
8850    /// ```ignore,no_run
8851    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8852    /// use wkt::Timestamp;
8853    /// let x = UpdateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8854    /// ```
8855    pub fn set_end_time<T>(mut self, v: T) -> Self
8856    where
8857        T: std::convert::Into<wkt::Timestamp>,
8858    {
8859        self.end_time = std::option::Option::Some(v.into());
8860        self
8861    }
8862
8863    /// Sets or clears the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
8864    ///
8865    /// # Example
8866    /// ```ignore,no_run
8867    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8868    /// use wkt::Timestamp;
8869    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8870    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8871    /// ```
8872    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8873    where
8874        T: std::convert::Into<wkt::Timestamp>,
8875    {
8876        self.end_time = v.map(|x| x.into());
8877        self
8878    }
8879}
8880
8881impl wkt::message::Message for UpdateSchemaBundleMetadata {
8882    fn typename() -> &'static str {
8883        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleMetadata"
8884    }
8885}
8886
8887/// The request for
8888/// [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle].
8889///
8890/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle]: crate::client::BigtableTableAdmin::get_schema_bundle
8891#[derive(Clone, Default, PartialEq)]
8892#[non_exhaustive]
8893pub struct GetSchemaBundleRequest {
8894    /// Required. The unique name of the schema bundle to retrieve.
8895    /// Values are of the form
8896    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8897    pub name: std::string::String,
8898
8899    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8900}
8901
8902impl GetSchemaBundleRequest {
8903    /// Creates a new default instance.
8904    pub fn new() -> Self {
8905        std::default::Default::default()
8906    }
8907
8908    /// Sets the value of [name][crate::model::GetSchemaBundleRequest::name].
8909    ///
8910    /// # Example
8911    /// ```ignore,no_run
8912    /// # use google_cloud_bigtable_admin_v2::model::GetSchemaBundleRequest;
8913    /// # let project_id = "project_id";
8914    /// # let instance_id = "instance_id";
8915    /// # let table_id = "table_id";
8916    /// # let schema_bundle_id = "schema_bundle_id";
8917    /// let x = GetSchemaBundleRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"));
8918    /// ```
8919    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8920        self.name = v.into();
8921        self
8922    }
8923}
8924
8925impl wkt::message::Message for GetSchemaBundleRequest {
8926    fn typename() -> &'static str {
8927        "type.googleapis.com/google.bigtable.admin.v2.GetSchemaBundleRequest"
8928    }
8929}
8930
8931/// The request for
8932/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
8933///
8934/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
8935#[derive(Clone, Default, PartialEq)]
8936#[non_exhaustive]
8937pub struct ListSchemaBundlesRequest {
8938    /// Required. The parent, which owns this collection of schema bundles.
8939    /// Values are of the form
8940    /// `projects/{project}/instances/{instance}/tables/{table}`.
8941    pub parent: std::string::String,
8942
8943    /// The maximum number of schema bundles to return. If the value is positive,
8944    /// the server may return at most this value. If unspecified, the server will
8945    /// return the maximum allowed page size.
8946    pub page_size: i32,
8947
8948    /// A page token, received from a previous `ListSchemaBundles` call.
8949    /// Provide this to retrieve the subsequent page.
8950    ///
8951    /// When paginating, all other parameters provided to `ListSchemaBundles` must
8952    /// match the call that provided the page token.
8953    pub page_token: std::string::String,
8954
8955    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8956}
8957
8958impl ListSchemaBundlesRequest {
8959    /// Creates a new default instance.
8960    pub fn new() -> Self {
8961        std::default::Default::default()
8962    }
8963
8964    /// Sets the value of [parent][crate::model::ListSchemaBundlesRequest::parent].
8965    ///
8966    /// # Example
8967    /// ```ignore,no_run
8968    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8969    /// # let project_id = "project_id";
8970    /// # let instance_id = "instance_id";
8971    /// # let table_id = "table_id";
8972    /// let x = ListSchemaBundlesRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
8973    /// ```
8974    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8975        self.parent = v.into();
8976        self
8977    }
8978
8979    /// Sets the value of [page_size][crate::model::ListSchemaBundlesRequest::page_size].
8980    ///
8981    /// # Example
8982    /// ```ignore,no_run
8983    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8984    /// let x = ListSchemaBundlesRequest::new().set_page_size(42);
8985    /// ```
8986    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8987        self.page_size = v.into();
8988        self
8989    }
8990
8991    /// Sets the value of [page_token][crate::model::ListSchemaBundlesRequest::page_token].
8992    ///
8993    /// # Example
8994    /// ```ignore,no_run
8995    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8996    /// let x = ListSchemaBundlesRequest::new().set_page_token("example");
8997    /// ```
8998    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8999        self.page_token = v.into();
9000        self
9001    }
9002}
9003
9004impl wkt::message::Message for ListSchemaBundlesRequest {
9005    fn typename() -> &'static str {
9006        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesRequest"
9007    }
9008}
9009
9010/// The response for
9011/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
9012///
9013/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
9014#[derive(Clone, Default, PartialEq)]
9015#[non_exhaustive]
9016pub struct ListSchemaBundlesResponse {
9017    /// The schema bundles from the specified table.
9018    pub schema_bundles: std::vec::Vec<crate::model::SchemaBundle>,
9019
9020    /// A token, which can be sent as `page_token` to retrieve the next page.
9021    /// If this field is omitted, there are no subsequent pages.
9022    pub next_page_token: std::string::String,
9023
9024    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9025}
9026
9027impl ListSchemaBundlesResponse {
9028    /// Creates a new default instance.
9029    pub fn new() -> Self {
9030        std::default::Default::default()
9031    }
9032
9033    /// Sets the value of [schema_bundles][crate::model::ListSchemaBundlesResponse::schema_bundles].
9034    ///
9035    /// # Example
9036    /// ```ignore,no_run
9037    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
9038    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
9039    /// let x = ListSchemaBundlesResponse::new()
9040    ///     .set_schema_bundles([
9041    ///         SchemaBundle::default()/* use setters */,
9042    ///         SchemaBundle::default()/* use (different) setters */,
9043    ///     ]);
9044    /// ```
9045    pub fn set_schema_bundles<T, V>(mut self, v: T) -> Self
9046    where
9047        T: std::iter::IntoIterator<Item = V>,
9048        V: std::convert::Into<crate::model::SchemaBundle>,
9049    {
9050        use std::iter::Iterator;
9051        self.schema_bundles = v.into_iter().map(|i| i.into()).collect();
9052        self
9053    }
9054
9055    /// Sets the value of [next_page_token][crate::model::ListSchemaBundlesResponse::next_page_token].
9056    ///
9057    /// # Example
9058    /// ```ignore,no_run
9059    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
9060    /// let x = ListSchemaBundlesResponse::new().set_next_page_token("example");
9061    /// ```
9062    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9063        self.next_page_token = v.into();
9064        self
9065    }
9066}
9067
9068impl wkt::message::Message for ListSchemaBundlesResponse {
9069    fn typename() -> &'static str {
9070        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesResponse"
9071    }
9072}
9073
9074#[doc(hidden)]
9075impl google_cloud_gax::paginator::internal::PageableResponse for ListSchemaBundlesResponse {
9076    type PageItem = crate::model::SchemaBundle;
9077
9078    fn items(self) -> std::vec::Vec<Self::PageItem> {
9079        self.schema_bundles
9080    }
9081
9082    fn next_page_token(&self) -> std::string::String {
9083        use std::clone::Clone;
9084        self.next_page_token.clone()
9085    }
9086}
9087
9088/// The request for
9089/// [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle].
9090///
9091/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle]: crate::client::BigtableTableAdmin::delete_schema_bundle
9092#[derive(Clone, Default, PartialEq)]
9093#[non_exhaustive]
9094pub struct DeleteSchemaBundleRequest {
9095    /// Required. The unique name of the schema bundle to delete.
9096    /// Values are of the form
9097    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
9098    pub name: std::string::String,
9099
9100    /// Optional. The etag of the schema bundle.
9101    /// If this is provided, it must match the server's etag. The server
9102    /// returns an ABORTED error on a mismatched etag.
9103    pub etag: std::string::String,
9104
9105    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9106}
9107
9108impl DeleteSchemaBundleRequest {
9109    /// Creates a new default instance.
9110    pub fn new() -> Self {
9111        std::default::Default::default()
9112    }
9113
9114    /// Sets the value of [name][crate::model::DeleteSchemaBundleRequest::name].
9115    ///
9116    /// # Example
9117    /// ```ignore,no_run
9118    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
9119    /// # let project_id = "project_id";
9120    /// # let instance_id = "instance_id";
9121    /// # let table_id = "table_id";
9122    /// # let schema_bundle_id = "schema_bundle_id";
9123    /// let x = DeleteSchemaBundleRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"));
9124    /// ```
9125    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9126        self.name = v.into();
9127        self
9128    }
9129
9130    /// Sets the value of [etag][crate::model::DeleteSchemaBundleRequest::etag].
9131    ///
9132    /// # Example
9133    /// ```ignore,no_run
9134    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
9135    /// let x = DeleteSchemaBundleRequest::new().set_etag("example");
9136    /// ```
9137    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9138        self.etag = v.into();
9139        self
9140    }
9141}
9142
9143impl wkt::message::Message for DeleteSchemaBundleRequest {
9144    fn typename() -> &'static str {
9145        "type.googleapis.com/google.bigtable.admin.v2.DeleteSchemaBundleRequest"
9146    }
9147}
9148
9149/// Encapsulates progress related information for a Cloud Bigtable long
9150/// running operation.
9151#[derive(Clone, Default, PartialEq)]
9152#[non_exhaustive]
9153pub struct OperationProgress {
9154    /// Percent completion of the operation.
9155    /// Values are between 0 and 100 inclusive.
9156    pub progress_percent: i32,
9157
9158    /// Time the request was received.
9159    pub start_time: std::option::Option<wkt::Timestamp>,
9160
9161    /// If set, the time at which this operation failed or was completed
9162    /// successfully.
9163    pub end_time: std::option::Option<wkt::Timestamp>,
9164
9165    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9166}
9167
9168impl OperationProgress {
9169    /// Creates a new default instance.
9170    pub fn new() -> Self {
9171        std::default::Default::default()
9172    }
9173
9174    /// Sets the value of [progress_percent][crate::model::OperationProgress::progress_percent].
9175    ///
9176    /// # Example
9177    /// ```ignore,no_run
9178    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9179    /// let x = OperationProgress::new().set_progress_percent(42);
9180    /// ```
9181    pub fn set_progress_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9182        self.progress_percent = v.into();
9183        self
9184    }
9185
9186    /// Sets the value of [start_time][crate::model::OperationProgress::start_time].
9187    ///
9188    /// # Example
9189    /// ```ignore,no_run
9190    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9191    /// use wkt::Timestamp;
9192    /// let x = OperationProgress::new().set_start_time(Timestamp::default()/* use setters */);
9193    /// ```
9194    pub fn set_start_time<T>(mut self, v: T) -> Self
9195    where
9196        T: std::convert::Into<wkt::Timestamp>,
9197    {
9198        self.start_time = std::option::Option::Some(v.into());
9199        self
9200    }
9201
9202    /// Sets or clears the value of [start_time][crate::model::OperationProgress::start_time].
9203    ///
9204    /// # Example
9205    /// ```ignore,no_run
9206    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9207    /// use wkt::Timestamp;
9208    /// let x = OperationProgress::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
9209    /// let x = OperationProgress::new().set_or_clear_start_time(None::<Timestamp>);
9210    /// ```
9211    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
9212    where
9213        T: std::convert::Into<wkt::Timestamp>,
9214    {
9215        self.start_time = v.map(|x| x.into());
9216        self
9217    }
9218
9219    /// Sets the value of [end_time][crate::model::OperationProgress::end_time].
9220    ///
9221    /// # Example
9222    /// ```ignore,no_run
9223    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9224    /// use wkt::Timestamp;
9225    /// let x = OperationProgress::new().set_end_time(Timestamp::default()/* use setters */);
9226    /// ```
9227    pub fn set_end_time<T>(mut self, v: T) -> Self
9228    where
9229        T: std::convert::Into<wkt::Timestamp>,
9230    {
9231        self.end_time = std::option::Option::Some(v.into());
9232        self
9233    }
9234
9235    /// Sets or clears the value of [end_time][crate::model::OperationProgress::end_time].
9236    ///
9237    /// # Example
9238    /// ```ignore,no_run
9239    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9240    /// use wkt::Timestamp;
9241    /// let x = OperationProgress::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9242    /// let x = OperationProgress::new().set_or_clear_end_time(None::<Timestamp>);
9243    /// ```
9244    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9245    where
9246        T: std::convert::Into<wkt::Timestamp>,
9247    {
9248        self.end_time = v.map(|x| x.into());
9249        self
9250    }
9251}
9252
9253impl wkt::message::Message for OperationProgress {
9254    fn typename() -> &'static str {
9255        "type.googleapis.com/google.bigtable.admin.v2.OperationProgress"
9256    }
9257}
9258
9259/// A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and
9260/// the resources that serve them.
9261/// All tables in an instance are served from all
9262/// [Clusters][google.bigtable.admin.v2.Cluster] in the instance.
9263///
9264/// [google.bigtable.admin.v2.Cluster]: crate::model::Cluster
9265/// [google.bigtable.admin.v2.Table]: crate::model::Table
9266#[derive(Clone, Default, PartialEq)]
9267#[non_exhaustive]
9268pub struct Instance {
9269    /// The unique name of the instance. Values are of the form
9270    /// `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
9271    pub name: std::string::String,
9272
9273    /// Required. The descriptive name for this instance as it appears in UIs.
9274    /// Can be changed at any time, but should be kept globally unique
9275    /// to avoid confusion.
9276    pub display_name: std::string::String,
9277
9278    /// Output only. The current state of the instance.
9279    pub state: crate::model::instance::State,
9280
9281    /// The type of the instance. Defaults to `PRODUCTION`.
9282    pub r#type: crate::model::instance::Type,
9283
9284    /// Optional. The edition of the instance. See
9285    /// [Edition][google.bigtable.admin.v2.Instance.Edition] for details.
9286    ///
9287    /// [google.bigtable.admin.v2.Instance.Edition]: crate::model::instance::Edition
9288    pub edition: crate::model::instance::Edition,
9289
9290    /// Labels are a flexible and lightweight mechanism for organizing cloud
9291    /// resources into groups that reflect a customer's organizational needs and
9292    /// deployment strategies. They can be used to filter resources and aggregate
9293    /// metrics.
9294    ///
9295    /// * Label keys must be between 1 and 63 characters long and must conform to
9296    ///   the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
9297    /// * Label values must be between 0 and 63 characters long and must conform to
9298    ///   the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
9299    /// * No more than 64 labels can be associated with a given resource.
9300    /// * Keys and values must both be under 128 bytes.
9301    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9302
9303    /// Output only. A commit timestamp representing when this Instance was
9304    /// created. For instances created before this field was added (August 2021),
9305    /// this value is `seconds: 0, nanos: 1`.
9306    pub create_time: std::option::Option<wkt::Timestamp>,
9307
9308    /// Output only. Reserved for future use.
9309    pub satisfies_pzs: std::option::Option<bool>,
9310
9311    /// Output only. Reserved for future use.
9312    pub satisfies_pzi: std::option::Option<bool>,
9313
9314    /// Optional. Input only. Immutable. Tag keys/values directly bound to this
9315    /// resource. For example:
9316    ///
9317    /// - "123/environment": "production",
9318    /// - "123/costCenter": "marketing"
9319    ///
9320    /// Tags and Labels (above) are both used to bind metadata to resources, with
9321    /// different use-cases. See
9322    /// <https://cloud.google.com/resource-manager/docs/tags/tags-overview> for an
9323    /// in-depth overview on the difference between tags and labels.
9324    pub tags: std::collections::HashMap<std::string::String, std::string::String>,
9325
9326    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9327}
9328
9329impl Instance {
9330    /// Creates a new default instance.
9331    pub fn new() -> Self {
9332        std::default::Default::default()
9333    }
9334
9335    /// Sets the value of [name][crate::model::Instance::name].
9336    ///
9337    /// # Example
9338    /// ```ignore,no_run
9339    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9340    /// # let project_id = "project_id";
9341    /// # let instance_id = "instance_id";
9342    /// let x = Instance::new().set_name(format!("projects/{project_id}/instances/{instance_id}"));
9343    /// ```
9344    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9345        self.name = v.into();
9346        self
9347    }
9348
9349    /// Sets the value of [display_name][crate::model::Instance::display_name].
9350    ///
9351    /// # Example
9352    /// ```ignore,no_run
9353    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9354    /// let x = Instance::new().set_display_name("example");
9355    /// ```
9356    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9357        self.display_name = v.into();
9358        self
9359    }
9360
9361    /// Sets the value of [state][crate::model::Instance::state].
9362    ///
9363    /// # Example
9364    /// ```ignore,no_run
9365    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9366    /// use google_cloud_bigtable_admin_v2::model::instance::State;
9367    /// let x0 = Instance::new().set_state(State::Ready);
9368    /// let x1 = Instance::new().set_state(State::Creating);
9369    /// ```
9370    pub fn set_state<T: std::convert::Into<crate::model::instance::State>>(mut self, v: T) -> Self {
9371        self.state = v.into();
9372        self
9373    }
9374
9375    /// Sets the value of [r#type][crate::model::Instance::type].
9376    ///
9377    /// # Example
9378    /// ```ignore,no_run
9379    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9380    /// use google_cloud_bigtable_admin_v2::model::instance::Type;
9381    /// let x0 = Instance::new().set_type(Type::Production);
9382    /// let x1 = Instance::new().set_type(Type::Development);
9383    /// ```
9384    pub fn set_type<T: std::convert::Into<crate::model::instance::Type>>(mut self, v: T) -> Self {
9385        self.r#type = v.into();
9386        self
9387    }
9388
9389    /// Sets the value of [edition][crate::model::Instance::edition].
9390    ///
9391    /// # Example
9392    /// ```ignore,no_run
9393    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9394    /// use google_cloud_bigtable_admin_v2::model::instance::Edition;
9395    /// let x0 = Instance::new().set_edition(Edition::Enterprise);
9396    /// let x1 = Instance::new().set_edition(Edition::EnterprisePlus);
9397    /// ```
9398    pub fn set_edition<T: std::convert::Into<crate::model::instance::Edition>>(
9399        mut self,
9400        v: T,
9401    ) -> Self {
9402        self.edition = v.into();
9403        self
9404    }
9405
9406    /// Sets the value of [labels][crate::model::Instance::labels].
9407    ///
9408    /// # Example
9409    /// ```ignore,no_run
9410    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9411    /// let x = Instance::new().set_labels([
9412    ///     ("key0", "abc"),
9413    ///     ("key1", "xyz"),
9414    /// ]);
9415    /// ```
9416    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9417    where
9418        T: std::iter::IntoIterator<Item = (K, V)>,
9419        K: std::convert::Into<std::string::String>,
9420        V: std::convert::Into<std::string::String>,
9421    {
9422        use std::iter::Iterator;
9423        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9424        self
9425    }
9426
9427    /// Sets the value of [create_time][crate::model::Instance::create_time].
9428    ///
9429    /// # Example
9430    /// ```ignore,no_run
9431    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9432    /// use wkt::Timestamp;
9433    /// let x = Instance::new().set_create_time(Timestamp::default()/* use setters */);
9434    /// ```
9435    pub fn set_create_time<T>(mut self, v: T) -> Self
9436    where
9437        T: std::convert::Into<wkt::Timestamp>,
9438    {
9439        self.create_time = std::option::Option::Some(v.into());
9440        self
9441    }
9442
9443    /// Sets or clears the value of [create_time][crate::model::Instance::create_time].
9444    ///
9445    /// # Example
9446    /// ```ignore,no_run
9447    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9448    /// use wkt::Timestamp;
9449    /// let x = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9450    /// let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);
9451    /// ```
9452    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9453    where
9454        T: std::convert::Into<wkt::Timestamp>,
9455    {
9456        self.create_time = v.map(|x| x.into());
9457        self
9458    }
9459
9460    /// Sets the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9461    ///
9462    /// # Example
9463    /// ```ignore,no_run
9464    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9465    /// let x = Instance::new().set_satisfies_pzs(true);
9466    /// ```
9467    pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
9468    where
9469        T: std::convert::Into<bool>,
9470    {
9471        self.satisfies_pzs = std::option::Option::Some(v.into());
9472        self
9473    }
9474
9475    /// Sets or clears the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9476    ///
9477    /// # Example
9478    /// ```ignore,no_run
9479    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9480    /// let x = Instance::new().set_or_clear_satisfies_pzs(Some(false));
9481    /// let x = Instance::new().set_or_clear_satisfies_pzs(None::<bool>);
9482    /// ```
9483    pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
9484    where
9485        T: std::convert::Into<bool>,
9486    {
9487        self.satisfies_pzs = v.map(|x| x.into());
9488        self
9489    }
9490
9491    /// Sets the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9492    ///
9493    /// # Example
9494    /// ```ignore,no_run
9495    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9496    /// let x = Instance::new().set_satisfies_pzi(true);
9497    /// ```
9498    pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
9499    where
9500        T: std::convert::Into<bool>,
9501    {
9502        self.satisfies_pzi = std::option::Option::Some(v.into());
9503        self
9504    }
9505
9506    /// Sets or clears the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9507    ///
9508    /// # Example
9509    /// ```ignore,no_run
9510    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9511    /// let x = Instance::new().set_or_clear_satisfies_pzi(Some(false));
9512    /// let x = Instance::new().set_or_clear_satisfies_pzi(None::<bool>);
9513    /// ```
9514    pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
9515    where
9516        T: std::convert::Into<bool>,
9517    {
9518        self.satisfies_pzi = v.map(|x| x.into());
9519        self
9520    }
9521
9522    /// Sets the value of [tags][crate::model::Instance::tags].
9523    ///
9524    /// # Example
9525    /// ```ignore,no_run
9526    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9527    /// let x = Instance::new().set_tags([
9528    ///     ("key0", "abc"),
9529    ///     ("key1", "xyz"),
9530    /// ]);
9531    /// ```
9532    pub fn set_tags<T, K, V>(mut self, v: T) -> Self
9533    where
9534        T: std::iter::IntoIterator<Item = (K, V)>,
9535        K: std::convert::Into<std::string::String>,
9536        V: std::convert::Into<std::string::String>,
9537    {
9538        use std::iter::Iterator;
9539        self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9540        self
9541    }
9542}
9543
9544impl wkt::message::Message for Instance {
9545    fn typename() -> &'static str {
9546        "type.googleapis.com/google.bigtable.admin.v2.Instance"
9547    }
9548}
9549
9550/// Defines additional types related to [Instance].
9551pub mod instance {
9552    #[allow(unused_imports)]
9553    use super::*;
9554
9555    /// Possible states of an instance.
9556    ///
9557    /// # Working with unknown values
9558    ///
9559    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9560    /// additional enum variants at any time. Adding new variants is not considered
9561    /// a breaking change. Applications should write their code in anticipation of:
9562    ///
9563    /// - New values appearing in future releases of the client library, **and**
9564    /// - New values received dynamically, without application changes.
9565    ///
9566    /// Please consult the [Working with enums] section in the user guide for some
9567    /// guidelines.
9568    ///
9569    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9570    #[derive(Clone, Debug, PartialEq)]
9571    #[non_exhaustive]
9572    pub enum State {
9573        /// The state of the instance could not be determined.
9574        NotKnown,
9575        /// The instance has been successfully created and can serve requests
9576        /// to its tables.
9577        Ready,
9578        /// The instance is currently being created, and may be destroyed
9579        /// if the creation process encounters an error.
9580        Creating,
9581        /// If set, the enum was initialized with an unknown value.
9582        ///
9583        /// Applications can examine the value using [State::value] or
9584        /// [State::name].
9585        UnknownValue(state::UnknownValue),
9586    }
9587
9588    #[doc(hidden)]
9589    pub mod state {
9590        #[allow(unused_imports)]
9591        use super::*;
9592        #[derive(Clone, Debug, PartialEq)]
9593        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9594    }
9595
9596    impl State {
9597        /// Gets the enum value.
9598        ///
9599        /// Returns `None` if the enum contains an unknown value deserialized from
9600        /// the string representation of enums.
9601        pub fn value(&self) -> std::option::Option<i32> {
9602            match self {
9603                Self::NotKnown => std::option::Option::Some(0),
9604                Self::Ready => std::option::Option::Some(1),
9605                Self::Creating => std::option::Option::Some(2),
9606                Self::UnknownValue(u) => u.0.value(),
9607            }
9608        }
9609
9610        /// Gets the enum value as a string.
9611        ///
9612        /// Returns `None` if the enum contains an unknown value deserialized from
9613        /// the integer representation of enums.
9614        pub fn name(&self) -> std::option::Option<&str> {
9615            match self {
9616                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
9617                Self::Ready => std::option::Option::Some("READY"),
9618                Self::Creating => std::option::Option::Some("CREATING"),
9619                Self::UnknownValue(u) => u.0.name(),
9620            }
9621        }
9622    }
9623
9624    impl std::default::Default for State {
9625        fn default() -> Self {
9626            use std::convert::From;
9627            Self::from(0)
9628        }
9629    }
9630
9631    impl std::fmt::Display for State {
9632        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9633            wkt::internal::display_enum(f, self.name(), self.value())
9634        }
9635    }
9636
9637    impl std::convert::From<i32> for State {
9638        fn from(value: i32) -> Self {
9639            match value {
9640                0 => Self::NotKnown,
9641                1 => Self::Ready,
9642                2 => Self::Creating,
9643                _ => Self::UnknownValue(state::UnknownValue(
9644                    wkt::internal::UnknownEnumValue::Integer(value),
9645                )),
9646            }
9647        }
9648    }
9649
9650    impl std::convert::From<&str> for State {
9651        fn from(value: &str) -> Self {
9652            use std::string::ToString;
9653            match value {
9654                "STATE_NOT_KNOWN" => Self::NotKnown,
9655                "READY" => Self::Ready,
9656                "CREATING" => Self::Creating,
9657                _ => Self::UnknownValue(state::UnknownValue(
9658                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9659                )),
9660            }
9661        }
9662    }
9663
9664    impl serde::ser::Serialize for State {
9665        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9666        where
9667            S: serde::Serializer,
9668        {
9669            match self {
9670                Self::NotKnown => serializer.serialize_i32(0),
9671                Self::Ready => serializer.serialize_i32(1),
9672                Self::Creating => serializer.serialize_i32(2),
9673                Self::UnknownValue(u) => u.0.serialize(serializer),
9674            }
9675        }
9676    }
9677
9678    impl<'de> serde::de::Deserialize<'de> for State {
9679        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9680        where
9681            D: serde::Deserializer<'de>,
9682        {
9683            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9684                ".google.bigtable.admin.v2.Instance.State",
9685            ))
9686        }
9687    }
9688
9689    /// The type of the instance.
9690    ///
9691    /// # Working with unknown values
9692    ///
9693    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9694    /// additional enum variants at any time. Adding new variants is not considered
9695    /// a breaking change. Applications should write their code in anticipation of:
9696    ///
9697    /// - New values appearing in future releases of the client library, **and**
9698    /// - New values received dynamically, without application changes.
9699    ///
9700    /// Please consult the [Working with enums] section in the user guide for some
9701    /// guidelines.
9702    ///
9703    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9704    #[derive(Clone, Debug, PartialEq)]
9705    #[non_exhaustive]
9706    pub enum Type {
9707        /// The type of the instance is unspecified. If set when creating an
9708        /// instance, a `PRODUCTION` instance will be created. If set when updating
9709        /// an instance, the type will be left unchanged.
9710        Unspecified,
9711        /// An instance meant for production use. `serve_nodes` must be set
9712        /// on the cluster.
9713        Production,
9714        /// DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces
9715        /// a higher minimum node count than DEVELOPMENT.
9716        Development,
9717        /// If set, the enum was initialized with an unknown value.
9718        ///
9719        /// Applications can examine the value using [Type::value] or
9720        /// [Type::name].
9721        UnknownValue(r#type::UnknownValue),
9722    }
9723
9724    #[doc(hidden)]
9725    pub mod r#type {
9726        #[allow(unused_imports)]
9727        use super::*;
9728        #[derive(Clone, Debug, PartialEq)]
9729        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9730    }
9731
9732    impl Type {
9733        /// Gets the enum value.
9734        ///
9735        /// Returns `None` if the enum contains an unknown value deserialized from
9736        /// the string representation of enums.
9737        pub fn value(&self) -> std::option::Option<i32> {
9738            match self {
9739                Self::Unspecified => std::option::Option::Some(0),
9740                Self::Production => std::option::Option::Some(1),
9741                Self::Development => std::option::Option::Some(2),
9742                Self::UnknownValue(u) => u.0.value(),
9743            }
9744        }
9745
9746        /// Gets the enum value as a string.
9747        ///
9748        /// Returns `None` if the enum contains an unknown value deserialized from
9749        /// the integer representation of enums.
9750        pub fn name(&self) -> std::option::Option<&str> {
9751            match self {
9752                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
9753                Self::Production => std::option::Option::Some("PRODUCTION"),
9754                Self::Development => std::option::Option::Some("DEVELOPMENT"),
9755                Self::UnknownValue(u) => u.0.name(),
9756            }
9757        }
9758    }
9759
9760    impl std::default::Default for Type {
9761        fn default() -> Self {
9762            use std::convert::From;
9763            Self::from(0)
9764        }
9765    }
9766
9767    impl std::fmt::Display for Type {
9768        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9769            wkt::internal::display_enum(f, self.name(), self.value())
9770        }
9771    }
9772
9773    impl std::convert::From<i32> for Type {
9774        fn from(value: i32) -> Self {
9775            match value {
9776                0 => Self::Unspecified,
9777                1 => Self::Production,
9778                2 => Self::Development,
9779                _ => Self::UnknownValue(r#type::UnknownValue(
9780                    wkt::internal::UnknownEnumValue::Integer(value),
9781                )),
9782            }
9783        }
9784    }
9785
9786    impl std::convert::From<&str> for Type {
9787        fn from(value: &str) -> Self {
9788            use std::string::ToString;
9789            match value {
9790                "TYPE_UNSPECIFIED" => Self::Unspecified,
9791                "PRODUCTION" => Self::Production,
9792                "DEVELOPMENT" => Self::Development,
9793                _ => Self::UnknownValue(r#type::UnknownValue(
9794                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9795                )),
9796            }
9797        }
9798    }
9799
9800    impl serde::ser::Serialize for Type {
9801        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9802        where
9803            S: serde::Serializer,
9804        {
9805            match self {
9806                Self::Unspecified => serializer.serialize_i32(0),
9807                Self::Production => serializer.serialize_i32(1),
9808                Self::Development => serializer.serialize_i32(2),
9809                Self::UnknownValue(u) => u.0.serialize(serializer),
9810            }
9811        }
9812    }
9813
9814    impl<'de> serde::de::Deserialize<'de> for Type {
9815        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9816        where
9817            D: serde::Deserializer<'de>,
9818        {
9819            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
9820                ".google.bigtable.admin.v2.Instance.Type",
9821            ))
9822        }
9823    }
9824
9825    /// Possible editions of an instance.
9826    ///
9827    /// An edition is a specific tier of Cloud Bigtable. Each edition is tailored
9828    /// to different customer needs. Higher tiers offer more features and better
9829    /// performance.
9830    ///
9831    /// # Working with unknown values
9832    ///
9833    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9834    /// additional enum variants at any time. Adding new variants is not considered
9835    /// a breaking change. Applications should write their code in anticipation of:
9836    ///
9837    /// - New values appearing in future releases of the client library, **and**
9838    /// - New values received dynamically, without application changes.
9839    ///
9840    /// Please consult the [Working with enums] section in the user guide for some
9841    /// guidelines.
9842    ///
9843    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9844    #[derive(Clone, Debug, PartialEq)]
9845    #[non_exhaustive]
9846    pub enum Edition {
9847        /// The edition is unspecified. This is treated as `ENTERPRISE`.
9848        Unspecified,
9849        /// The Enterprise edition. This is the default offering that is designed to
9850        /// meet the needs of most enterprise workloads.
9851        Enterprise,
9852        /// The Enterprise Plus edition. This is a premium tier that is designed for
9853        /// demanding, multi-tenant workloads requiring the highest levels of
9854        /// performance, scale, and global availability.
9855        ///
9856        /// The nodes in the Enterprise Plus tier come at a higher cost than the
9857        /// Enterprise tier. Any Enterprise Plus features must be disabled before
9858        /// downgrading to Enterprise.
9859        EnterprisePlus,
9860        /// If set, the enum was initialized with an unknown value.
9861        ///
9862        /// Applications can examine the value using [Edition::value] or
9863        /// [Edition::name].
9864        UnknownValue(edition::UnknownValue),
9865    }
9866
9867    #[doc(hidden)]
9868    pub mod edition {
9869        #[allow(unused_imports)]
9870        use super::*;
9871        #[derive(Clone, Debug, PartialEq)]
9872        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9873    }
9874
9875    impl Edition {
9876        /// Gets the enum value.
9877        ///
9878        /// Returns `None` if the enum contains an unknown value deserialized from
9879        /// the string representation of enums.
9880        pub fn value(&self) -> std::option::Option<i32> {
9881            match self {
9882                Self::Unspecified => std::option::Option::Some(0),
9883                Self::Enterprise => std::option::Option::Some(1),
9884                Self::EnterprisePlus => std::option::Option::Some(2),
9885                Self::UnknownValue(u) => u.0.value(),
9886            }
9887        }
9888
9889        /// Gets the enum value as a string.
9890        ///
9891        /// Returns `None` if the enum contains an unknown value deserialized from
9892        /// the integer representation of enums.
9893        pub fn name(&self) -> std::option::Option<&str> {
9894            match self {
9895                Self::Unspecified => std::option::Option::Some("EDITION_UNSPECIFIED"),
9896                Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
9897                Self::EnterprisePlus => std::option::Option::Some("ENTERPRISE_PLUS"),
9898                Self::UnknownValue(u) => u.0.name(),
9899            }
9900        }
9901    }
9902
9903    impl std::default::Default for Edition {
9904        fn default() -> Self {
9905            use std::convert::From;
9906            Self::from(0)
9907        }
9908    }
9909
9910    impl std::fmt::Display for Edition {
9911        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9912            wkt::internal::display_enum(f, self.name(), self.value())
9913        }
9914    }
9915
9916    impl std::convert::From<i32> for Edition {
9917        fn from(value: i32) -> Self {
9918            match value {
9919                0 => Self::Unspecified,
9920                1 => Self::Enterprise,
9921                2 => Self::EnterprisePlus,
9922                _ => Self::UnknownValue(edition::UnknownValue(
9923                    wkt::internal::UnknownEnumValue::Integer(value),
9924                )),
9925            }
9926        }
9927    }
9928
9929    impl std::convert::From<&str> for Edition {
9930        fn from(value: &str) -> Self {
9931            use std::string::ToString;
9932            match value {
9933                "EDITION_UNSPECIFIED" => Self::Unspecified,
9934                "ENTERPRISE" => Self::Enterprise,
9935                "ENTERPRISE_PLUS" => Self::EnterprisePlus,
9936                _ => Self::UnknownValue(edition::UnknownValue(
9937                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9938                )),
9939            }
9940        }
9941    }
9942
9943    impl serde::ser::Serialize for Edition {
9944        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9945        where
9946            S: serde::Serializer,
9947        {
9948            match self {
9949                Self::Unspecified => serializer.serialize_i32(0),
9950                Self::Enterprise => serializer.serialize_i32(1),
9951                Self::EnterprisePlus => serializer.serialize_i32(2),
9952                Self::UnknownValue(u) => u.0.serialize(serializer),
9953            }
9954        }
9955    }
9956
9957    impl<'de> serde::de::Deserialize<'de> for Edition {
9958        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9959        where
9960            D: serde::Deserializer<'de>,
9961        {
9962            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Edition>::new(
9963                ".google.bigtable.admin.v2.Instance.Edition",
9964            ))
9965        }
9966    }
9967}
9968
9969/// The Autoscaling targets for a Cluster. These determine the recommended nodes.
9970#[derive(Clone, Default, PartialEq)]
9971#[non_exhaustive]
9972pub struct AutoscalingTargets {
9973    /// The cpu utilization that the Autoscaler should be trying to achieve.
9974    /// This number is on a scale from 0 (no utilization) to
9975    /// 100 (total utilization), and is limited between 10 and 80, otherwise it
9976    /// will return INVALID_ARGUMENT error.
9977    pub cpu_utilization_percent: i32,
9978
9979    /// The storage utilization that the Autoscaler should be trying to achieve.
9980    /// This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
9981    /// cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster,
9982    /// otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
9983    /// it will be treated as if it were set to the default value: 2560 for SSD,
9984    /// 8192 for HDD.
9985    pub storage_utilization_gib_per_node: i32,
9986
9987    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9988}
9989
9990impl AutoscalingTargets {
9991    /// Creates a new default instance.
9992    pub fn new() -> Self {
9993        std::default::Default::default()
9994    }
9995
9996    /// Sets the value of [cpu_utilization_percent][crate::model::AutoscalingTargets::cpu_utilization_percent].
9997    ///
9998    /// # Example
9999    /// ```ignore,no_run
10000    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10001    /// let x = AutoscalingTargets::new().set_cpu_utilization_percent(42);
10002    /// ```
10003    pub fn set_cpu_utilization_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10004        self.cpu_utilization_percent = v.into();
10005        self
10006    }
10007
10008    /// Sets the value of [storage_utilization_gib_per_node][crate::model::AutoscalingTargets::storage_utilization_gib_per_node].
10009    ///
10010    /// # Example
10011    /// ```ignore,no_run
10012    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10013    /// let x = AutoscalingTargets::new().set_storage_utilization_gib_per_node(42);
10014    /// ```
10015    pub fn set_storage_utilization_gib_per_node<T: std::convert::Into<i32>>(
10016        mut self,
10017        v: T,
10018    ) -> Self {
10019        self.storage_utilization_gib_per_node = v.into();
10020        self
10021    }
10022}
10023
10024impl wkt::message::Message for AutoscalingTargets {
10025    fn typename() -> &'static str {
10026        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingTargets"
10027    }
10028}
10029
10030/// Limits for the number of nodes a Cluster can autoscale up/down to.
10031#[derive(Clone, Default, PartialEq)]
10032#[non_exhaustive]
10033pub struct AutoscalingLimits {
10034    /// Required. Minimum number of nodes to scale down to.
10035    pub min_serve_nodes: i32,
10036
10037    /// Required. Maximum number of nodes to scale up to.
10038    pub max_serve_nodes: i32,
10039
10040    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10041}
10042
10043impl AutoscalingLimits {
10044    /// Creates a new default instance.
10045    pub fn new() -> Self {
10046        std::default::Default::default()
10047    }
10048
10049    /// Sets the value of [min_serve_nodes][crate::model::AutoscalingLimits::min_serve_nodes].
10050    ///
10051    /// # Example
10052    /// ```ignore,no_run
10053    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10054    /// let x = AutoscalingLimits::new().set_min_serve_nodes(42);
10055    /// ```
10056    pub fn set_min_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10057        self.min_serve_nodes = v.into();
10058        self
10059    }
10060
10061    /// Sets the value of [max_serve_nodes][crate::model::AutoscalingLimits::max_serve_nodes].
10062    ///
10063    /// # Example
10064    /// ```ignore,no_run
10065    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10066    /// let x = AutoscalingLimits::new().set_max_serve_nodes(42);
10067    /// ```
10068    pub fn set_max_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10069        self.max_serve_nodes = v.into();
10070        self
10071    }
10072}
10073
10074impl wkt::message::Message for AutoscalingLimits {
10075    fn typename() -> &'static str {
10076        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingLimits"
10077    }
10078}
10079
10080/// A resizable group of nodes in a particular cloud location, capable
10081/// of serving all [Tables][google.bigtable.admin.v2.Table] in the parent
10082/// [Instance][google.bigtable.admin.v2.Instance].
10083///
10084/// [google.bigtable.admin.v2.Instance]: crate::model::Instance
10085/// [google.bigtable.admin.v2.Table]: crate::model::Table
10086#[derive(Clone, Default, PartialEq)]
10087#[non_exhaustive]
10088pub struct Cluster {
10089    /// The unique name of the cluster. Values are of the form
10090    /// `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
10091    pub name: std::string::String,
10092
10093    /// Immutable. The location where this cluster's nodes and storage reside. For
10094    /// best performance, clients should be located as close as possible to this
10095    /// cluster. Currently only zones are supported, so values should be of the
10096    /// form `projects/{project}/locations/{zone}`.
10097    pub location: std::string::String,
10098
10099    /// Output only. The current state of the cluster.
10100    pub state: crate::model::cluster::State,
10101
10102    /// The number of nodes in the cluster. If no value is set,
10103    /// Cloud Bigtable automatically allocates nodes based on your data footprint
10104    /// and optimized for 50% storage utilization.
10105    pub serve_nodes: i32,
10106
10107    /// Immutable. The node scaling factor of this cluster.
10108    pub node_scaling_factor: crate::model::cluster::NodeScalingFactor,
10109
10110    /// Immutable. The type of storage used by this cluster to serve its
10111    /// parent instance's tables, unless explicitly overridden.
10112    pub default_storage_type: crate::model::StorageType,
10113
10114    /// Immutable. The encryption configuration for CMEK-protected clusters.
10115    pub encryption_config: std::option::Option<crate::model::cluster::EncryptionConfig>,
10116
10117    #[allow(missing_docs)]
10118    pub config: std::option::Option<crate::model::cluster::Config>,
10119
10120    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10121}
10122
10123impl Cluster {
10124    /// Creates a new default instance.
10125    pub fn new() -> Self {
10126        std::default::Default::default()
10127    }
10128
10129    /// Sets the value of [name][crate::model::Cluster::name].
10130    ///
10131    /// # Example
10132    /// ```ignore,no_run
10133    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10134    /// # let project_id = "project_id";
10135    /// # let instance_id = "instance_id";
10136    /// # let cluster_id = "cluster_id";
10137    /// let x = Cluster::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
10138    /// ```
10139    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10140        self.name = v.into();
10141        self
10142    }
10143
10144    /// Sets the value of [location][crate::model::Cluster::location].
10145    ///
10146    /// # Example
10147    /// ```ignore,no_run
10148    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10149    /// let x = Cluster::new().set_location("example");
10150    /// ```
10151    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10152        self.location = v.into();
10153        self
10154    }
10155
10156    /// Sets the value of [state][crate::model::Cluster::state].
10157    ///
10158    /// # Example
10159    /// ```ignore,no_run
10160    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10161    /// use google_cloud_bigtable_admin_v2::model::cluster::State;
10162    /// let x0 = Cluster::new().set_state(State::Ready);
10163    /// let x1 = Cluster::new().set_state(State::Creating);
10164    /// let x2 = Cluster::new().set_state(State::Resizing);
10165    /// ```
10166    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
10167        self.state = v.into();
10168        self
10169    }
10170
10171    /// Sets the value of [serve_nodes][crate::model::Cluster::serve_nodes].
10172    ///
10173    /// # Example
10174    /// ```ignore,no_run
10175    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10176    /// let x = Cluster::new().set_serve_nodes(42);
10177    /// ```
10178    pub fn set_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10179        self.serve_nodes = v.into();
10180        self
10181    }
10182
10183    /// Sets the value of [node_scaling_factor][crate::model::Cluster::node_scaling_factor].
10184    ///
10185    /// # Example
10186    /// ```ignore,no_run
10187    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10188    /// use google_cloud_bigtable_admin_v2::model::cluster::NodeScalingFactor;
10189    /// let x0 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor1X);
10190    /// let x1 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor2X);
10191    /// ```
10192    pub fn set_node_scaling_factor<
10193        T: std::convert::Into<crate::model::cluster::NodeScalingFactor>,
10194    >(
10195        mut self,
10196        v: T,
10197    ) -> Self {
10198        self.node_scaling_factor = v.into();
10199        self
10200    }
10201
10202    /// Sets the value of [default_storage_type][crate::model::Cluster::default_storage_type].
10203    ///
10204    /// # Example
10205    /// ```ignore,no_run
10206    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10207    /// use google_cloud_bigtable_admin_v2::model::StorageType;
10208    /// let x0 = Cluster::new().set_default_storage_type(StorageType::Ssd);
10209    /// let x1 = Cluster::new().set_default_storage_type(StorageType::Hdd);
10210    /// ```
10211    pub fn set_default_storage_type<T: std::convert::Into<crate::model::StorageType>>(
10212        mut self,
10213        v: T,
10214    ) -> Self {
10215        self.default_storage_type = v.into();
10216        self
10217    }
10218
10219    /// Sets the value of [encryption_config][crate::model::Cluster::encryption_config].
10220    ///
10221    /// # Example
10222    /// ```ignore,no_run
10223    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10224    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10225    /// let x = Cluster::new().set_encryption_config(EncryptionConfig::default()/* use setters */);
10226    /// ```
10227    pub fn set_encryption_config<T>(mut self, v: T) -> Self
10228    where
10229        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
10230    {
10231        self.encryption_config = std::option::Option::Some(v.into());
10232        self
10233    }
10234
10235    /// Sets or clears the value of [encryption_config][crate::model::Cluster::encryption_config].
10236    ///
10237    /// # Example
10238    /// ```ignore,no_run
10239    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10240    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10241    /// let x = Cluster::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
10242    /// let x = Cluster::new().set_or_clear_encryption_config(None::<EncryptionConfig>);
10243    /// ```
10244    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
10245    where
10246        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
10247    {
10248        self.encryption_config = v.map(|x| x.into());
10249        self
10250    }
10251
10252    /// Sets the value of [config][crate::model::Cluster::config].
10253    ///
10254    /// Note that all the setters affecting `config` are mutually
10255    /// exclusive.
10256    ///
10257    /// # Example
10258    /// ```ignore,no_run
10259    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10260    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10261    /// let x = Cluster::new().set_config(Some(
10262    ///     google_cloud_bigtable_admin_v2::model::cluster::Config::ClusterConfig(ClusterConfig::default().into())));
10263    /// ```
10264    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::cluster::Config>>>(
10265        mut self,
10266        v: T,
10267    ) -> Self {
10268        self.config = v.into();
10269        self
10270    }
10271
10272    /// The value of [config][crate::model::Cluster::config]
10273    /// if it holds a `ClusterConfig`, `None` if the field is not set or
10274    /// holds a different branch.
10275    pub fn cluster_config(
10276        &self,
10277    ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::ClusterConfig>> {
10278        #[allow(unreachable_patterns)]
10279        self.config.as_ref().and_then(|v| match v {
10280            crate::model::cluster::Config::ClusterConfig(v) => std::option::Option::Some(v),
10281            _ => std::option::Option::None,
10282        })
10283    }
10284
10285    /// Sets the value of [config][crate::model::Cluster::config]
10286    /// to hold a `ClusterConfig`.
10287    ///
10288    /// Note that all the setters affecting `config` are
10289    /// mutually exclusive.
10290    ///
10291    /// # Example
10292    /// ```ignore,no_run
10293    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10294    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10295    /// let x = Cluster::new().set_cluster_config(ClusterConfig::default()/* use setters */);
10296    /// assert!(x.cluster_config().is_some());
10297    /// ```
10298    pub fn set_cluster_config<
10299        T: std::convert::Into<std::boxed::Box<crate::model::cluster::ClusterConfig>>,
10300    >(
10301        mut self,
10302        v: T,
10303    ) -> Self {
10304        self.config =
10305            std::option::Option::Some(crate::model::cluster::Config::ClusterConfig(v.into()));
10306        self
10307    }
10308}
10309
10310impl wkt::message::Message for Cluster {
10311    fn typename() -> &'static str {
10312        "type.googleapis.com/google.bigtable.admin.v2.Cluster"
10313    }
10314}
10315
10316/// Defines additional types related to [Cluster].
10317pub mod cluster {
10318    #[allow(unused_imports)]
10319    use super::*;
10320
10321    /// Autoscaling config for a cluster.
10322    #[derive(Clone, Default, PartialEq)]
10323    #[non_exhaustive]
10324    pub struct ClusterAutoscalingConfig {
10325        /// Required. Autoscaling limits for this cluster.
10326        pub autoscaling_limits: std::option::Option<crate::model::AutoscalingLimits>,
10327
10328        /// Required. Autoscaling targets for this cluster.
10329        pub autoscaling_targets: std::option::Option<crate::model::AutoscalingTargets>,
10330
10331        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10332    }
10333
10334    impl ClusterAutoscalingConfig {
10335        /// Creates a new default instance.
10336        pub fn new() -> Self {
10337            std::default::Default::default()
10338        }
10339
10340        /// Sets the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
10341        ///
10342        /// # Example
10343        /// ```ignore,no_run
10344        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10345        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10346        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_limits(AutoscalingLimits::default()/* use setters */);
10347        /// ```
10348        pub fn set_autoscaling_limits<T>(mut self, v: T) -> Self
10349        where
10350            T: std::convert::Into<crate::model::AutoscalingLimits>,
10351        {
10352            self.autoscaling_limits = std::option::Option::Some(v.into());
10353            self
10354        }
10355
10356        /// Sets or clears the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
10357        ///
10358        /// # Example
10359        /// ```ignore,no_run
10360        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10361        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10362        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(Some(AutoscalingLimits::default()/* use setters */));
10363        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(None::<AutoscalingLimits>);
10364        /// ```
10365        pub fn set_or_clear_autoscaling_limits<T>(mut self, v: std::option::Option<T>) -> Self
10366        where
10367            T: std::convert::Into<crate::model::AutoscalingLimits>,
10368        {
10369            self.autoscaling_limits = v.map(|x| x.into());
10370            self
10371        }
10372
10373        /// Sets the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
10374        ///
10375        /// # Example
10376        /// ```ignore,no_run
10377        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10378        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10379        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_targets(AutoscalingTargets::default()/* use setters */);
10380        /// ```
10381        pub fn set_autoscaling_targets<T>(mut self, v: T) -> Self
10382        where
10383            T: std::convert::Into<crate::model::AutoscalingTargets>,
10384        {
10385            self.autoscaling_targets = std::option::Option::Some(v.into());
10386            self
10387        }
10388
10389        /// Sets or clears the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
10390        ///
10391        /// # Example
10392        /// ```ignore,no_run
10393        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10394        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10395        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(Some(AutoscalingTargets::default()/* use setters */));
10396        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(None::<AutoscalingTargets>);
10397        /// ```
10398        pub fn set_or_clear_autoscaling_targets<T>(mut self, v: std::option::Option<T>) -> Self
10399        where
10400            T: std::convert::Into<crate::model::AutoscalingTargets>,
10401        {
10402            self.autoscaling_targets = v.map(|x| x.into());
10403            self
10404        }
10405    }
10406
10407    impl wkt::message::Message for ClusterAutoscalingConfig {
10408        fn typename() -> &'static str {
10409            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig"
10410        }
10411    }
10412
10413    /// Configuration for a cluster.
10414    #[derive(Clone, Default, PartialEq)]
10415    #[non_exhaustive]
10416    pub struct ClusterConfig {
10417        /// Autoscaling configuration for this cluster.
10418        pub cluster_autoscaling_config:
10419            std::option::Option<crate::model::cluster::ClusterAutoscalingConfig>,
10420
10421        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10422    }
10423
10424    impl ClusterConfig {
10425        /// Creates a new default instance.
10426        pub fn new() -> Self {
10427            std::default::Default::default()
10428        }
10429
10430        /// Sets the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
10431        ///
10432        /// # Example
10433        /// ```ignore,no_run
10434        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10435        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10436        /// let x = ClusterConfig::new().set_cluster_autoscaling_config(ClusterAutoscalingConfig::default()/* use setters */);
10437        /// ```
10438        pub fn set_cluster_autoscaling_config<T>(mut self, v: T) -> Self
10439        where
10440            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10441        {
10442            self.cluster_autoscaling_config = std::option::Option::Some(v.into());
10443            self
10444        }
10445
10446        /// Sets or clears the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
10447        ///
10448        /// # Example
10449        /// ```ignore,no_run
10450        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10451        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10452        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(Some(ClusterAutoscalingConfig::default()/* use setters */));
10453        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(None::<ClusterAutoscalingConfig>);
10454        /// ```
10455        pub fn set_or_clear_cluster_autoscaling_config<T>(
10456            mut self,
10457            v: std::option::Option<T>,
10458        ) -> Self
10459        where
10460            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10461        {
10462            self.cluster_autoscaling_config = v.map(|x| x.into());
10463            self
10464        }
10465    }
10466
10467    impl wkt::message::Message for ClusterConfig {
10468        fn typename() -> &'static str {
10469            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterConfig"
10470        }
10471    }
10472
10473    /// Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected
10474    /// cluster.
10475    #[derive(Clone, Default, PartialEq)]
10476    #[non_exhaustive]
10477    pub struct EncryptionConfig {
10478        /// Describes the Cloud KMS encryption key that will be used to protect the
10479        /// destination Bigtable cluster. The requirements for this key are:
10480        ///
10481        /// 1. The Cloud Bigtable service account associated with the project that
10482        ///    contains this cluster must be granted the
10483        ///    `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
10484        /// 1. Only regional keys can be used and the region of the CMEK key must
10485        ///    match the region of the cluster.
10486        ///    Values are of the form
10487        ///    `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
10488        pub kms_key_name: std::string::String,
10489
10490        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10491    }
10492
10493    impl EncryptionConfig {
10494        /// Creates a new default instance.
10495        pub fn new() -> Self {
10496            std::default::Default::default()
10497        }
10498
10499        /// Sets the value of [kms_key_name][crate::model::cluster::EncryptionConfig::kms_key_name].
10500        ///
10501        /// # Example
10502        /// ```ignore,no_run
10503        /// # use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10504        /// let x = EncryptionConfig::new().set_kms_key_name("example");
10505        /// ```
10506        pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(
10507            mut self,
10508            v: T,
10509        ) -> Self {
10510            self.kms_key_name = v.into();
10511            self
10512        }
10513    }
10514
10515    impl wkt::message::Message for EncryptionConfig {
10516        fn typename() -> &'static str {
10517            "type.googleapis.com/google.bigtable.admin.v2.Cluster.EncryptionConfig"
10518        }
10519    }
10520
10521    /// Possible states of a cluster.
10522    ///
10523    /// # Working with unknown values
10524    ///
10525    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10526    /// additional enum variants at any time. Adding new variants is not considered
10527    /// a breaking change. Applications should write their code in anticipation of:
10528    ///
10529    /// - New values appearing in future releases of the client library, **and**
10530    /// - New values received dynamically, without application changes.
10531    ///
10532    /// Please consult the [Working with enums] section in the user guide for some
10533    /// guidelines.
10534    ///
10535    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10536    #[derive(Clone, Debug, PartialEq)]
10537    #[non_exhaustive]
10538    pub enum State {
10539        /// The state of the cluster could not be determined.
10540        NotKnown,
10541        /// The cluster has been successfully created and is ready to serve requests.
10542        Ready,
10543        /// The cluster is currently being created, and may be destroyed
10544        /// if the creation process encounters an error.
10545        /// A cluster may not be able to serve requests while being created.
10546        Creating,
10547        /// The cluster is currently being resized, and may revert to its previous
10548        /// node count if the process encounters an error.
10549        /// A cluster is still capable of serving requests while being resized,
10550        /// but may exhibit performance as if its number of allocated nodes is
10551        /// between the starting and requested states.
10552        Resizing,
10553        /// The cluster has no backing nodes. The data (tables) still
10554        /// exist, but no operations can be performed on the cluster.
10555        Disabled,
10556        /// If set, the enum was initialized with an unknown value.
10557        ///
10558        /// Applications can examine the value using [State::value] or
10559        /// [State::name].
10560        UnknownValue(state::UnknownValue),
10561    }
10562
10563    #[doc(hidden)]
10564    pub mod state {
10565        #[allow(unused_imports)]
10566        use super::*;
10567        #[derive(Clone, Debug, PartialEq)]
10568        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10569    }
10570
10571    impl State {
10572        /// Gets the enum value.
10573        ///
10574        /// Returns `None` if the enum contains an unknown value deserialized from
10575        /// the string representation of enums.
10576        pub fn value(&self) -> std::option::Option<i32> {
10577            match self {
10578                Self::NotKnown => std::option::Option::Some(0),
10579                Self::Ready => std::option::Option::Some(1),
10580                Self::Creating => std::option::Option::Some(2),
10581                Self::Resizing => std::option::Option::Some(3),
10582                Self::Disabled => std::option::Option::Some(4),
10583                Self::UnknownValue(u) => u.0.value(),
10584            }
10585        }
10586
10587        /// Gets the enum value as a string.
10588        ///
10589        /// Returns `None` if the enum contains an unknown value deserialized from
10590        /// the integer representation of enums.
10591        pub fn name(&self) -> std::option::Option<&str> {
10592            match self {
10593                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
10594                Self::Ready => std::option::Option::Some("READY"),
10595                Self::Creating => std::option::Option::Some("CREATING"),
10596                Self::Resizing => std::option::Option::Some("RESIZING"),
10597                Self::Disabled => std::option::Option::Some("DISABLED"),
10598                Self::UnknownValue(u) => u.0.name(),
10599            }
10600        }
10601    }
10602
10603    impl std::default::Default for State {
10604        fn default() -> Self {
10605            use std::convert::From;
10606            Self::from(0)
10607        }
10608    }
10609
10610    impl std::fmt::Display for State {
10611        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10612            wkt::internal::display_enum(f, self.name(), self.value())
10613        }
10614    }
10615
10616    impl std::convert::From<i32> for State {
10617        fn from(value: i32) -> Self {
10618            match value {
10619                0 => Self::NotKnown,
10620                1 => Self::Ready,
10621                2 => Self::Creating,
10622                3 => Self::Resizing,
10623                4 => Self::Disabled,
10624                _ => Self::UnknownValue(state::UnknownValue(
10625                    wkt::internal::UnknownEnumValue::Integer(value),
10626                )),
10627            }
10628        }
10629    }
10630
10631    impl std::convert::From<&str> for State {
10632        fn from(value: &str) -> Self {
10633            use std::string::ToString;
10634            match value {
10635                "STATE_NOT_KNOWN" => Self::NotKnown,
10636                "READY" => Self::Ready,
10637                "CREATING" => Self::Creating,
10638                "RESIZING" => Self::Resizing,
10639                "DISABLED" => Self::Disabled,
10640                _ => Self::UnknownValue(state::UnknownValue(
10641                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10642                )),
10643            }
10644        }
10645    }
10646
10647    impl serde::ser::Serialize for State {
10648        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10649        where
10650            S: serde::Serializer,
10651        {
10652            match self {
10653                Self::NotKnown => serializer.serialize_i32(0),
10654                Self::Ready => serializer.serialize_i32(1),
10655                Self::Creating => serializer.serialize_i32(2),
10656                Self::Resizing => serializer.serialize_i32(3),
10657                Self::Disabled => serializer.serialize_i32(4),
10658                Self::UnknownValue(u) => u.0.serialize(serializer),
10659            }
10660        }
10661    }
10662
10663    impl<'de> serde::de::Deserialize<'de> for State {
10664        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10665        where
10666            D: serde::Deserializer<'de>,
10667        {
10668            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10669                ".google.bigtable.admin.v2.Cluster.State",
10670            ))
10671        }
10672    }
10673
10674    /// Possible node scaling factors of the clusters. Node scaling delivers better
10675    /// latency and more throughput by removing node boundaries.
10676    ///
10677    /// # Working with unknown values
10678    ///
10679    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10680    /// additional enum variants at any time. Adding new variants is not considered
10681    /// a breaking change. Applications should write their code in anticipation of:
10682    ///
10683    /// - New values appearing in future releases of the client library, **and**
10684    /// - New values received dynamically, without application changes.
10685    ///
10686    /// Please consult the [Working with enums] section in the user guide for some
10687    /// guidelines.
10688    ///
10689    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10690    #[derive(Clone, Debug, PartialEq)]
10691    #[non_exhaustive]
10692    pub enum NodeScalingFactor {
10693        /// No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X.
10694        Unspecified,
10695        /// The cluster is running with a scaling factor of 1.
10696        NodeScalingFactor1X,
10697        /// The cluster is running with a scaling factor of 2.
10698        /// All node count values must be in increments of 2 with this scaling factor
10699        /// enabled, otherwise an INVALID_ARGUMENT error will be returned.
10700        NodeScalingFactor2X,
10701        /// If set, the enum was initialized with an unknown value.
10702        ///
10703        /// Applications can examine the value using [NodeScalingFactor::value] or
10704        /// [NodeScalingFactor::name].
10705        UnknownValue(node_scaling_factor::UnknownValue),
10706    }
10707
10708    #[doc(hidden)]
10709    pub mod node_scaling_factor {
10710        #[allow(unused_imports)]
10711        use super::*;
10712        #[derive(Clone, Debug, PartialEq)]
10713        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10714    }
10715
10716    impl NodeScalingFactor {
10717        /// Gets the enum value.
10718        ///
10719        /// Returns `None` if the enum contains an unknown value deserialized from
10720        /// the string representation of enums.
10721        pub fn value(&self) -> std::option::Option<i32> {
10722            match self {
10723                Self::Unspecified => std::option::Option::Some(0),
10724                Self::NodeScalingFactor1X => std::option::Option::Some(1),
10725                Self::NodeScalingFactor2X => std::option::Option::Some(2),
10726                Self::UnknownValue(u) => u.0.value(),
10727            }
10728        }
10729
10730        /// Gets the enum value as a string.
10731        ///
10732        /// Returns `None` if the enum contains an unknown value deserialized from
10733        /// the integer representation of enums.
10734        pub fn name(&self) -> std::option::Option<&str> {
10735            match self {
10736                Self::Unspecified => std::option::Option::Some("NODE_SCALING_FACTOR_UNSPECIFIED"),
10737                Self::NodeScalingFactor1X => std::option::Option::Some("NODE_SCALING_FACTOR_1X"),
10738                Self::NodeScalingFactor2X => std::option::Option::Some("NODE_SCALING_FACTOR_2X"),
10739                Self::UnknownValue(u) => u.0.name(),
10740            }
10741        }
10742    }
10743
10744    impl std::default::Default for NodeScalingFactor {
10745        fn default() -> Self {
10746            use std::convert::From;
10747            Self::from(0)
10748        }
10749    }
10750
10751    impl std::fmt::Display for NodeScalingFactor {
10752        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10753            wkt::internal::display_enum(f, self.name(), self.value())
10754        }
10755    }
10756
10757    impl std::convert::From<i32> for NodeScalingFactor {
10758        fn from(value: i32) -> Self {
10759            match value {
10760                0 => Self::Unspecified,
10761                1 => Self::NodeScalingFactor1X,
10762                2 => Self::NodeScalingFactor2X,
10763                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
10764                    wkt::internal::UnknownEnumValue::Integer(value),
10765                )),
10766            }
10767        }
10768    }
10769
10770    impl std::convert::From<&str> for NodeScalingFactor {
10771        fn from(value: &str) -> Self {
10772            use std::string::ToString;
10773            match value {
10774                "NODE_SCALING_FACTOR_UNSPECIFIED" => Self::Unspecified,
10775                "NODE_SCALING_FACTOR_1X" => Self::NodeScalingFactor1X,
10776                "NODE_SCALING_FACTOR_2X" => Self::NodeScalingFactor2X,
10777                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
10778                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10779                )),
10780            }
10781        }
10782    }
10783
10784    impl serde::ser::Serialize for NodeScalingFactor {
10785        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10786        where
10787            S: serde::Serializer,
10788        {
10789            match self {
10790                Self::Unspecified => serializer.serialize_i32(0),
10791                Self::NodeScalingFactor1X => serializer.serialize_i32(1),
10792                Self::NodeScalingFactor2X => serializer.serialize_i32(2),
10793                Self::UnknownValue(u) => u.0.serialize(serializer),
10794            }
10795        }
10796    }
10797
10798    impl<'de> serde::de::Deserialize<'de> for NodeScalingFactor {
10799        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10800        where
10801            D: serde::Deserializer<'de>,
10802        {
10803            deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeScalingFactor>::new(
10804                ".google.bigtable.admin.v2.Cluster.NodeScalingFactor",
10805            ))
10806        }
10807    }
10808
10809    #[allow(missing_docs)]
10810    #[derive(Clone, Debug, PartialEq)]
10811    #[non_exhaustive]
10812    pub enum Config {
10813        /// Configuration for this cluster.
10814        ClusterConfig(std::boxed::Box<crate::model::cluster::ClusterConfig>),
10815    }
10816}
10817
10818/// A configuration object describing how Cloud Bigtable should treat traffic
10819/// from a particular end user application.
10820#[derive(Clone, Default, PartialEq)]
10821#[non_exhaustive]
10822pub struct AppProfile {
10823    /// The unique name of the app profile. Values are of the form
10824    /// `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
10825    pub name: std::string::String,
10826
10827    /// Strongly validated etag for optimistic concurrency control. Preserve the
10828    /// value returned from `GetAppProfile` when calling `UpdateAppProfile` to
10829    /// fail the request if there has been a modification in the mean time. The
10830    /// `update_mask` of the request need not include `etag` for this protection
10831    /// to apply.
10832    /// See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
10833    /// [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
10834    /// details.
10835    pub etag: std::string::String,
10836
10837    /// Long form description of the use case for this AppProfile.
10838    pub description: std::string::String,
10839
10840    /// The routing policy for all read/write requests that use this app profile.
10841    /// A value must be explicitly set.
10842    pub routing_policy: std::option::Option<crate::model::app_profile::RoutingPolicy>,
10843
10844    /// Options for isolating this app profile's traffic from other use cases.
10845    pub isolation: std::option::Option<crate::model::app_profile::Isolation>,
10846
10847    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10848}
10849
10850impl AppProfile {
10851    /// Creates a new default instance.
10852    pub fn new() -> Self {
10853        std::default::Default::default()
10854    }
10855
10856    /// Sets the value of [name][crate::model::AppProfile::name].
10857    ///
10858    /// # Example
10859    /// ```ignore,no_run
10860    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10861    /// # let project_id = "project_id";
10862    /// # let instance_id = "instance_id";
10863    /// # let app_profile_id = "app_profile_id";
10864    /// let x = AppProfile::new().set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"));
10865    /// ```
10866    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10867        self.name = v.into();
10868        self
10869    }
10870
10871    /// Sets the value of [etag][crate::model::AppProfile::etag].
10872    ///
10873    /// # Example
10874    /// ```ignore,no_run
10875    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10876    /// let x = AppProfile::new().set_etag("example");
10877    /// ```
10878    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10879        self.etag = v.into();
10880        self
10881    }
10882
10883    /// Sets the value of [description][crate::model::AppProfile::description].
10884    ///
10885    /// # Example
10886    /// ```ignore,no_run
10887    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10888    /// let x = AppProfile::new().set_description("example");
10889    /// ```
10890    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10891        self.description = v.into();
10892        self
10893    }
10894
10895    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy].
10896    ///
10897    /// Note that all the setters affecting `routing_policy` are mutually
10898    /// exclusive.
10899    ///
10900    /// # Example
10901    /// ```ignore,no_run
10902    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10903    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10904    /// let x = AppProfile::new().set_routing_policy(Some(
10905    ///     google_cloud_bigtable_admin_v2::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(MultiClusterRoutingUseAny::default().into())));
10906    /// ```
10907    pub fn set_routing_policy<
10908        T: std::convert::Into<std::option::Option<crate::model::app_profile::RoutingPolicy>>,
10909    >(
10910        mut self,
10911        v: T,
10912    ) -> Self {
10913        self.routing_policy = v.into();
10914        self
10915    }
10916
10917    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
10918    /// if it holds a `MultiClusterRoutingUseAny`, `None` if the field is not set or
10919    /// holds a different branch.
10920    pub fn multi_cluster_routing_use_any(
10921        &self,
10922    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>
10923    {
10924        #[allow(unreachable_patterns)]
10925        self.routing_policy.as_ref().and_then(|v| match v {
10926            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v) => {
10927                std::option::Option::Some(v)
10928            }
10929            _ => std::option::Option::None,
10930        })
10931    }
10932
10933    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
10934    /// to hold a `MultiClusterRoutingUseAny`.
10935    ///
10936    /// Note that all the setters affecting `routing_policy` are
10937    /// mutually exclusive.
10938    ///
10939    /// # Example
10940    /// ```ignore,no_run
10941    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10942    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10943    /// let x = AppProfile::new().set_multi_cluster_routing_use_any(MultiClusterRoutingUseAny::default()/* use setters */);
10944    /// assert!(x.multi_cluster_routing_use_any().is_some());
10945    /// assert!(x.single_cluster_routing().is_none());
10946    /// ```
10947    pub fn set_multi_cluster_routing_use_any<
10948        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>,
10949    >(
10950        mut self,
10951        v: T,
10952    ) -> Self {
10953        self.routing_policy = std::option::Option::Some(
10954            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v.into()),
10955        );
10956        self
10957    }
10958
10959    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
10960    /// if it holds a `SingleClusterRouting`, `None` if the field is not set or
10961    /// holds a different branch.
10962    pub fn single_cluster_routing(
10963        &self,
10964    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>
10965    {
10966        #[allow(unreachable_patterns)]
10967        self.routing_policy.as_ref().and_then(|v| match v {
10968            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v) => {
10969                std::option::Option::Some(v)
10970            }
10971            _ => std::option::Option::None,
10972        })
10973    }
10974
10975    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
10976    /// to hold a `SingleClusterRouting`.
10977    ///
10978    /// Note that all the setters affecting `routing_policy` are
10979    /// mutually exclusive.
10980    ///
10981    /// # Example
10982    /// ```ignore,no_run
10983    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10984    /// use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
10985    /// let x = AppProfile::new().set_single_cluster_routing(SingleClusterRouting::default()/* use setters */);
10986    /// assert!(x.single_cluster_routing().is_some());
10987    /// assert!(x.multi_cluster_routing_use_any().is_none());
10988    /// ```
10989    pub fn set_single_cluster_routing<
10990        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>,
10991    >(
10992        mut self,
10993        v: T,
10994    ) -> Self {
10995        self.routing_policy = std::option::Option::Some(
10996            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v.into()),
10997        );
10998        self
10999    }
11000
11001    /// Sets the value of [isolation][crate::model::AppProfile::isolation].
11002    ///
11003    /// Note that all the setters affecting `isolation` are mutually
11004    /// exclusive.
11005    ///
11006    /// # Example
11007    /// ```ignore,no_run
11008    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11009    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
11010    /// let x = AppProfile::new().set_isolation(Some(
11011    ///     google_cloud_bigtable_admin_v2::model::app_profile::Isolation::StandardIsolation(StandardIsolation::default().into())));
11012    /// ```
11013    pub fn set_isolation<
11014        T: std::convert::Into<std::option::Option<crate::model::app_profile::Isolation>>,
11015    >(
11016        mut self,
11017        v: T,
11018    ) -> Self {
11019        self.isolation = v.into();
11020        self
11021    }
11022
11023    /// The value of [isolation][crate::model::AppProfile::isolation]
11024    /// if it holds a `Priority`, `None` if the field is not set or
11025    /// holds a different branch.
11026    #[deprecated]
11027    pub fn priority(&self) -> std::option::Option<&crate::model::app_profile::Priority> {
11028        #[allow(unreachable_patterns)]
11029        self.isolation.as_ref().and_then(|v| match v {
11030            crate::model::app_profile::Isolation::Priority(v) => std::option::Option::Some(v),
11031            _ => std::option::Option::None,
11032        })
11033    }
11034
11035    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
11036    /// to hold a `Priority`.
11037    ///
11038    /// Note that all the setters affecting `isolation` are
11039    /// mutually exclusive.
11040    ///
11041    /// # Example
11042    /// ```ignore,no_run
11043    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11044    /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
11045    /// let x0 = AppProfile::new().set_priority(Priority::Low);
11046    /// let x1 = AppProfile::new().set_priority(Priority::Medium);
11047    /// let x2 = AppProfile::new().set_priority(Priority::High);
11048    /// assert!(x0.priority().is_some());
11049    /// assert!(x0.standard_isolation().is_none());
11050    /// assert!(x0.data_boost_isolation_read_only().is_none());
11051    /// assert!(x1.priority().is_some());
11052    /// assert!(x1.standard_isolation().is_none());
11053    /// assert!(x1.data_boost_isolation_read_only().is_none());
11054    /// assert!(x2.priority().is_some());
11055    /// assert!(x2.standard_isolation().is_none());
11056    /// assert!(x2.data_boost_isolation_read_only().is_none());
11057    /// ```
11058    #[deprecated]
11059    pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
11060        mut self,
11061        v: T,
11062    ) -> Self {
11063        self.isolation =
11064            std::option::Option::Some(crate::model::app_profile::Isolation::Priority(v.into()));
11065        self
11066    }
11067
11068    /// The value of [isolation][crate::model::AppProfile::isolation]
11069    /// if it holds a `StandardIsolation`, `None` if the field is not set or
11070    /// holds a different branch.
11071    pub fn standard_isolation(
11072        &self,
11073    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::StandardIsolation>> {
11074        #[allow(unreachable_patterns)]
11075        self.isolation.as_ref().and_then(|v| match v {
11076            crate::model::app_profile::Isolation::StandardIsolation(v) => {
11077                std::option::Option::Some(v)
11078            }
11079            _ => std::option::Option::None,
11080        })
11081    }
11082
11083    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
11084    /// to hold a `StandardIsolation`.
11085    ///
11086    /// Note that all the setters affecting `isolation` are
11087    /// mutually exclusive.
11088    ///
11089    /// # Example
11090    /// ```ignore,no_run
11091    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11092    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
11093    /// let x = AppProfile::new().set_standard_isolation(StandardIsolation::default()/* use setters */);
11094    /// assert!(x.standard_isolation().is_some());
11095    /// assert!(x.priority().is_none());
11096    /// assert!(x.data_boost_isolation_read_only().is_none());
11097    /// ```
11098    pub fn set_standard_isolation<
11099        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::StandardIsolation>>,
11100    >(
11101        mut self,
11102        v: T,
11103    ) -> Self {
11104        self.isolation = std::option::Option::Some(
11105            crate::model::app_profile::Isolation::StandardIsolation(v.into()),
11106        );
11107        self
11108    }
11109
11110    /// The value of [isolation][crate::model::AppProfile::isolation]
11111    /// if it holds a `DataBoostIsolationReadOnly`, `None` if the field is not set or
11112    /// holds a different branch.
11113    pub fn data_boost_isolation_read_only(
11114        &self,
11115    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>
11116    {
11117        #[allow(unreachable_patterns)]
11118        self.isolation.as_ref().and_then(|v| match v {
11119            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v) => {
11120                std::option::Option::Some(v)
11121            }
11122            _ => std::option::Option::None,
11123        })
11124    }
11125
11126    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
11127    /// to hold a `DataBoostIsolationReadOnly`.
11128    ///
11129    /// Note that all the setters affecting `isolation` are
11130    /// mutually exclusive.
11131    ///
11132    /// # Example
11133    /// ```ignore,no_run
11134    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11135    /// use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11136    /// let x = AppProfile::new().set_data_boost_isolation_read_only(DataBoostIsolationReadOnly::default()/* use setters */);
11137    /// assert!(x.data_boost_isolation_read_only().is_some());
11138    /// assert!(x.priority().is_none());
11139    /// assert!(x.standard_isolation().is_none());
11140    /// ```
11141    pub fn set_data_boost_isolation_read_only<
11142        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>,
11143    >(
11144        mut self,
11145        v: T,
11146    ) -> Self {
11147        self.isolation = std::option::Option::Some(
11148            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v.into()),
11149        );
11150        self
11151    }
11152}
11153
11154impl wkt::message::Message for AppProfile {
11155    fn typename() -> &'static str {
11156        "type.googleapis.com/google.bigtable.admin.v2.AppProfile"
11157    }
11158}
11159
11160/// Defines additional types related to [AppProfile].
11161pub mod app_profile {
11162    #[allow(unused_imports)]
11163    use super::*;
11164
11165    /// Read/write requests are routed to the nearest cluster in the instance, and
11166    /// will fail over to the nearest cluster that is available in the event of
11167    /// transient errors or delays. Clusters in a region are considered
11168    /// equidistant. Choosing this option sacrifices read-your-writes consistency
11169    /// to improve availability.
11170    #[derive(Clone, Default, PartialEq)]
11171    #[non_exhaustive]
11172    pub struct MultiClusterRoutingUseAny {
11173        /// The set of clusters to route to. The order is ignored; clusters will be
11174        /// tried in order of distance. If left empty, all clusters are eligible.
11175        pub cluster_ids: std::vec::Vec<std::string::String>,
11176
11177        /// Possible algorithms for routing affinity. If enabled, Bigtable will
11178        /// route between equidistant clusters in a deterministic order rather than
11179        /// choosing randomly.
11180        ///
11181        /// This mechanism gives read-your-writes consistency for *most* requests
11182        /// under *most* circumstances, without sacrificing availability. Consistency
11183        /// is *not* guaranteed, as requests might still fail over between clusters
11184        /// in the event of errors or latency.
11185        pub affinity:
11186            std::option::Option<crate::model::app_profile::multi_cluster_routing_use_any::Affinity>,
11187
11188        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11189    }
11190
11191    impl MultiClusterRoutingUseAny {
11192        /// Creates a new default instance.
11193        pub fn new() -> Self {
11194            std::default::Default::default()
11195        }
11196
11197        /// Sets the value of [cluster_ids][crate::model::app_profile::MultiClusterRoutingUseAny::cluster_ids].
11198        ///
11199        /// # Example
11200        /// ```ignore,no_run
11201        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11202        /// let x = MultiClusterRoutingUseAny::new().set_cluster_ids(["a", "b", "c"]);
11203        /// ```
11204        pub fn set_cluster_ids<T, V>(mut self, v: T) -> Self
11205        where
11206            T: std::iter::IntoIterator<Item = V>,
11207            V: std::convert::Into<std::string::String>,
11208        {
11209            use std::iter::Iterator;
11210            self.cluster_ids = v.into_iter().map(|i| i.into()).collect();
11211            self
11212        }
11213
11214        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity].
11215        ///
11216        /// Note that all the setters affecting `affinity` are mutually
11217        /// exclusive.
11218        ///
11219        /// # Example
11220        /// ```ignore,no_run
11221        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11222        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
11223        /// let x = MultiClusterRoutingUseAny::new().set_affinity(Some(
11224        ///     google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(RowAffinity::default().into())));
11225        /// ```
11226        pub fn set_affinity<
11227            T: std::convert::Into<
11228                    std::option::Option<
11229                        crate::model::app_profile::multi_cluster_routing_use_any::Affinity,
11230                    >,
11231                >,
11232        >(
11233            mut self,
11234            v: T,
11235        ) -> Self {
11236            self.affinity = v.into();
11237            self
11238        }
11239
11240        /// The value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
11241        /// if it holds a `RowAffinity`, `None` if the field is not set or
11242        /// holds a different branch.
11243        pub fn row_affinity(
11244            &self,
11245        ) -> std::option::Option<
11246            &std::boxed::Box<crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity>,
11247        > {
11248            #[allow(unreachable_patterns)]
11249            self.affinity.as_ref().and_then(|v| match v {
11250                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
11251                    v,
11252                ) => std::option::Option::Some(v),
11253                _ => std::option::Option::None,
11254            })
11255        }
11256
11257        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
11258        /// to hold a `RowAffinity`.
11259        ///
11260        /// Note that all the setters affecting `affinity` are
11261        /// mutually exclusive.
11262        ///
11263        /// # Example
11264        /// ```ignore,no_run
11265        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11266        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
11267        /// let x = MultiClusterRoutingUseAny::new().set_row_affinity(RowAffinity::default()/* use setters */);
11268        /// assert!(x.row_affinity().is_some());
11269        /// ```
11270        pub fn set_row_affinity<
11271            T: std::convert::Into<
11272                    std::boxed::Box<
11273                        crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
11274                    >,
11275                >,
11276        >(
11277            mut self,
11278            v: T,
11279        ) -> Self {
11280            self.affinity = std::option::Option::Some(
11281                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
11282                    v.into(),
11283                ),
11284            );
11285            self
11286        }
11287    }
11288
11289    impl wkt::message::Message for MultiClusterRoutingUseAny {
11290        fn typename() -> &'static str {
11291            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny"
11292        }
11293    }
11294
11295    /// Defines additional types related to [MultiClusterRoutingUseAny].
11296    pub mod multi_cluster_routing_use_any {
11297        #[allow(unused_imports)]
11298        use super::*;
11299
11300        /// If enabled, Bigtable will route the request based on the row key of the
11301        /// request, rather than randomly. Instead, each row key will be assigned
11302        /// to a cluster, and will stick to that cluster. If clusters are added or
11303        /// removed, then this may affect which row keys stick to which clusters.
11304        /// To avoid this, users can use a cluster group to specify which clusters
11305        /// are to be used. In this case, new clusters that are not a part of the
11306        /// cluster group will not be routed to, and routing will be unaffected by
11307        /// the new cluster. Moreover, clusters specified in the cluster group cannot
11308        /// be deleted unless removed from the cluster group.
11309        #[derive(Clone, Default, PartialEq)]
11310        #[non_exhaustive]
11311        pub struct RowAffinity {
11312            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11313        }
11314
11315        impl RowAffinity {
11316            /// Creates a new default instance.
11317            pub fn new() -> Self {
11318                std::default::Default::default()
11319            }
11320        }
11321
11322        impl wkt::message::Message for RowAffinity {
11323            fn typename() -> &'static str {
11324                "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity"
11325            }
11326        }
11327
11328        /// Possible algorithms for routing affinity. If enabled, Bigtable will
11329        /// route between equidistant clusters in a deterministic order rather than
11330        /// choosing randomly.
11331        ///
11332        /// This mechanism gives read-your-writes consistency for *most* requests
11333        /// under *most* circumstances, without sacrificing availability. Consistency
11334        /// is *not* guaranteed, as requests might still fail over between clusters
11335        /// in the event of errors or latency.
11336        #[derive(Clone, Debug, PartialEq)]
11337        #[non_exhaustive]
11338        pub enum Affinity {
11339            /// Row affinity sticky routing based on the row key of the request.
11340            /// Requests that span multiple rows are routed non-deterministically.
11341            RowAffinity(
11342                std::boxed::Box<
11343                    crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
11344                >,
11345            ),
11346        }
11347    }
11348
11349    /// Unconditionally routes all read/write requests to a specific cluster.
11350    /// This option preserves read-your-writes consistency but does not improve
11351    /// availability.
11352    #[derive(Clone, Default, PartialEq)]
11353    #[non_exhaustive]
11354    pub struct SingleClusterRouting {
11355        /// The cluster to which read/write requests should be routed.
11356        pub cluster_id: std::string::String,
11357
11358        /// Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
11359        /// allowed by this app profile. It is unsafe to send these requests to
11360        /// the same table/row/column in multiple clusters.
11361        pub allow_transactional_writes: bool,
11362
11363        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11364    }
11365
11366    impl SingleClusterRouting {
11367        /// Creates a new default instance.
11368        pub fn new() -> Self {
11369            std::default::Default::default()
11370        }
11371
11372        /// Sets the value of [cluster_id][crate::model::app_profile::SingleClusterRouting::cluster_id].
11373        ///
11374        /// # Example
11375        /// ```ignore,no_run
11376        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
11377        /// let x = SingleClusterRouting::new().set_cluster_id("example");
11378        /// ```
11379        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11380            self.cluster_id = v.into();
11381            self
11382        }
11383
11384        /// Sets the value of [allow_transactional_writes][crate::model::app_profile::SingleClusterRouting::allow_transactional_writes].
11385        ///
11386        /// # Example
11387        /// ```ignore,no_run
11388        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
11389        /// let x = SingleClusterRouting::new().set_allow_transactional_writes(true);
11390        /// ```
11391        pub fn set_allow_transactional_writes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11392            self.allow_transactional_writes = v.into();
11393            self
11394        }
11395    }
11396
11397    impl wkt::message::Message for SingleClusterRouting {
11398        fn typename() -> &'static str {
11399            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.SingleClusterRouting"
11400        }
11401    }
11402
11403    /// Standard options for isolating this app profile's traffic from other use
11404    /// cases.
11405    #[derive(Clone, Default, PartialEq)]
11406    #[non_exhaustive]
11407    pub struct StandardIsolation {
11408        /// The priority of requests sent using this app profile.
11409        pub priority: crate::model::app_profile::Priority,
11410
11411        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11412    }
11413
11414    impl StandardIsolation {
11415        /// Creates a new default instance.
11416        pub fn new() -> Self {
11417            std::default::Default::default()
11418        }
11419
11420        /// Sets the value of [priority][crate::model::app_profile::StandardIsolation::priority].
11421        ///
11422        /// # Example
11423        /// ```ignore,no_run
11424        /// # use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
11425        /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
11426        /// let x0 = StandardIsolation::new().set_priority(Priority::Low);
11427        /// let x1 = StandardIsolation::new().set_priority(Priority::Medium);
11428        /// let x2 = StandardIsolation::new().set_priority(Priority::High);
11429        /// ```
11430        pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
11431            mut self,
11432            v: T,
11433        ) -> Self {
11434            self.priority = v.into();
11435            self
11436        }
11437    }
11438
11439    impl wkt::message::Message for StandardIsolation {
11440        fn typename() -> &'static str {
11441            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.StandardIsolation"
11442        }
11443    }
11444
11445    /// Data Boost is a serverless compute capability that lets you run
11446    /// high-throughput read jobs and queries on your Bigtable data, without
11447    /// impacting the performance of the clusters that handle your application
11448    /// traffic. Data Boost supports read-only use cases with single-cluster
11449    /// routing.
11450    #[derive(Clone, Default, PartialEq)]
11451    #[non_exhaustive]
11452    pub struct DataBoostIsolationReadOnly {
11453        /// The Compute Billing Owner for this Data Boost App Profile.
11454        pub compute_billing_owner: std::option::Option<
11455            crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11456        >,
11457
11458        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11459    }
11460
11461    impl DataBoostIsolationReadOnly {
11462        /// Creates a new default instance.
11463        pub fn new() -> Self {
11464            std::default::Default::default()
11465        }
11466
11467        /// Sets the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
11468        ///
11469        /// # Example
11470        /// ```ignore,no_run
11471        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11472        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
11473        /// let x0 = DataBoostIsolationReadOnly::new().set_compute_billing_owner(ComputeBillingOwner::HostPays);
11474        /// ```
11475        pub fn set_compute_billing_owner<T>(mut self, v: T) -> Self
11476        where
11477            T: std::convert::Into<
11478                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11479                >,
11480        {
11481            self.compute_billing_owner = std::option::Option::Some(v.into());
11482            self
11483        }
11484
11485        /// Sets or clears the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
11486        ///
11487        /// # Example
11488        /// ```ignore,no_run
11489        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11490        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
11491        /// let x0 = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(Some(ComputeBillingOwner::HostPays));
11492        /// let x_none = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(None::<ComputeBillingOwner>);
11493        /// ```
11494        pub fn set_or_clear_compute_billing_owner<T>(mut self, v: std::option::Option<T>) -> Self
11495        where
11496            T: std::convert::Into<
11497                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11498                >,
11499        {
11500            self.compute_billing_owner = v.map(|x| x.into());
11501            self
11502        }
11503    }
11504
11505    impl wkt::message::Message for DataBoostIsolationReadOnly {
11506        fn typename() -> &'static str {
11507            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly"
11508        }
11509    }
11510
11511    /// Defines additional types related to [DataBoostIsolationReadOnly].
11512    pub mod data_boost_isolation_read_only {
11513        #[allow(unused_imports)]
11514        use super::*;
11515
11516        /// Compute Billing Owner specifies how usage should be accounted when using
11517        /// Data Boost. Compute Billing Owner also configures which Cloud Project is
11518        /// charged for relevant quota.
11519        ///
11520        /// # Working with unknown values
11521        ///
11522        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11523        /// additional enum variants at any time. Adding new variants is not considered
11524        /// a breaking change. Applications should write their code in anticipation of:
11525        ///
11526        /// - New values appearing in future releases of the client library, **and**
11527        /// - New values received dynamically, without application changes.
11528        ///
11529        /// Please consult the [Working with enums] section in the user guide for some
11530        /// guidelines.
11531        ///
11532        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11533        #[derive(Clone, Debug, PartialEq)]
11534        #[non_exhaustive]
11535        pub enum ComputeBillingOwner {
11536            /// Unspecified value.
11537            Unspecified,
11538            /// The host Cloud Project containing the targeted Bigtable Instance /
11539            /// Table pays for compute.
11540            HostPays,
11541            /// If set, the enum was initialized with an unknown value.
11542            ///
11543            /// Applications can examine the value using [ComputeBillingOwner::value] or
11544            /// [ComputeBillingOwner::name].
11545            UnknownValue(compute_billing_owner::UnknownValue),
11546        }
11547
11548        #[doc(hidden)]
11549        pub mod compute_billing_owner {
11550            #[allow(unused_imports)]
11551            use super::*;
11552            #[derive(Clone, Debug, PartialEq)]
11553            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11554        }
11555
11556        impl ComputeBillingOwner {
11557            /// Gets the enum value.
11558            ///
11559            /// Returns `None` if the enum contains an unknown value deserialized from
11560            /// the string representation of enums.
11561            pub fn value(&self) -> std::option::Option<i32> {
11562                match self {
11563                    Self::Unspecified => std::option::Option::Some(0),
11564                    Self::HostPays => std::option::Option::Some(1),
11565                    Self::UnknownValue(u) => u.0.value(),
11566                }
11567            }
11568
11569            /// Gets the enum value as a string.
11570            ///
11571            /// Returns `None` if the enum contains an unknown value deserialized from
11572            /// the integer representation of enums.
11573            pub fn name(&self) -> std::option::Option<&str> {
11574                match self {
11575                    Self::Unspecified => {
11576                        std::option::Option::Some("COMPUTE_BILLING_OWNER_UNSPECIFIED")
11577                    }
11578                    Self::HostPays => std::option::Option::Some("HOST_PAYS"),
11579                    Self::UnknownValue(u) => u.0.name(),
11580                }
11581            }
11582        }
11583
11584        impl std::default::Default for ComputeBillingOwner {
11585            fn default() -> Self {
11586                use std::convert::From;
11587                Self::from(0)
11588            }
11589        }
11590
11591        impl std::fmt::Display for ComputeBillingOwner {
11592            fn fmt(
11593                &self,
11594                f: &mut std::fmt::Formatter<'_>,
11595            ) -> std::result::Result<(), std::fmt::Error> {
11596                wkt::internal::display_enum(f, self.name(), self.value())
11597            }
11598        }
11599
11600        impl std::convert::From<i32> for ComputeBillingOwner {
11601            fn from(value: i32) -> Self {
11602                match value {
11603                    0 => Self::Unspecified,
11604                    1 => Self::HostPays,
11605                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
11606                        wkt::internal::UnknownEnumValue::Integer(value),
11607                    )),
11608                }
11609            }
11610        }
11611
11612        impl std::convert::From<&str> for ComputeBillingOwner {
11613            fn from(value: &str) -> Self {
11614                use std::string::ToString;
11615                match value {
11616                    "COMPUTE_BILLING_OWNER_UNSPECIFIED" => Self::Unspecified,
11617                    "HOST_PAYS" => Self::HostPays,
11618                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
11619                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11620                    )),
11621                }
11622            }
11623        }
11624
11625        impl serde::ser::Serialize for ComputeBillingOwner {
11626            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11627            where
11628                S: serde::Serializer,
11629            {
11630                match self {
11631                    Self::Unspecified => serializer.serialize_i32(0),
11632                    Self::HostPays => serializer.serialize_i32(1),
11633                    Self::UnknownValue(u) => u.0.serialize(serializer),
11634                }
11635            }
11636        }
11637
11638        impl<'de> serde::de::Deserialize<'de> for ComputeBillingOwner {
11639            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11640            where
11641                D: serde::Deserializer<'de>,
11642            {
11643                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComputeBillingOwner>::new(
11644                    ".google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner"))
11645            }
11646        }
11647    }
11648
11649    /// Possible priorities for an app profile. Note that higher priority writes
11650    /// can sometimes queue behind lower priority writes to the same tablet, as
11651    /// writes must be strictly sequenced in the durability log.
11652    ///
11653    /// # Working with unknown values
11654    ///
11655    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11656    /// additional enum variants at any time. Adding new variants is not considered
11657    /// a breaking change. Applications should write their code in anticipation of:
11658    ///
11659    /// - New values appearing in future releases of the client library, **and**
11660    /// - New values received dynamically, without application changes.
11661    ///
11662    /// Please consult the [Working with enums] section in the user guide for some
11663    /// guidelines.
11664    ///
11665    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11666    #[derive(Clone, Debug, PartialEq)]
11667    #[non_exhaustive]
11668    pub enum Priority {
11669        /// Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation.
11670        Unspecified,
11671        #[allow(missing_docs)]
11672        Low,
11673        #[allow(missing_docs)]
11674        Medium,
11675        #[allow(missing_docs)]
11676        High,
11677        /// If set, the enum was initialized with an unknown value.
11678        ///
11679        /// Applications can examine the value using [Priority::value] or
11680        /// [Priority::name].
11681        UnknownValue(priority::UnknownValue),
11682    }
11683
11684    #[doc(hidden)]
11685    pub mod priority {
11686        #[allow(unused_imports)]
11687        use super::*;
11688        #[derive(Clone, Debug, PartialEq)]
11689        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11690    }
11691
11692    impl Priority {
11693        /// Gets the enum value.
11694        ///
11695        /// Returns `None` if the enum contains an unknown value deserialized from
11696        /// the string representation of enums.
11697        pub fn value(&self) -> std::option::Option<i32> {
11698            match self {
11699                Self::Unspecified => std::option::Option::Some(0),
11700                Self::Low => std::option::Option::Some(1),
11701                Self::Medium => std::option::Option::Some(2),
11702                Self::High => std::option::Option::Some(3),
11703                Self::UnknownValue(u) => u.0.value(),
11704            }
11705        }
11706
11707        /// Gets the enum value as a string.
11708        ///
11709        /// Returns `None` if the enum contains an unknown value deserialized from
11710        /// the integer representation of enums.
11711        pub fn name(&self) -> std::option::Option<&str> {
11712            match self {
11713                Self::Unspecified => std::option::Option::Some("PRIORITY_UNSPECIFIED"),
11714                Self::Low => std::option::Option::Some("PRIORITY_LOW"),
11715                Self::Medium => std::option::Option::Some("PRIORITY_MEDIUM"),
11716                Self::High => std::option::Option::Some("PRIORITY_HIGH"),
11717                Self::UnknownValue(u) => u.0.name(),
11718            }
11719        }
11720    }
11721
11722    impl std::default::Default for Priority {
11723        fn default() -> Self {
11724            use std::convert::From;
11725            Self::from(0)
11726        }
11727    }
11728
11729    impl std::fmt::Display for Priority {
11730        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11731            wkt::internal::display_enum(f, self.name(), self.value())
11732        }
11733    }
11734
11735    impl std::convert::From<i32> for Priority {
11736        fn from(value: i32) -> Self {
11737            match value {
11738                0 => Self::Unspecified,
11739                1 => Self::Low,
11740                2 => Self::Medium,
11741                3 => Self::High,
11742                _ => Self::UnknownValue(priority::UnknownValue(
11743                    wkt::internal::UnknownEnumValue::Integer(value),
11744                )),
11745            }
11746        }
11747    }
11748
11749    impl std::convert::From<&str> for Priority {
11750        fn from(value: &str) -> Self {
11751            use std::string::ToString;
11752            match value {
11753                "PRIORITY_UNSPECIFIED" => Self::Unspecified,
11754                "PRIORITY_LOW" => Self::Low,
11755                "PRIORITY_MEDIUM" => Self::Medium,
11756                "PRIORITY_HIGH" => Self::High,
11757                _ => Self::UnknownValue(priority::UnknownValue(
11758                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11759                )),
11760            }
11761        }
11762    }
11763
11764    impl serde::ser::Serialize for Priority {
11765        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11766        where
11767            S: serde::Serializer,
11768        {
11769            match self {
11770                Self::Unspecified => serializer.serialize_i32(0),
11771                Self::Low => serializer.serialize_i32(1),
11772                Self::Medium => serializer.serialize_i32(2),
11773                Self::High => serializer.serialize_i32(3),
11774                Self::UnknownValue(u) => u.0.serialize(serializer),
11775            }
11776        }
11777    }
11778
11779    impl<'de> serde::de::Deserialize<'de> for Priority {
11780        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11781        where
11782            D: serde::Deserializer<'de>,
11783        {
11784            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Priority>::new(
11785                ".google.bigtable.admin.v2.AppProfile.Priority",
11786            ))
11787        }
11788    }
11789
11790    /// The routing policy for all read/write requests that use this app profile.
11791    /// A value must be explicitly set.
11792    #[derive(Clone, Debug, PartialEq)]
11793    #[non_exhaustive]
11794    pub enum RoutingPolicy {
11795        /// Use a multi-cluster routing policy.
11796        MultiClusterRoutingUseAny(
11797            std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>,
11798        ),
11799        /// Use a single-cluster routing policy.
11800        SingleClusterRouting(std::boxed::Box<crate::model::app_profile::SingleClusterRouting>),
11801    }
11802
11803    /// Options for isolating this app profile's traffic from other use cases.
11804    #[derive(Clone, Debug, PartialEq)]
11805    #[non_exhaustive]
11806    pub enum Isolation {
11807        /// This field has been deprecated in favor of `standard_isolation.priority`.
11808        /// If you set this field, `standard_isolation.priority` will be set instead.
11809        ///
11810        /// The priority of requests sent using this app profile.
11811        #[deprecated]
11812        Priority(crate::model::app_profile::Priority),
11813        /// The standard options used for isolating this app profile's traffic from
11814        /// other use cases.
11815        StandardIsolation(std::boxed::Box<crate::model::app_profile::StandardIsolation>),
11816        /// Specifies that this app profile is intended for read-only usage via the
11817        /// Data Boost feature.
11818        DataBoostIsolationReadOnly(
11819            std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>,
11820        ),
11821    }
11822}
11823
11824/// A tablet is a defined by a start and end key and is explained in
11825/// <https://cloud.google.com/bigtable/docs/overview#architecture> and
11826/// <https://cloud.google.com/bigtable/docs/performance#optimization>.
11827/// A Hot tablet is a tablet that exhibits high average cpu usage during the time
11828/// interval from start time to end time.
11829#[derive(Clone, Default, PartialEq)]
11830#[non_exhaustive]
11831pub struct HotTablet {
11832    /// The unique name of the hot tablet. Values are of the form
11833    /// `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`.
11834    pub name: std::string::String,
11835
11836    /// Name of the table that contains the tablet. Values are of the form
11837    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
11838    pub table_name: std::string::String,
11839
11840    /// Output only. The start time of the hot tablet.
11841    pub start_time: std::option::Option<wkt::Timestamp>,
11842
11843    /// Output only. The end time of the hot tablet.
11844    pub end_time: std::option::Option<wkt::Timestamp>,
11845
11846    /// Tablet Start Key (inclusive).
11847    pub start_key: std::string::String,
11848
11849    /// Tablet End Key (inclusive).
11850    pub end_key: std::string::String,
11851
11852    /// Output only. The average CPU usage spent by a node on this tablet over the
11853    /// start_time to end_time time range. The percentage is the amount of CPU used
11854    /// by the node to serve the tablet, from 0% (tablet was not interacted with)
11855    /// to 100% (the node spent all cycles serving the hot tablet).
11856    pub node_cpu_usage_percent: f32,
11857
11858    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11859}
11860
11861impl HotTablet {
11862    /// Creates a new default instance.
11863    pub fn new() -> Self {
11864        std::default::Default::default()
11865    }
11866
11867    /// Sets the value of [name][crate::model::HotTablet::name].
11868    ///
11869    /// # Example
11870    /// ```ignore,no_run
11871    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11872    /// # let project_id = "project_id";
11873    /// # let instance_id = "instance_id";
11874    /// # let cluster_id = "cluster_id";
11875    /// # let hot_tablet_id = "hot_tablet_id";
11876    /// let x = HotTablet::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/hotTablets/{hot_tablet_id}"));
11877    /// ```
11878    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11879        self.name = v.into();
11880        self
11881    }
11882
11883    /// Sets the value of [table_name][crate::model::HotTablet::table_name].
11884    ///
11885    /// # Example
11886    /// ```ignore,no_run
11887    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11888    /// # let project_id = "project_id";
11889    /// # let instance_id = "instance_id";
11890    /// # let table_id = "table_id";
11891    /// let x = HotTablet::new().set_table_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
11892    /// ```
11893    pub fn set_table_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11894        self.table_name = v.into();
11895        self
11896    }
11897
11898    /// Sets the value of [start_time][crate::model::HotTablet::start_time].
11899    ///
11900    /// # Example
11901    /// ```ignore,no_run
11902    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11903    /// use wkt::Timestamp;
11904    /// let x = HotTablet::new().set_start_time(Timestamp::default()/* use setters */);
11905    /// ```
11906    pub fn set_start_time<T>(mut self, v: T) -> Self
11907    where
11908        T: std::convert::Into<wkt::Timestamp>,
11909    {
11910        self.start_time = std::option::Option::Some(v.into());
11911        self
11912    }
11913
11914    /// Sets or clears the value of [start_time][crate::model::HotTablet::start_time].
11915    ///
11916    /// # Example
11917    /// ```ignore,no_run
11918    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11919    /// use wkt::Timestamp;
11920    /// let x = HotTablet::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
11921    /// let x = HotTablet::new().set_or_clear_start_time(None::<Timestamp>);
11922    /// ```
11923    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
11924    where
11925        T: std::convert::Into<wkt::Timestamp>,
11926    {
11927        self.start_time = v.map(|x| x.into());
11928        self
11929    }
11930
11931    /// Sets the value of [end_time][crate::model::HotTablet::end_time].
11932    ///
11933    /// # Example
11934    /// ```ignore,no_run
11935    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11936    /// use wkt::Timestamp;
11937    /// let x = HotTablet::new().set_end_time(Timestamp::default()/* use setters */);
11938    /// ```
11939    pub fn set_end_time<T>(mut self, v: T) -> Self
11940    where
11941        T: std::convert::Into<wkt::Timestamp>,
11942    {
11943        self.end_time = std::option::Option::Some(v.into());
11944        self
11945    }
11946
11947    /// Sets or clears the value of [end_time][crate::model::HotTablet::end_time].
11948    ///
11949    /// # Example
11950    /// ```ignore,no_run
11951    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11952    /// use wkt::Timestamp;
11953    /// let x = HotTablet::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
11954    /// let x = HotTablet::new().set_or_clear_end_time(None::<Timestamp>);
11955    /// ```
11956    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
11957    where
11958        T: std::convert::Into<wkt::Timestamp>,
11959    {
11960        self.end_time = v.map(|x| x.into());
11961        self
11962    }
11963
11964    /// Sets the value of [start_key][crate::model::HotTablet::start_key].
11965    ///
11966    /// # Example
11967    /// ```ignore,no_run
11968    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11969    /// let x = HotTablet::new().set_start_key("example");
11970    /// ```
11971    pub fn set_start_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11972        self.start_key = v.into();
11973        self
11974    }
11975
11976    /// Sets the value of [end_key][crate::model::HotTablet::end_key].
11977    ///
11978    /// # Example
11979    /// ```ignore,no_run
11980    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11981    /// let x = HotTablet::new().set_end_key("example");
11982    /// ```
11983    pub fn set_end_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11984        self.end_key = v.into();
11985        self
11986    }
11987
11988    /// Sets the value of [node_cpu_usage_percent][crate::model::HotTablet::node_cpu_usage_percent].
11989    ///
11990    /// # Example
11991    /// ```ignore,no_run
11992    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11993    /// let x = HotTablet::new().set_node_cpu_usage_percent(42.0);
11994    /// ```
11995    pub fn set_node_cpu_usage_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
11996        self.node_cpu_usage_percent = v.into();
11997        self
11998    }
11999}
12000
12001impl wkt::message::Message for HotTablet {
12002    fn typename() -> &'static str {
12003        "type.googleapis.com/google.bigtable.admin.v2.HotTablet"
12004    }
12005}
12006
12007/// A SQL logical view object that can be referenced in SQL queries.
12008#[derive(Clone, Default, PartialEq)]
12009#[non_exhaustive]
12010pub struct LogicalView {
12011    /// Identifier. The unique name of the logical view.
12012    /// Format:
12013    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
12014    pub name: std::string::String,
12015
12016    /// Required. The logical view's select query.
12017    pub query: std::string::String,
12018
12019    /// Optional. The etag for this logical view.
12020    /// This may be sent on update requests to ensure that the client has an
12021    /// up-to-date value before proceeding. The server returns an ABORTED error on
12022    /// a mismatched etag.
12023    pub etag: std::string::String,
12024
12025    /// Optional. Set to true to make the LogicalView protected against deletion.
12026    pub deletion_protection: bool,
12027
12028    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12029}
12030
12031impl LogicalView {
12032    /// Creates a new default instance.
12033    pub fn new() -> Self {
12034        std::default::Default::default()
12035    }
12036
12037    /// Sets the value of [name][crate::model::LogicalView::name].
12038    ///
12039    /// # Example
12040    /// ```ignore,no_run
12041    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12042    /// # let project_id = "project_id";
12043    /// # let instance_id = "instance_id";
12044    /// # let logical_view_id = "logical_view_id";
12045    /// let x = LogicalView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"));
12046    /// ```
12047    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12048        self.name = v.into();
12049        self
12050    }
12051
12052    /// Sets the value of [query][crate::model::LogicalView::query].
12053    ///
12054    /// # Example
12055    /// ```ignore,no_run
12056    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12057    /// let x = LogicalView::new().set_query("example");
12058    /// ```
12059    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12060        self.query = v.into();
12061        self
12062    }
12063
12064    /// Sets the value of [etag][crate::model::LogicalView::etag].
12065    ///
12066    /// # Example
12067    /// ```ignore,no_run
12068    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12069    /// let x = LogicalView::new().set_etag("example");
12070    /// ```
12071    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12072        self.etag = v.into();
12073        self
12074    }
12075
12076    /// Sets the value of [deletion_protection][crate::model::LogicalView::deletion_protection].
12077    ///
12078    /// # Example
12079    /// ```ignore,no_run
12080    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12081    /// let x = LogicalView::new().set_deletion_protection(true);
12082    /// ```
12083    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12084        self.deletion_protection = v.into();
12085        self
12086    }
12087}
12088
12089impl wkt::message::Message for LogicalView {
12090    fn typename() -> &'static str {
12091        "type.googleapis.com/google.bigtable.admin.v2.LogicalView"
12092    }
12093}
12094
12095/// A materialized view object that can be referenced in SQL queries.
12096#[derive(Clone, Default, PartialEq)]
12097#[non_exhaustive]
12098pub struct MaterializedView {
12099    /// Identifier. The unique name of the materialized view.
12100    /// Format:
12101    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
12102    pub name: std::string::String,
12103
12104    /// Required. Immutable. The materialized view's select query.
12105    pub query: std::string::String,
12106
12107    /// Optional. The etag for this materialized view.
12108    /// This may be sent on update requests to ensure that the client has an
12109    /// up-to-date value before proceeding. The server returns an ABORTED error on
12110    /// a mismatched etag.
12111    pub etag: std::string::String,
12112
12113    /// Set to true to make the MaterializedView protected against deletion.
12114    pub deletion_protection: bool,
12115
12116    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12117}
12118
12119impl MaterializedView {
12120    /// Creates a new default instance.
12121    pub fn new() -> Self {
12122        std::default::Default::default()
12123    }
12124
12125    /// Sets the value of [name][crate::model::MaterializedView::name].
12126    ///
12127    /// # Example
12128    /// ```ignore,no_run
12129    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12130    /// # let project_id = "project_id";
12131    /// # let instance_id = "instance_id";
12132    /// # let materialized_view_id = "materialized_view_id";
12133    /// let x = MaterializedView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"));
12134    /// ```
12135    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12136        self.name = v.into();
12137        self
12138    }
12139
12140    /// Sets the value of [query][crate::model::MaterializedView::query].
12141    ///
12142    /// # Example
12143    /// ```ignore,no_run
12144    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12145    /// let x = MaterializedView::new().set_query("example");
12146    /// ```
12147    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12148        self.query = v.into();
12149        self
12150    }
12151
12152    /// Sets the value of [etag][crate::model::MaterializedView::etag].
12153    ///
12154    /// # Example
12155    /// ```ignore,no_run
12156    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12157    /// let x = MaterializedView::new().set_etag("example");
12158    /// ```
12159    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12160        self.etag = v.into();
12161        self
12162    }
12163
12164    /// Sets the value of [deletion_protection][crate::model::MaterializedView::deletion_protection].
12165    ///
12166    /// # Example
12167    /// ```ignore,no_run
12168    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12169    /// let x = MaterializedView::new().set_deletion_protection(true);
12170    /// ```
12171    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12172        self.deletion_protection = v.into();
12173        self
12174    }
12175}
12176
12177impl wkt::message::Message for MaterializedView {
12178    fn typename() -> &'static str {
12179        "type.googleapis.com/google.bigtable.admin.v2.MaterializedView"
12180    }
12181}
12182
12183/// Information about a table restore.
12184#[derive(Clone, Default, PartialEq)]
12185#[non_exhaustive]
12186pub struct RestoreInfo {
12187    /// The type of the restore source.
12188    pub source_type: crate::model::RestoreSourceType,
12189
12190    /// Information about the source used to restore the table.
12191    pub source_info: std::option::Option<crate::model::restore_info::SourceInfo>,
12192
12193    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12194}
12195
12196impl RestoreInfo {
12197    /// Creates a new default instance.
12198    pub fn new() -> Self {
12199        std::default::Default::default()
12200    }
12201
12202    /// Sets the value of [source_type][crate::model::RestoreInfo::source_type].
12203    ///
12204    /// # Example
12205    /// ```ignore,no_run
12206    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12207    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
12208    /// let x0 = RestoreInfo::new().set_source_type(RestoreSourceType::Backup);
12209    /// ```
12210    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
12211        mut self,
12212        v: T,
12213    ) -> Self {
12214        self.source_type = v.into();
12215        self
12216    }
12217
12218    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info].
12219    ///
12220    /// Note that all the setters affecting `source_info` are mutually
12221    /// exclusive.
12222    ///
12223    /// # Example
12224    /// ```ignore,no_run
12225    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12226    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
12227    /// let x = RestoreInfo::new().set_source_info(Some(
12228    ///     google_cloud_bigtable_admin_v2::model::restore_info::SourceInfo::BackupInfo(BackupInfo::default().into())));
12229    /// ```
12230    pub fn set_source_info<
12231        T: std::convert::Into<std::option::Option<crate::model::restore_info::SourceInfo>>,
12232    >(
12233        mut self,
12234        v: T,
12235    ) -> Self {
12236        self.source_info = v.into();
12237        self
12238    }
12239
12240    /// The value of [source_info][crate::model::RestoreInfo::source_info]
12241    /// if it holds a `BackupInfo`, `None` if the field is not set or
12242    /// holds a different branch.
12243    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
12244        #[allow(unreachable_patterns)]
12245        self.source_info.as_ref().and_then(|v| match v {
12246            crate::model::restore_info::SourceInfo::BackupInfo(v) => std::option::Option::Some(v),
12247            _ => std::option::Option::None,
12248        })
12249    }
12250
12251    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info]
12252    /// to hold a `BackupInfo`.
12253    ///
12254    /// Note that all the setters affecting `source_info` are
12255    /// mutually exclusive.
12256    ///
12257    /// # Example
12258    /// ```ignore,no_run
12259    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12260    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
12261    /// let x = RestoreInfo::new().set_backup_info(BackupInfo::default()/* use setters */);
12262    /// assert!(x.backup_info().is_some());
12263    /// ```
12264    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
12265        mut self,
12266        v: T,
12267    ) -> Self {
12268        self.source_info =
12269            std::option::Option::Some(crate::model::restore_info::SourceInfo::BackupInfo(v.into()));
12270        self
12271    }
12272}
12273
12274impl wkt::message::Message for RestoreInfo {
12275    fn typename() -> &'static str {
12276        "type.googleapis.com/google.bigtable.admin.v2.RestoreInfo"
12277    }
12278}
12279
12280/// Defines additional types related to [RestoreInfo].
12281pub mod restore_info {
12282    #[allow(unused_imports)]
12283    use super::*;
12284
12285    /// Information about the source used to restore the table.
12286    #[derive(Clone, Debug, PartialEq)]
12287    #[non_exhaustive]
12288    pub enum SourceInfo {
12289        /// Information about the backup used to restore the table. The backup
12290        /// may no longer exist.
12291        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
12292    }
12293}
12294
12295/// Change stream configuration.
12296#[derive(Clone, Default, PartialEq)]
12297#[non_exhaustive]
12298pub struct ChangeStreamConfig {
12299    /// How long the change stream should be retained. Change stream data older
12300    /// than the retention period will not be returned when reading the change
12301    /// stream from the table.
12302    /// Values must be at least 1 day and at most 7 days, and will be truncated to
12303    /// microsecond granularity.
12304    pub retention_period: std::option::Option<wkt::Duration>,
12305
12306    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12307}
12308
12309impl ChangeStreamConfig {
12310    /// Creates a new default instance.
12311    pub fn new() -> Self {
12312        std::default::Default::default()
12313    }
12314
12315    /// Sets the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
12316    ///
12317    /// # Example
12318    /// ```ignore,no_run
12319    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12320    /// use wkt::Duration;
12321    /// let x = ChangeStreamConfig::new().set_retention_period(Duration::default()/* use setters */);
12322    /// ```
12323    pub fn set_retention_period<T>(mut self, v: T) -> Self
12324    where
12325        T: std::convert::Into<wkt::Duration>,
12326    {
12327        self.retention_period = std::option::Option::Some(v.into());
12328        self
12329    }
12330
12331    /// Sets or clears the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
12332    ///
12333    /// # Example
12334    /// ```ignore,no_run
12335    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12336    /// use wkt::Duration;
12337    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
12338    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(None::<Duration>);
12339    /// ```
12340    pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
12341    where
12342        T: std::convert::Into<wkt::Duration>,
12343    {
12344        self.retention_period = v.map(|x| x.into());
12345        self
12346    }
12347}
12348
12349impl wkt::message::Message for ChangeStreamConfig {
12350    fn typename() -> &'static str {
12351        "type.googleapis.com/google.bigtable.admin.v2.ChangeStreamConfig"
12352    }
12353}
12354
12355/// A collection of user data indexed by row, column, and timestamp.
12356/// Each table is served using the resources of its parent cluster.
12357#[derive(Clone, Default, PartialEq)]
12358#[non_exhaustive]
12359pub struct Table {
12360    /// The unique name of the table. Values are of the form
12361    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
12362    /// Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
12363    pub name: std::string::String,
12364
12365    /// Output only. Map from cluster ID to per-cluster table state.
12366    /// If it could not be determined whether or not the table has data in a
12367    /// particular cluster (for example, if its zone is unavailable), then
12368    /// there will be an entry for the cluster with UNKNOWN `replication_status`.
12369    /// Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
12370    pub cluster_states:
12371        std::collections::HashMap<std::string::String, crate::model::table::ClusterState>,
12372
12373    /// The column families configured for this table, mapped by column family ID.
12374    /// Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
12375    pub column_families: std::collections::HashMap<std::string::String, crate::model::ColumnFamily>,
12376
12377    /// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
12378    /// in this table. Timestamps not matching the granularity will be rejected. If
12379    /// unspecified at creation time, the value will be set to `MILLIS`. Views:
12380    /// `SCHEMA_VIEW`, `FULL`.
12381    pub granularity: crate::model::table::TimestampGranularity,
12382
12383    /// Output only. If this table was restored from another data source (e.g. a
12384    /// backup), this field will be populated with information about the restore.
12385    pub restore_info: std::option::Option<crate::model::RestoreInfo>,
12386
12387    /// If specified, enable the change stream on this table.
12388    /// Otherwise, the change stream is disabled and the change stream is not
12389    /// retained.
12390    pub change_stream_config: std::option::Option<crate::model::ChangeStreamConfig>,
12391
12392    /// Set to true to make the table protected against data loss. i.e. deleting
12393    /// the following resources through Admin APIs are prohibited:
12394    ///
12395    /// * The table.
12396    /// * The column families in the table.
12397    /// * The instance containing the table.
12398    ///
12399    /// Note one can still delete the data stored in the table through Data APIs.
12400    pub deletion_protection: bool,
12401
12402    /// Rules to specify what data is stored in each storage tier.
12403    /// Different tiers store data differently, providing different trade-offs
12404    /// between cost and performance. Different parts of a table can be stored
12405    /// separately on different tiers.
12406    /// If a config is specified, tiered storage is enabled for this table.
12407    /// Otherwise, tiered storage is disabled.
12408    /// Only SSD instances can configure tiered storage.
12409    pub tiered_storage_config: std::option::Option<crate::model::TieredStorageConfig>,
12410
12411    /// The row key schema for this table. The schema is used to decode the raw row
12412    /// key bytes into a structured format. The order of field declarations in this
12413    /// schema is important, as it reflects how the raw row key bytes are
12414    /// structured. Currently, this only affects how the key is read via a
12415    /// GoogleSQL query from the ExecuteQuery API.
12416    ///
12417    /// For a SQL query, the _key column is still read as raw bytes. But queries
12418    /// can reference the key fields by name, which will be decoded from _key using
12419    /// provided type and encoding. Queries that reference key fields will fail if
12420    /// they encounter an invalid row key.
12421    ///
12422    /// For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
12423    /// following schema:
12424    /// {
12425    /// fields {
12426    /// field_name: "id"
12427    /// type { string { encoding: utf8_bytes {} } }
12428    /// }
12429    /// fields {
12430    /// field_name: "date"
12431    /// type { string { encoding: utf8_bytes {} } }
12432    /// }
12433    /// fields {
12434    /// field_name: "product_code"
12435    /// type { int64 { encoding: big_endian_bytes {} } }
12436    /// }
12437    /// encoding { delimited_bytes { delimiter: "#" } }
12438    /// }
12439    ///
12440    /// The decoded key parts would be:
12441    /// id = "some_id", date = "2024-04-30", product_code = 1245427
12442    /// The query "SELECT _key, product_code FROM table" will return two columns:
12443    /// /------------------------------------------------------\
12444    /// |              _key                     | product_code |
12445    /// | --------------------------------------|--------------|
12446    /// | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
12447    /// \------------------------------------------------------/
12448    ///
12449    /// The schema has the following invariants:
12450    /// (1) The decoded field values are order-preserved. For read, the field
12451    /// values will be decoded in sorted mode from the raw bytes.
12452    /// (2) Every field in the schema must specify a non-empty name.
12453    /// (3) Every field must specify a type with an associated encoding. The type
12454    /// is limited to scalar types only: Array, Map, Aggregate, and Struct are not
12455    /// allowed.
12456    /// (4) The field names must not collide with existing column family
12457    /// names and reserved keywords "_key" and "_timestamp".
12458    ///
12459    /// The following update operations are allowed for row_key_schema:
12460    ///
12461    /// - Update from an empty schema to a new schema.
12462    /// - Remove the existing schema. This operation requires setting the
12463    ///   `ignore_warnings` flag to `true`, since it might be a backward
12464    ///   incompatible change. Without the flag, the update request will fail with
12465    ///   an INVALID_ARGUMENT error.
12466    ///   Any other row key schema update operation (e.g. update existing schema
12467    ///   columns names or types) is currently unsupported.
12468    pub row_key_schema: std::option::Option<crate::model::r#type::Struct>,
12469
12470    #[allow(missing_docs)]
12471    pub automated_backup_config: std::option::Option<crate::model::table::AutomatedBackupConfig>,
12472
12473    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12474}
12475
12476impl Table {
12477    /// Creates a new default instance.
12478    pub fn new() -> Self {
12479        std::default::Default::default()
12480    }
12481
12482    /// Sets the value of [name][crate::model::Table::name].
12483    ///
12484    /// # Example
12485    /// ```ignore,no_run
12486    /// # use google_cloud_bigtable_admin_v2::model::Table;
12487    /// # let project_id = "project_id";
12488    /// # let instance_id = "instance_id";
12489    /// # let table_id = "table_id";
12490    /// let x = Table::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
12491    /// ```
12492    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12493        self.name = v.into();
12494        self
12495    }
12496
12497    /// Sets the value of [cluster_states][crate::model::Table::cluster_states].
12498    ///
12499    /// # Example
12500    /// ```ignore,no_run
12501    /// # use google_cloud_bigtable_admin_v2::model::Table;
12502    /// use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12503    /// let x = Table::new().set_cluster_states([
12504    ///     ("key0", ClusterState::default()/* use setters */),
12505    ///     ("key1", ClusterState::default()/* use (different) setters */),
12506    /// ]);
12507    /// ```
12508    pub fn set_cluster_states<T, K, V>(mut self, v: T) -> Self
12509    where
12510        T: std::iter::IntoIterator<Item = (K, V)>,
12511        K: std::convert::Into<std::string::String>,
12512        V: std::convert::Into<crate::model::table::ClusterState>,
12513    {
12514        use std::iter::Iterator;
12515        self.cluster_states = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12516        self
12517    }
12518
12519    /// Sets the value of [column_families][crate::model::Table::column_families].
12520    ///
12521    /// # Example
12522    /// ```ignore,no_run
12523    /// # use google_cloud_bigtable_admin_v2::model::Table;
12524    /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
12525    /// let x = Table::new().set_column_families([
12526    ///     ("key0", ColumnFamily::default()/* use setters */),
12527    ///     ("key1", ColumnFamily::default()/* use (different) setters */),
12528    /// ]);
12529    /// ```
12530    pub fn set_column_families<T, K, V>(mut self, v: T) -> Self
12531    where
12532        T: std::iter::IntoIterator<Item = (K, V)>,
12533        K: std::convert::Into<std::string::String>,
12534        V: std::convert::Into<crate::model::ColumnFamily>,
12535    {
12536        use std::iter::Iterator;
12537        self.column_families = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12538        self
12539    }
12540
12541    /// Sets the value of [granularity][crate::model::Table::granularity].
12542    ///
12543    /// # Example
12544    /// ```ignore,no_run
12545    /// # use google_cloud_bigtable_admin_v2::model::Table;
12546    /// use google_cloud_bigtable_admin_v2::model::table::TimestampGranularity;
12547    /// let x0 = Table::new().set_granularity(TimestampGranularity::Millis);
12548    /// let x1 = Table::new().set_granularity(TimestampGranularity::Micros);
12549    /// ```
12550    pub fn set_granularity<T: std::convert::Into<crate::model::table::TimestampGranularity>>(
12551        mut self,
12552        v: T,
12553    ) -> Self {
12554        self.granularity = v.into();
12555        self
12556    }
12557
12558    /// Sets the value of [restore_info][crate::model::Table::restore_info].
12559    ///
12560    /// # Example
12561    /// ```ignore,no_run
12562    /// # use google_cloud_bigtable_admin_v2::model::Table;
12563    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12564    /// let x = Table::new().set_restore_info(RestoreInfo::default()/* use setters */);
12565    /// ```
12566    pub fn set_restore_info<T>(mut self, v: T) -> Self
12567    where
12568        T: std::convert::Into<crate::model::RestoreInfo>,
12569    {
12570        self.restore_info = std::option::Option::Some(v.into());
12571        self
12572    }
12573
12574    /// Sets or clears the value of [restore_info][crate::model::Table::restore_info].
12575    ///
12576    /// # Example
12577    /// ```ignore,no_run
12578    /// # use google_cloud_bigtable_admin_v2::model::Table;
12579    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12580    /// let x = Table::new().set_or_clear_restore_info(Some(RestoreInfo::default()/* use setters */));
12581    /// let x = Table::new().set_or_clear_restore_info(None::<RestoreInfo>);
12582    /// ```
12583    pub fn set_or_clear_restore_info<T>(mut self, v: std::option::Option<T>) -> Self
12584    where
12585        T: std::convert::Into<crate::model::RestoreInfo>,
12586    {
12587        self.restore_info = v.map(|x| x.into());
12588        self
12589    }
12590
12591    /// Sets the value of [change_stream_config][crate::model::Table::change_stream_config].
12592    ///
12593    /// # Example
12594    /// ```ignore,no_run
12595    /// # use google_cloud_bigtable_admin_v2::model::Table;
12596    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12597    /// let x = Table::new().set_change_stream_config(ChangeStreamConfig::default()/* use setters */);
12598    /// ```
12599    pub fn set_change_stream_config<T>(mut self, v: T) -> Self
12600    where
12601        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12602    {
12603        self.change_stream_config = std::option::Option::Some(v.into());
12604        self
12605    }
12606
12607    /// Sets or clears the value of [change_stream_config][crate::model::Table::change_stream_config].
12608    ///
12609    /// # Example
12610    /// ```ignore,no_run
12611    /// # use google_cloud_bigtable_admin_v2::model::Table;
12612    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12613    /// let x = Table::new().set_or_clear_change_stream_config(Some(ChangeStreamConfig::default()/* use setters */));
12614    /// let x = Table::new().set_or_clear_change_stream_config(None::<ChangeStreamConfig>);
12615    /// ```
12616    pub fn set_or_clear_change_stream_config<T>(mut self, v: std::option::Option<T>) -> Self
12617    where
12618        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12619    {
12620        self.change_stream_config = v.map(|x| x.into());
12621        self
12622    }
12623
12624    /// Sets the value of [deletion_protection][crate::model::Table::deletion_protection].
12625    ///
12626    /// # Example
12627    /// ```ignore,no_run
12628    /// # use google_cloud_bigtable_admin_v2::model::Table;
12629    /// let x = Table::new().set_deletion_protection(true);
12630    /// ```
12631    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12632        self.deletion_protection = v.into();
12633        self
12634    }
12635
12636    /// Sets the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
12637    ///
12638    /// # Example
12639    /// ```ignore,no_run
12640    /// # use google_cloud_bigtable_admin_v2::model::Table;
12641    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
12642    /// let x = Table::new().set_tiered_storage_config(TieredStorageConfig::default()/* use setters */);
12643    /// ```
12644    pub fn set_tiered_storage_config<T>(mut self, v: T) -> Self
12645    where
12646        T: std::convert::Into<crate::model::TieredStorageConfig>,
12647    {
12648        self.tiered_storage_config = std::option::Option::Some(v.into());
12649        self
12650    }
12651
12652    /// Sets or clears the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
12653    ///
12654    /// # Example
12655    /// ```ignore,no_run
12656    /// # use google_cloud_bigtable_admin_v2::model::Table;
12657    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
12658    /// let x = Table::new().set_or_clear_tiered_storage_config(Some(TieredStorageConfig::default()/* use setters */));
12659    /// let x = Table::new().set_or_clear_tiered_storage_config(None::<TieredStorageConfig>);
12660    /// ```
12661    pub fn set_or_clear_tiered_storage_config<T>(mut self, v: std::option::Option<T>) -> Self
12662    where
12663        T: std::convert::Into<crate::model::TieredStorageConfig>,
12664    {
12665        self.tiered_storage_config = v.map(|x| x.into());
12666        self
12667    }
12668
12669    /// Sets the value of [row_key_schema][crate::model::Table::row_key_schema].
12670    ///
12671    /// # Example
12672    /// ```ignore,no_run
12673    /// # use google_cloud_bigtable_admin_v2::model::Table;
12674    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12675    /// let x = Table::new().set_row_key_schema(Struct::default()/* use setters */);
12676    /// ```
12677    pub fn set_row_key_schema<T>(mut self, v: T) -> Self
12678    where
12679        T: std::convert::Into<crate::model::r#type::Struct>,
12680    {
12681        self.row_key_schema = std::option::Option::Some(v.into());
12682        self
12683    }
12684
12685    /// Sets or clears the value of [row_key_schema][crate::model::Table::row_key_schema].
12686    ///
12687    /// # Example
12688    /// ```ignore,no_run
12689    /// # use google_cloud_bigtable_admin_v2::model::Table;
12690    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12691    /// let x = Table::new().set_or_clear_row_key_schema(Some(Struct::default()/* use setters */));
12692    /// let x = Table::new().set_or_clear_row_key_schema(None::<Struct>);
12693    /// ```
12694    pub fn set_or_clear_row_key_schema<T>(mut self, v: std::option::Option<T>) -> Self
12695    where
12696        T: std::convert::Into<crate::model::r#type::Struct>,
12697    {
12698        self.row_key_schema = v.map(|x| x.into());
12699        self
12700    }
12701
12702    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config].
12703    ///
12704    /// Note that all the setters affecting `automated_backup_config` are mutually
12705    /// exclusive.
12706    ///
12707    /// # Example
12708    /// ```ignore,no_run
12709    /// # use google_cloud_bigtable_admin_v2::model::Table;
12710    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12711    /// let x = Table::new().set_automated_backup_config(Some(
12712    ///     google_cloud_bigtable_admin_v2::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(AutomatedBackupPolicy::default().into())));
12713    /// ```
12714    pub fn set_automated_backup_config<
12715        T: std::convert::Into<std::option::Option<crate::model::table::AutomatedBackupConfig>>,
12716    >(
12717        mut self,
12718        v: T,
12719    ) -> Self {
12720        self.automated_backup_config = v.into();
12721        self
12722    }
12723
12724    /// The value of [automated_backup_config][crate::model::Table::automated_backup_config]
12725    /// if it holds a `AutomatedBackupPolicy`, `None` if the field is not set or
12726    /// holds a different branch.
12727    pub fn automated_backup_policy(
12728        &self,
12729    ) -> std::option::Option<&std::boxed::Box<crate::model::table::AutomatedBackupPolicy>> {
12730        #[allow(unreachable_patterns)]
12731        self.automated_backup_config.as_ref().and_then(|v| match v {
12732            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v) => {
12733                std::option::Option::Some(v)
12734            }
12735            _ => std::option::Option::None,
12736        })
12737    }
12738
12739    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config]
12740    /// to hold a `AutomatedBackupPolicy`.
12741    ///
12742    /// Note that all the setters affecting `automated_backup_config` are
12743    /// mutually exclusive.
12744    ///
12745    /// # Example
12746    /// ```ignore,no_run
12747    /// # use google_cloud_bigtable_admin_v2::model::Table;
12748    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12749    /// let x = Table::new().set_automated_backup_policy(AutomatedBackupPolicy::default()/* use setters */);
12750    /// assert!(x.automated_backup_policy().is_some());
12751    /// ```
12752    pub fn set_automated_backup_policy<
12753        T: std::convert::Into<std::boxed::Box<crate::model::table::AutomatedBackupPolicy>>,
12754    >(
12755        mut self,
12756        v: T,
12757    ) -> Self {
12758        self.automated_backup_config = std::option::Option::Some(
12759            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v.into()),
12760        );
12761        self
12762    }
12763}
12764
12765impl wkt::message::Message for Table {
12766    fn typename() -> &'static str {
12767        "type.googleapis.com/google.bigtable.admin.v2.Table"
12768    }
12769}
12770
12771/// Defines additional types related to [Table].
12772pub mod table {
12773    #[allow(unused_imports)]
12774    use super::*;
12775
12776    /// The state of a table's data in a particular cluster.
12777    #[derive(Clone, Default, PartialEq)]
12778    #[non_exhaustive]
12779    pub struct ClusterState {
12780        /// Output only. The state of replication for the table in this cluster.
12781        pub replication_state: crate::model::table::cluster_state::ReplicationState,
12782
12783        /// Output only. The encryption information for the table in this cluster.
12784        /// If the encryption key protecting this resource is customer managed, then
12785        /// its version can be rotated in Cloud Key Management Service (Cloud KMS).
12786        /// The primary version of the key and its status will be reflected here when
12787        /// changes propagate from Cloud KMS.
12788        pub encryption_info: std::vec::Vec<crate::model::EncryptionInfo>,
12789
12790        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12791    }
12792
12793    impl ClusterState {
12794        /// Creates a new default instance.
12795        pub fn new() -> Self {
12796            std::default::Default::default()
12797        }
12798
12799        /// Sets the value of [replication_state][crate::model::table::ClusterState::replication_state].
12800        ///
12801        /// # Example
12802        /// ```ignore,no_run
12803        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12804        /// use google_cloud_bigtable_admin_v2::model::table::cluster_state::ReplicationState;
12805        /// let x0 = ClusterState::new().set_replication_state(ReplicationState::Initializing);
12806        /// let x1 = ClusterState::new().set_replication_state(ReplicationState::PlannedMaintenance);
12807        /// let x2 = ClusterState::new().set_replication_state(ReplicationState::UnplannedMaintenance);
12808        /// ```
12809        pub fn set_replication_state<
12810            T: std::convert::Into<crate::model::table::cluster_state::ReplicationState>,
12811        >(
12812            mut self,
12813            v: T,
12814        ) -> Self {
12815            self.replication_state = v.into();
12816            self
12817        }
12818
12819        /// Sets the value of [encryption_info][crate::model::table::ClusterState::encryption_info].
12820        ///
12821        /// # Example
12822        /// ```ignore,no_run
12823        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12824        /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
12825        /// let x = ClusterState::new()
12826        ///     .set_encryption_info([
12827        ///         EncryptionInfo::default()/* use setters */,
12828        ///         EncryptionInfo::default()/* use (different) setters */,
12829        ///     ]);
12830        /// ```
12831        pub fn set_encryption_info<T, V>(mut self, v: T) -> Self
12832        where
12833            T: std::iter::IntoIterator<Item = V>,
12834            V: std::convert::Into<crate::model::EncryptionInfo>,
12835        {
12836            use std::iter::Iterator;
12837            self.encryption_info = v.into_iter().map(|i| i.into()).collect();
12838            self
12839        }
12840    }
12841
12842    impl wkt::message::Message for ClusterState {
12843        fn typename() -> &'static str {
12844            "type.googleapis.com/google.bigtable.admin.v2.Table.ClusterState"
12845        }
12846    }
12847
12848    /// Defines additional types related to [ClusterState].
12849    pub mod cluster_state {
12850        #[allow(unused_imports)]
12851        use super::*;
12852
12853        /// Table replication states.
12854        ///
12855        /// # Working with unknown values
12856        ///
12857        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12858        /// additional enum variants at any time. Adding new variants is not considered
12859        /// a breaking change. Applications should write their code in anticipation of:
12860        ///
12861        /// - New values appearing in future releases of the client library, **and**
12862        /// - New values received dynamically, without application changes.
12863        ///
12864        /// Please consult the [Working with enums] section in the user guide for some
12865        /// guidelines.
12866        ///
12867        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12868        #[derive(Clone, Debug, PartialEq)]
12869        #[non_exhaustive]
12870        pub enum ReplicationState {
12871            /// The replication state of the table is unknown in this cluster.
12872            StateNotKnown,
12873            /// The cluster was recently created, and the table must finish copying
12874            /// over pre-existing data from other clusters before it can begin
12875            /// receiving live replication updates and serving Data API requests.
12876            Initializing,
12877            /// The table is temporarily unable to serve Data API requests from this
12878            /// cluster due to planned internal maintenance.
12879            PlannedMaintenance,
12880            /// The table is temporarily unable to serve Data API requests from this
12881            /// cluster due to unplanned or emergency maintenance.
12882            UnplannedMaintenance,
12883            /// The table can serve Data API requests from this cluster. Depending on
12884            /// replication delay, reads may not immediately reflect the state of the
12885            /// table in other clusters.
12886            Ready,
12887            /// The table is fully created and ready for use after a restore, and is
12888            /// being optimized for performance. When optimizations are complete, the
12889            /// table will transition to `READY` state.
12890            ReadyOptimizing,
12891            /// If set, the enum was initialized with an unknown value.
12892            ///
12893            /// Applications can examine the value using [ReplicationState::value] or
12894            /// [ReplicationState::name].
12895            UnknownValue(replication_state::UnknownValue),
12896        }
12897
12898        #[doc(hidden)]
12899        pub mod replication_state {
12900            #[allow(unused_imports)]
12901            use super::*;
12902            #[derive(Clone, Debug, PartialEq)]
12903            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12904        }
12905
12906        impl ReplicationState {
12907            /// Gets the enum value.
12908            ///
12909            /// Returns `None` if the enum contains an unknown value deserialized from
12910            /// the string representation of enums.
12911            pub fn value(&self) -> std::option::Option<i32> {
12912                match self {
12913                    Self::StateNotKnown => std::option::Option::Some(0),
12914                    Self::Initializing => std::option::Option::Some(1),
12915                    Self::PlannedMaintenance => std::option::Option::Some(2),
12916                    Self::UnplannedMaintenance => std::option::Option::Some(3),
12917                    Self::Ready => std::option::Option::Some(4),
12918                    Self::ReadyOptimizing => std::option::Option::Some(5),
12919                    Self::UnknownValue(u) => u.0.value(),
12920                }
12921            }
12922
12923            /// Gets the enum value as a string.
12924            ///
12925            /// Returns `None` if the enum contains an unknown value deserialized from
12926            /// the integer representation of enums.
12927            pub fn name(&self) -> std::option::Option<&str> {
12928                match self {
12929                    Self::StateNotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
12930                    Self::Initializing => std::option::Option::Some("INITIALIZING"),
12931                    Self::PlannedMaintenance => std::option::Option::Some("PLANNED_MAINTENANCE"),
12932                    Self::UnplannedMaintenance => {
12933                        std::option::Option::Some("UNPLANNED_MAINTENANCE")
12934                    }
12935                    Self::Ready => std::option::Option::Some("READY"),
12936                    Self::ReadyOptimizing => std::option::Option::Some("READY_OPTIMIZING"),
12937                    Self::UnknownValue(u) => u.0.name(),
12938                }
12939            }
12940        }
12941
12942        impl std::default::Default for ReplicationState {
12943            fn default() -> Self {
12944                use std::convert::From;
12945                Self::from(0)
12946            }
12947        }
12948
12949        impl std::fmt::Display for ReplicationState {
12950            fn fmt(
12951                &self,
12952                f: &mut std::fmt::Formatter<'_>,
12953            ) -> std::result::Result<(), std::fmt::Error> {
12954                wkt::internal::display_enum(f, self.name(), self.value())
12955            }
12956        }
12957
12958        impl std::convert::From<i32> for ReplicationState {
12959            fn from(value: i32) -> Self {
12960                match value {
12961                    0 => Self::StateNotKnown,
12962                    1 => Self::Initializing,
12963                    2 => Self::PlannedMaintenance,
12964                    3 => Self::UnplannedMaintenance,
12965                    4 => Self::Ready,
12966                    5 => Self::ReadyOptimizing,
12967                    _ => Self::UnknownValue(replication_state::UnknownValue(
12968                        wkt::internal::UnknownEnumValue::Integer(value),
12969                    )),
12970                }
12971            }
12972        }
12973
12974        impl std::convert::From<&str> for ReplicationState {
12975            fn from(value: &str) -> Self {
12976                use std::string::ToString;
12977                match value {
12978                    "STATE_NOT_KNOWN" => Self::StateNotKnown,
12979                    "INITIALIZING" => Self::Initializing,
12980                    "PLANNED_MAINTENANCE" => Self::PlannedMaintenance,
12981                    "UNPLANNED_MAINTENANCE" => Self::UnplannedMaintenance,
12982                    "READY" => Self::Ready,
12983                    "READY_OPTIMIZING" => Self::ReadyOptimizing,
12984                    _ => Self::UnknownValue(replication_state::UnknownValue(
12985                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12986                    )),
12987                }
12988            }
12989        }
12990
12991        impl serde::ser::Serialize for ReplicationState {
12992            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12993            where
12994                S: serde::Serializer,
12995            {
12996                match self {
12997                    Self::StateNotKnown => serializer.serialize_i32(0),
12998                    Self::Initializing => serializer.serialize_i32(1),
12999                    Self::PlannedMaintenance => serializer.serialize_i32(2),
13000                    Self::UnplannedMaintenance => serializer.serialize_i32(3),
13001                    Self::Ready => serializer.serialize_i32(4),
13002                    Self::ReadyOptimizing => serializer.serialize_i32(5),
13003                    Self::UnknownValue(u) => u.0.serialize(serializer),
13004                }
13005            }
13006        }
13007
13008        impl<'de> serde::de::Deserialize<'de> for ReplicationState {
13009            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13010            where
13011                D: serde::Deserializer<'de>,
13012            {
13013                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReplicationState>::new(
13014                    ".google.bigtable.admin.v2.Table.ClusterState.ReplicationState",
13015                ))
13016            }
13017        }
13018    }
13019
13020    /// Defines an automated backup policy for a table
13021    #[derive(Clone, Default, PartialEq)]
13022    #[non_exhaustive]
13023    pub struct AutomatedBackupPolicy {
13024        /// Required. How long the automated backups should be retained. Values must
13025        /// be at least 3 days and at most 90 days.
13026        pub retention_period: std::option::Option<wkt::Duration>,
13027
13028        /// How frequently automated backups should occur. The only supported value
13029        /// at this time is 24 hours. An undefined frequency is treated as 24 hours.
13030        pub frequency: std::option::Option<wkt::Duration>,
13031
13032        /// Optional. A list of Cloud Bigtable zones where automated backups are
13033        /// allowed to be created. If empty, automated backups will be created in all
13034        /// zones of the instance. Locations are in the format
13035        /// `projects/{project}/locations/{zone}`.
13036        /// This field can only set for tables in Enterprise Plus instances.
13037        pub locations: std::vec::Vec<std::string::String>,
13038
13039        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13040    }
13041
13042    impl AutomatedBackupPolicy {
13043        /// Creates a new default instance.
13044        pub fn new() -> Self {
13045            std::default::Default::default()
13046        }
13047
13048        /// Sets the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
13049        ///
13050        /// # Example
13051        /// ```ignore,no_run
13052        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13053        /// use wkt::Duration;
13054        /// let x = AutomatedBackupPolicy::new().set_retention_period(Duration::default()/* use setters */);
13055        /// ```
13056        pub fn set_retention_period<T>(mut self, v: T) -> Self
13057        where
13058            T: std::convert::Into<wkt::Duration>,
13059        {
13060            self.retention_period = std::option::Option::Some(v.into());
13061            self
13062        }
13063
13064        /// Sets or clears the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
13065        ///
13066        /// # Example
13067        /// ```ignore,no_run
13068        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13069        /// use wkt::Duration;
13070        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
13071        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(None::<Duration>);
13072        /// ```
13073        pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
13074        where
13075            T: std::convert::Into<wkt::Duration>,
13076        {
13077            self.retention_period = v.map(|x| x.into());
13078            self
13079        }
13080
13081        /// Sets the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
13082        ///
13083        /// # Example
13084        /// ```ignore,no_run
13085        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13086        /// use wkt::Duration;
13087        /// let x = AutomatedBackupPolicy::new().set_frequency(Duration::default()/* use setters */);
13088        /// ```
13089        pub fn set_frequency<T>(mut self, v: T) -> Self
13090        where
13091            T: std::convert::Into<wkt::Duration>,
13092        {
13093            self.frequency = std::option::Option::Some(v.into());
13094            self
13095        }
13096
13097        /// Sets or clears the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
13098        ///
13099        /// # Example
13100        /// ```ignore,no_run
13101        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13102        /// use wkt::Duration;
13103        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(Some(Duration::default()/* use setters */));
13104        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(None::<Duration>);
13105        /// ```
13106        pub fn set_or_clear_frequency<T>(mut self, v: std::option::Option<T>) -> Self
13107        where
13108            T: std::convert::Into<wkt::Duration>,
13109        {
13110            self.frequency = v.map(|x| x.into());
13111            self
13112        }
13113
13114        /// Sets the value of [locations][crate::model::table::AutomatedBackupPolicy::locations].
13115        ///
13116        /// # Example
13117        /// ```ignore,no_run
13118        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13119        /// let x = AutomatedBackupPolicy::new().set_locations(["a", "b", "c"]);
13120        /// ```
13121        pub fn set_locations<T, V>(mut self, v: T) -> Self
13122        where
13123            T: std::iter::IntoIterator<Item = V>,
13124            V: std::convert::Into<std::string::String>,
13125        {
13126            use std::iter::Iterator;
13127            self.locations = v.into_iter().map(|i| i.into()).collect();
13128            self
13129        }
13130    }
13131
13132    impl wkt::message::Message for AutomatedBackupPolicy {
13133        fn typename() -> &'static str {
13134            "type.googleapis.com/google.bigtable.admin.v2.Table.AutomatedBackupPolicy"
13135        }
13136    }
13137
13138    /// Possible timestamp granularities to use when keeping multiple versions
13139    /// of data in a table.
13140    ///
13141    /// # Working with unknown values
13142    ///
13143    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13144    /// additional enum variants at any time. Adding new variants is not considered
13145    /// a breaking change. Applications should write their code in anticipation of:
13146    ///
13147    /// - New values appearing in future releases of the client library, **and**
13148    /// - New values received dynamically, without application changes.
13149    ///
13150    /// Please consult the [Working with enums] section in the user guide for some
13151    /// guidelines.
13152    ///
13153    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13154    #[derive(Clone, Debug, PartialEq)]
13155    #[non_exhaustive]
13156    pub enum TimestampGranularity {
13157        /// The user did not specify a granularity. Should not be returned.
13158        /// When specified during table creation, MILLIS will be used.
13159        Unspecified,
13160        /// The table keeps data versioned at a granularity of 1ms.
13161        Millis,
13162        /// The table keeps data versioned at a granularity of 1us.
13163        Micros,
13164        /// If set, the enum was initialized with an unknown value.
13165        ///
13166        /// Applications can examine the value using [TimestampGranularity::value] or
13167        /// [TimestampGranularity::name].
13168        UnknownValue(timestamp_granularity::UnknownValue),
13169    }
13170
13171    #[doc(hidden)]
13172    pub mod timestamp_granularity {
13173        #[allow(unused_imports)]
13174        use super::*;
13175        #[derive(Clone, Debug, PartialEq)]
13176        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13177    }
13178
13179    impl TimestampGranularity {
13180        /// Gets the enum value.
13181        ///
13182        /// Returns `None` if the enum contains an unknown value deserialized from
13183        /// the string representation of enums.
13184        pub fn value(&self) -> std::option::Option<i32> {
13185            match self {
13186                Self::Unspecified => std::option::Option::Some(0),
13187                Self::Millis => std::option::Option::Some(1),
13188                Self::Micros => std::option::Option::Some(2),
13189                Self::UnknownValue(u) => u.0.value(),
13190            }
13191        }
13192
13193        /// Gets the enum value as a string.
13194        ///
13195        /// Returns `None` if the enum contains an unknown value deserialized from
13196        /// the integer representation of enums.
13197        pub fn name(&self) -> std::option::Option<&str> {
13198            match self {
13199                Self::Unspecified => std::option::Option::Some("TIMESTAMP_GRANULARITY_UNSPECIFIED"),
13200                Self::Millis => std::option::Option::Some("MILLIS"),
13201                Self::Micros => std::option::Option::Some("MICROS"),
13202                Self::UnknownValue(u) => u.0.name(),
13203            }
13204        }
13205    }
13206
13207    impl std::default::Default for TimestampGranularity {
13208        fn default() -> Self {
13209            use std::convert::From;
13210            Self::from(0)
13211        }
13212    }
13213
13214    impl std::fmt::Display for TimestampGranularity {
13215        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13216            wkt::internal::display_enum(f, self.name(), self.value())
13217        }
13218    }
13219
13220    impl std::convert::From<i32> for TimestampGranularity {
13221        fn from(value: i32) -> Self {
13222            match value {
13223                0 => Self::Unspecified,
13224                1 => Self::Millis,
13225                2 => Self::Micros,
13226                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
13227                    wkt::internal::UnknownEnumValue::Integer(value),
13228                )),
13229            }
13230        }
13231    }
13232
13233    impl std::convert::From<&str> for TimestampGranularity {
13234        fn from(value: &str) -> Self {
13235            use std::string::ToString;
13236            match value {
13237                "TIMESTAMP_GRANULARITY_UNSPECIFIED" => Self::Unspecified,
13238                "MILLIS" => Self::Millis,
13239                "MICROS" => Self::Micros,
13240                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
13241                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13242                )),
13243            }
13244        }
13245    }
13246
13247    impl serde::ser::Serialize for TimestampGranularity {
13248        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13249        where
13250            S: serde::Serializer,
13251        {
13252            match self {
13253                Self::Unspecified => serializer.serialize_i32(0),
13254                Self::Millis => serializer.serialize_i32(1),
13255                Self::Micros => serializer.serialize_i32(2),
13256                Self::UnknownValue(u) => u.0.serialize(serializer),
13257            }
13258        }
13259    }
13260
13261    impl<'de> serde::de::Deserialize<'de> for TimestampGranularity {
13262        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13263        where
13264            D: serde::Deserializer<'de>,
13265        {
13266            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TimestampGranularity>::new(
13267                ".google.bigtable.admin.v2.Table.TimestampGranularity",
13268            ))
13269        }
13270    }
13271
13272    /// Defines a view over a table's fields.
13273    ///
13274    /// # Working with unknown values
13275    ///
13276    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13277    /// additional enum variants at any time. Adding new variants is not considered
13278    /// a breaking change. Applications should write their code in anticipation of:
13279    ///
13280    /// - New values appearing in future releases of the client library, **and**
13281    /// - New values received dynamically, without application changes.
13282    ///
13283    /// Please consult the [Working with enums] section in the user guide for some
13284    /// guidelines.
13285    ///
13286    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13287    #[derive(Clone, Debug, PartialEq)]
13288    #[non_exhaustive]
13289    pub enum View {
13290        /// Uses the default view for each method as documented in its request.
13291        Unspecified,
13292        /// Only populates `name`.
13293        NameOnly,
13294        /// Only populates `name` and fields related to the table's schema.
13295        SchemaView,
13296        /// Only populates `name` and fields related to the table's replication
13297        /// state.
13298        ReplicationView,
13299        /// Only populates `name` and fields related to the table's encryption state.
13300        EncryptionView,
13301        /// Populates all fields.
13302        Full,
13303        /// If set, the enum was initialized with an unknown value.
13304        ///
13305        /// Applications can examine the value using [View::value] or
13306        /// [View::name].
13307        UnknownValue(view::UnknownValue),
13308    }
13309
13310    #[doc(hidden)]
13311    pub mod view {
13312        #[allow(unused_imports)]
13313        use super::*;
13314        #[derive(Clone, Debug, PartialEq)]
13315        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13316    }
13317
13318    impl View {
13319        /// Gets the enum value.
13320        ///
13321        /// Returns `None` if the enum contains an unknown value deserialized from
13322        /// the string representation of enums.
13323        pub fn value(&self) -> std::option::Option<i32> {
13324            match self {
13325                Self::Unspecified => std::option::Option::Some(0),
13326                Self::NameOnly => std::option::Option::Some(1),
13327                Self::SchemaView => std::option::Option::Some(2),
13328                Self::ReplicationView => std::option::Option::Some(3),
13329                Self::EncryptionView => std::option::Option::Some(5),
13330                Self::Full => std::option::Option::Some(4),
13331                Self::UnknownValue(u) => u.0.value(),
13332            }
13333        }
13334
13335        /// Gets the enum value as a string.
13336        ///
13337        /// Returns `None` if the enum contains an unknown value deserialized from
13338        /// the integer representation of enums.
13339        pub fn name(&self) -> std::option::Option<&str> {
13340            match self {
13341                Self::Unspecified => std::option::Option::Some("VIEW_UNSPECIFIED"),
13342                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
13343                Self::SchemaView => std::option::Option::Some("SCHEMA_VIEW"),
13344                Self::ReplicationView => std::option::Option::Some("REPLICATION_VIEW"),
13345                Self::EncryptionView => std::option::Option::Some("ENCRYPTION_VIEW"),
13346                Self::Full => std::option::Option::Some("FULL"),
13347                Self::UnknownValue(u) => u.0.name(),
13348            }
13349        }
13350    }
13351
13352    impl std::default::Default for View {
13353        fn default() -> Self {
13354            use std::convert::From;
13355            Self::from(0)
13356        }
13357    }
13358
13359    impl std::fmt::Display for View {
13360        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13361            wkt::internal::display_enum(f, self.name(), self.value())
13362        }
13363    }
13364
13365    impl std::convert::From<i32> for View {
13366        fn from(value: i32) -> Self {
13367            match value {
13368                0 => Self::Unspecified,
13369                1 => Self::NameOnly,
13370                2 => Self::SchemaView,
13371                3 => Self::ReplicationView,
13372                4 => Self::Full,
13373                5 => Self::EncryptionView,
13374                _ => Self::UnknownValue(view::UnknownValue(
13375                    wkt::internal::UnknownEnumValue::Integer(value),
13376                )),
13377            }
13378        }
13379    }
13380
13381    impl std::convert::From<&str> for View {
13382        fn from(value: &str) -> Self {
13383            use std::string::ToString;
13384            match value {
13385                "VIEW_UNSPECIFIED" => Self::Unspecified,
13386                "NAME_ONLY" => Self::NameOnly,
13387                "SCHEMA_VIEW" => Self::SchemaView,
13388                "REPLICATION_VIEW" => Self::ReplicationView,
13389                "ENCRYPTION_VIEW" => Self::EncryptionView,
13390                "FULL" => Self::Full,
13391                _ => Self::UnknownValue(view::UnknownValue(
13392                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13393                )),
13394            }
13395        }
13396    }
13397
13398    impl serde::ser::Serialize for View {
13399        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13400        where
13401            S: serde::Serializer,
13402        {
13403            match self {
13404                Self::Unspecified => serializer.serialize_i32(0),
13405                Self::NameOnly => serializer.serialize_i32(1),
13406                Self::SchemaView => serializer.serialize_i32(2),
13407                Self::ReplicationView => serializer.serialize_i32(3),
13408                Self::EncryptionView => serializer.serialize_i32(5),
13409                Self::Full => serializer.serialize_i32(4),
13410                Self::UnknownValue(u) => u.0.serialize(serializer),
13411            }
13412        }
13413    }
13414
13415    impl<'de> serde::de::Deserialize<'de> for View {
13416        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13417        where
13418            D: serde::Deserializer<'de>,
13419        {
13420            deserializer.deserialize_any(wkt::internal::EnumVisitor::<View>::new(
13421                ".google.bigtable.admin.v2.Table.View",
13422            ))
13423        }
13424    }
13425
13426    #[allow(missing_docs)]
13427    #[derive(Clone, Debug, PartialEq)]
13428    #[non_exhaustive]
13429    pub enum AutomatedBackupConfig {
13430        /// If specified, automated backups are enabled for this table.
13431        /// Otherwise, automated backups are disabled.
13432        AutomatedBackupPolicy(std::boxed::Box<crate::model::table::AutomatedBackupPolicy>),
13433    }
13434}
13435
13436/// AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users
13437/// can configure access to each Authorized View independently from the table and
13438/// use the existing Data APIs to access the subset of data.
13439#[derive(Clone, Default, PartialEq)]
13440#[non_exhaustive]
13441pub struct AuthorizedView {
13442    /// Identifier. The name of this AuthorizedView.
13443    /// Values are of the form
13444    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`
13445    pub name: std::string::String,
13446
13447    /// The etag for this AuthorizedView.
13448    /// If this is provided on update, it must match the server's etag. The server
13449    /// returns ABORTED error on a mismatched etag.
13450    pub etag: std::string::String,
13451
13452    /// Set to true to make the AuthorizedView protected against deletion.
13453    /// The parent Table and containing Instance cannot be deleted if an
13454    /// AuthorizedView has this bit set.
13455    pub deletion_protection: bool,
13456
13457    /// The type of this AuthorizedView.
13458    pub authorized_view: std::option::Option<crate::model::authorized_view::AuthorizedView>,
13459
13460    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13461}
13462
13463impl AuthorizedView {
13464    /// Creates a new default instance.
13465    pub fn new() -> Self {
13466        std::default::Default::default()
13467    }
13468
13469    /// Sets the value of [name][crate::model::AuthorizedView::name].
13470    ///
13471    /// # Example
13472    /// ```ignore,no_run
13473    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13474    /// # let project_id = "project_id";
13475    /// # let instance_id = "instance_id";
13476    /// # let table_id = "table_id";
13477    /// # let authorized_view_id = "authorized_view_id";
13478    /// let x = AuthorizedView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"));
13479    /// ```
13480    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13481        self.name = v.into();
13482        self
13483    }
13484
13485    /// Sets the value of [etag][crate::model::AuthorizedView::etag].
13486    ///
13487    /// # Example
13488    /// ```ignore,no_run
13489    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13490    /// let x = AuthorizedView::new().set_etag("example");
13491    /// ```
13492    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13493        self.etag = v.into();
13494        self
13495    }
13496
13497    /// Sets the value of [deletion_protection][crate::model::AuthorizedView::deletion_protection].
13498    ///
13499    /// # Example
13500    /// ```ignore,no_run
13501    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13502    /// let x = AuthorizedView::new().set_deletion_protection(true);
13503    /// ```
13504    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13505        self.deletion_protection = v.into();
13506        self
13507    }
13508
13509    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view].
13510    ///
13511    /// Note that all the setters affecting `authorized_view` are mutually
13512    /// exclusive.
13513    ///
13514    /// # Example
13515    /// ```ignore,no_run
13516    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13517    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13518    /// let x = AuthorizedView::new().set_authorized_view(Some(
13519    ///     google_cloud_bigtable_admin_v2::model::authorized_view::AuthorizedView::SubsetView(SubsetView::default().into())));
13520    /// ```
13521    pub fn set_authorized_view<
13522        T: std::convert::Into<std::option::Option<crate::model::authorized_view::AuthorizedView>>,
13523    >(
13524        mut self,
13525        v: T,
13526    ) -> Self {
13527        self.authorized_view = v.into();
13528        self
13529    }
13530
13531    /// The value of [authorized_view][crate::model::AuthorizedView::authorized_view]
13532    /// if it holds a `SubsetView`, `None` if the field is not set or
13533    /// holds a different branch.
13534    pub fn subset_view(
13535        &self,
13536    ) -> std::option::Option<&std::boxed::Box<crate::model::authorized_view::SubsetView>> {
13537        #[allow(unreachable_patterns)]
13538        self.authorized_view.as_ref().and_then(|v| match v {
13539            crate::model::authorized_view::AuthorizedView::SubsetView(v) => {
13540                std::option::Option::Some(v)
13541            }
13542            _ => std::option::Option::None,
13543        })
13544    }
13545
13546    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view]
13547    /// to hold a `SubsetView`.
13548    ///
13549    /// Note that all the setters affecting `authorized_view` are
13550    /// mutually exclusive.
13551    ///
13552    /// # Example
13553    /// ```ignore,no_run
13554    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13555    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13556    /// let x = AuthorizedView::new().set_subset_view(SubsetView::default()/* use setters */);
13557    /// assert!(x.subset_view().is_some());
13558    /// ```
13559    pub fn set_subset_view<
13560        T: std::convert::Into<std::boxed::Box<crate::model::authorized_view::SubsetView>>,
13561    >(
13562        mut self,
13563        v: T,
13564    ) -> Self {
13565        self.authorized_view = std::option::Option::Some(
13566            crate::model::authorized_view::AuthorizedView::SubsetView(v.into()),
13567        );
13568        self
13569    }
13570}
13571
13572impl wkt::message::Message for AuthorizedView {
13573    fn typename() -> &'static str {
13574        "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView"
13575    }
13576}
13577
13578/// Defines additional types related to [AuthorizedView].
13579pub mod authorized_view {
13580    #[allow(unused_imports)]
13581    use super::*;
13582
13583    /// Subsets of a column family that are included in this AuthorizedView.
13584    #[derive(Clone, Default, PartialEq)]
13585    #[non_exhaustive]
13586    pub struct FamilySubsets {
13587        /// Individual exact column qualifiers to be included in the AuthorizedView.
13588        pub qualifiers: std::vec::Vec<::bytes::Bytes>,
13589
13590        /// Prefixes for qualifiers to be included in the AuthorizedView. Every
13591        /// qualifier starting with one of these prefixes is included in the
13592        /// AuthorizedView. To provide access to all qualifiers, include the empty
13593        /// string as a prefix
13594        /// ("").
13595        pub qualifier_prefixes: std::vec::Vec<::bytes::Bytes>,
13596
13597        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13598    }
13599
13600    impl FamilySubsets {
13601        /// Creates a new default instance.
13602        pub fn new() -> Self {
13603            std::default::Default::default()
13604        }
13605
13606        /// Sets the value of [qualifiers][crate::model::authorized_view::FamilySubsets::qualifiers].
13607        ///
13608        /// # Example
13609        /// ```ignore,no_run
13610        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13611        /// let b1 = bytes::Bytes::from_static(b"abc");
13612        /// let b2 = bytes::Bytes::from_static(b"xyz");
13613        /// let x = FamilySubsets::new().set_qualifiers([b1, b2]);
13614        /// ```
13615        pub fn set_qualifiers<T, V>(mut self, v: T) -> Self
13616        where
13617            T: std::iter::IntoIterator<Item = V>,
13618            V: std::convert::Into<::bytes::Bytes>,
13619        {
13620            use std::iter::Iterator;
13621            self.qualifiers = v.into_iter().map(|i| i.into()).collect();
13622            self
13623        }
13624
13625        /// Sets the value of [qualifier_prefixes][crate::model::authorized_view::FamilySubsets::qualifier_prefixes].
13626        ///
13627        /// # Example
13628        /// ```ignore,no_run
13629        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13630        /// let b1 = bytes::Bytes::from_static(b"abc");
13631        /// let b2 = bytes::Bytes::from_static(b"xyz");
13632        /// let x = FamilySubsets::new().set_qualifier_prefixes([b1, b2]);
13633        /// ```
13634        pub fn set_qualifier_prefixes<T, V>(mut self, v: T) -> Self
13635        where
13636            T: std::iter::IntoIterator<Item = V>,
13637            V: std::convert::Into<::bytes::Bytes>,
13638        {
13639            use std::iter::Iterator;
13640            self.qualifier_prefixes = v.into_iter().map(|i| i.into()).collect();
13641            self
13642        }
13643    }
13644
13645    impl wkt::message::Message for FamilySubsets {
13646        fn typename() -> &'static str {
13647            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.FamilySubsets"
13648        }
13649    }
13650
13651    /// Defines a simple AuthorizedView that is a subset of the underlying Table.
13652    #[derive(Clone, Default, PartialEq)]
13653    #[non_exhaustive]
13654    pub struct SubsetView {
13655        /// Row prefixes to be included in the AuthorizedView.
13656        /// To provide access to all rows, include the empty string as a prefix ("").
13657        pub row_prefixes: std::vec::Vec<::bytes::Bytes>,
13658
13659        /// Map from column family name to the columns in this family to be included
13660        /// in the AuthorizedView.
13661        pub family_subsets: std::collections::HashMap<
13662            std::string::String,
13663            crate::model::authorized_view::FamilySubsets,
13664        >,
13665
13666        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13667    }
13668
13669    impl SubsetView {
13670        /// Creates a new default instance.
13671        pub fn new() -> Self {
13672            std::default::Default::default()
13673        }
13674
13675        /// Sets the value of [row_prefixes][crate::model::authorized_view::SubsetView::row_prefixes].
13676        ///
13677        /// # Example
13678        /// ```ignore,no_run
13679        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13680        /// let b1 = bytes::Bytes::from_static(b"abc");
13681        /// let b2 = bytes::Bytes::from_static(b"xyz");
13682        /// let x = SubsetView::new().set_row_prefixes([b1, b2]);
13683        /// ```
13684        pub fn set_row_prefixes<T, V>(mut self, v: T) -> Self
13685        where
13686            T: std::iter::IntoIterator<Item = V>,
13687            V: std::convert::Into<::bytes::Bytes>,
13688        {
13689            use std::iter::Iterator;
13690            self.row_prefixes = v.into_iter().map(|i| i.into()).collect();
13691            self
13692        }
13693
13694        /// Sets the value of [family_subsets][crate::model::authorized_view::SubsetView::family_subsets].
13695        ///
13696        /// # Example
13697        /// ```ignore,no_run
13698        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13699        /// use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13700        /// let x = SubsetView::new().set_family_subsets([
13701        ///     ("key0", FamilySubsets::default()/* use setters */),
13702        ///     ("key1", FamilySubsets::default()/* use (different) setters */),
13703        /// ]);
13704        /// ```
13705        pub fn set_family_subsets<T, K, V>(mut self, v: T) -> Self
13706        where
13707            T: std::iter::IntoIterator<Item = (K, V)>,
13708            K: std::convert::Into<std::string::String>,
13709            V: std::convert::Into<crate::model::authorized_view::FamilySubsets>,
13710        {
13711            use std::iter::Iterator;
13712            self.family_subsets = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13713            self
13714        }
13715    }
13716
13717    impl wkt::message::Message for SubsetView {
13718        fn typename() -> &'static str {
13719            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.SubsetView"
13720        }
13721    }
13722
13723    /// Defines a subset of an AuthorizedView's fields.
13724    ///
13725    /// # Working with unknown values
13726    ///
13727    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13728    /// additional enum variants at any time. Adding new variants is not considered
13729    /// a breaking change. Applications should write their code in anticipation of:
13730    ///
13731    /// - New values appearing in future releases of the client library, **and**
13732    /// - New values received dynamically, without application changes.
13733    ///
13734    /// Please consult the [Working with enums] section in the user guide for some
13735    /// guidelines.
13736    ///
13737    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13738    #[derive(Clone, Debug, PartialEq)]
13739    #[non_exhaustive]
13740    pub enum ResponseView {
13741        /// Uses the default view for each method as documented in the request.
13742        Unspecified,
13743        /// Only populates `name`.
13744        NameOnly,
13745        /// Only populates the AuthorizedView's basic metadata. This includes:
13746        /// name, deletion_protection, etag.
13747        Basic,
13748        /// Populates every fields.
13749        Full,
13750        /// If set, the enum was initialized with an unknown value.
13751        ///
13752        /// Applications can examine the value using [ResponseView::value] or
13753        /// [ResponseView::name].
13754        UnknownValue(response_view::UnknownValue),
13755    }
13756
13757    #[doc(hidden)]
13758    pub mod response_view {
13759        #[allow(unused_imports)]
13760        use super::*;
13761        #[derive(Clone, Debug, PartialEq)]
13762        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13763    }
13764
13765    impl ResponseView {
13766        /// Gets the enum value.
13767        ///
13768        /// Returns `None` if the enum contains an unknown value deserialized from
13769        /// the string representation of enums.
13770        pub fn value(&self) -> std::option::Option<i32> {
13771            match self {
13772                Self::Unspecified => std::option::Option::Some(0),
13773                Self::NameOnly => std::option::Option::Some(1),
13774                Self::Basic => std::option::Option::Some(2),
13775                Self::Full => std::option::Option::Some(3),
13776                Self::UnknownValue(u) => u.0.value(),
13777            }
13778        }
13779
13780        /// Gets the enum value as a string.
13781        ///
13782        /// Returns `None` if the enum contains an unknown value deserialized from
13783        /// the integer representation of enums.
13784        pub fn name(&self) -> std::option::Option<&str> {
13785            match self {
13786                Self::Unspecified => std::option::Option::Some("RESPONSE_VIEW_UNSPECIFIED"),
13787                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
13788                Self::Basic => std::option::Option::Some("BASIC"),
13789                Self::Full => std::option::Option::Some("FULL"),
13790                Self::UnknownValue(u) => u.0.name(),
13791            }
13792        }
13793    }
13794
13795    impl std::default::Default for ResponseView {
13796        fn default() -> Self {
13797            use std::convert::From;
13798            Self::from(0)
13799        }
13800    }
13801
13802    impl std::fmt::Display for ResponseView {
13803        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13804            wkt::internal::display_enum(f, self.name(), self.value())
13805        }
13806    }
13807
13808    impl std::convert::From<i32> for ResponseView {
13809        fn from(value: i32) -> Self {
13810            match value {
13811                0 => Self::Unspecified,
13812                1 => Self::NameOnly,
13813                2 => Self::Basic,
13814                3 => Self::Full,
13815                _ => Self::UnknownValue(response_view::UnknownValue(
13816                    wkt::internal::UnknownEnumValue::Integer(value),
13817                )),
13818            }
13819        }
13820    }
13821
13822    impl std::convert::From<&str> for ResponseView {
13823        fn from(value: &str) -> Self {
13824            use std::string::ToString;
13825            match value {
13826                "RESPONSE_VIEW_UNSPECIFIED" => Self::Unspecified,
13827                "NAME_ONLY" => Self::NameOnly,
13828                "BASIC" => Self::Basic,
13829                "FULL" => Self::Full,
13830                _ => Self::UnknownValue(response_view::UnknownValue(
13831                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13832                )),
13833            }
13834        }
13835    }
13836
13837    impl serde::ser::Serialize for ResponseView {
13838        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13839        where
13840            S: serde::Serializer,
13841        {
13842            match self {
13843                Self::Unspecified => serializer.serialize_i32(0),
13844                Self::NameOnly => serializer.serialize_i32(1),
13845                Self::Basic => serializer.serialize_i32(2),
13846                Self::Full => serializer.serialize_i32(3),
13847                Self::UnknownValue(u) => u.0.serialize(serializer),
13848            }
13849        }
13850    }
13851
13852    impl<'de> serde::de::Deserialize<'de> for ResponseView {
13853        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13854        where
13855            D: serde::Deserializer<'de>,
13856        {
13857            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResponseView>::new(
13858                ".google.bigtable.admin.v2.AuthorizedView.ResponseView",
13859            ))
13860        }
13861    }
13862
13863    /// The type of this AuthorizedView.
13864    #[derive(Clone, Debug, PartialEq)]
13865    #[non_exhaustive]
13866    pub enum AuthorizedView {
13867        /// An AuthorizedView permitting access to an explicit subset of a Table.
13868        SubsetView(std::boxed::Box<crate::model::authorized_view::SubsetView>),
13869    }
13870}
13871
13872/// A set of columns within a table which share a common configuration.
13873#[derive(Clone, Default, PartialEq)]
13874#[non_exhaustive]
13875pub struct ColumnFamily {
13876    /// Garbage collection rule specified as a protobuf.
13877    /// Must serialize to at most 500 bytes.
13878    ///
13879    /// NOTE: Garbage collection executes opportunistically in the background, and
13880    /// so it's possible for reads to return a cell even if it matches the active
13881    /// GC expression for its family.
13882    pub gc_rule: std::option::Option<crate::model::GcRule>,
13883
13884    /// The type of data stored in each of this family's cell values, including its
13885    /// full encoding. If omitted, the family only serves raw untyped bytes.
13886    ///
13887    /// For now, only the `Aggregate` type is supported.
13888    ///
13889    /// `Aggregate` can only be set at family creation and is immutable afterwards.
13890    ///
13891    /// If `value_type` is `Aggregate`, written data must be compatible with:
13892    ///
13893    /// * `value_type.input_type` for `AddInput` mutations
13894    pub value_type: std::option::Option<crate::model::Type>,
13895
13896    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13897}
13898
13899impl ColumnFamily {
13900    /// Creates a new default instance.
13901    pub fn new() -> Self {
13902        std::default::Default::default()
13903    }
13904
13905    /// Sets the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13906    ///
13907    /// # Example
13908    /// ```ignore,no_run
13909    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13910    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13911    /// let x = ColumnFamily::new().set_gc_rule(GcRule::default()/* use setters */);
13912    /// ```
13913    pub fn set_gc_rule<T>(mut self, v: T) -> Self
13914    where
13915        T: std::convert::Into<crate::model::GcRule>,
13916    {
13917        self.gc_rule = std::option::Option::Some(v.into());
13918        self
13919    }
13920
13921    /// Sets or clears the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13922    ///
13923    /// # Example
13924    /// ```ignore,no_run
13925    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13926    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13927    /// let x = ColumnFamily::new().set_or_clear_gc_rule(Some(GcRule::default()/* use setters */));
13928    /// let x = ColumnFamily::new().set_or_clear_gc_rule(None::<GcRule>);
13929    /// ```
13930    pub fn set_or_clear_gc_rule<T>(mut self, v: std::option::Option<T>) -> Self
13931    where
13932        T: std::convert::Into<crate::model::GcRule>,
13933    {
13934        self.gc_rule = v.map(|x| x.into());
13935        self
13936    }
13937
13938    /// Sets the value of [value_type][crate::model::ColumnFamily::value_type].
13939    ///
13940    /// # Example
13941    /// ```ignore,no_run
13942    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13943    /// use google_cloud_bigtable_admin_v2::model::Type;
13944    /// let x = ColumnFamily::new().set_value_type(Type::default()/* use setters */);
13945    /// ```
13946    pub fn set_value_type<T>(mut self, v: T) -> Self
13947    where
13948        T: std::convert::Into<crate::model::Type>,
13949    {
13950        self.value_type = std::option::Option::Some(v.into());
13951        self
13952    }
13953
13954    /// Sets or clears the value of [value_type][crate::model::ColumnFamily::value_type].
13955    ///
13956    /// # Example
13957    /// ```ignore,no_run
13958    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13959    /// use google_cloud_bigtable_admin_v2::model::Type;
13960    /// let x = ColumnFamily::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
13961    /// let x = ColumnFamily::new().set_or_clear_value_type(None::<Type>);
13962    /// ```
13963    pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
13964    where
13965        T: std::convert::Into<crate::model::Type>,
13966    {
13967        self.value_type = v.map(|x| x.into());
13968        self
13969    }
13970}
13971
13972impl wkt::message::Message for ColumnFamily {
13973    fn typename() -> &'static str {
13974        "type.googleapis.com/google.bigtable.admin.v2.ColumnFamily"
13975    }
13976}
13977
13978/// Rule for determining which cells to delete during garbage collection.
13979#[derive(Clone, Default, PartialEq)]
13980#[non_exhaustive]
13981pub struct GcRule {
13982    /// Garbage collection rules.
13983    pub rule: std::option::Option<crate::model::gc_rule::Rule>,
13984
13985    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13986}
13987
13988impl GcRule {
13989    /// Creates a new default instance.
13990    pub fn new() -> Self {
13991        std::default::Default::default()
13992    }
13993
13994    /// Sets the value of [rule][crate::model::GcRule::rule].
13995    ///
13996    /// Note that all the setters affecting `rule` are mutually
13997    /// exclusive.
13998    ///
13999    /// # Example
14000    /// ```ignore,no_run
14001    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14002    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Rule;
14003    /// let x = GcRule::new().set_rule(Some(Rule::MaxNumVersions(42)));
14004    /// ```
14005    pub fn set_rule<T: std::convert::Into<std::option::Option<crate::model::gc_rule::Rule>>>(
14006        mut self,
14007        v: T,
14008    ) -> Self {
14009        self.rule = v.into();
14010        self
14011    }
14012
14013    /// The value of [rule][crate::model::GcRule::rule]
14014    /// if it holds a `MaxNumVersions`, `None` if the field is not set or
14015    /// holds a different branch.
14016    pub fn max_num_versions(&self) -> std::option::Option<&i32> {
14017        #[allow(unreachable_patterns)]
14018        self.rule.as_ref().and_then(|v| match v {
14019            crate::model::gc_rule::Rule::MaxNumVersions(v) => std::option::Option::Some(v),
14020            _ => std::option::Option::None,
14021        })
14022    }
14023
14024    /// Sets the value of [rule][crate::model::GcRule::rule]
14025    /// to hold a `MaxNumVersions`.
14026    ///
14027    /// Note that all the setters affecting `rule` are
14028    /// mutually exclusive.
14029    ///
14030    /// # Example
14031    /// ```ignore,no_run
14032    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14033    /// let x = GcRule::new().set_max_num_versions(42);
14034    /// assert!(x.max_num_versions().is_some());
14035    /// assert!(x.max_age().is_none());
14036    /// assert!(x.intersection().is_none());
14037    /// assert!(x.union().is_none());
14038    /// ```
14039    pub fn set_max_num_versions<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14040        self.rule =
14041            std::option::Option::Some(crate::model::gc_rule::Rule::MaxNumVersions(v.into()));
14042        self
14043    }
14044
14045    /// The value of [rule][crate::model::GcRule::rule]
14046    /// if it holds a `MaxAge`, `None` if the field is not set or
14047    /// holds a different branch.
14048    pub fn max_age(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
14049        #[allow(unreachable_patterns)]
14050        self.rule.as_ref().and_then(|v| match v {
14051            crate::model::gc_rule::Rule::MaxAge(v) => std::option::Option::Some(v),
14052            _ => std::option::Option::None,
14053        })
14054    }
14055
14056    /// Sets the value of [rule][crate::model::GcRule::rule]
14057    /// to hold a `MaxAge`.
14058    ///
14059    /// Note that all the setters affecting `rule` are
14060    /// mutually exclusive.
14061    ///
14062    /// # Example
14063    /// ```ignore,no_run
14064    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14065    /// use wkt::Duration;
14066    /// let x = GcRule::new().set_max_age(Duration::default()/* use setters */);
14067    /// assert!(x.max_age().is_some());
14068    /// assert!(x.max_num_versions().is_none());
14069    /// assert!(x.intersection().is_none());
14070    /// assert!(x.union().is_none());
14071    /// ```
14072    pub fn set_max_age<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
14073        mut self,
14074        v: T,
14075    ) -> Self {
14076        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::MaxAge(v.into()));
14077        self
14078    }
14079
14080    /// The value of [rule][crate::model::GcRule::rule]
14081    /// if it holds a `Intersection`, `None` if the field is not set or
14082    /// holds a different branch.
14083    pub fn intersection(
14084        &self,
14085    ) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Intersection>> {
14086        #[allow(unreachable_patterns)]
14087        self.rule.as_ref().and_then(|v| match v {
14088            crate::model::gc_rule::Rule::Intersection(v) => std::option::Option::Some(v),
14089            _ => std::option::Option::None,
14090        })
14091    }
14092
14093    /// Sets the value of [rule][crate::model::GcRule::rule]
14094    /// to hold a `Intersection`.
14095    ///
14096    /// Note that all the setters affecting `rule` are
14097    /// mutually exclusive.
14098    ///
14099    /// # Example
14100    /// ```ignore,no_run
14101    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14102    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
14103    /// let x = GcRule::new().set_intersection(Intersection::default()/* use setters */);
14104    /// assert!(x.intersection().is_some());
14105    /// assert!(x.max_num_versions().is_none());
14106    /// assert!(x.max_age().is_none());
14107    /// assert!(x.union().is_none());
14108    /// ```
14109    pub fn set_intersection<
14110        T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Intersection>>,
14111    >(
14112        mut self,
14113        v: T,
14114    ) -> Self {
14115        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Intersection(v.into()));
14116        self
14117    }
14118
14119    /// The value of [rule][crate::model::GcRule::rule]
14120    /// if it holds a `Union`, `None` if the field is not set or
14121    /// holds a different branch.
14122    pub fn union(&self) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Union>> {
14123        #[allow(unreachable_patterns)]
14124        self.rule.as_ref().and_then(|v| match v {
14125            crate::model::gc_rule::Rule::Union(v) => std::option::Option::Some(v),
14126            _ => std::option::Option::None,
14127        })
14128    }
14129
14130    /// Sets the value of [rule][crate::model::GcRule::rule]
14131    /// to hold a `Union`.
14132    ///
14133    /// Note that all the setters affecting `rule` are
14134    /// mutually exclusive.
14135    ///
14136    /// # Example
14137    /// ```ignore,no_run
14138    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14139    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
14140    /// let x = GcRule::new().set_union(Union::default()/* use setters */);
14141    /// assert!(x.union().is_some());
14142    /// assert!(x.max_num_versions().is_none());
14143    /// assert!(x.max_age().is_none());
14144    /// assert!(x.intersection().is_none());
14145    /// ```
14146    pub fn set_union<T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Union>>>(
14147        mut self,
14148        v: T,
14149    ) -> Self {
14150        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Union(v.into()));
14151        self
14152    }
14153}
14154
14155impl wkt::message::Message for GcRule {
14156    fn typename() -> &'static str {
14157        "type.googleapis.com/google.bigtable.admin.v2.GcRule"
14158    }
14159}
14160
14161/// Defines additional types related to [GcRule].
14162pub mod gc_rule {
14163    #[allow(unused_imports)]
14164    use super::*;
14165
14166    /// A GcRule which deletes cells matching all of the given rules.
14167    #[derive(Clone, Default, PartialEq)]
14168    #[non_exhaustive]
14169    pub struct Intersection {
14170        /// Only delete cells which would be deleted by every element of `rules`.
14171        pub rules: std::vec::Vec<crate::model::GcRule>,
14172
14173        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14174    }
14175
14176    impl Intersection {
14177        /// Creates a new default instance.
14178        pub fn new() -> Self {
14179            std::default::Default::default()
14180        }
14181
14182        /// Sets the value of [rules][crate::model::gc_rule::Intersection::rules].
14183        ///
14184        /// # Example
14185        /// ```ignore,no_run
14186        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
14187        /// use google_cloud_bigtable_admin_v2::model::GcRule;
14188        /// let x = Intersection::new()
14189        ///     .set_rules([
14190        ///         GcRule::default()/* use setters */,
14191        ///         GcRule::default()/* use (different) setters */,
14192        ///     ]);
14193        /// ```
14194        pub fn set_rules<T, V>(mut self, v: T) -> Self
14195        where
14196            T: std::iter::IntoIterator<Item = V>,
14197            V: std::convert::Into<crate::model::GcRule>,
14198        {
14199            use std::iter::Iterator;
14200            self.rules = v.into_iter().map(|i| i.into()).collect();
14201            self
14202        }
14203    }
14204
14205    impl wkt::message::Message for Intersection {
14206        fn typename() -> &'static str {
14207            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Intersection"
14208        }
14209    }
14210
14211    /// A GcRule which deletes cells matching any of the given rules.
14212    #[derive(Clone, Default, PartialEq)]
14213    #[non_exhaustive]
14214    pub struct Union {
14215        /// Delete cells which would be deleted by any element of `rules`.
14216        pub rules: std::vec::Vec<crate::model::GcRule>,
14217
14218        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14219    }
14220
14221    impl Union {
14222        /// Creates a new default instance.
14223        pub fn new() -> Self {
14224            std::default::Default::default()
14225        }
14226
14227        /// Sets the value of [rules][crate::model::gc_rule::Union::rules].
14228        ///
14229        /// # Example
14230        /// ```ignore,no_run
14231        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
14232        /// use google_cloud_bigtable_admin_v2::model::GcRule;
14233        /// let x = Union::new()
14234        ///     .set_rules([
14235        ///         GcRule::default()/* use setters */,
14236        ///         GcRule::default()/* use (different) setters */,
14237        ///     ]);
14238        /// ```
14239        pub fn set_rules<T, V>(mut self, v: T) -> Self
14240        where
14241            T: std::iter::IntoIterator<Item = V>,
14242            V: std::convert::Into<crate::model::GcRule>,
14243        {
14244            use std::iter::Iterator;
14245            self.rules = v.into_iter().map(|i| i.into()).collect();
14246            self
14247        }
14248    }
14249
14250    impl wkt::message::Message for Union {
14251        fn typename() -> &'static str {
14252            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Union"
14253        }
14254    }
14255
14256    /// Garbage collection rules.
14257    #[derive(Clone, Debug, PartialEq)]
14258    #[non_exhaustive]
14259    pub enum Rule {
14260        /// Delete all cells in a column except the most recent N.
14261        MaxNumVersions(i32),
14262        /// Delete cells in a column older than the given age.
14263        /// Values must be at least one millisecond, and will be truncated to
14264        /// microsecond granularity.
14265        MaxAge(std::boxed::Box<wkt::Duration>),
14266        /// Delete cells that would be deleted by every nested rule.
14267        Intersection(std::boxed::Box<crate::model::gc_rule::Intersection>),
14268        /// Delete cells that would be deleted by any nested rule.
14269        Union(std::boxed::Box<crate::model::gc_rule::Union>),
14270    }
14271}
14272
14273/// Encryption information for a given resource.
14274/// If this resource is protected with customer managed encryption, the in-use
14275/// Cloud Key Management Service (Cloud KMS) key version is specified along with
14276/// its status.
14277#[derive(Clone, Default, PartialEq)]
14278#[non_exhaustive]
14279pub struct EncryptionInfo {
14280    /// Output only. The type of encryption used to protect this resource.
14281    pub encryption_type: crate::model::encryption_info::EncryptionType,
14282
14283    /// Output only. The status of encrypt/decrypt calls on underlying data for
14284    /// this resource. Regardless of status, the existing data is always encrypted
14285    /// at rest.
14286    pub encryption_status: std::option::Option<google_cloud_rpc::model::Status>,
14287
14288    /// Output only. The version of the Cloud KMS key specified in the parent
14289    /// cluster that is in use for the data underlying this table.
14290    pub kms_key_version: std::string::String,
14291
14292    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14293}
14294
14295impl EncryptionInfo {
14296    /// Creates a new default instance.
14297    pub fn new() -> Self {
14298        std::default::Default::default()
14299    }
14300
14301    /// Sets the value of [encryption_type][crate::model::EncryptionInfo::encryption_type].
14302    ///
14303    /// # Example
14304    /// ```ignore,no_run
14305    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14306    /// use google_cloud_bigtable_admin_v2::model::encryption_info::EncryptionType;
14307    /// let x0 = EncryptionInfo::new().set_encryption_type(EncryptionType::GoogleDefaultEncryption);
14308    /// let x1 = EncryptionInfo::new().set_encryption_type(EncryptionType::CustomerManagedEncryption);
14309    /// ```
14310    pub fn set_encryption_type<
14311        T: std::convert::Into<crate::model::encryption_info::EncryptionType>,
14312    >(
14313        mut self,
14314        v: T,
14315    ) -> Self {
14316        self.encryption_type = v.into();
14317        self
14318    }
14319
14320    /// Sets the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
14321    ///
14322    /// # Example
14323    /// ```ignore,no_run
14324    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14325    /// use google_cloud_rpc::model::Status;
14326    /// let x = EncryptionInfo::new().set_encryption_status(Status::default()/* use setters */);
14327    /// ```
14328    pub fn set_encryption_status<T>(mut self, v: T) -> Self
14329    where
14330        T: std::convert::Into<google_cloud_rpc::model::Status>,
14331    {
14332        self.encryption_status = std::option::Option::Some(v.into());
14333        self
14334    }
14335
14336    /// Sets or clears the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
14337    ///
14338    /// # Example
14339    /// ```ignore,no_run
14340    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14341    /// use google_cloud_rpc::model::Status;
14342    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(Some(Status::default()/* use setters */));
14343    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(None::<Status>);
14344    /// ```
14345    pub fn set_or_clear_encryption_status<T>(mut self, v: std::option::Option<T>) -> Self
14346    where
14347        T: std::convert::Into<google_cloud_rpc::model::Status>,
14348    {
14349        self.encryption_status = v.map(|x| x.into());
14350        self
14351    }
14352
14353    /// Sets the value of [kms_key_version][crate::model::EncryptionInfo::kms_key_version].
14354    ///
14355    /// # Example
14356    /// ```ignore,no_run
14357    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14358    /// let x = EncryptionInfo::new().set_kms_key_version("example");
14359    /// ```
14360    pub fn set_kms_key_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14361        self.kms_key_version = v.into();
14362        self
14363    }
14364}
14365
14366impl wkt::message::Message for EncryptionInfo {
14367    fn typename() -> &'static str {
14368        "type.googleapis.com/google.bigtable.admin.v2.EncryptionInfo"
14369    }
14370}
14371
14372/// Defines additional types related to [EncryptionInfo].
14373pub mod encryption_info {
14374    #[allow(unused_imports)]
14375    use super::*;
14376
14377    /// Possible encryption types for a resource.
14378    ///
14379    /// # Working with unknown values
14380    ///
14381    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14382    /// additional enum variants at any time. Adding new variants is not considered
14383    /// a breaking change. Applications should write their code in anticipation of:
14384    ///
14385    /// - New values appearing in future releases of the client library, **and**
14386    /// - New values received dynamically, without application changes.
14387    ///
14388    /// Please consult the [Working with enums] section in the user guide for some
14389    /// guidelines.
14390    ///
14391    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14392    #[derive(Clone, Debug, PartialEq)]
14393    #[non_exhaustive]
14394    pub enum EncryptionType {
14395        /// Encryption type was not specified, though data at rest remains encrypted.
14396        Unspecified,
14397        /// The data backing this resource is encrypted at rest with a key that is
14398        /// fully managed by Google. No key version or status will be populated.
14399        /// This is the default state.
14400        GoogleDefaultEncryption,
14401        /// The data backing this resource is encrypted at rest with a key that is
14402        /// managed by the customer.
14403        /// The in-use version of the key and its status are populated for
14404        /// CMEK-protected tables.
14405        /// CMEK-protected backups are pinned to the key version that was in use at
14406        /// the time the backup was taken. This key version is populated but its
14407        /// status is not tracked and is reported as `UNKNOWN`.
14408        CustomerManagedEncryption,
14409        /// If set, the enum was initialized with an unknown value.
14410        ///
14411        /// Applications can examine the value using [EncryptionType::value] or
14412        /// [EncryptionType::name].
14413        UnknownValue(encryption_type::UnknownValue),
14414    }
14415
14416    #[doc(hidden)]
14417    pub mod encryption_type {
14418        #[allow(unused_imports)]
14419        use super::*;
14420        #[derive(Clone, Debug, PartialEq)]
14421        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14422    }
14423
14424    impl EncryptionType {
14425        /// Gets the enum value.
14426        ///
14427        /// Returns `None` if the enum contains an unknown value deserialized from
14428        /// the string representation of enums.
14429        pub fn value(&self) -> std::option::Option<i32> {
14430            match self {
14431                Self::Unspecified => std::option::Option::Some(0),
14432                Self::GoogleDefaultEncryption => std::option::Option::Some(1),
14433                Self::CustomerManagedEncryption => std::option::Option::Some(2),
14434                Self::UnknownValue(u) => u.0.value(),
14435            }
14436        }
14437
14438        /// Gets the enum value as a string.
14439        ///
14440        /// Returns `None` if the enum contains an unknown value deserialized from
14441        /// the integer representation of enums.
14442        pub fn name(&self) -> std::option::Option<&str> {
14443            match self {
14444                Self::Unspecified => std::option::Option::Some("ENCRYPTION_TYPE_UNSPECIFIED"),
14445                Self::GoogleDefaultEncryption => {
14446                    std::option::Option::Some("GOOGLE_DEFAULT_ENCRYPTION")
14447                }
14448                Self::CustomerManagedEncryption => {
14449                    std::option::Option::Some("CUSTOMER_MANAGED_ENCRYPTION")
14450                }
14451                Self::UnknownValue(u) => u.0.name(),
14452            }
14453        }
14454    }
14455
14456    impl std::default::Default for EncryptionType {
14457        fn default() -> Self {
14458            use std::convert::From;
14459            Self::from(0)
14460        }
14461    }
14462
14463    impl std::fmt::Display for EncryptionType {
14464        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14465            wkt::internal::display_enum(f, self.name(), self.value())
14466        }
14467    }
14468
14469    impl std::convert::From<i32> for EncryptionType {
14470        fn from(value: i32) -> Self {
14471            match value {
14472                0 => Self::Unspecified,
14473                1 => Self::GoogleDefaultEncryption,
14474                2 => Self::CustomerManagedEncryption,
14475                _ => Self::UnknownValue(encryption_type::UnknownValue(
14476                    wkt::internal::UnknownEnumValue::Integer(value),
14477                )),
14478            }
14479        }
14480    }
14481
14482    impl std::convert::From<&str> for EncryptionType {
14483        fn from(value: &str) -> Self {
14484            use std::string::ToString;
14485            match value {
14486                "ENCRYPTION_TYPE_UNSPECIFIED" => Self::Unspecified,
14487                "GOOGLE_DEFAULT_ENCRYPTION" => Self::GoogleDefaultEncryption,
14488                "CUSTOMER_MANAGED_ENCRYPTION" => Self::CustomerManagedEncryption,
14489                _ => Self::UnknownValue(encryption_type::UnknownValue(
14490                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14491                )),
14492            }
14493        }
14494    }
14495
14496    impl serde::ser::Serialize for EncryptionType {
14497        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14498        where
14499            S: serde::Serializer,
14500        {
14501            match self {
14502                Self::Unspecified => serializer.serialize_i32(0),
14503                Self::GoogleDefaultEncryption => serializer.serialize_i32(1),
14504                Self::CustomerManagedEncryption => serializer.serialize_i32(2),
14505                Self::UnknownValue(u) => u.0.serialize(serializer),
14506            }
14507        }
14508    }
14509
14510    impl<'de> serde::de::Deserialize<'de> for EncryptionType {
14511        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14512        where
14513            D: serde::Deserializer<'de>,
14514        {
14515            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionType>::new(
14516                ".google.bigtable.admin.v2.EncryptionInfo.EncryptionType",
14517            ))
14518        }
14519    }
14520}
14521
14522/// A snapshot of a table at a particular time. A snapshot can be used as a
14523/// checkpoint for data restoration or a data source for a new table.
14524///
14525/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
14526/// feature is not currently available to most Cloud Bigtable customers. This
14527/// feature might be changed in backward-incompatible ways and is not recommended
14528/// for production use. It is not subject to any SLA or deprecation policy.
14529#[derive(Clone, Default, PartialEq)]
14530#[non_exhaustive]
14531pub struct Snapshot {
14532    /// The unique name of the snapshot.
14533    /// Values are of the form
14534    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
14535    pub name: std::string::String,
14536
14537    /// Output only. The source table at the time the snapshot was taken.
14538    pub source_table: std::option::Option<crate::model::Table>,
14539
14540    /// Output only. The size of the data in the source table at the time the
14541    /// snapshot was taken. In some cases, this value may be computed
14542    /// asynchronously via a background process and a placeholder of 0 will be used
14543    /// in the meantime.
14544    pub data_size_bytes: i64,
14545
14546    /// Output only. The time when the snapshot is created.
14547    pub create_time: std::option::Option<wkt::Timestamp>,
14548
14549    /// The time when the snapshot will be deleted. The maximum amount of time a
14550    /// snapshot can stay active is 365 days. If 'ttl' is not specified,
14551    /// the default maximum of 365 days will be used.
14552    pub delete_time: std::option::Option<wkt::Timestamp>,
14553
14554    /// Output only. The current state of the snapshot.
14555    pub state: crate::model::snapshot::State,
14556
14557    /// Description of the snapshot.
14558    pub description: std::string::String,
14559
14560    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14561}
14562
14563impl Snapshot {
14564    /// Creates a new default instance.
14565    pub fn new() -> Self {
14566        std::default::Default::default()
14567    }
14568
14569    /// Sets the value of [name][crate::model::Snapshot::name].
14570    ///
14571    /// # Example
14572    /// ```ignore,no_run
14573    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14574    /// # let project_id = "project_id";
14575    /// # let instance_id = "instance_id";
14576    /// # let cluster_id = "cluster_id";
14577    /// # let snapshot_id = "snapshot_id";
14578    /// let x = Snapshot::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
14579    /// ```
14580    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14581        self.name = v.into();
14582        self
14583    }
14584
14585    /// Sets the value of [source_table][crate::model::Snapshot::source_table].
14586    ///
14587    /// # Example
14588    /// ```ignore,no_run
14589    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14590    /// use google_cloud_bigtable_admin_v2::model::Table;
14591    /// let x = Snapshot::new().set_source_table(Table::default()/* use setters */);
14592    /// ```
14593    pub fn set_source_table<T>(mut self, v: T) -> Self
14594    where
14595        T: std::convert::Into<crate::model::Table>,
14596    {
14597        self.source_table = std::option::Option::Some(v.into());
14598        self
14599    }
14600
14601    /// Sets or clears the value of [source_table][crate::model::Snapshot::source_table].
14602    ///
14603    /// # Example
14604    /// ```ignore,no_run
14605    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14606    /// use google_cloud_bigtable_admin_v2::model::Table;
14607    /// let x = Snapshot::new().set_or_clear_source_table(Some(Table::default()/* use setters */));
14608    /// let x = Snapshot::new().set_or_clear_source_table(None::<Table>);
14609    /// ```
14610    pub fn set_or_clear_source_table<T>(mut self, v: std::option::Option<T>) -> Self
14611    where
14612        T: std::convert::Into<crate::model::Table>,
14613    {
14614        self.source_table = v.map(|x| x.into());
14615        self
14616    }
14617
14618    /// Sets the value of [data_size_bytes][crate::model::Snapshot::data_size_bytes].
14619    ///
14620    /// # Example
14621    /// ```ignore,no_run
14622    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14623    /// let x = Snapshot::new().set_data_size_bytes(42);
14624    /// ```
14625    pub fn set_data_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14626        self.data_size_bytes = v.into();
14627        self
14628    }
14629
14630    /// Sets the value of [create_time][crate::model::Snapshot::create_time].
14631    ///
14632    /// # Example
14633    /// ```ignore,no_run
14634    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14635    /// use wkt::Timestamp;
14636    /// let x = Snapshot::new().set_create_time(Timestamp::default()/* use setters */);
14637    /// ```
14638    pub fn set_create_time<T>(mut self, v: T) -> Self
14639    where
14640        T: std::convert::Into<wkt::Timestamp>,
14641    {
14642        self.create_time = std::option::Option::Some(v.into());
14643        self
14644    }
14645
14646    /// Sets or clears the value of [create_time][crate::model::Snapshot::create_time].
14647    ///
14648    /// # Example
14649    /// ```ignore,no_run
14650    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14651    /// use wkt::Timestamp;
14652    /// let x = Snapshot::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14653    /// let x = Snapshot::new().set_or_clear_create_time(None::<Timestamp>);
14654    /// ```
14655    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14656    where
14657        T: std::convert::Into<wkt::Timestamp>,
14658    {
14659        self.create_time = v.map(|x| x.into());
14660        self
14661    }
14662
14663    /// Sets the value of [delete_time][crate::model::Snapshot::delete_time].
14664    ///
14665    /// # Example
14666    /// ```ignore,no_run
14667    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14668    /// use wkt::Timestamp;
14669    /// let x = Snapshot::new().set_delete_time(Timestamp::default()/* use setters */);
14670    /// ```
14671    pub fn set_delete_time<T>(mut self, v: T) -> Self
14672    where
14673        T: std::convert::Into<wkt::Timestamp>,
14674    {
14675        self.delete_time = std::option::Option::Some(v.into());
14676        self
14677    }
14678
14679    /// Sets or clears the value of [delete_time][crate::model::Snapshot::delete_time].
14680    ///
14681    /// # Example
14682    /// ```ignore,no_run
14683    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14684    /// use wkt::Timestamp;
14685    /// let x = Snapshot::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
14686    /// let x = Snapshot::new().set_or_clear_delete_time(None::<Timestamp>);
14687    /// ```
14688    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
14689    where
14690        T: std::convert::Into<wkt::Timestamp>,
14691    {
14692        self.delete_time = v.map(|x| x.into());
14693        self
14694    }
14695
14696    /// Sets the value of [state][crate::model::Snapshot::state].
14697    ///
14698    /// # Example
14699    /// ```ignore,no_run
14700    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14701    /// use google_cloud_bigtable_admin_v2::model::snapshot::State;
14702    /// let x0 = Snapshot::new().set_state(State::Ready);
14703    /// let x1 = Snapshot::new().set_state(State::Creating);
14704    /// ```
14705    pub fn set_state<T: std::convert::Into<crate::model::snapshot::State>>(mut self, v: T) -> Self {
14706        self.state = v.into();
14707        self
14708    }
14709
14710    /// Sets the value of [description][crate::model::Snapshot::description].
14711    ///
14712    /// # Example
14713    /// ```ignore,no_run
14714    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14715    /// let x = Snapshot::new().set_description("example");
14716    /// ```
14717    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14718        self.description = v.into();
14719        self
14720    }
14721}
14722
14723impl wkt::message::Message for Snapshot {
14724    fn typename() -> &'static str {
14725        "type.googleapis.com/google.bigtable.admin.v2.Snapshot"
14726    }
14727}
14728
14729/// Defines additional types related to [Snapshot].
14730pub mod snapshot {
14731    #[allow(unused_imports)]
14732    use super::*;
14733
14734    /// Possible states of a snapshot.
14735    ///
14736    /// # Working with unknown values
14737    ///
14738    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14739    /// additional enum variants at any time. Adding new variants is not considered
14740    /// a breaking change. Applications should write their code in anticipation of:
14741    ///
14742    /// - New values appearing in future releases of the client library, **and**
14743    /// - New values received dynamically, without application changes.
14744    ///
14745    /// Please consult the [Working with enums] section in the user guide for some
14746    /// guidelines.
14747    ///
14748    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14749    #[derive(Clone, Debug, PartialEq)]
14750    #[non_exhaustive]
14751    pub enum State {
14752        /// The state of the snapshot could not be determined.
14753        NotKnown,
14754        /// The snapshot has been successfully created and can serve all requests.
14755        Ready,
14756        /// The snapshot is currently being created, and may be destroyed if the
14757        /// creation process encounters an error. A snapshot may not be restored to a
14758        /// table while it is being created.
14759        Creating,
14760        /// If set, the enum was initialized with an unknown value.
14761        ///
14762        /// Applications can examine the value using [State::value] or
14763        /// [State::name].
14764        UnknownValue(state::UnknownValue),
14765    }
14766
14767    #[doc(hidden)]
14768    pub mod state {
14769        #[allow(unused_imports)]
14770        use super::*;
14771        #[derive(Clone, Debug, PartialEq)]
14772        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14773    }
14774
14775    impl State {
14776        /// Gets the enum value.
14777        ///
14778        /// Returns `None` if the enum contains an unknown value deserialized from
14779        /// the string representation of enums.
14780        pub fn value(&self) -> std::option::Option<i32> {
14781            match self {
14782                Self::NotKnown => std::option::Option::Some(0),
14783                Self::Ready => std::option::Option::Some(1),
14784                Self::Creating => std::option::Option::Some(2),
14785                Self::UnknownValue(u) => u.0.value(),
14786            }
14787        }
14788
14789        /// Gets the enum value as a string.
14790        ///
14791        /// Returns `None` if the enum contains an unknown value deserialized from
14792        /// the integer representation of enums.
14793        pub fn name(&self) -> std::option::Option<&str> {
14794            match self {
14795                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
14796                Self::Ready => std::option::Option::Some("READY"),
14797                Self::Creating => std::option::Option::Some("CREATING"),
14798                Self::UnknownValue(u) => u.0.name(),
14799            }
14800        }
14801    }
14802
14803    impl std::default::Default for State {
14804        fn default() -> Self {
14805            use std::convert::From;
14806            Self::from(0)
14807        }
14808    }
14809
14810    impl std::fmt::Display for State {
14811        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14812            wkt::internal::display_enum(f, self.name(), self.value())
14813        }
14814    }
14815
14816    impl std::convert::From<i32> for State {
14817        fn from(value: i32) -> Self {
14818            match value {
14819                0 => Self::NotKnown,
14820                1 => Self::Ready,
14821                2 => Self::Creating,
14822                _ => Self::UnknownValue(state::UnknownValue(
14823                    wkt::internal::UnknownEnumValue::Integer(value),
14824                )),
14825            }
14826        }
14827    }
14828
14829    impl std::convert::From<&str> for State {
14830        fn from(value: &str) -> Self {
14831            use std::string::ToString;
14832            match value {
14833                "STATE_NOT_KNOWN" => Self::NotKnown,
14834                "READY" => Self::Ready,
14835                "CREATING" => Self::Creating,
14836                _ => Self::UnknownValue(state::UnknownValue(
14837                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14838                )),
14839            }
14840        }
14841    }
14842
14843    impl serde::ser::Serialize for State {
14844        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14845        where
14846            S: serde::Serializer,
14847        {
14848            match self {
14849                Self::NotKnown => serializer.serialize_i32(0),
14850                Self::Ready => serializer.serialize_i32(1),
14851                Self::Creating => serializer.serialize_i32(2),
14852                Self::UnknownValue(u) => u.0.serialize(serializer),
14853            }
14854        }
14855    }
14856
14857    impl<'de> serde::de::Deserialize<'de> for State {
14858        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14859        where
14860            D: serde::Deserializer<'de>,
14861        {
14862            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14863                ".google.bigtable.admin.v2.Snapshot.State",
14864            ))
14865        }
14866    }
14867}
14868
14869/// A backup of a Cloud Bigtable table.
14870#[derive(Clone, Default, PartialEq)]
14871#[non_exhaustive]
14872pub struct Backup {
14873    /// A globally unique identifier for the backup which cannot be
14874    /// changed. Values are of the form
14875    /// `projects/{project}/instances/{instance}/clusters/{cluster}/
14876    /// backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
14877    /// The final segment of the name must be between 1 and 50 characters
14878    /// in length.
14879    ///
14880    /// The backup is stored in the cluster identified by the prefix of the backup
14881    /// name of the form
14882    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
14883    pub name: std::string::String,
14884
14885    /// Required. Immutable. Name of the table from which this backup was created.
14886    /// This needs to be in the same instance as the backup. Values are of the form
14887    /// `projects/{project}/instances/{instance}/tables/{source_table}`.
14888    pub source_table: std::string::String,
14889
14890    /// Output only. Name of the backup from which this backup was copied. If a
14891    /// backup is not created by copying a backup, this field will be empty. Values
14892    /// are of the form:
14893    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
14894    pub source_backup: std::string::String,
14895
14896    /// Required. The expiration time of the backup.
14897    /// When creating a backup or updating its `expire_time`, the value must be
14898    /// greater than the backup creation time by:
14899    ///
14900    /// - At least 6 hours
14901    /// - At most 90 days
14902    ///
14903    /// Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
14904    pub expire_time: std::option::Option<wkt::Timestamp>,
14905
14906    /// Output only. `start_time` is the time that the backup was started
14907    /// (i.e. approximately the time the
14908    /// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]
14909    /// request is received).  The row data in this backup will be no older than
14910    /// this timestamp.
14911    ///
14912    /// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
14913    pub start_time: std::option::Option<wkt::Timestamp>,
14914
14915    /// Output only. `end_time` is the time that the backup was finished. The row
14916    /// data in the backup will be no newer than this timestamp.
14917    pub end_time: std::option::Option<wkt::Timestamp>,
14918
14919    /// Output only. Size of the backup in bytes.
14920    pub size_bytes: i64,
14921
14922    /// Output only. The current state of the backup.
14923    pub state: crate::model::backup::State,
14924
14925    /// Output only. The encryption information for the backup.
14926    pub encryption_info: std::option::Option<crate::model::EncryptionInfo>,
14927
14928    /// Indicates the backup type of the backup.
14929    pub backup_type: crate::model::backup::BackupType,
14930
14931    /// The time at which the hot backup will be converted to a standard backup.
14932    /// Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
14933    /// hot backup to a standard backup. This value must be greater than the backup
14934    /// creation time by:
14935    ///
14936    /// - At least 24 hours
14937    ///
14938    /// This field only applies for hot backups. When creating or updating a
14939    /// standard backup, attempting to set this field will fail the request.
14940    pub hot_to_standard_time: std::option::Option<wkt::Timestamp>,
14941
14942    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14943}
14944
14945impl Backup {
14946    /// Creates a new default instance.
14947    pub fn new() -> Self {
14948        std::default::Default::default()
14949    }
14950
14951    /// Sets the value of [name][crate::model::Backup::name].
14952    ///
14953    /// # Example
14954    /// ```ignore,no_run
14955    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14956    /// # let project_id = "project_id";
14957    /// # let instance_id = "instance_id";
14958    /// # let cluster_id = "cluster_id";
14959    /// # let backup_id = "backup_id";
14960    /// let x = Backup::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
14961    /// ```
14962    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14963        self.name = v.into();
14964        self
14965    }
14966
14967    /// Sets the value of [source_table][crate::model::Backup::source_table].
14968    ///
14969    /// # Example
14970    /// ```ignore,no_run
14971    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14972    /// let x = Backup::new().set_source_table("example");
14973    /// ```
14974    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14975        self.source_table = v.into();
14976        self
14977    }
14978
14979    /// Sets the value of [source_backup][crate::model::Backup::source_backup].
14980    ///
14981    /// # Example
14982    /// ```ignore,no_run
14983    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14984    /// let x = Backup::new().set_source_backup("example");
14985    /// ```
14986    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14987        self.source_backup = v.into();
14988        self
14989    }
14990
14991    /// Sets the value of [expire_time][crate::model::Backup::expire_time].
14992    ///
14993    /// # Example
14994    /// ```ignore,no_run
14995    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14996    /// use wkt::Timestamp;
14997    /// let x = Backup::new().set_expire_time(Timestamp::default()/* use setters */);
14998    /// ```
14999    pub fn set_expire_time<T>(mut self, v: T) -> Self
15000    where
15001        T: std::convert::Into<wkt::Timestamp>,
15002    {
15003        self.expire_time = std::option::Option::Some(v.into());
15004        self
15005    }
15006
15007    /// Sets or clears the value of [expire_time][crate::model::Backup::expire_time].
15008    ///
15009    /// # Example
15010    /// ```ignore,no_run
15011    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15012    /// use wkt::Timestamp;
15013    /// let x = Backup::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
15014    /// let x = Backup::new().set_or_clear_expire_time(None::<Timestamp>);
15015    /// ```
15016    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
15017    where
15018        T: std::convert::Into<wkt::Timestamp>,
15019    {
15020        self.expire_time = v.map(|x| x.into());
15021        self
15022    }
15023
15024    /// Sets the value of [start_time][crate::model::Backup::start_time].
15025    ///
15026    /// # Example
15027    /// ```ignore,no_run
15028    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15029    /// use wkt::Timestamp;
15030    /// let x = Backup::new().set_start_time(Timestamp::default()/* use setters */);
15031    /// ```
15032    pub fn set_start_time<T>(mut self, v: T) -> Self
15033    where
15034        T: std::convert::Into<wkt::Timestamp>,
15035    {
15036        self.start_time = std::option::Option::Some(v.into());
15037        self
15038    }
15039
15040    /// Sets or clears the value of [start_time][crate::model::Backup::start_time].
15041    ///
15042    /// # Example
15043    /// ```ignore,no_run
15044    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15045    /// use wkt::Timestamp;
15046    /// let x = Backup::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
15047    /// let x = Backup::new().set_or_clear_start_time(None::<Timestamp>);
15048    /// ```
15049    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
15050    where
15051        T: std::convert::Into<wkt::Timestamp>,
15052    {
15053        self.start_time = v.map(|x| x.into());
15054        self
15055    }
15056
15057    /// Sets the value of [end_time][crate::model::Backup::end_time].
15058    ///
15059    /// # Example
15060    /// ```ignore,no_run
15061    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15062    /// use wkt::Timestamp;
15063    /// let x = Backup::new().set_end_time(Timestamp::default()/* use setters */);
15064    /// ```
15065    pub fn set_end_time<T>(mut self, v: T) -> Self
15066    where
15067        T: std::convert::Into<wkt::Timestamp>,
15068    {
15069        self.end_time = std::option::Option::Some(v.into());
15070        self
15071    }
15072
15073    /// Sets or clears the value of [end_time][crate::model::Backup::end_time].
15074    ///
15075    /// # Example
15076    /// ```ignore,no_run
15077    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15078    /// use wkt::Timestamp;
15079    /// let x = Backup::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15080    /// let x = Backup::new().set_or_clear_end_time(None::<Timestamp>);
15081    /// ```
15082    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15083    where
15084        T: std::convert::Into<wkt::Timestamp>,
15085    {
15086        self.end_time = v.map(|x| x.into());
15087        self
15088    }
15089
15090    /// Sets the value of [size_bytes][crate::model::Backup::size_bytes].
15091    ///
15092    /// # Example
15093    /// ```ignore,no_run
15094    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15095    /// let x = Backup::new().set_size_bytes(42);
15096    /// ```
15097    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15098        self.size_bytes = v.into();
15099        self
15100    }
15101
15102    /// Sets the value of [state][crate::model::Backup::state].
15103    ///
15104    /// # Example
15105    /// ```ignore,no_run
15106    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15107    /// use google_cloud_bigtable_admin_v2::model::backup::State;
15108    /// let x0 = Backup::new().set_state(State::Creating);
15109    /// let x1 = Backup::new().set_state(State::Ready);
15110    /// ```
15111    pub fn set_state<T: std::convert::Into<crate::model::backup::State>>(mut self, v: T) -> Self {
15112        self.state = v.into();
15113        self
15114    }
15115
15116    /// Sets the value of [encryption_info][crate::model::Backup::encryption_info].
15117    ///
15118    /// # Example
15119    /// ```ignore,no_run
15120    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15121    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
15122    /// let x = Backup::new().set_encryption_info(EncryptionInfo::default()/* use setters */);
15123    /// ```
15124    pub fn set_encryption_info<T>(mut self, v: T) -> Self
15125    where
15126        T: std::convert::Into<crate::model::EncryptionInfo>,
15127    {
15128        self.encryption_info = std::option::Option::Some(v.into());
15129        self
15130    }
15131
15132    /// Sets or clears the value of [encryption_info][crate::model::Backup::encryption_info].
15133    ///
15134    /// # Example
15135    /// ```ignore,no_run
15136    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15137    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
15138    /// let x = Backup::new().set_or_clear_encryption_info(Some(EncryptionInfo::default()/* use setters */));
15139    /// let x = Backup::new().set_or_clear_encryption_info(None::<EncryptionInfo>);
15140    /// ```
15141    pub fn set_or_clear_encryption_info<T>(mut self, v: std::option::Option<T>) -> Self
15142    where
15143        T: std::convert::Into<crate::model::EncryptionInfo>,
15144    {
15145        self.encryption_info = v.map(|x| x.into());
15146        self
15147    }
15148
15149    /// Sets the value of [backup_type][crate::model::Backup::backup_type].
15150    ///
15151    /// # Example
15152    /// ```ignore,no_run
15153    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15154    /// use google_cloud_bigtable_admin_v2::model::backup::BackupType;
15155    /// let x0 = Backup::new().set_backup_type(BackupType::Standard);
15156    /// let x1 = Backup::new().set_backup_type(BackupType::Hot);
15157    /// ```
15158    pub fn set_backup_type<T: std::convert::Into<crate::model::backup::BackupType>>(
15159        mut self,
15160        v: T,
15161    ) -> Self {
15162        self.backup_type = v.into();
15163        self
15164    }
15165
15166    /// Sets the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
15167    ///
15168    /// # Example
15169    /// ```ignore,no_run
15170    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15171    /// use wkt::Timestamp;
15172    /// let x = Backup::new().set_hot_to_standard_time(Timestamp::default()/* use setters */);
15173    /// ```
15174    pub fn set_hot_to_standard_time<T>(mut self, v: T) -> Self
15175    where
15176        T: std::convert::Into<wkt::Timestamp>,
15177    {
15178        self.hot_to_standard_time = std::option::Option::Some(v.into());
15179        self
15180    }
15181
15182    /// Sets or clears the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
15183    ///
15184    /// # Example
15185    /// ```ignore,no_run
15186    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15187    /// use wkt::Timestamp;
15188    /// let x = Backup::new().set_or_clear_hot_to_standard_time(Some(Timestamp::default()/* use setters */));
15189    /// let x = Backup::new().set_or_clear_hot_to_standard_time(None::<Timestamp>);
15190    /// ```
15191    pub fn set_or_clear_hot_to_standard_time<T>(mut self, v: std::option::Option<T>) -> Self
15192    where
15193        T: std::convert::Into<wkt::Timestamp>,
15194    {
15195        self.hot_to_standard_time = v.map(|x| x.into());
15196        self
15197    }
15198}
15199
15200impl wkt::message::Message for Backup {
15201    fn typename() -> &'static str {
15202        "type.googleapis.com/google.bigtable.admin.v2.Backup"
15203    }
15204}
15205
15206/// Defines additional types related to [Backup].
15207pub mod backup {
15208    #[allow(unused_imports)]
15209    use super::*;
15210
15211    /// Indicates the current state of the backup.
15212    ///
15213    /// # Working with unknown values
15214    ///
15215    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15216    /// additional enum variants at any time. Adding new variants is not considered
15217    /// a breaking change. Applications should write their code in anticipation of:
15218    ///
15219    /// - New values appearing in future releases of the client library, **and**
15220    /// - New values received dynamically, without application changes.
15221    ///
15222    /// Please consult the [Working with enums] section in the user guide for some
15223    /// guidelines.
15224    ///
15225    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15226    #[derive(Clone, Debug, PartialEq)]
15227    #[non_exhaustive]
15228    pub enum State {
15229        /// Not specified.
15230        Unspecified,
15231        /// The pending backup is still being created. Operations on the
15232        /// backup may fail with `FAILED_PRECONDITION` in this state.
15233        Creating,
15234        /// The backup is complete and ready for use.
15235        Ready,
15236        /// If set, the enum was initialized with an unknown value.
15237        ///
15238        /// Applications can examine the value using [State::value] or
15239        /// [State::name].
15240        UnknownValue(state::UnknownValue),
15241    }
15242
15243    #[doc(hidden)]
15244    pub mod state {
15245        #[allow(unused_imports)]
15246        use super::*;
15247        #[derive(Clone, Debug, PartialEq)]
15248        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15249    }
15250
15251    impl State {
15252        /// Gets the enum value.
15253        ///
15254        /// Returns `None` if the enum contains an unknown value deserialized from
15255        /// the string representation of enums.
15256        pub fn value(&self) -> std::option::Option<i32> {
15257            match self {
15258                Self::Unspecified => std::option::Option::Some(0),
15259                Self::Creating => std::option::Option::Some(1),
15260                Self::Ready => std::option::Option::Some(2),
15261                Self::UnknownValue(u) => u.0.value(),
15262            }
15263        }
15264
15265        /// Gets the enum value as a string.
15266        ///
15267        /// Returns `None` if the enum contains an unknown value deserialized from
15268        /// the integer representation of enums.
15269        pub fn name(&self) -> std::option::Option<&str> {
15270            match self {
15271                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
15272                Self::Creating => std::option::Option::Some("CREATING"),
15273                Self::Ready => std::option::Option::Some("READY"),
15274                Self::UnknownValue(u) => u.0.name(),
15275            }
15276        }
15277    }
15278
15279    impl std::default::Default for State {
15280        fn default() -> Self {
15281            use std::convert::From;
15282            Self::from(0)
15283        }
15284    }
15285
15286    impl std::fmt::Display for State {
15287        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15288            wkt::internal::display_enum(f, self.name(), self.value())
15289        }
15290    }
15291
15292    impl std::convert::From<i32> for State {
15293        fn from(value: i32) -> Self {
15294            match value {
15295                0 => Self::Unspecified,
15296                1 => Self::Creating,
15297                2 => Self::Ready,
15298                _ => Self::UnknownValue(state::UnknownValue(
15299                    wkt::internal::UnknownEnumValue::Integer(value),
15300                )),
15301            }
15302        }
15303    }
15304
15305    impl std::convert::From<&str> for State {
15306        fn from(value: &str) -> Self {
15307            use std::string::ToString;
15308            match value {
15309                "STATE_UNSPECIFIED" => Self::Unspecified,
15310                "CREATING" => Self::Creating,
15311                "READY" => Self::Ready,
15312                _ => Self::UnknownValue(state::UnknownValue(
15313                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15314                )),
15315            }
15316        }
15317    }
15318
15319    impl serde::ser::Serialize for State {
15320        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15321        where
15322            S: serde::Serializer,
15323        {
15324            match self {
15325                Self::Unspecified => serializer.serialize_i32(0),
15326                Self::Creating => serializer.serialize_i32(1),
15327                Self::Ready => serializer.serialize_i32(2),
15328                Self::UnknownValue(u) => u.0.serialize(serializer),
15329            }
15330        }
15331    }
15332
15333    impl<'de> serde::de::Deserialize<'de> for State {
15334        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15335        where
15336            D: serde::Deserializer<'de>,
15337        {
15338            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15339                ".google.bigtable.admin.v2.Backup.State",
15340            ))
15341        }
15342    }
15343
15344    /// The type of the backup.
15345    ///
15346    /// # Working with unknown values
15347    ///
15348    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15349    /// additional enum variants at any time. Adding new variants is not considered
15350    /// a breaking change. Applications should write their code in anticipation of:
15351    ///
15352    /// - New values appearing in future releases of the client library, **and**
15353    /// - New values received dynamically, without application changes.
15354    ///
15355    /// Please consult the [Working with enums] section in the user guide for some
15356    /// guidelines.
15357    ///
15358    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15359    #[derive(Clone, Debug, PartialEq)]
15360    #[non_exhaustive]
15361    pub enum BackupType {
15362        /// Not specified.
15363        Unspecified,
15364        /// The default type for Cloud Bigtable managed backups. Supported for
15365        /// backups created in both HDD and SSD instances. Requires optimization when
15366        /// restored to a table in an SSD instance.
15367        Standard,
15368        /// A backup type with faster restore to SSD performance. Only supported for
15369        /// backups created in SSD instances. A new SSD table restored from a hot
15370        /// backup reaches production performance more quickly than a standard
15371        /// backup.
15372        Hot,
15373        /// If set, the enum was initialized with an unknown value.
15374        ///
15375        /// Applications can examine the value using [BackupType::value] or
15376        /// [BackupType::name].
15377        UnknownValue(backup_type::UnknownValue),
15378    }
15379
15380    #[doc(hidden)]
15381    pub mod backup_type {
15382        #[allow(unused_imports)]
15383        use super::*;
15384        #[derive(Clone, Debug, PartialEq)]
15385        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15386    }
15387
15388    impl BackupType {
15389        /// Gets the enum value.
15390        ///
15391        /// Returns `None` if the enum contains an unknown value deserialized from
15392        /// the string representation of enums.
15393        pub fn value(&self) -> std::option::Option<i32> {
15394            match self {
15395                Self::Unspecified => std::option::Option::Some(0),
15396                Self::Standard => std::option::Option::Some(1),
15397                Self::Hot => std::option::Option::Some(2),
15398                Self::UnknownValue(u) => u.0.value(),
15399            }
15400        }
15401
15402        /// Gets the enum value as a string.
15403        ///
15404        /// Returns `None` if the enum contains an unknown value deserialized from
15405        /// the integer representation of enums.
15406        pub fn name(&self) -> std::option::Option<&str> {
15407            match self {
15408                Self::Unspecified => std::option::Option::Some("BACKUP_TYPE_UNSPECIFIED"),
15409                Self::Standard => std::option::Option::Some("STANDARD"),
15410                Self::Hot => std::option::Option::Some("HOT"),
15411                Self::UnknownValue(u) => u.0.name(),
15412            }
15413        }
15414    }
15415
15416    impl std::default::Default for BackupType {
15417        fn default() -> Self {
15418            use std::convert::From;
15419            Self::from(0)
15420        }
15421    }
15422
15423    impl std::fmt::Display for BackupType {
15424        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15425            wkt::internal::display_enum(f, self.name(), self.value())
15426        }
15427    }
15428
15429    impl std::convert::From<i32> for BackupType {
15430        fn from(value: i32) -> Self {
15431            match value {
15432                0 => Self::Unspecified,
15433                1 => Self::Standard,
15434                2 => Self::Hot,
15435                _ => Self::UnknownValue(backup_type::UnknownValue(
15436                    wkt::internal::UnknownEnumValue::Integer(value),
15437                )),
15438            }
15439        }
15440    }
15441
15442    impl std::convert::From<&str> for BackupType {
15443        fn from(value: &str) -> Self {
15444            use std::string::ToString;
15445            match value {
15446                "BACKUP_TYPE_UNSPECIFIED" => Self::Unspecified,
15447                "STANDARD" => Self::Standard,
15448                "HOT" => Self::Hot,
15449                _ => Self::UnknownValue(backup_type::UnknownValue(
15450                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15451                )),
15452            }
15453        }
15454    }
15455
15456    impl serde::ser::Serialize for BackupType {
15457        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15458        where
15459            S: serde::Serializer,
15460        {
15461            match self {
15462                Self::Unspecified => serializer.serialize_i32(0),
15463                Self::Standard => serializer.serialize_i32(1),
15464                Self::Hot => serializer.serialize_i32(2),
15465                Self::UnknownValue(u) => u.0.serialize(serializer),
15466            }
15467        }
15468    }
15469
15470    impl<'de> serde::de::Deserialize<'de> for BackupType {
15471        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15472        where
15473            D: serde::Deserializer<'de>,
15474        {
15475            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupType>::new(
15476                ".google.bigtable.admin.v2.Backup.BackupType",
15477            ))
15478        }
15479    }
15480}
15481
15482/// Information about a backup.
15483#[derive(Clone, Default, PartialEq)]
15484#[non_exhaustive]
15485pub struct BackupInfo {
15486    /// Output only. Name of the backup.
15487    pub backup: std::string::String,
15488
15489    /// Output only. The time that the backup was started. Row data in the backup
15490    /// will be no older than this timestamp.
15491    pub start_time: std::option::Option<wkt::Timestamp>,
15492
15493    /// Output only. This time that the backup was finished. Row data in the
15494    /// backup will be no newer than this timestamp.
15495    pub end_time: std::option::Option<wkt::Timestamp>,
15496
15497    /// Output only. Name of the table the backup was created from.
15498    pub source_table: std::string::String,
15499
15500    /// Output only. Name of the backup from which this backup was copied. If a
15501    /// backup is not created by copying a backup, this field will be empty. Values
15502    /// are of the form:
15503    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
15504    pub source_backup: std::string::String,
15505
15506    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15507}
15508
15509impl BackupInfo {
15510    /// Creates a new default instance.
15511    pub fn new() -> Self {
15512        std::default::Default::default()
15513    }
15514
15515    /// Sets the value of [backup][crate::model::BackupInfo::backup].
15516    ///
15517    /// # Example
15518    /// ```ignore,no_run
15519    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15520    /// let x = BackupInfo::new().set_backup("example");
15521    /// ```
15522    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15523        self.backup = v.into();
15524        self
15525    }
15526
15527    /// Sets the value of [start_time][crate::model::BackupInfo::start_time].
15528    ///
15529    /// # Example
15530    /// ```ignore,no_run
15531    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15532    /// use wkt::Timestamp;
15533    /// let x = BackupInfo::new().set_start_time(Timestamp::default()/* use setters */);
15534    /// ```
15535    pub fn set_start_time<T>(mut self, v: T) -> Self
15536    where
15537        T: std::convert::Into<wkt::Timestamp>,
15538    {
15539        self.start_time = std::option::Option::Some(v.into());
15540        self
15541    }
15542
15543    /// Sets or clears the value of [start_time][crate::model::BackupInfo::start_time].
15544    ///
15545    /// # Example
15546    /// ```ignore,no_run
15547    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15548    /// use wkt::Timestamp;
15549    /// let x = BackupInfo::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
15550    /// let x = BackupInfo::new().set_or_clear_start_time(None::<Timestamp>);
15551    /// ```
15552    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
15553    where
15554        T: std::convert::Into<wkt::Timestamp>,
15555    {
15556        self.start_time = v.map(|x| x.into());
15557        self
15558    }
15559
15560    /// Sets the value of [end_time][crate::model::BackupInfo::end_time].
15561    ///
15562    /// # Example
15563    /// ```ignore,no_run
15564    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15565    /// use wkt::Timestamp;
15566    /// let x = BackupInfo::new().set_end_time(Timestamp::default()/* use setters */);
15567    /// ```
15568    pub fn set_end_time<T>(mut self, v: T) -> Self
15569    where
15570        T: std::convert::Into<wkt::Timestamp>,
15571    {
15572        self.end_time = std::option::Option::Some(v.into());
15573        self
15574    }
15575
15576    /// Sets or clears the value of [end_time][crate::model::BackupInfo::end_time].
15577    ///
15578    /// # Example
15579    /// ```ignore,no_run
15580    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15581    /// use wkt::Timestamp;
15582    /// let x = BackupInfo::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15583    /// let x = BackupInfo::new().set_or_clear_end_time(None::<Timestamp>);
15584    /// ```
15585    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15586    where
15587        T: std::convert::Into<wkt::Timestamp>,
15588    {
15589        self.end_time = v.map(|x| x.into());
15590        self
15591    }
15592
15593    /// Sets the value of [source_table][crate::model::BackupInfo::source_table].
15594    ///
15595    /// # Example
15596    /// ```ignore,no_run
15597    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15598    /// let x = BackupInfo::new().set_source_table("example");
15599    /// ```
15600    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15601        self.source_table = v.into();
15602        self
15603    }
15604
15605    /// Sets the value of [source_backup][crate::model::BackupInfo::source_backup].
15606    ///
15607    /// # Example
15608    /// ```ignore,no_run
15609    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15610    /// let x = BackupInfo::new().set_source_backup("example");
15611    /// ```
15612    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15613        self.source_backup = v.into();
15614        self
15615    }
15616}
15617
15618impl wkt::message::Message for BackupInfo {
15619    fn typename() -> &'static str {
15620        "type.googleapis.com/google.bigtable.admin.v2.BackupInfo"
15621    }
15622}
15623
15624/// Config for tiered storage.
15625/// A valid config must have a valid TieredStorageRule. Otherwise the whole
15626/// TieredStorageConfig must be unset.
15627/// By default all data is stored in the SSD tier (only SSD instances can
15628/// configure tiered storage).
15629#[derive(Clone, Default, PartialEq)]
15630#[non_exhaustive]
15631pub struct TieredStorageConfig {
15632    /// Rule to specify what data is stored in the infrequent access(IA) tier.
15633    /// The IA tier allows storing more data per node with reduced performance.
15634    pub infrequent_access: std::option::Option<crate::model::TieredStorageRule>,
15635
15636    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15637}
15638
15639impl TieredStorageConfig {
15640    /// Creates a new default instance.
15641    pub fn new() -> Self {
15642        std::default::Default::default()
15643    }
15644
15645    /// Sets the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
15646    ///
15647    /// # Example
15648    /// ```ignore,no_run
15649    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
15650    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15651    /// let x = TieredStorageConfig::new().set_infrequent_access(TieredStorageRule::default()/* use setters */);
15652    /// ```
15653    pub fn set_infrequent_access<T>(mut self, v: T) -> Self
15654    where
15655        T: std::convert::Into<crate::model::TieredStorageRule>,
15656    {
15657        self.infrequent_access = std::option::Option::Some(v.into());
15658        self
15659    }
15660
15661    /// Sets or clears the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
15662    ///
15663    /// # Example
15664    /// ```ignore,no_run
15665    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
15666    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15667    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(Some(TieredStorageRule::default()/* use setters */));
15668    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(None::<TieredStorageRule>);
15669    /// ```
15670    pub fn set_or_clear_infrequent_access<T>(mut self, v: std::option::Option<T>) -> Self
15671    where
15672        T: std::convert::Into<crate::model::TieredStorageRule>,
15673    {
15674        self.infrequent_access = v.map(|x| x.into());
15675        self
15676    }
15677}
15678
15679impl wkt::message::Message for TieredStorageConfig {
15680    fn typename() -> &'static str {
15681        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageConfig"
15682    }
15683}
15684
15685/// Rule to specify what data is stored in a storage tier.
15686#[derive(Clone, Default, PartialEq)]
15687#[non_exhaustive]
15688pub struct TieredStorageRule {
15689    /// Rules to specify what data is stored in this tier.
15690    pub rule: std::option::Option<crate::model::tiered_storage_rule::Rule>,
15691
15692    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15693}
15694
15695impl TieredStorageRule {
15696    /// Creates a new default instance.
15697    pub fn new() -> Self {
15698        std::default::Default::default()
15699    }
15700
15701    /// Sets the value of [rule][crate::model::TieredStorageRule::rule].
15702    ///
15703    /// Note that all the setters affecting `rule` are mutually
15704    /// exclusive.
15705    ///
15706    /// # Example
15707    /// ```ignore,no_run
15708    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15709    /// use wkt::Duration;
15710    /// let x = TieredStorageRule::new().set_rule(Some(
15711    ///     google_cloud_bigtable_admin_v2::model::tiered_storage_rule::Rule::IncludeIfOlderThan(Duration::default().into())));
15712    /// ```
15713    pub fn set_rule<
15714        T: std::convert::Into<std::option::Option<crate::model::tiered_storage_rule::Rule>>,
15715    >(
15716        mut self,
15717        v: T,
15718    ) -> Self {
15719        self.rule = v.into();
15720        self
15721    }
15722
15723    /// The value of [rule][crate::model::TieredStorageRule::rule]
15724    /// if it holds a `IncludeIfOlderThan`, `None` if the field is not set or
15725    /// holds a different branch.
15726    pub fn include_if_older_than(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
15727        #[allow(unreachable_patterns)]
15728        self.rule.as_ref().and_then(|v| match v {
15729            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v) => {
15730                std::option::Option::Some(v)
15731            }
15732            _ => std::option::Option::None,
15733        })
15734    }
15735
15736    /// Sets the value of [rule][crate::model::TieredStorageRule::rule]
15737    /// to hold a `IncludeIfOlderThan`.
15738    ///
15739    /// Note that all the setters affecting `rule` are
15740    /// mutually exclusive.
15741    ///
15742    /// # Example
15743    /// ```ignore,no_run
15744    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15745    /// use wkt::Duration;
15746    /// let x = TieredStorageRule::new().set_include_if_older_than(Duration::default()/* use setters */);
15747    /// assert!(x.include_if_older_than().is_some());
15748    /// ```
15749    pub fn set_include_if_older_than<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
15750        mut self,
15751        v: T,
15752    ) -> Self {
15753        self.rule = std::option::Option::Some(
15754            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v.into()),
15755        );
15756        self
15757    }
15758}
15759
15760impl wkt::message::Message for TieredStorageRule {
15761    fn typename() -> &'static str {
15762        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageRule"
15763    }
15764}
15765
15766/// Defines additional types related to [TieredStorageRule].
15767pub mod tiered_storage_rule {
15768    #[allow(unused_imports)]
15769    use super::*;
15770
15771    /// Rules to specify what data is stored in this tier.
15772    #[derive(Clone, Debug, PartialEq)]
15773    #[non_exhaustive]
15774    pub enum Rule {
15775        /// Include cells older than the given age.
15776        /// For the infrequent access tier, this value must be at least 30 days.
15777        IncludeIfOlderThan(std::boxed::Box<wkt::Duration>),
15778    }
15779}
15780
15781/// Represents a protobuf schema.
15782#[derive(Clone, Default, PartialEq)]
15783#[non_exhaustive]
15784pub struct ProtoSchema {
15785    /// Required. Contains a protobuf-serialized
15786    /// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
15787    /// which could include multiple proto files.
15788    /// To generate it, [install](https://grpc.io/docs/protoc-installation/) and
15789    /// run `protoc` with
15790    /// `--include_imports` and `--descriptor_set_out`. For example, to generate
15791    /// for moon/shot/app.proto, run
15792    ///
15793    /// ```norust
15794    /// $protoc  --proto_path=/app_path --proto_path=/lib_path \
15795    ///          --include_imports \
15796    ///          --descriptor_set_out=descriptors.pb \
15797    ///          moon/shot/app.proto
15798    /// ```
15799    ///
15800    /// For more details, see protobuffer [self
15801    /// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
15802    pub proto_descriptors: ::bytes::Bytes,
15803
15804    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15805}
15806
15807impl ProtoSchema {
15808    /// Creates a new default instance.
15809    pub fn new() -> Self {
15810        std::default::Default::default()
15811    }
15812
15813    /// Sets the value of [proto_descriptors][crate::model::ProtoSchema::proto_descriptors].
15814    ///
15815    /// # Example
15816    /// ```ignore,no_run
15817    /// # use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15818    /// let x = ProtoSchema::new().set_proto_descriptors(bytes::Bytes::from_static(b"example"));
15819    /// ```
15820    pub fn set_proto_descriptors<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
15821        self.proto_descriptors = v.into();
15822        self
15823    }
15824}
15825
15826impl wkt::message::Message for ProtoSchema {
15827    fn typename() -> &'static str {
15828        "type.googleapis.com/google.bigtable.admin.v2.ProtoSchema"
15829    }
15830}
15831
15832/// A named collection of related schemas.
15833#[derive(Clone, Default, PartialEq)]
15834#[non_exhaustive]
15835pub struct SchemaBundle {
15836    /// Identifier. The unique name identifying this schema bundle.
15837    /// Values are of the form
15838    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
15839    pub name: std::string::String,
15840
15841    /// Optional. The etag for this schema bundle.
15842    /// This may be sent on update and delete requests to ensure the
15843    /// client has an up-to-date value before proceeding. The server
15844    /// returns an ABORTED error on a mismatched etag.
15845    pub etag: std::string::String,
15846
15847    /// The type of this schema bundle. The oneof case cannot change after
15848    /// creation.
15849    pub r#type: std::option::Option<crate::model::schema_bundle::Type>,
15850
15851    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15852}
15853
15854impl SchemaBundle {
15855    /// Creates a new default instance.
15856    pub fn new() -> Self {
15857        std::default::Default::default()
15858    }
15859
15860    /// Sets the value of [name][crate::model::SchemaBundle::name].
15861    ///
15862    /// # Example
15863    /// ```ignore,no_run
15864    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15865    /// # let project_id = "project_id";
15866    /// # let instance_id = "instance_id";
15867    /// # let table_id = "table_id";
15868    /// # let schema_bundle_id = "schema_bundle_id";
15869    /// let x = SchemaBundle::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"));
15870    /// ```
15871    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15872        self.name = v.into();
15873        self
15874    }
15875
15876    /// Sets the value of [etag][crate::model::SchemaBundle::etag].
15877    ///
15878    /// # Example
15879    /// ```ignore,no_run
15880    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15881    /// let x = SchemaBundle::new().set_etag("example");
15882    /// ```
15883    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15884        self.etag = v.into();
15885        self
15886    }
15887
15888    /// Sets the value of [r#type][crate::model::SchemaBundle::type].
15889    ///
15890    /// Note that all the setters affecting `r#type` are mutually
15891    /// exclusive.
15892    ///
15893    /// # Example
15894    /// ```ignore,no_run
15895    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15896    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15897    /// let x = SchemaBundle::new().set_type(Some(
15898    ///     google_cloud_bigtable_admin_v2::model::schema_bundle::Type::ProtoSchema(ProtoSchema::default().into())));
15899    /// ```
15900    pub fn set_type<
15901        T: std::convert::Into<std::option::Option<crate::model::schema_bundle::Type>>,
15902    >(
15903        mut self,
15904        v: T,
15905    ) -> Self {
15906        self.r#type = v.into();
15907        self
15908    }
15909
15910    /// The value of [r#type][crate::model::SchemaBundle::r#type]
15911    /// if it holds a `ProtoSchema`, `None` if the field is not set or
15912    /// holds a different branch.
15913    pub fn proto_schema(&self) -> std::option::Option<&std::boxed::Box<crate::model::ProtoSchema>> {
15914        #[allow(unreachable_patterns)]
15915        self.r#type.as_ref().and_then(|v| match v {
15916            crate::model::schema_bundle::Type::ProtoSchema(v) => std::option::Option::Some(v),
15917            _ => std::option::Option::None,
15918        })
15919    }
15920
15921    /// Sets the value of [r#type][crate::model::SchemaBundle::r#type]
15922    /// to hold a `ProtoSchema`.
15923    ///
15924    /// Note that all the setters affecting `r#type` are
15925    /// mutually exclusive.
15926    ///
15927    /// # Example
15928    /// ```ignore,no_run
15929    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15930    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15931    /// let x = SchemaBundle::new().set_proto_schema(ProtoSchema::default()/* use setters */);
15932    /// assert!(x.proto_schema().is_some());
15933    /// ```
15934    pub fn set_proto_schema<T: std::convert::Into<std::boxed::Box<crate::model::ProtoSchema>>>(
15935        mut self,
15936        v: T,
15937    ) -> Self {
15938        self.r#type =
15939            std::option::Option::Some(crate::model::schema_bundle::Type::ProtoSchema(v.into()));
15940        self
15941    }
15942}
15943
15944impl wkt::message::Message for SchemaBundle {
15945    fn typename() -> &'static str {
15946        "type.googleapis.com/google.bigtable.admin.v2.SchemaBundle"
15947    }
15948}
15949
15950/// Defines additional types related to [SchemaBundle].
15951pub mod schema_bundle {
15952    #[allow(unused_imports)]
15953    use super::*;
15954
15955    /// The type of this schema bundle. The oneof case cannot change after
15956    /// creation.
15957    #[derive(Clone, Debug, PartialEq)]
15958    #[non_exhaustive]
15959    pub enum Type {
15960        /// Schema for Protobufs.
15961        ProtoSchema(std::boxed::Box<crate::model::ProtoSchema>),
15962    }
15963}
15964
15965/// `Type` represents the type of data that is written to, read from, or stored
15966/// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
15967/// familiarity and consistency across products and features.
15968///
15969/// For compatibility with Bigtable's existing untyped APIs, each `Type` includes
15970/// an `Encoding` which describes how to convert to or from the underlying data.
15971///
15972/// Each encoding can operate in one of two modes:
15973///
15974/// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)`
15975///   if and only if `X <= Y`. This is useful anywhere sort order is important,
15976///   for example when encoding keys.
15977/// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then
15978///   `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For
15979///   example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}"
15980///   are valid encodings of the same JSON value.
15981///
15982/// The API clearly documents which mode is used wherever an encoding can be
15983/// configured. Each encoding also documents which values are supported in which
15984/// modes. For example, when encoding INT64 as a numeric STRING, negative numbers
15985/// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but
15986/// `STRING("-00001") > STRING("00001")`.
15987#[derive(Clone, Default, PartialEq)]
15988#[non_exhaustive]
15989pub struct Type {
15990    /// The kind of type that this represents.
15991    pub kind: std::option::Option<crate::model::r#type::Kind>,
15992
15993    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15994}
15995
15996impl Type {
15997    /// Creates a new default instance.
15998    pub fn new() -> Self {
15999        std::default::Default::default()
16000    }
16001
16002    /// Sets the value of [kind][crate::model::Type::kind].
16003    ///
16004    /// Note that all the setters affecting `kind` are mutually
16005    /// exclusive.
16006    ///
16007    /// # Example
16008    /// ```ignore,no_run
16009    /// # use google_cloud_bigtable_admin_v2::model::Type;
16010    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16011    /// let x = Type::new().set_kind(Some(
16012    ///     google_cloud_bigtable_admin_v2::model::r#type::Kind::BytesType(Bytes::default().into())));
16013    /// ```
16014    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::r#type::Kind>>>(
16015        mut self,
16016        v: T,
16017    ) -> Self {
16018        self.kind = v.into();
16019        self
16020    }
16021
16022    /// The value of [kind][crate::model::Type::kind]
16023    /// if it holds a `BytesType`, `None` if the field is not set or
16024    /// holds a different branch.
16025    pub fn bytes_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bytes>> {
16026        #[allow(unreachable_patterns)]
16027        self.kind.as_ref().and_then(|v| match v {
16028            crate::model::r#type::Kind::BytesType(v) => std::option::Option::Some(v),
16029            _ => std::option::Option::None,
16030        })
16031    }
16032
16033    /// Sets the value of [kind][crate::model::Type::kind]
16034    /// to hold a `BytesType`.
16035    ///
16036    /// Note that all the setters affecting `kind` are
16037    /// mutually exclusive.
16038    ///
16039    /// # Example
16040    /// ```ignore,no_run
16041    /// # use google_cloud_bigtable_admin_v2::model::Type;
16042    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16043    /// let x = Type::new().set_bytes_type(Bytes::default()/* use setters */);
16044    /// assert!(x.bytes_type().is_some());
16045    /// assert!(x.string_type().is_none());
16046    /// assert!(x.int64_type().is_none());
16047    /// assert!(x.float32_type().is_none());
16048    /// assert!(x.float64_type().is_none());
16049    /// assert!(x.bool_type().is_none());
16050    /// assert!(x.timestamp_type().is_none());
16051    /// assert!(x.date_type().is_none());
16052    /// assert!(x.aggregate_type().is_none());
16053    /// assert!(x.struct_type().is_none());
16054    /// assert!(x.array_type().is_none());
16055    /// assert!(x.map_type().is_none());
16056    /// assert!(x.proto_type().is_none());
16057    /// assert!(x.enum_type().is_none());
16058    /// ```
16059    pub fn set_bytes_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bytes>>>(
16060        mut self,
16061        v: T,
16062    ) -> Self {
16063        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BytesType(v.into()));
16064        self
16065    }
16066
16067    /// The value of [kind][crate::model::Type::kind]
16068    /// if it holds a `StringType`, `None` if the field is not set or
16069    /// holds a different branch.
16070    pub fn string_type(
16071        &self,
16072    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::String>> {
16073        #[allow(unreachable_patterns)]
16074        self.kind.as_ref().and_then(|v| match v {
16075            crate::model::r#type::Kind::StringType(v) => std::option::Option::Some(v),
16076            _ => std::option::Option::None,
16077        })
16078    }
16079
16080    /// Sets the value of [kind][crate::model::Type::kind]
16081    /// to hold a `StringType`.
16082    ///
16083    /// Note that all the setters affecting `kind` are
16084    /// mutually exclusive.
16085    ///
16086    /// # Example
16087    /// ```ignore,no_run
16088    /// # use google_cloud_bigtable_admin_v2::model::Type;
16089    /// use google_cloud_bigtable_admin_v2::model::r#type::String;
16090    /// let x = Type::new().set_string_type(String::default()/* use setters */);
16091    /// assert!(x.string_type().is_some());
16092    /// assert!(x.bytes_type().is_none());
16093    /// assert!(x.int64_type().is_none());
16094    /// assert!(x.float32_type().is_none());
16095    /// assert!(x.float64_type().is_none());
16096    /// assert!(x.bool_type().is_none());
16097    /// assert!(x.timestamp_type().is_none());
16098    /// assert!(x.date_type().is_none());
16099    /// assert!(x.aggregate_type().is_none());
16100    /// assert!(x.struct_type().is_none());
16101    /// assert!(x.array_type().is_none());
16102    /// assert!(x.map_type().is_none());
16103    /// assert!(x.proto_type().is_none());
16104    /// assert!(x.enum_type().is_none());
16105    /// ```
16106    pub fn set_string_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::String>>>(
16107        mut self,
16108        v: T,
16109    ) -> Self {
16110        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StringType(v.into()));
16111        self
16112    }
16113
16114    /// The value of [kind][crate::model::Type::kind]
16115    /// if it holds a `Int64Type`, `None` if the field is not set or
16116    /// holds a different branch.
16117    pub fn int64_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Int64>> {
16118        #[allow(unreachable_patterns)]
16119        self.kind.as_ref().and_then(|v| match v {
16120            crate::model::r#type::Kind::Int64Type(v) => std::option::Option::Some(v),
16121            _ => std::option::Option::None,
16122        })
16123    }
16124
16125    /// Sets the value of [kind][crate::model::Type::kind]
16126    /// to hold a `Int64Type`.
16127    ///
16128    /// Note that all the setters affecting `kind` are
16129    /// mutually exclusive.
16130    ///
16131    /// # Example
16132    /// ```ignore,no_run
16133    /// # use google_cloud_bigtable_admin_v2::model::Type;
16134    /// use google_cloud_bigtable_admin_v2::model::r#type::Int64;
16135    /// let x = Type::new().set_int64_type(Int64::default()/* use setters */);
16136    /// assert!(x.int64_type().is_some());
16137    /// assert!(x.bytes_type().is_none());
16138    /// assert!(x.string_type().is_none());
16139    /// assert!(x.float32_type().is_none());
16140    /// assert!(x.float64_type().is_none());
16141    /// assert!(x.bool_type().is_none());
16142    /// assert!(x.timestamp_type().is_none());
16143    /// assert!(x.date_type().is_none());
16144    /// assert!(x.aggregate_type().is_none());
16145    /// assert!(x.struct_type().is_none());
16146    /// assert!(x.array_type().is_none());
16147    /// assert!(x.map_type().is_none());
16148    /// assert!(x.proto_type().is_none());
16149    /// assert!(x.enum_type().is_none());
16150    /// ```
16151    pub fn set_int64_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Int64>>>(
16152        mut self,
16153        v: T,
16154    ) -> Self {
16155        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Int64Type(v.into()));
16156        self
16157    }
16158
16159    /// The value of [kind][crate::model::Type::kind]
16160    /// if it holds a `Float32Type`, `None` if the field is not set or
16161    /// holds a different branch.
16162    pub fn float32_type(
16163        &self,
16164    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float32>> {
16165        #[allow(unreachable_patterns)]
16166        self.kind.as_ref().and_then(|v| match v {
16167            crate::model::r#type::Kind::Float32Type(v) => std::option::Option::Some(v),
16168            _ => std::option::Option::None,
16169        })
16170    }
16171
16172    /// Sets the value of [kind][crate::model::Type::kind]
16173    /// to hold a `Float32Type`.
16174    ///
16175    /// Note that all the setters affecting `kind` are
16176    /// mutually exclusive.
16177    ///
16178    /// # Example
16179    /// ```ignore,no_run
16180    /// # use google_cloud_bigtable_admin_v2::model::Type;
16181    /// use google_cloud_bigtable_admin_v2::model::r#type::Float32;
16182    /// let x = Type::new().set_float32_type(Float32::default()/* use setters */);
16183    /// assert!(x.float32_type().is_some());
16184    /// assert!(x.bytes_type().is_none());
16185    /// assert!(x.string_type().is_none());
16186    /// assert!(x.int64_type().is_none());
16187    /// assert!(x.float64_type().is_none());
16188    /// assert!(x.bool_type().is_none());
16189    /// assert!(x.timestamp_type().is_none());
16190    /// assert!(x.date_type().is_none());
16191    /// assert!(x.aggregate_type().is_none());
16192    /// assert!(x.struct_type().is_none());
16193    /// assert!(x.array_type().is_none());
16194    /// assert!(x.map_type().is_none());
16195    /// assert!(x.proto_type().is_none());
16196    /// assert!(x.enum_type().is_none());
16197    /// ```
16198    pub fn set_float32_type<
16199        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float32>>,
16200    >(
16201        mut self,
16202        v: T,
16203    ) -> Self {
16204        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float32Type(v.into()));
16205        self
16206    }
16207
16208    /// The value of [kind][crate::model::Type::kind]
16209    /// if it holds a `Float64Type`, `None` if the field is not set or
16210    /// holds a different branch.
16211    pub fn float64_type(
16212        &self,
16213    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float64>> {
16214        #[allow(unreachable_patterns)]
16215        self.kind.as_ref().and_then(|v| match v {
16216            crate::model::r#type::Kind::Float64Type(v) => std::option::Option::Some(v),
16217            _ => std::option::Option::None,
16218        })
16219    }
16220
16221    /// Sets the value of [kind][crate::model::Type::kind]
16222    /// to hold a `Float64Type`.
16223    ///
16224    /// Note that all the setters affecting `kind` are
16225    /// mutually exclusive.
16226    ///
16227    /// # Example
16228    /// ```ignore,no_run
16229    /// # use google_cloud_bigtable_admin_v2::model::Type;
16230    /// use google_cloud_bigtable_admin_v2::model::r#type::Float64;
16231    /// let x = Type::new().set_float64_type(Float64::default()/* use setters */);
16232    /// assert!(x.float64_type().is_some());
16233    /// assert!(x.bytes_type().is_none());
16234    /// assert!(x.string_type().is_none());
16235    /// assert!(x.int64_type().is_none());
16236    /// assert!(x.float32_type().is_none());
16237    /// assert!(x.bool_type().is_none());
16238    /// assert!(x.timestamp_type().is_none());
16239    /// assert!(x.date_type().is_none());
16240    /// assert!(x.aggregate_type().is_none());
16241    /// assert!(x.struct_type().is_none());
16242    /// assert!(x.array_type().is_none());
16243    /// assert!(x.map_type().is_none());
16244    /// assert!(x.proto_type().is_none());
16245    /// assert!(x.enum_type().is_none());
16246    /// ```
16247    pub fn set_float64_type<
16248        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float64>>,
16249    >(
16250        mut self,
16251        v: T,
16252    ) -> Self {
16253        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float64Type(v.into()));
16254        self
16255    }
16256
16257    /// The value of [kind][crate::model::Type::kind]
16258    /// if it holds a `BoolType`, `None` if the field is not set or
16259    /// holds a different branch.
16260    pub fn bool_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bool>> {
16261        #[allow(unreachable_patterns)]
16262        self.kind.as_ref().and_then(|v| match v {
16263            crate::model::r#type::Kind::BoolType(v) => std::option::Option::Some(v),
16264            _ => std::option::Option::None,
16265        })
16266    }
16267
16268    /// Sets the value of [kind][crate::model::Type::kind]
16269    /// to hold a `BoolType`.
16270    ///
16271    /// Note that all the setters affecting `kind` are
16272    /// mutually exclusive.
16273    ///
16274    /// # Example
16275    /// ```ignore,no_run
16276    /// # use google_cloud_bigtable_admin_v2::model::Type;
16277    /// use google_cloud_bigtable_admin_v2::model::r#type::Bool;
16278    /// let x = Type::new().set_bool_type(Bool::default()/* use setters */);
16279    /// assert!(x.bool_type().is_some());
16280    /// assert!(x.bytes_type().is_none());
16281    /// assert!(x.string_type().is_none());
16282    /// assert!(x.int64_type().is_none());
16283    /// assert!(x.float32_type().is_none());
16284    /// assert!(x.float64_type().is_none());
16285    /// assert!(x.timestamp_type().is_none());
16286    /// assert!(x.date_type().is_none());
16287    /// assert!(x.aggregate_type().is_none());
16288    /// assert!(x.struct_type().is_none());
16289    /// assert!(x.array_type().is_none());
16290    /// assert!(x.map_type().is_none());
16291    /// assert!(x.proto_type().is_none());
16292    /// assert!(x.enum_type().is_none());
16293    /// ```
16294    pub fn set_bool_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bool>>>(
16295        mut self,
16296        v: T,
16297    ) -> Self {
16298        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BoolType(v.into()));
16299        self
16300    }
16301
16302    /// The value of [kind][crate::model::Type::kind]
16303    /// if it holds a `TimestampType`, `None` if the field is not set or
16304    /// holds a different branch.
16305    pub fn timestamp_type(
16306        &self,
16307    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Timestamp>> {
16308        #[allow(unreachable_patterns)]
16309        self.kind.as_ref().and_then(|v| match v {
16310            crate::model::r#type::Kind::TimestampType(v) => std::option::Option::Some(v),
16311            _ => std::option::Option::None,
16312        })
16313    }
16314
16315    /// Sets the value of [kind][crate::model::Type::kind]
16316    /// to hold a `TimestampType`.
16317    ///
16318    /// Note that all the setters affecting `kind` are
16319    /// mutually exclusive.
16320    ///
16321    /// # Example
16322    /// ```ignore,no_run
16323    /// # use google_cloud_bigtable_admin_v2::model::Type;
16324    /// use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
16325    /// let x = Type::new().set_timestamp_type(Timestamp::default()/* use setters */);
16326    /// assert!(x.timestamp_type().is_some());
16327    /// assert!(x.bytes_type().is_none());
16328    /// assert!(x.string_type().is_none());
16329    /// assert!(x.int64_type().is_none());
16330    /// assert!(x.float32_type().is_none());
16331    /// assert!(x.float64_type().is_none());
16332    /// assert!(x.bool_type().is_none());
16333    /// assert!(x.date_type().is_none());
16334    /// assert!(x.aggregate_type().is_none());
16335    /// assert!(x.struct_type().is_none());
16336    /// assert!(x.array_type().is_none());
16337    /// assert!(x.map_type().is_none());
16338    /// assert!(x.proto_type().is_none());
16339    /// assert!(x.enum_type().is_none());
16340    /// ```
16341    pub fn set_timestamp_type<
16342        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Timestamp>>,
16343    >(
16344        mut self,
16345        v: T,
16346    ) -> Self {
16347        self.kind = std::option::Option::Some(crate::model::r#type::Kind::TimestampType(v.into()));
16348        self
16349    }
16350
16351    /// The value of [kind][crate::model::Type::kind]
16352    /// if it holds a `DateType`, `None` if the field is not set or
16353    /// holds a different branch.
16354    pub fn date_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Date>> {
16355        #[allow(unreachable_patterns)]
16356        self.kind.as_ref().and_then(|v| match v {
16357            crate::model::r#type::Kind::DateType(v) => std::option::Option::Some(v),
16358            _ => std::option::Option::None,
16359        })
16360    }
16361
16362    /// Sets the value of [kind][crate::model::Type::kind]
16363    /// to hold a `DateType`.
16364    ///
16365    /// Note that all the setters affecting `kind` are
16366    /// mutually exclusive.
16367    ///
16368    /// # Example
16369    /// ```ignore,no_run
16370    /// # use google_cloud_bigtable_admin_v2::model::Type;
16371    /// use google_cloud_bigtable_admin_v2::model::r#type::Date;
16372    /// let x = Type::new().set_date_type(Date::default()/* use setters */);
16373    /// assert!(x.date_type().is_some());
16374    /// assert!(x.bytes_type().is_none());
16375    /// assert!(x.string_type().is_none());
16376    /// assert!(x.int64_type().is_none());
16377    /// assert!(x.float32_type().is_none());
16378    /// assert!(x.float64_type().is_none());
16379    /// assert!(x.bool_type().is_none());
16380    /// assert!(x.timestamp_type().is_none());
16381    /// assert!(x.aggregate_type().is_none());
16382    /// assert!(x.struct_type().is_none());
16383    /// assert!(x.array_type().is_none());
16384    /// assert!(x.map_type().is_none());
16385    /// assert!(x.proto_type().is_none());
16386    /// assert!(x.enum_type().is_none());
16387    /// ```
16388    pub fn set_date_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Date>>>(
16389        mut self,
16390        v: T,
16391    ) -> Self {
16392        self.kind = std::option::Option::Some(crate::model::r#type::Kind::DateType(v.into()));
16393        self
16394    }
16395
16396    /// The value of [kind][crate::model::Type::kind]
16397    /// if it holds a `AggregateType`, `None` if the field is not set or
16398    /// holds a different branch.
16399    pub fn aggregate_type(
16400        &self,
16401    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Aggregate>> {
16402        #[allow(unreachable_patterns)]
16403        self.kind.as_ref().and_then(|v| match v {
16404            crate::model::r#type::Kind::AggregateType(v) => std::option::Option::Some(v),
16405            _ => std::option::Option::None,
16406        })
16407    }
16408
16409    /// Sets the value of [kind][crate::model::Type::kind]
16410    /// to hold a `AggregateType`.
16411    ///
16412    /// Note that all the setters affecting `kind` are
16413    /// mutually exclusive.
16414    ///
16415    /// # Example
16416    /// ```ignore,no_run
16417    /// # use google_cloud_bigtable_admin_v2::model::Type;
16418    /// use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
16419    /// let x = Type::new().set_aggregate_type(Aggregate::default()/* use setters */);
16420    /// assert!(x.aggregate_type().is_some());
16421    /// assert!(x.bytes_type().is_none());
16422    /// assert!(x.string_type().is_none());
16423    /// assert!(x.int64_type().is_none());
16424    /// assert!(x.float32_type().is_none());
16425    /// assert!(x.float64_type().is_none());
16426    /// assert!(x.bool_type().is_none());
16427    /// assert!(x.timestamp_type().is_none());
16428    /// assert!(x.date_type().is_none());
16429    /// assert!(x.struct_type().is_none());
16430    /// assert!(x.array_type().is_none());
16431    /// assert!(x.map_type().is_none());
16432    /// assert!(x.proto_type().is_none());
16433    /// assert!(x.enum_type().is_none());
16434    /// ```
16435    pub fn set_aggregate_type<
16436        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Aggregate>>,
16437    >(
16438        mut self,
16439        v: T,
16440    ) -> Self {
16441        self.kind = std::option::Option::Some(crate::model::r#type::Kind::AggregateType(v.into()));
16442        self
16443    }
16444
16445    /// The value of [kind][crate::model::Type::kind]
16446    /// if it holds a `StructType`, `None` if the field is not set or
16447    /// holds a different branch.
16448    pub fn struct_type(
16449        &self,
16450    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Struct>> {
16451        #[allow(unreachable_patterns)]
16452        self.kind.as_ref().and_then(|v| match v {
16453            crate::model::r#type::Kind::StructType(v) => std::option::Option::Some(v),
16454            _ => std::option::Option::None,
16455        })
16456    }
16457
16458    /// Sets the value of [kind][crate::model::Type::kind]
16459    /// to hold a `StructType`.
16460    ///
16461    /// Note that all the setters affecting `kind` are
16462    /// mutually exclusive.
16463    ///
16464    /// # Example
16465    /// ```ignore,no_run
16466    /// # use google_cloud_bigtable_admin_v2::model::Type;
16467    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
16468    /// let x = Type::new().set_struct_type(Struct::default()/* use setters */);
16469    /// assert!(x.struct_type().is_some());
16470    /// assert!(x.bytes_type().is_none());
16471    /// assert!(x.string_type().is_none());
16472    /// assert!(x.int64_type().is_none());
16473    /// assert!(x.float32_type().is_none());
16474    /// assert!(x.float64_type().is_none());
16475    /// assert!(x.bool_type().is_none());
16476    /// assert!(x.timestamp_type().is_none());
16477    /// assert!(x.date_type().is_none());
16478    /// assert!(x.aggregate_type().is_none());
16479    /// assert!(x.array_type().is_none());
16480    /// assert!(x.map_type().is_none());
16481    /// assert!(x.proto_type().is_none());
16482    /// assert!(x.enum_type().is_none());
16483    /// ```
16484    pub fn set_struct_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Struct>>>(
16485        mut self,
16486        v: T,
16487    ) -> Self {
16488        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StructType(v.into()));
16489        self
16490    }
16491
16492    /// The value of [kind][crate::model::Type::kind]
16493    /// if it holds a `ArrayType`, `None` if the field is not set or
16494    /// holds a different branch.
16495    pub fn array_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Array>> {
16496        #[allow(unreachable_patterns)]
16497        self.kind.as_ref().and_then(|v| match v {
16498            crate::model::r#type::Kind::ArrayType(v) => std::option::Option::Some(v),
16499            _ => std::option::Option::None,
16500        })
16501    }
16502
16503    /// Sets the value of [kind][crate::model::Type::kind]
16504    /// to hold a `ArrayType`.
16505    ///
16506    /// Note that all the setters affecting `kind` are
16507    /// mutually exclusive.
16508    ///
16509    /// # Example
16510    /// ```ignore,no_run
16511    /// # use google_cloud_bigtable_admin_v2::model::Type;
16512    /// use google_cloud_bigtable_admin_v2::model::r#type::Array;
16513    /// let x = Type::new().set_array_type(Array::default()/* use setters */);
16514    /// assert!(x.array_type().is_some());
16515    /// assert!(x.bytes_type().is_none());
16516    /// assert!(x.string_type().is_none());
16517    /// assert!(x.int64_type().is_none());
16518    /// assert!(x.float32_type().is_none());
16519    /// assert!(x.float64_type().is_none());
16520    /// assert!(x.bool_type().is_none());
16521    /// assert!(x.timestamp_type().is_none());
16522    /// assert!(x.date_type().is_none());
16523    /// assert!(x.aggregate_type().is_none());
16524    /// assert!(x.struct_type().is_none());
16525    /// assert!(x.map_type().is_none());
16526    /// assert!(x.proto_type().is_none());
16527    /// assert!(x.enum_type().is_none());
16528    /// ```
16529    pub fn set_array_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Array>>>(
16530        mut self,
16531        v: T,
16532    ) -> Self {
16533        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ArrayType(v.into()));
16534        self
16535    }
16536
16537    /// The value of [kind][crate::model::Type::kind]
16538    /// if it holds a `MapType`, `None` if the field is not set or
16539    /// holds a different branch.
16540    pub fn map_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Map>> {
16541        #[allow(unreachable_patterns)]
16542        self.kind.as_ref().and_then(|v| match v {
16543            crate::model::r#type::Kind::MapType(v) => std::option::Option::Some(v),
16544            _ => std::option::Option::None,
16545        })
16546    }
16547
16548    /// Sets the value of [kind][crate::model::Type::kind]
16549    /// to hold a `MapType`.
16550    ///
16551    /// Note that all the setters affecting `kind` are
16552    /// mutually exclusive.
16553    ///
16554    /// # Example
16555    /// ```ignore,no_run
16556    /// # use google_cloud_bigtable_admin_v2::model::Type;
16557    /// use google_cloud_bigtable_admin_v2::model::r#type::Map;
16558    /// let x = Type::new().set_map_type(Map::default()/* use setters */);
16559    /// assert!(x.map_type().is_some());
16560    /// assert!(x.bytes_type().is_none());
16561    /// assert!(x.string_type().is_none());
16562    /// assert!(x.int64_type().is_none());
16563    /// assert!(x.float32_type().is_none());
16564    /// assert!(x.float64_type().is_none());
16565    /// assert!(x.bool_type().is_none());
16566    /// assert!(x.timestamp_type().is_none());
16567    /// assert!(x.date_type().is_none());
16568    /// assert!(x.aggregate_type().is_none());
16569    /// assert!(x.struct_type().is_none());
16570    /// assert!(x.array_type().is_none());
16571    /// assert!(x.proto_type().is_none());
16572    /// assert!(x.enum_type().is_none());
16573    /// ```
16574    pub fn set_map_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Map>>>(
16575        mut self,
16576        v: T,
16577    ) -> Self {
16578        self.kind = std::option::Option::Some(crate::model::r#type::Kind::MapType(v.into()));
16579        self
16580    }
16581
16582    /// The value of [kind][crate::model::Type::kind]
16583    /// if it holds a `ProtoType`, `None` if the field is not set or
16584    /// holds a different branch.
16585    pub fn proto_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Proto>> {
16586        #[allow(unreachable_patterns)]
16587        self.kind.as_ref().and_then(|v| match v {
16588            crate::model::r#type::Kind::ProtoType(v) => std::option::Option::Some(v),
16589            _ => std::option::Option::None,
16590        })
16591    }
16592
16593    /// Sets the value of [kind][crate::model::Type::kind]
16594    /// to hold a `ProtoType`.
16595    ///
16596    /// Note that all the setters affecting `kind` are
16597    /// mutually exclusive.
16598    ///
16599    /// # Example
16600    /// ```ignore,no_run
16601    /// # use google_cloud_bigtable_admin_v2::model::Type;
16602    /// use google_cloud_bigtable_admin_v2::model::r#type::Proto;
16603    /// let x = Type::new().set_proto_type(Proto::default()/* use setters */);
16604    /// assert!(x.proto_type().is_some());
16605    /// assert!(x.bytes_type().is_none());
16606    /// assert!(x.string_type().is_none());
16607    /// assert!(x.int64_type().is_none());
16608    /// assert!(x.float32_type().is_none());
16609    /// assert!(x.float64_type().is_none());
16610    /// assert!(x.bool_type().is_none());
16611    /// assert!(x.timestamp_type().is_none());
16612    /// assert!(x.date_type().is_none());
16613    /// assert!(x.aggregate_type().is_none());
16614    /// assert!(x.struct_type().is_none());
16615    /// assert!(x.array_type().is_none());
16616    /// assert!(x.map_type().is_none());
16617    /// assert!(x.enum_type().is_none());
16618    /// ```
16619    pub fn set_proto_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Proto>>>(
16620        mut self,
16621        v: T,
16622    ) -> Self {
16623        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ProtoType(v.into()));
16624        self
16625    }
16626
16627    /// The value of [kind][crate::model::Type::kind]
16628    /// if it holds a `EnumType`, `None` if the field is not set or
16629    /// holds a different branch.
16630    pub fn enum_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Enum>> {
16631        #[allow(unreachable_patterns)]
16632        self.kind.as_ref().and_then(|v| match v {
16633            crate::model::r#type::Kind::EnumType(v) => std::option::Option::Some(v),
16634            _ => std::option::Option::None,
16635        })
16636    }
16637
16638    /// Sets the value of [kind][crate::model::Type::kind]
16639    /// to hold a `EnumType`.
16640    ///
16641    /// Note that all the setters affecting `kind` are
16642    /// mutually exclusive.
16643    ///
16644    /// # Example
16645    /// ```ignore,no_run
16646    /// # use google_cloud_bigtable_admin_v2::model::Type;
16647    /// use google_cloud_bigtable_admin_v2::model::r#type::Enum;
16648    /// let x = Type::new().set_enum_type(Enum::default()/* use setters */);
16649    /// assert!(x.enum_type().is_some());
16650    /// assert!(x.bytes_type().is_none());
16651    /// assert!(x.string_type().is_none());
16652    /// assert!(x.int64_type().is_none());
16653    /// assert!(x.float32_type().is_none());
16654    /// assert!(x.float64_type().is_none());
16655    /// assert!(x.bool_type().is_none());
16656    /// assert!(x.timestamp_type().is_none());
16657    /// assert!(x.date_type().is_none());
16658    /// assert!(x.aggregate_type().is_none());
16659    /// assert!(x.struct_type().is_none());
16660    /// assert!(x.array_type().is_none());
16661    /// assert!(x.map_type().is_none());
16662    /// assert!(x.proto_type().is_none());
16663    /// ```
16664    pub fn set_enum_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Enum>>>(
16665        mut self,
16666        v: T,
16667    ) -> Self {
16668        self.kind = std::option::Option::Some(crate::model::r#type::Kind::EnumType(v.into()));
16669        self
16670    }
16671}
16672
16673impl wkt::message::Message for Type {
16674    fn typename() -> &'static str {
16675        "type.googleapis.com/google.bigtable.admin.v2.Type"
16676    }
16677}
16678
16679/// Defines additional types related to [Type].
16680pub mod r#type {
16681    #[allow(unused_imports)]
16682    use super::*;
16683
16684    /// Bytes
16685    /// Values of type `Bytes` are stored in `Value.bytes_value`.
16686    #[derive(Clone, Default, PartialEq)]
16687    #[non_exhaustive]
16688    pub struct Bytes {
16689        /// The encoding to use when converting to or from lower level types.
16690        pub encoding: std::option::Option<crate::model::r#type::bytes::Encoding>,
16691
16692        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16693    }
16694
16695    impl Bytes {
16696        /// Creates a new default instance.
16697        pub fn new() -> Self {
16698            std::default::Default::default()
16699        }
16700
16701        /// Sets the value of [encoding][crate::model::r#type::Bytes::encoding].
16702        ///
16703        /// # Example
16704        /// ```ignore,no_run
16705        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16706        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16707        /// let x = Bytes::new().set_encoding(Encoding::default()/* use setters */);
16708        /// ```
16709        pub fn set_encoding<T>(mut self, v: T) -> Self
16710        where
16711            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
16712        {
16713            self.encoding = std::option::Option::Some(v.into());
16714            self
16715        }
16716
16717        /// Sets or clears the value of [encoding][crate::model::r#type::Bytes::encoding].
16718        ///
16719        /// # Example
16720        /// ```ignore,no_run
16721        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16722        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16723        /// let x = Bytes::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16724        /// let x = Bytes::new().set_or_clear_encoding(None::<Encoding>);
16725        /// ```
16726        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16727        where
16728            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
16729        {
16730            self.encoding = v.map(|x| x.into());
16731            self
16732        }
16733    }
16734
16735    impl wkt::message::Message for Bytes {
16736        fn typename() -> &'static str {
16737            "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes"
16738        }
16739    }
16740
16741    /// Defines additional types related to [Bytes].
16742    pub mod bytes {
16743        #[allow(unused_imports)]
16744        use super::*;
16745
16746        /// Rules used to convert to or from lower level types.
16747        #[derive(Clone, Default, PartialEq)]
16748        #[non_exhaustive]
16749        pub struct Encoding {
16750            /// Which encoding to use.
16751            pub encoding: std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16752
16753            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16754        }
16755
16756        impl Encoding {
16757            /// Creates a new default instance.
16758            pub fn new() -> Self {
16759                std::default::Default::default()
16760            }
16761
16762            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding].
16763            ///
16764            /// Note that all the setters affecting `encoding` are mutually
16765            /// exclusive.
16766            ///
16767            /// # Example
16768            /// ```ignore,no_run
16769            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16770            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16771            /// let x = Encoding::new().set_encoding(Some(
16772            ///     google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Encoding::Raw(Raw::default().into())));
16773            /// ```
16774            pub fn set_encoding<
16775                T: std::convert::Into<
16776                        std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16777                    >,
16778            >(
16779                mut self,
16780                v: T,
16781            ) -> Self {
16782                self.encoding = v.into();
16783                self
16784            }
16785
16786            /// The value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16787            /// if it holds a `Raw`, `None` if the field is not set or
16788            /// holds a different branch.
16789            pub fn raw(
16790                &self,
16791            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>
16792            {
16793                #[allow(unreachable_patterns)]
16794                self.encoding.as_ref().and_then(|v| match v {
16795                    crate::model::r#type::bytes::encoding::Encoding::Raw(v) => {
16796                        std::option::Option::Some(v)
16797                    }
16798                    _ => std::option::Option::None,
16799                })
16800            }
16801
16802            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16803            /// to hold a `Raw`.
16804            ///
16805            /// Note that all the setters affecting `encoding` are
16806            /// mutually exclusive.
16807            ///
16808            /// # Example
16809            /// ```ignore,no_run
16810            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16811            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16812            /// let x = Encoding::new().set_raw(Raw::default()/* use setters */);
16813            /// assert!(x.raw().is_some());
16814            /// ```
16815            pub fn set_raw<
16816                T: std::convert::Into<std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>,
16817            >(
16818                mut self,
16819                v: T,
16820            ) -> Self {
16821                self.encoding = std::option::Option::Some(
16822                    crate::model::r#type::bytes::encoding::Encoding::Raw(v.into()),
16823                );
16824                self
16825            }
16826        }
16827
16828        impl wkt::message::Message for Encoding {
16829            fn typename() -> &'static str {
16830                "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding"
16831            }
16832        }
16833
16834        /// Defines additional types related to [Encoding].
16835        pub mod encoding {
16836            #[allow(unused_imports)]
16837            use super::*;
16838
16839            /// Leaves the value as-is.
16840            ///
16841            /// Sorted mode: all values are supported.
16842            ///
16843            /// Distinct mode: all values are supported.
16844            #[derive(Clone, Default, PartialEq)]
16845            #[non_exhaustive]
16846            pub struct Raw {
16847                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16848            }
16849
16850            impl Raw {
16851                /// Creates a new default instance.
16852                pub fn new() -> Self {
16853                    std::default::Default::default()
16854                }
16855            }
16856
16857            impl wkt::message::Message for Raw {
16858                fn typename() -> &'static str {
16859                    "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding.Raw"
16860                }
16861            }
16862
16863            /// Which encoding to use.
16864            #[derive(Clone, Debug, PartialEq)]
16865            #[non_exhaustive]
16866            pub enum Encoding {
16867                /// Use `Raw` encoding.
16868                Raw(std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>),
16869            }
16870        }
16871    }
16872
16873    /// String
16874    /// Values of type `String` are stored in `Value.string_value`.
16875    #[derive(Clone, Default, PartialEq)]
16876    #[non_exhaustive]
16877    pub struct String {
16878        /// The encoding to use when converting to or from lower level types.
16879        pub encoding: std::option::Option<crate::model::r#type::string::Encoding>,
16880
16881        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16882    }
16883
16884    impl String {
16885        /// Creates a new default instance.
16886        pub fn new() -> Self {
16887            std::default::Default::default()
16888        }
16889
16890        /// Sets the value of [encoding][crate::model::r#type::String::encoding].
16891        ///
16892        /// # Example
16893        /// ```ignore,no_run
16894        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16895        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16896        /// let x = String::new().set_encoding(Encoding::default()/* use setters */);
16897        /// ```
16898        pub fn set_encoding<T>(mut self, v: T) -> Self
16899        where
16900            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16901        {
16902            self.encoding = std::option::Option::Some(v.into());
16903            self
16904        }
16905
16906        /// Sets or clears the value of [encoding][crate::model::r#type::String::encoding].
16907        ///
16908        /// # Example
16909        /// ```ignore,no_run
16910        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16911        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16912        /// let x = String::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16913        /// let x = String::new().set_or_clear_encoding(None::<Encoding>);
16914        /// ```
16915        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16916        where
16917            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16918        {
16919            self.encoding = v.map(|x| x.into());
16920            self
16921        }
16922    }
16923
16924    impl wkt::message::Message for String {
16925        fn typename() -> &'static str {
16926            "type.googleapis.com/google.bigtable.admin.v2.Type.String"
16927        }
16928    }
16929
16930    /// Defines additional types related to [String].
16931    pub mod string {
16932        #[allow(unused_imports)]
16933        use super::*;
16934
16935        /// Rules used to convert to or from lower level types.
16936        #[derive(Clone, Default, PartialEq)]
16937        #[non_exhaustive]
16938        pub struct Encoding {
16939            /// Which encoding to use.
16940            pub encoding: std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16941
16942            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16943        }
16944
16945        impl Encoding {
16946            /// Creates a new default instance.
16947            pub fn new() -> Self {
16948                std::default::Default::default()
16949            }
16950
16951            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding].
16952            ///
16953            /// Note that all the setters affecting `encoding` are mutually
16954            /// exclusive.
16955            ///
16956            /// # Example
16957            /// ```ignore,no_run
16958            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16959            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
16960            /// let x = Encoding::new().set_encoding(Some(
16961            ///     google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Encoding::Utf8Bytes(Utf8Bytes::default().into())));
16962            /// ```
16963            pub fn set_encoding<
16964                T: std::convert::Into<
16965                        std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16966                    >,
16967            >(
16968                mut self,
16969                v: T,
16970            ) -> Self {
16971                self.encoding = v.into();
16972                self
16973            }
16974
16975            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
16976            /// if it holds a `Utf8Raw`, `None` if the field is not set or
16977            /// holds a different branch.
16978            #[deprecated]
16979            pub fn utf8_raw(
16980                &self,
16981            ) -> std::option::Option<
16982                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
16983            > {
16984                #[allow(unreachable_patterns)]
16985                self.encoding.as_ref().and_then(|v| match v {
16986                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v) => {
16987                        std::option::Option::Some(v)
16988                    }
16989                    _ => std::option::Option::None,
16990                })
16991            }
16992
16993            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
16994            /// to hold a `Utf8Raw`.
16995            ///
16996            /// Note that all the setters affecting `encoding` are
16997            /// mutually exclusive.
16998            ///
16999            /// # Example
17000            /// ```ignore,no_run
17001            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
17002            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Raw;
17003            /// let x = Encoding::new().set_utf8_raw(Utf8Raw::default()/* use setters */);
17004            /// assert!(x.utf8_raw().is_some());
17005            /// assert!(x.utf8_bytes().is_none());
17006            /// ```
17007            #[deprecated]
17008            pub fn set_utf8_raw<
17009                T: std::convert::Into<
17010                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
17011                    >,
17012            >(
17013                mut self,
17014                v: T,
17015            ) -> Self {
17016                self.encoding = std::option::Option::Some(
17017                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v.into()),
17018                );
17019                self
17020            }
17021
17022            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
17023            /// if it holds a `Utf8Bytes`, `None` if the field is not set or
17024            /// holds a different branch.
17025            pub fn utf8_bytes(
17026                &self,
17027            ) -> std::option::Option<
17028                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
17029            > {
17030                #[allow(unreachable_patterns)]
17031                self.encoding.as_ref().and_then(|v| match v {
17032                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v) => {
17033                        std::option::Option::Some(v)
17034                    }
17035                    _ => std::option::Option::None,
17036                })
17037            }
17038
17039            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
17040            /// to hold a `Utf8Bytes`.
17041            ///
17042            /// Note that all the setters affecting `encoding` are
17043            /// mutually exclusive.
17044            ///
17045            /// # Example
17046            /// ```ignore,no_run
17047            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
17048            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
17049            /// let x = Encoding::new().set_utf8_bytes(Utf8Bytes::default()/* use setters */);
17050            /// assert!(x.utf8_bytes().is_some());
17051            /// assert!(x.utf8_raw().is_none());
17052            /// ```
17053            pub fn set_utf8_bytes<
17054                T: std::convert::Into<
17055                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
17056                    >,
17057            >(
17058                mut self,
17059                v: T,
17060            ) -> Self {
17061                self.encoding = std::option::Option::Some(
17062                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v.into()),
17063                );
17064                self
17065            }
17066        }
17067
17068        impl wkt::message::Message for Encoding {
17069            fn typename() -> &'static str {
17070                "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding"
17071            }
17072        }
17073
17074        /// Defines additional types related to [Encoding].
17075        pub mod encoding {
17076            #[allow(unused_imports)]
17077            use super::*;
17078
17079            /// Deprecated: prefer the equivalent `Utf8Bytes`.
17080            #[derive(Clone, Default, PartialEq)]
17081            #[non_exhaustive]
17082            #[deprecated]
17083            pub struct Utf8Raw {
17084                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17085            }
17086
17087            impl Utf8Raw {
17088                /// Creates a new default instance.
17089                pub fn new() -> Self {
17090                    std::default::Default::default()
17091                }
17092            }
17093
17094            impl wkt::message::Message for Utf8Raw {
17095                fn typename() -> &'static str {
17096                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw"
17097                }
17098            }
17099
17100            /// UTF-8 encoding.
17101            ///
17102            /// Sorted mode:
17103            ///
17104            /// - All values are supported.
17105            /// - Code point order is preserved.
17106            ///
17107            /// Distinct mode: all values are supported.
17108            ///
17109            /// Compatible with:
17110            ///
17111            /// - BigQuery `TEXT` encoding
17112            /// - HBase `Bytes.toBytes`
17113            /// - Java `String#getBytes(StandardCharsets.UTF_8)`
17114            #[derive(Clone, Default, PartialEq)]
17115            #[non_exhaustive]
17116            pub struct Utf8Bytes {
17117                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17118            }
17119
17120            impl Utf8Bytes {
17121                /// Creates a new default instance.
17122                pub fn new() -> Self {
17123                    std::default::Default::default()
17124                }
17125            }
17126
17127            impl wkt::message::Message for Utf8Bytes {
17128                fn typename() -> &'static str {
17129                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes"
17130                }
17131            }
17132
17133            /// Which encoding to use.
17134            #[derive(Clone, Debug, PartialEq)]
17135            #[non_exhaustive]
17136            pub enum Encoding {
17137                /// Deprecated: if set, converts to an empty `utf8_bytes`.
17138                #[deprecated]
17139                Utf8Raw(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>),
17140                /// Use `Utf8Bytes` encoding.
17141                Utf8Bytes(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>),
17142            }
17143        }
17144    }
17145
17146    /// Int64
17147    /// Values of type `Int64` are stored in `Value.int_value`.
17148    #[derive(Clone, Default, PartialEq)]
17149    #[non_exhaustive]
17150    pub struct Int64 {
17151        /// The encoding to use when converting to or from lower level types.
17152        pub encoding: std::option::Option<crate::model::r#type::int_64::Encoding>,
17153
17154        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17155    }
17156
17157    impl Int64 {
17158        /// Creates a new default instance.
17159        pub fn new() -> Self {
17160            std::default::Default::default()
17161        }
17162
17163        /// Sets the value of [encoding][crate::model::r#type::Int64::encoding].
17164        ///
17165        /// # Example
17166        /// ```ignore,no_run
17167        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
17168        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17169        /// let x = Int64::new().set_encoding(Encoding::default()/* use setters */);
17170        /// ```
17171        pub fn set_encoding<T>(mut self, v: T) -> Self
17172        where
17173            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
17174        {
17175            self.encoding = std::option::Option::Some(v.into());
17176            self
17177        }
17178
17179        /// Sets or clears the value of [encoding][crate::model::r#type::Int64::encoding].
17180        ///
17181        /// # Example
17182        /// ```ignore,no_run
17183        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
17184        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17185        /// let x = Int64::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17186        /// let x = Int64::new().set_or_clear_encoding(None::<Encoding>);
17187        /// ```
17188        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17189        where
17190            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
17191        {
17192            self.encoding = v.map(|x| x.into());
17193            self
17194        }
17195    }
17196
17197    impl wkt::message::Message for Int64 {
17198        fn typename() -> &'static str {
17199            "type.googleapis.com/google.bigtable.admin.v2.Type.Int64"
17200        }
17201    }
17202
17203    /// Defines additional types related to [Int64].
17204    pub mod int_64 {
17205        #[allow(unused_imports)]
17206        use super::*;
17207
17208        /// Rules used to convert to or from lower level types.
17209        #[derive(Clone, Default, PartialEq)]
17210        #[non_exhaustive]
17211        pub struct Encoding {
17212            /// Which encoding to use.
17213            pub encoding: std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
17214
17215            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17216        }
17217
17218        impl Encoding {
17219            /// Creates a new default instance.
17220            pub fn new() -> Self {
17221                std::default::Default::default()
17222            }
17223
17224            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding].
17225            ///
17226            /// Note that all the setters affecting `encoding` are mutually
17227            /// exclusive.
17228            ///
17229            /// # Example
17230            /// ```ignore,no_run
17231            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17232            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17233            /// let x = Encoding::new().set_encoding(Some(
17234            ///     google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::Encoding::BigEndianBytes(BigEndianBytes::default().into())));
17235            /// ```
17236            pub fn set_encoding<
17237                T: std::convert::Into<
17238                        std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
17239                    >,
17240            >(
17241                mut self,
17242                v: T,
17243            ) -> Self {
17244                self.encoding = v.into();
17245                self
17246            }
17247
17248            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17249            /// if it holds a `BigEndianBytes`, `None` if the field is not set or
17250            /// holds a different branch.
17251            pub fn big_endian_bytes(
17252                &self,
17253            ) -> std::option::Option<
17254                &std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17255            > {
17256                #[allow(unreachable_patterns)]
17257                self.encoding.as_ref().and_then(|v| match v {
17258                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v) => {
17259                        std::option::Option::Some(v)
17260                    }
17261                    _ => std::option::Option::None,
17262                })
17263            }
17264
17265            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17266            /// to hold a `BigEndianBytes`.
17267            ///
17268            /// Note that all the setters affecting `encoding` are
17269            /// mutually exclusive.
17270            ///
17271            /// # Example
17272            /// ```ignore,no_run
17273            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17274            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17275            /// let x = Encoding::new().set_big_endian_bytes(BigEndianBytes::default()/* use setters */);
17276            /// assert!(x.big_endian_bytes().is_some());
17277            /// assert!(x.ordered_code_bytes().is_none());
17278            /// ```
17279            pub fn set_big_endian_bytes<
17280                T: std::convert::Into<
17281                        std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17282                    >,
17283            >(
17284                mut self,
17285                v: T,
17286            ) -> Self {
17287                self.encoding = std::option::Option::Some(
17288                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v.into()),
17289                );
17290                self
17291            }
17292
17293            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17294            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
17295            /// holds a different branch.
17296            pub fn ordered_code_bytes(
17297                &self,
17298            ) -> std::option::Option<
17299                &std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17300            > {
17301                #[allow(unreachable_patterns)]
17302                self.encoding.as_ref().and_then(|v| match v {
17303                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v) => {
17304                        std::option::Option::Some(v)
17305                    }
17306                    _ => std::option::Option::None,
17307                })
17308            }
17309
17310            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17311            /// to hold a `OrderedCodeBytes`.
17312            ///
17313            /// Note that all the setters affecting `encoding` are
17314            /// mutually exclusive.
17315            ///
17316            /// # Example
17317            /// ```ignore,no_run
17318            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17319            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::OrderedCodeBytes;
17320            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
17321            /// assert!(x.ordered_code_bytes().is_some());
17322            /// assert!(x.big_endian_bytes().is_none());
17323            /// ```
17324            pub fn set_ordered_code_bytes<
17325                T: std::convert::Into<
17326                        std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17327                    >,
17328            >(
17329                mut self,
17330                v: T,
17331            ) -> Self {
17332                self.encoding = std::option::Option::Some(
17333                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v.into()),
17334                );
17335                self
17336            }
17337        }
17338
17339        impl wkt::message::Message for Encoding {
17340            fn typename() -> &'static str {
17341                "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding"
17342            }
17343        }
17344
17345        /// Defines additional types related to [Encoding].
17346        pub mod encoding {
17347            #[allow(unused_imports)]
17348            use super::*;
17349
17350            /// Encodes the value as an 8-byte big-endian two's complement value.
17351            ///
17352            /// Sorted mode: non-negative values are supported.
17353            ///
17354            /// Distinct mode: all values are supported.
17355            ///
17356            /// Compatible with:
17357            ///
17358            /// - BigQuery `BINARY` encoding
17359            /// - HBase `Bytes.toBytes`
17360            /// - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
17361            #[derive(Clone, Default, PartialEq)]
17362            #[non_exhaustive]
17363            pub struct BigEndianBytes {
17364                /// Deprecated: ignored if set.
17365                #[deprecated]
17366                pub bytes_type: std::option::Option<crate::model::r#type::Bytes>,
17367
17368                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17369            }
17370
17371            impl BigEndianBytes {
17372                /// Creates a new default instance.
17373                pub fn new() -> Self {
17374                    std::default::Default::default()
17375                }
17376
17377                /// Sets the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
17378                ///
17379                /// # Example
17380                /// ```ignore,no_run
17381                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17382                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17383                /// let x = BigEndianBytes::new().set_bytes_type(Bytes::default()/* use setters */);
17384                /// ```
17385                #[deprecated]
17386                pub fn set_bytes_type<T>(mut self, v: T) -> Self
17387                where
17388                    T: std::convert::Into<crate::model::r#type::Bytes>,
17389                {
17390                    self.bytes_type = std::option::Option::Some(v.into());
17391                    self
17392                }
17393
17394                /// Sets or clears the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
17395                ///
17396                /// # Example
17397                /// ```ignore,no_run
17398                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17399                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17400                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(Some(Bytes::default()/* use setters */));
17401                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(None::<Bytes>);
17402                /// ```
17403                #[deprecated]
17404                pub fn set_or_clear_bytes_type<T>(mut self, v: std::option::Option<T>) -> Self
17405                where
17406                    T: std::convert::Into<crate::model::r#type::Bytes>,
17407                {
17408                    self.bytes_type = v.map(|x| x.into());
17409                    self
17410                }
17411            }
17412
17413            impl wkt::message::Message for BigEndianBytes {
17414                fn typename() -> &'static str {
17415                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes"
17416                }
17417            }
17418
17419            /// Encodes the value in a variable length binary format of up to 10 bytes.
17420            /// Values that are closer to zero use fewer bytes.
17421            ///
17422            /// Sorted mode: all values are supported.
17423            ///
17424            /// Distinct mode: all values are supported.
17425            #[derive(Clone, Default, PartialEq)]
17426            #[non_exhaustive]
17427            pub struct OrderedCodeBytes {
17428                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17429            }
17430
17431            impl OrderedCodeBytes {
17432                /// Creates a new default instance.
17433                pub fn new() -> Self {
17434                    std::default::Default::default()
17435                }
17436            }
17437
17438            impl wkt::message::Message for OrderedCodeBytes {
17439                fn typename() -> &'static str {
17440                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes"
17441                }
17442            }
17443
17444            /// Which encoding to use.
17445            #[derive(Clone, Debug, PartialEq)]
17446            #[non_exhaustive]
17447            pub enum Encoding {
17448                /// Use `BigEndianBytes` encoding.
17449                BigEndianBytes(
17450                    std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17451                ),
17452                /// Use `OrderedCodeBytes` encoding.
17453                OrderedCodeBytes(
17454                    std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17455                ),
17456            }
17457        }
17458    }
17459
17460    /// bool
17461    /// Values of type `Bool` are stored in `Value.bool_value`.
17462    #[derive(Clone, Default, PartialEq)]
17463    #[non_exhaustive]
17464    pub struct Bool {
17465        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17466    }
17467
17468    impl Bool {
17469        /// Creates a new default instance.
17470        pub fn new() -> Self {
17471            std::default::Default::default()
17472        }
17473    }
17474
17475    impl wkt::message::Message for Bool {
17476        fn typename() -> &'static str {
17477            "type.googleapis.com/google.bigtable.admin.v2.Type.Bool"
17478        }
17479    }
17480
17481    /// Float32
17482    /// Values of type `Float32` are stored in `Value.float_value`.
17483    #[derive(Clone, Default, PartialEq)]
17484    #[non_exhaustive]
17485    pub struct Float32 {
17486        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17487    }
17488
17489    impl Float32 {
17490        /// Creates a new default instance.
17491        pub fn new() -> Self {
17492            std::default::Default::default()
17493        }
17494    }
17495
17496    impl wkt::message::Message for Float32 {
17497        fn typename() -> &'static str {
17498            "type.googleapis.com/google.bigtable.admin.v2.Type.Float32"
17499        }
17500    }
17501
17502    /// Float64
17503    /// Values of type `Float64` are stored in `Value.float_value`.
17504    #[derive(Clone, Default, PartialEq)]
17505    #[non_exhaustive]
17506    pub struct Float64 {
17507        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17508    }
17509
17510    impl Float64 {
17511        /// Creates a new default instance.
17512        pub fn new() -> Self {
17513            std::default::Default::default()
17514        }
17515    }
17516
17517    impl wkt::message::Message for Float64 {
17518        fn typename() -> &'static str {
17519            "type.googleapis.com/google.bigtable.admin.v2.Type.Float64"
17520        }
17521    }
17522
17523    /// Timestamp
17524    /// Values of type `Timestamp` are stored in `Value.timestamp_value`.
17525    #[derive(Clone, Default, PartialEq)]
17526    #[non_exhaustive]
17527    pub struct Timestamp {
17528        /// The encoding to use when converting to or from lower level types.
17529        pub encoding: std::option::Option<crate::model::r#type::timestamp::Encoding>,
17530
17531        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17532    }
17533
17534    impl Timestamp {
17535        /// Creates a new default instance.
17536        pub fn new() -> Self {
17537            std::default::Default::default()
17538        }
17539
17540        /// Sets the value of [encoding][crate::model::r#type::Timestamp::encoding].
17541        ///
17542        /// # Example
17543        /// ```ignore,no_run
17544        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17545        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17546        /// let x = Timestamp::new().set_encoding(Encoding::default()/* use setters */);
17547        /// ```
17548        pub fn set_encoding<T>(mut self, v: T) -> Self
17549        where
17550            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
17551        {
17552            self.encoding = std::option::Option::Some(v.into());
17553            self
17554        }
17555
17556        /// Sets or clears the value of [encoding][crate::model::r#type::Timestamp::encoding].
17557        ///
17558        /// # Example
17559        /// ```ignore,no_run
17560        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17561        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17562        /// let x = Timestamp::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17563        /// let x = Timestamp::new().set_or_clear_encoding(None::<Encoding>);
17564        /// ```
17565        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17566        where
17567            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
17568        {
17569            self.encoding = v.map(|x| x.into());
17570            self
17571        }
17572    }
17573
17574    impl wkt::message::Message for Timestamp {
17575        fn typename() -> &'static str {
17576            "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp"
17577        }
17578    }
17579
17580    /// Defines additional types related to [Timestamp].
17581    pub mod timestamp {
17582        #[allow(unused_imports)]
17583        use super::*;
17584
17585        /// Rules used to convert to or from lower level types.
17586        #[derive(Clone, Default, PartialEq)]
17587        #[non_exhaustive]
17588        pub struct Encoding {
17589            /// Which encoding to use.
17590            pub encoding: std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
17591
17592            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17593        }
17594
17595        impl Encoding {
17596            /// Creates a new default instance.
17597            pub fn new() -> Self {
17598                std::default::Default::default()
17599            }
17600
17601            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding].
17602            ///
17603            /// Note that all the setters affecting `encoding` are mutually
17604            /// exclusive.
17605            ///
17606            /// # Example
17607            /// ```ignore,no_run
17608            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17609            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
17610            /// let x = Encoding::new().set_encoding(Some(
17611            ///     google_cloud_bigtable_admin_v2::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(UnixMicrosInt64::default().into())));
17612            /// ```
17613            pub fn set_encoding<
17614                T: std::convert::Into<
17615                        std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
17616                    >,
17617            >(
17618                mut self,
17619                v: T,
17620            ) -> Self {
17621                self.encoding = v.into();
17622                self
17623            }
17624
17625            /// The value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
17626            /// if it holds a `UnixMicrosInt64`, `None` if the field is not set or
17627            /// holds a different branch.
17628            pub fn unix_micros_int64(
17629                &self,
17630            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::int_64::Encoding>>
17631            {
17632                #[allow(unreachable_patterns)]
17633                self.encoding.as_ref().and_then(|v| match v {
17634                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v) => {
17635                        std::option::Option::Some(v)
17636                    }
17637                    _ => std::option::Option::None,
17638                })
17639            }
17640
17641            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
17642            /// to hold a `UnixMicrosInt64`.
17643            ///
17644            /// Note that all the setters affecting `encoding` are
17645            /// mutually exclusive.
17646            ///
17647            /// # Example
17648            /// ```ignore,no_run
17649            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17650            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
17651            /// let x = Encoding::new().set_unix_micros_int64(UnixMicrosInt64::default()/* use setters */);
17652            /// assert!(x.unix_micros_int64().is_some());
17653            /// ```
17654            pub fn set_unix_micros_int64<
17655                T: std::convert::Into<std::boxed::Box<crate::model::r#type::int_64::Encoding>>,
17656            >(
17657                mut self,
17658                v: T,
17659            ) -> Self {
17660                self.encoding = std::option::Option::Some(
17661                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v.into()),
17662                );
17663                self
17664            }
17665        }
17666
17667        impl wkt::message::Message for Encoding {
17668            fn typename() -> &'static str {
17669                "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp.Encoding"
17670            }
17671        }
17672
17673        /// Defines additional types related to [Encoding].
17674        pub mod encoding {
17675            #[allow(unused_imports)]
17676            use super::*;
17677
17678            /// Which encoding to use.
17679            #[derive(Clone, Debug, PartialEq)]
17680            #[non_exhaustive]
17681            pub enum Encoding {
17682                /// Encodes the number of microseconds since the Unix epoch using the
17683                /// given `Int64` encoding. Values must be microsecond-aligned.
17684                ///
17685                /// Compatible with:
17686                ///
17687                /// - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
17688                UnixMicrosInt64(std::boxed::Box<crate::model::r#type::int_64::Encoding>),
17689            }
17690        }
17691    }
17692
17693    /// Date
17694    /// Values of type `Date` are stored in `Value.date_value`.
17695    #[derive(Clone, Default, PartialEq)]
17696    #[non_exhaustive]
17697    pub struct Date {
17698        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17699    }
17700
17701    impl Date {
17702        /// Creates a new default instance.
17703        pub fn new() -> Self {
17704            std::default::Default::default()
17705        }
17706    }
17707
17708    impl wkt::message::Message for Date {
17709        fn typename() -> &'static str {
17710            "type.googleapis.com/google.bigtable.admin.v2.Type.Date"
17711        }
17712    }
17713
17714    /// A structured data value, consisting of fields which map to dynamically
17715    /// typed values.
17716    /// Values of type `Struct` are stored in `Value.array_value` where entries are
17717    /// in the same order and number as `field_types`.
17718    #[derive(Clone, Default, PartialEq)]
17719    #[non_exhaustive]
17720    pub struct Struct {
17721        /// The names and types of the fields in this struct.
17722        pub fields: std::vec::Vec<crate::model::r#type::r#struct::Field>,
17723
17724        /// The encoding to use when converting to or from lower level types.
17725        pub encoding: std::option::Option<crate::model::r#type::r#struct::Encoding>,
17726
17727        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17728    }
17729
17730    impl Struct {
17731        /// Creates a new default instance.
17732        pub fn new() -> Self {
17733            std::default::Default::default()
17734        }
17735
17736        /// Sets the value of [fields][crate::model::r#type::Struct::fields].
17737        ///
17738        /// # Example
17739        /// ```ignore,no_run
17740        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17741        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17742        /// let x = Struct::new()
17743        ///     .set_fields([
17744        ///         Field::default()/* use setters */,
17745        ///         Field::default()/* use (different) setters */,
17746        ///     ]);
17747        /// ```
17748        pub fn set_fields<T, V>(mut self, v: T) -> Self
17749        where
17750            T: std::iter::IntoIterator<Item = V>,
17751            V: std::convert::Into<crate::model::r#type::r#struct::Field>,
17752        {
17753            use std::iter::Iterator;
17754            self.fields = v.into_iter().map(|i| i.into()).collect();
17755            self
17756        }
17757
17758        /// Sets the value of [encoding][crate::model::r#type::Struct::encoding].
17759        ///
17760        /// # Example
17761        /// ```ignore,no_run
17762        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17763        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17764        /// let x = Struct::new().set_encoding(Encoding::default()/* use setters */);
17765        /// ```
17766        pub fn set_encoding<T>(mut self, v: T) -> Self
17767        where
17768            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17769        {
17770            self.encoding = std::option::Option::Some(v.into());
17771            self
17772        }
17773
17774        /// Sets or clears the value of [encoding][crate::model::r#type::Struct::encoding].
17775        ///
17776        /// # Example
17777        /// ```ignore,no_run
17778        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17779        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17780        /// let x = Struct::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17781        /// let x = Struct::new().set_or_clear_encoding(None::<Encoding>);
17782        /// ```
17783        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17784        where
17785            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17786        {
17787            self.encoding = v.map(|x| x.into());
17788            self
17789        }
17790    }
17791
17792    impl wkt::message::Message for Struct {
17793        fn typename() -> &'static str {
17794            "type.googleapis.com/google.bigtable.admin.v2.Type.Struct"
17795        }
17796    }
17797
17798    /// Defines additional types related to [Struct].
17799    pub mod r#struct {
17800        #[allow(unused_imports)]
17801        use super::*;
17802
17803        /// A struct field and its type.
17804        #[derive(Clone, Default, PartialEq)]
17805        #[non_exhaustive]
17806        pub struct Field {
17807            /// The field name (optional). Fields without a `field_name` are considered
17808            /// anonymous and cannot be referenced by name.
17809            pub field_name: std::string::String,
17810
17811            /// The type of values in this field.
17812            pub r#type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17813
17814            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17815        }
17816
17817        impl Field {
17818            /// Creates a new default instance.
17819            pub fn new() -> Self {
17820                std::default::Default::default()
17821            }
17822
17823            /// Sets the value of [field_name][crate::model::r#type::r#struct::Field::field_name].
17824            ///
17825            /// # Example
17826            /// ```ignore,no_run
17827            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17828            /// let x = Field::new().set_field_name("example");
17829            /// ```
17830            pub fn set_field_name<T: std::convert::Into<std::string::String>>(
17831                mut self,
17832                v: T,
17833            ) -> Self {
17834                self.field_name = v.into();
17835                self
17836            }
17837
17838            /// Sets the value of [r#type][crate::model::r#type::r#struct::Field::type].
17839            ///
17840            /// # Example
17841            /// ```ignore,no_run
17842            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17843            /// use google_cloud_bigtable_admin_v2::model::Type;
17844            /// let x = Field::new().set_type(Type::default()/* use setters */);
17845            /// ```
17846            pub fn set_type<T>(mut self, v: T) -> Self
17847            where
17848                T: std::convert::Into<crate::model::Type>,
17849            {
17850                self.r#type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17851                self
17852            }
17853
17854            /// Sets or clears the value of [r#type][crate::model::r#type::r#struct::Field::type].
17855            ///
17856            /// # Example
17857            /// ```ignore,no_run
17858            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17859            /// use google_cloud_bigtable_admin_v2::model::Type;
17860            /// let x = Field::new().set_or_clear_type(Some(Type::default()/* use setters */));
17861            /// let x = Field::new().set_or_clear_type(None::<Type>);
17862            /// ```
17863            pub fn set_or_clear_type<T>(mut self, v: std::option::Option<T>) -> Self
17864            where
17865                T: std::convert::Into<crate::model::Type>,
17866            {
17867                self.r#type = v.map(|x| std::boxed::Box::new(x.into()));
17868                self
17869            }
17870        }
17871
17872        impl wkt::message::Message for Field {
17873            fn typename() -> &'static str {
17874                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Field"
17875            }
17876        }
17877
17878        /// Rules used to convert to or from lower level types.
17879        #[derive(Clone, Default, PartialEq)]
17880        #[non_exhaustive]
17881        pub struct Encoding {
17882            /// Which encoding to use.
17883            pub encoding: std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17884
17885            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17886        }
17887
17888        impl Encoding {
17889            /// Creates a new default instance.
17890            pub fn new() -> Self {
17891                std::default::Default::default()
17892            }
17893
17894            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding].
17895            ///
17896            /// Note that all the setters affecting `encoding` are mutually
17897            /// exclusive.
17898            ///
17899            /// # Example
17900            /// ```ignore,no_run
17901            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17902            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17903            /// let x = Encoding::new().set_encoding(Some(
17904            ///     google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Encoding::Singleton(Singleton::default().into())));
17905            /// ```
17906            pub fn set_encoding<
17907                T: std::convert::Into<
17908                        std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17909                    >,
17910            >(
17911                mut self,
17912                v: T,
17913            ) -> Self {
17914                self.encoding = v.into();
17915                self
17916            }
17917
17918            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17919            /// if it holds a `Singleton`, `None` if the field is not set or
17920            /// holds a different branch.
17921            pub fn singleton(
17922                &self,
17923            ) -> std::option::Option<
17924                &std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17925            > {
17926                #[allow(unreachable_patterns)]
17927                self.encoding.as_ref().and_then(|v| match v {
17928                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v) => {
17929                        std::option::Option::Some(v)
17930                    }
17931                    _ => std::option::Option::None,
17932                })
17933            }
17934
17935            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17936            /// to hold a `Singleton`.
17937            ///
17938            /// Note that all the setters affecting `encoding` are
17939            /// mutually exclusive.
17940            ///
17941            /// # Example
17942            /// ```ignore,no_run
17943            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17944            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17945            /// let x = Encoding::new().set_singleton(Singleton::default()/* use setters */);
17946            /// assert!(x.singleton().is_some());
17947            /// assert!(x.delimited_bytes().is_none());
17948            /// assert!(x.ordered_code_bytes().is_none());
17949            /// ```
17950            pub fn set_singleton<
17951                T: std::convert::Into<
17952                        std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17953                    >,
17954            >(
17955                mut self,
17956                v: T,
17957            ) -> Self {
17958                self.encoding = std::option::Option::Some(
17959                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v.into()),
17960                );
17961                self
17962            }
17963
17964            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17965            /// if it holds a `DelimitedBytes`, `None` if the field is not set or
17966            /// holds a different branch.
17967            pub fn delimited_bytes(
17968                &self,
17969            ) -> std::option::Option<
17970                &std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17971            > {
17972                #[allow(unreachable_patterns)]
17973                self.encoding.as_ref().and_then(|v| match v {
17974                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v) => {
17975                        std::option::Option::Some(v)
17976                    }
17977                    _ => std::option::Option::None,
17978                })
17979            }
17980
17981            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17982            /// to hold a `DelimitedBytes`.
17983            ///
17984            /// Note that all the setters affecting `encoding` are
17985            /// mutually exclusive.
17986            ///
17987            /// # Example
17988            /// ```ignore,no_run
17989            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17990            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
17991            /// let x = Encoding::new().set_delimited_bytes(DelimitedBytes::default()/* use setters */);
17992            /// assert!(x.delimited_bytes().is_some());
17993            /// assert!(x.singleton().is_none());
17994            /// assert!(x.ordered_code_bytes().is_none());
17995            /// ```
17996            pub fn set_delimited_bytes<
17997                T: std::convert::Into<
17998                        std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17999                    >,
18000            >(
18001                mut self,
18002                v: T,
18003            ) -> Self {
18004                self.encoding = std::option::Option::Some(
18005                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v.into()),
18006                );
18007                self
18008            }
18009
18010            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
18011            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
18012            /// holds a different branch.
18013            pub fn ordered_code_bytes(
18014                &self,
18015            ) -> std::option::Option<
18016                &std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
18017            > {
18018                #[allow(unreachable_patterns)]
18019                self.encoding.as_ref().and_then(|v| match v {
18020                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v) => {
18021                        std::option::Option::Some(v)
18022                    }
18023                    _ => std::option::Option::None,
18024                })
18025            }
18026
18027            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
18028            /// to hold a `OrderedCodeBytes`.
18029            ///
18030            /// Note that all the setters affecting `encoding` are
18031            /// mutually exclusive.
18032            ///
18033            /// # Example
18034            /// ```ignore,no_run
18035            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
18036            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::OrderedCodeBytes;
18037            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
18038            /// assert!(x.ordered_code_bytes().is_some());
18039            /// assert!(x.singleton().is_none());
18040            /// assert!(x.delimited_bytes().is_none());
18041            /// ```
18042            pub fn set_ordered_code_bytes<
18043                T: std::convert::Into<
18044                        std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
18045                    >,
18046            >(
18047                mut self,
18048                v: T,
18049            ) -> Self {
18050                self.encoding = std::option::Option::Some(
18051                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v.into()),
18052                );
18053                self
18054            }
18055        }
18056
18057        impl wkt::message::Message for Encoding {
18058            fn typename() -> &'static str {
18059                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding"
18060            }
18061        }
18062
18063        /// Defines additional types related to [Encoding].
18064        pub mod encoding {
18065            #[allow(unused_imports)]
18066            use super::*;
18067
18068            /// Uses the encoding of `fields[0].type` as-is.
18069            /// Only valid if `fields.size == 1`.
18070            #[derive(Clone, Default, PartialEq)]
18071            #[non_exhaustive]
18072            pub struct Singleton {
18073                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18074            }
18075
18076            impl Singleton {
18077                /// Creates a new default instance.
18078                pub fn new() -> Self {
18079                    std::default::Default::default()
18080                }
18081            }
18082
18083            impl wkt::message::Message for Singleton {
18084                fn typename() -> &'static str {
18085                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.Singleton"
18086                }
18087            }
18088
18089            /// Fields are encoded independently and concatenated with a configurable
18090            /// `delimiter` in between.
18091            ///
18092            /// A struct with no fields defined is encoded as a single `delimiter`.
18093            ///
18094            /// Sorted mode:
18095            ///
18096            /// - Fields are encoded in sorted mode.
18097            /// - Encoded field values must not contain any bytes <= `delimiter[0]`
18098            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
18099            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
18100            ///
18101            /// Distinct mode:
18102            ///
18103            /// - Fields are encoded in distinct mode.
18104            /// - Encoded field values must not contain `delimiter[0]`.
18105            #[derive(Clone, Default, PartialEq)]
18106            #[non_exhaustive]
18107            pub struct DelimitedBytes {
18108                /// Byte sequence used to delimit concatenated fields. The delimiter must
18109                /// contain at least 1 character and at most 50 characters.
18110                pub delimiter: ::bytes::Bytes,
18111
18112                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18113            }
18114
18115            impl DelimitedBytes {
18116                /// Creates a new default instance.
18117                pub fn new() -> Self {
18118                    std::default::Default::default()
18119                }
18120
18121                /// Sets the value of [delimiter][crate::model::r#type::r#struct::encoding::DelimitedBytes::delimiter].
18122                ///
18123                /// # Example
18124                /// ```ignore,no_run
18125                /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
18126                /// let x = DelimitedBytes::new().set_delimiter(bytes::Bytes::from_static(b"example"));
18127                /// ```
18128                pub fn set_delimiter<T: std::convert::Into<::bytes::Bytes>>(
18129                    mut self,
18130                    v: T,
18131                ) -> Self {
18132                    self.delimiter = v.into();
18133                    self
18134                }
18135            }
18136
18137            impl wkt::message::Message for DelimitedBytes {
18138                fn typename() -> &'static str {
18139                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes"
18140                }
18141            }
18142
18143            /// Fields are encoded independently and concatenated with the fixed byte
18144            /// pair {0x00, 0x01} in between.
18145            ///
18146            /// Any null (0x00) byte in an encoded field is replaced by the fixed byte
18147            /// pair {0x00, 0xFF}.
18148            ///
18149            /// Fields that encode to the empty string "" have special handling:
18150            ///
18151            /// - If *every* field encodes to "", or if the STRUCT has no fields
18152            ///   defined, then the STRUCT is encoded as the fixed byte pair
18153            ///   {0x00, 0x00}.
18154            /// - Otherwise, the STRUCT only encodes until the last non-empty field,
18155            ///   omitting any trailing empty fields. Any empty fields that aren't
18156            ///   omitted are replaced with the fixed byte pair {0x00, 0x00}.
18157            ///
18158            /// Examples:
18159            ///
18160            /// - STRUCT()             -> "\00\00"
18161            /// - STRUCT("")           -> "\00\00"
18162            /// - STRUCT("", "")       -> "\00\00"
18163            /// - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
18164            /// - STRUCT("A", "")      -> "A"
18165            /// - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
18166            /// - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
18167            ///
18168            /// Since null bytes are always escaped, this encoding can cause size
18169            /// blowup for encodings like `Int64.BigEndianBytes` that are likely to
18170            /// produce many such bytes.
18171            ///
18172            /// Sorted mode:
18173            ///
18174            /// - Fields are encoded in sorted mode.
18175            /// - All values supported by the field encodings are allowed
18176            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
18177            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
18178            ///
18179            /// Distinct mode:
18180            ///
18181            /// - Fields are encoded in distinct mode.
18182            /// - All values supported by the field encodings are allowed.
18183            #[derive(Clone, Default, PartialEq)]
18184            #[non_exhaustive]
18185            pub struct OrderedCodeBytes {
18186                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18187            }
18188
18189            impl OrderedCodeBytes {
18190                /// Creates a new default instance.
18191                pub fn new() -> Self {
18192                    std::default::Default::default()
18193                }
18194            }
18195
18196            impl wkt::message::Message for OrderedCodeBytes {
18197                fn typename() -> &'static str {
18198                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes"
18199                }
18200            }
18201
18202            /// Which encoding to use.
18203            #[derive(Clone, Debug, PartialEq)]
18204            #[non_exhaustive]
18205            pub enum Encoding {
18206                /// Use `Singleton` encoding.
18207                Singleton(std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>),
18208                /// Use `DelimitedBytes` encoding.
18209                DelimitedBytes(
18210                    std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
18211                ),
18212                /// User `OrderedCodeBytes` encoding.
18213                OrderedCodeBytes(
18214                    std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
18215                ),
18216            }
18217        }
18218    }
18219
18220    /// A protobuf message type.
18221    /// Values of type `Proto` are stored in `Value.bytes_value`.
18222    #[derive(Clone, Default, PartialEq)]
18223    #[non_exhaustive]
18224    pub struct Proto {
18225        /// The ID of the schema bundle that this proto is defined in.
18226        pub schema_bundle_id: std::string::String,
18227
18228        /// The fully qualified name of the protobuf message, including package. In
18229        /// the format of "foo.bar.Message".
18230        pub message_name: std::string::String,
18231
18232        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18233    }
18234
18235    impl Proto {
18236        /// Creates a new default instance.
18237        pub fn new() -> Self {
18238            std::default::Default::default()
18239        }
18240
18241        /// Sets the value of [schema_bundle_id][crate::model::r#type::Proto::schema_bundle_id].
18242        ///
18243        /// # Example
18244        /// ```ignore,no_run
18245        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
18246        /// let x = Proto::new().set_schema_bundle_id("example");
18247        /// ```
18248        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
18249            mut self,
18250            v: T,
18251        ) -> Self {
18252            self.schema_bundle_id = v.into();
18253            self
18254        }
18255
18256        /// Sets the value of [message_name][crate::model::r#type::Proto::message_name].
18257        ///
18258        /// # Example
18259        /// ```ignore,no_run
18260        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
18261        /// let x = Proto::new().set_message_name("example");
18262        /// ```
18263        pub fn set_message_name<T: std::convert::Into<std::string::String>>(
18264            mut self,
18265            v: T,
18266        ) -> Self {
18267            self.message_name = v.into();
18268            self
18269        }
18270    }
18271
18272    impl wkt::message::Message for Proto {
18273        fn typename() -> &'static str {
18274            "type.googleapis.com/google.bigtable.admin.v2.Type.Proto"
18275        }
18276    }
18277
18278    /// A protobuf enum type.
18279    /// Values of type `Enum` are stored in `Value.int_value`.
18280    #[derive(Clone, Default, PartialEq)]
18281    #[non_exhaustive]
18282    pub struct Enum {
18283        /// The ID of the schema bundle that this enum is defined in.
18284        pub schema_bundle_id: std::string::String,
18285
18286        /// The fully qualified name of the protobuf enum message, including package.
18287        /// In the format of "foo.bar.EnumMessage".
18288        pub enum_name: std::string::String,
18289
18290        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18291    }
18292
18293    impl Enum {
18294        /// Creates a new default instance.
18295        pub fn new() -> Self {
18296            std::default::Default::default()
18297        }
18298
18299        /// Sets the value of [schema_bundle_id][crate::model::r#type::Enum::schema_bundle_id].
18300        ///
18301        /// # Example
18302        /// ```ignore,no_run
18303        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
18304        /// let x = Enum::new().set_schema_bundle_id("example");
18305        /// ```
18306        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
18307            mut self,
18308            v: T,
18309        ) -> Self {
18310            self.schema_bundle_id = v.into();
18311            self
18312        }
18313
18314        /// Sets the value of [enum_name][crate::model::r#type::Enum::enum_name].
18315        ///
18316        /// # Example
18317        /// ```ignore,no_run
18318        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
18319        /// let x = Enum::new().set_enum_name("example");
18320        /// ```
18321        pub fn set_enum_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18322            self.enum_name = v.into();
18323            self
18324        }
18325    }
18326
18327    impl wkt::message::Message for Enum {
18328        fn typename() -> &'static str {
18329            "type.googleapis.com/google.bigtable.admin.v2.Type.Enum"
18330        }
18331    }
18332
18333    /// An ordered list of elements of a given type.
18334    /// Values of type `Array` are stored in `Value.array_value`.
18335    #[derive(Clone, Default, PartialEq)]
18336    #[non_exhaustive]
18337    pub struct Array {
18338        /// The type of the elements in the array. This must not be `Array`.
18339        pub element_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18340
18341        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18342    }
18343
18344    impl Array {
18345        /// Creates a new default instance.
18346        pub fn new() -> Self {
18347            std::default::Default::default()
18348        }
18349
18350        /// Sets the value of [element_type][crate::model::r#type::Array::element_type].
18351        ///
18352        /// # Example
18353        /// ```ignore,no_run
18354        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
18355        /// use google_cloud_bigtable_admin_v2::model::Type;
18356        /// let x = Array::new().set_element_type(Type::default()/* use setters */);
18357        /// ```
18358        pub fn set_element_type<T>(mut self, v: T) -> Self
18359        where
18360            T: std::convert::Into<crate::model::Type>,
18361        {
18362            self.element_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18363            self
18364        }
18365
18366        /// Sets or clears the value of [element_type][crate::model::r#type::Array::element_type].
18367        ///
18368        /// # Example
18369        /// ```ignore,no_run
18370        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
18371        /// use google_cloud_bigtable_admin_v2::model::Type;
18372        /// let x = Array::new().set_or_clear_element_type(Some(Type::default()/* use setters */));
18373        /// let x = Array::new().set_or_clear_element_type(None::<Type>);
18374        /// ```
18375        pub fn set_or_clear_element_type<T>(mut self, v: std::option::Option<T>) -> Self
18376        where
18377            T: std::convert::Into<crate::model::Type>,
18378        {
18379            self.element_type = v.map(|x| std::boxed::Box::new(x.into()));
18380            self
18381        }
18382    }
18383
18384    impl wkt::message::Message for Array {
18385        fn typename() -> &'static str {
18386            "type.googleapis.com/google.bigtable.admin.v2.Type.Array"
18387        }
18388    }
18389
18390    /// A mapping of keys to values of a given type.
18391    /// Values of type `Map` are stored in a `Value.array_value` where each entry
18392    /// is another `Value.array_value` with two elements (the key and the value,
18393    /// in that order).
18394    /// Normally encoded Map values won't have repeated keys, however, clients are
18395    /// expected to handle the case in which they do. If the same key appears
18396    /// multiple times, the _last_ value takes precedence.
18397    #[derive(Clone, Default, PartialEq)]
18398    #[non_exhaustive]
18399    pub struct Map {
18400        /// The type of a map key.
18401        /// Only `Bytes`, `String`, and `Int64` are allowed as key types.
18402        pub key_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18403
18404        /// The type of the values in a map.
18405        pub value_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18406
18407        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18408    }
18409
18410    impl Map {
18411        /// Creates a new default instance.
18412        pub fn new() -> Self {
18413            std::default::Default::default()
18414        }
18415
18416        /// Sets the value of [key_type][crate::model::r#type::Map::key_type].
18417        ///
18418        /// # Example
18419        /// ```ignore,no_run
18420        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18421        /// use google_cloud_bigtable_admin_v2::model::Type;
18422        /// let x = Map::new().set_key_type(Type::default()/* use setters */);
18423        /// ```
18424        pub fn set_key_type<T>(mut self, v: T) -> Self
18425        where
18426            T: std::convert::Into<crate::model::Type>,
18427        {
18428            self.key_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18429            self
18430        }
18431
18432        /// Sets or clears the value of [key_type][crate::model::r#type::Map::key_type].
18433        ///
18434        /// # Example
18435        /// ```ignore,no_run
18436        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18437        /// use google_cloud_bigtable_admin_v2::model::Type;
18438        /// let x = Map::new().set_or_clear_key_type(Some(Type::default()/* use setters */));
18439        /// let x = Map::new().set_or_clear_key_type(None::<Type>);
18440        /// ```
18441        pub fn set_or_clear_key_type<T>(mut self, v: std::option::Option<T>) -> Self
18442        where
18443            T: std::convert::Into<crate::model::Type>,
18444        {
18445            self.key_type = v.map(|x| std::boxed::Box::new(x.into()));
18446            self
18447        }
18448
18449        /// Sets the value of [value_type][crate::model::r#type::Map::value_type].
18450        ///
18451        /// # Example
18452        /// ```ignore,no_run
18453        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18454        /// use google_cloud_bigtable_admin_v2::model::Type;
18455        /// let x = Map::new().set_value_type(Type::default()/* use setters */);
18456        /// ```
18457        pub fn set_value_type<T>(mut self, v: T) -> Self
18458        where
18459            T: std::convert::Into<crate::model::Type>,
18460        {
18461            self.value_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18462            self
18463        }
18464
18465        /// Sets or clears the value of [value_type][crate::model::r#type::Map::value_type].
18466        ///
18467        /// # Example
18468        /// ```ignore,no_run
18469        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18470        /// use google_cloud_bigtable_admin_v2::model::Type;
18471        /// let x = Map::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
18472        /// let x = Map::new().set_or_clear_value_type(None::<Type>);
18473        /// ```
18474        pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
18475        where
18476            T: std::convert::Into<crate::model::Type>,
18477        {
18478            self.value_type = v.map(|x| std::boxed::Box::new(x.into()));
18479            self
18480        }
18481    }
18482
18483    impl wkt::message::Message for Map {
18484        fn typename() -> &'static str {
18485            "type.googleapis.com/google.bigtable.admin.v2.Type.Map"
18486        }
18487    }
18488
18489    /// A value that combines incremental updates into a summarized value.
18490    ///
18491    /// Data is never directly written or read using type `Aggregate`. Writes will
18492    /// provide either the `input_type` or `state_type`, and reads will always
18493    /// return the `state_type` .
18494    #[derive(Clone, Default, PartialEq)]
18495    #[non_exhaustive]
18496    pub struct Aggregate {
18497        /// Type of the inputs that are accumulated by this `Aggregate`, which must
18498        /// specify a full encoding.
18499        /// Use `AddInput` mutations to accumulate new inputs.
18500        pub input_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18501
18502        /// Output only. Type that holds the internal accumulator state for the
18503        /// `Aggregate`. This is a function of the `input_type` and `aggregator`
18504        /// chosen, and will always specify a full encoding.
18505        pub state_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18506
18507        /// Which aggregator function to use. The configured types must match.
18508        pub aggregator: std::option::Option<crate::model::r#type::aggregate::Aggregator>,
18509
18510        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18511    }
18512
18513    impl Aggregate {
18514        /// Creates a new default instance.
18515        pub fn new() -> Self {
18516            std::default::Default::default()
18517        }
18518
18519        /// Sets the value of [input_type][crate::model::r#type::Aggregate::input_type].
18520        ///
18521        /// # Example
18522        /// ```ignore,no_run
18523        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18524        /// use google_cloud_bigtable_admin_v2::model::Type;
18525        /// let x = Aggregate::new().set_input_type(Type::default()/* use setters */);
18526        /// ```
18527        pub fn set_input_type<T>(mut self, v: T) -> Self
18528        where
18529            T: std::convert::Into<crate::model::Type>,
18530        {
18531            self.input_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18532            self
18533        }
18534
18535        /// Sets or clears the value of [input_type][crate::model::r#type::Aggregate::input_type].
18536        ///
18537        /// # Example
18538        /// ```ignore,no_run
18539        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18540        /// use google_cloud_bigtable_admin_v2::model::Type;
18541        /// let x = Aggregate::new().set_or_clear_input_type(Some(Type::default()/* use setters */));
18542        /// let x = Aggregate::new().set_or_clear_input_type(None::<Type>);
18543        /// ```
18544        pub fn set_or_clear_input_type<T>(mut self, v: std::option::Option<T>) -> Self
18545        where
18546            T: std::convert::Into<crate::model::Type>,
18547        {
18548            self.input_type = v.map(|x| std::boxed::Box::new(x.into()));
18549            self
18550        }
18551
18552        /// Sets the value of [state_type][crate::model::r#type::Aggregate::state_type].
18553        ///
18554        /// # Example
18555        /// ```ignore,no_run
18556        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18557        /// use google_cloud_bigtable_admin_v2::model::Type;
18558        /// let x = Aggregate::new().set_state_type(Type::default()/* use setters */);
18559        /// ```
18560        pub fn set_state_type<T>(mut self, v: T) -> Self
18561        where
18562            T: std::convert::Into<crate::model::Type>,
18563        {
18564            self.state_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18565            self
18566        }
18567
18568        /// Sets or clears the value of [state_type][crate::model::r#type::Aggregate::state_type].
18569        ///
18570        /// # Example
18571        /// ```ignore,no_run
18572        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18573        /// use google_cloud_bigtable_admin_v2::model::Type;
18574        /// let x = Aggregate::new().set_or_clear_state_type(Some(Type::default()/* use setters */));
18575        /// let x = Aggregate::new().set_or_clear_state_type(None::<Type>);
18576        /// ```
18577        pub fn set_or_clear_state_type<T>(mut self, v: std::option::Option<T>) -> Self
18578        where
18579            T: std::convert::Into<crate::model::Type>,
18580        {
18581            self.state_type = v.map(|x| std::boxed::Box::new(x.into()));
18582            self
18583        }
18584
18585        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator].
18586        ///
18587        /// Note that all the setters affecting `aggregator` are mutually
18588        /// exclusive.
18589        ///
18590        /// # Example
18591        /// ```ignore,no_run
18592        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18593        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
18594        /// let x = Aggregate::new().set_aggregator(Some(
18595        ///     google_cloud_bigtable_admin_v2::model::r#type::aggregate::Aggregator::Sum(Sum::default().into())));
18596        /// ```
18597        pub fn set_aggregator<
18598            T: std::convert::Into<std::option::Option<crate::model::r#type::aggregate::Aggregator>>,
18599        >(
18600            mut self,
18601            v: T,
18602        ) -> Self {
18603            self.aggregator = v.into();
18604            self
18605        }
18606
18607        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18608        /// if it holds a `Sum`, `None` if the field is not set or
18609        /// holds a different branch.
18610        pub fn sum(
18611            &self,
18612        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Sum>> {
18613            #[allow(unreachable_patterns)]
18614            self.aggregator.as_ref().and_then(|v| match v {
18615                crate::model::r#type::aggregate::Aggregator::Sum(v) => std::option::Option::Some(v),
18616                _ => std::option::Option::None,
18617            })
18618        }
18619
18620        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18621        /// to hold a `Sum`.
18622        ///
18623        /// Note that all the setters affecting `aggregator` are
18624        /// mutually exclusive.
18625        ///
18626        /// # Example
18627        /// ```ignore,no_run
18628        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18629        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
18630        /// let x = Aggregate::new().set_sum(Sum::default()/* use setters */);
18631        /// assert!(x.sum().is_some());
18632        /// assert!(x.hllpp_unique_count().is_none());
18633        /// assert!(x.max().is_none());
18634        /// assert!(x.min().is_none());
18635        /// ```
18636        pub fn set_sum<
18637            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Sum>>,
18638        >(
18639            mut self,
18640            v: T,
18641        ) -> Self {
18642            self.aggregator = std::option::Option::Some(
18643                crate::model::r#type::aggregate::Aggregator::Sum(v.into()),
18644            );
18645            self
18646        }
18647
18648        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18649        /// if it holds a `HllppUniqueCount`, `None` if the field is not set or
18650        /// holds a different branch.
18651        pub fn hllpp_unique_count(
18652            &self,
18653        ) -> std::option::Option<
18654            &std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18655        > {
18656            #[allow(unreachable_patterns)]
18657            self.aggregator.as_ref().and_then(|v| match v {
18658                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v) => {
18659                    std::option::Option::Some(v)
18660                }
18661                _ => std::option::Option::None,
18662            })
18663        }
18664
18665        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18666        /// to hold a `HllppUniqueCount`.
18667        ///
18668        /// Note that all the setters affecting `aggregator` are
18669        /// mutually exclusive.
18670        ///
18671        /// # Example
18672        /// ```ignore,no_run
18673        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18674        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount;
18675        /// let x = Aggregate::new().set_hllpp_unique_count(HyperLogLogPlusPlusUniqueCount::default()/* use setters */);
18676        /// assert!(x.hllpp_unique_count().is_some());
18677        /// assert!(x.sum().is_none());
18678        /// assert!(x.max().is_none());
18679        /// assert!(x.min().is_none());
18680        /// ```
18681        pub fn set_hllpp_unique_count<
18682            T: std::convert::Into<
18683                    std::boxed::Box<
18684                        crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount,
18685                    >,
18686                >,
18687        >(
18688            mut self,
18689            v: T,
18690        ) -> Self {
18691            self.aggregator = std::option::Option::Some(
18692                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v.into()),
18693            );
18694            self
18695        }
18696
18697        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18698        /// if it holds a `Max`, `None` if the field is not set or
18699        /// holds a different branch.
18700        pub fn max(
18701            &self,
18702        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Max>> {
18703            #[allow(unreachable_patterns)]
18704            self.aggregator.as_ref().and_then(|v| match v {
18705                crate::model::r#type::aggregate::Aggregator::Max(v) => std::option::Option::Some(v),
18706                _ => std::option::Option::None,
18707            })
18708        }
18709
18710        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18711        /// to hold a `Max`.
18712        ///
18713        /// Note that all the setters affecting `aggregator` are
18714        /// mutually exclusive.
18715        ///
18716        /// # Example
18717        /// ```ignore,no_run
18718        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18719        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Max;
18720        /// let x = Aggregate::new().set_max(Max::default()/* use setters */);
18721        /// assert!(x.max().is_some());
18722        /// assert!(x.sum().is_none());
18723        /// assert!(x.hllpp_unique_count().is_none());
18724        /// assert!(x.min().is_none());
18725        /// ```
18726        pub fn set_max<
18727            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Max>>,
18728        >(
18729            mut self,
18730            v: T,
18731        ) -> Self {
18732            self.aggregator = std::option::Option::Some(
18733                crate::model::r#type::aggregate::Aggregator::Max(v.into()),
18734            );
18735            self
18736        }
18737
18738        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18739        /// if it holds a `Min`, `None` if the field is not set or
18740        /// holds a different branch.
18741        pub fn min(
18742            &self,
18743        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Min>> {
18744            #[allow(unreachable_patterns)]
18745            self.aggregator.as_ref().and_then(|v| match v {
18746                crate::model::r#type::aggregate::Aggregator::Min(v) => std::option::Option::Some(v),
18747                _ => std::option::Option::None,
18748            })
18749        }
18750
18751        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18752        /// to hold a `Min`.
18753        ///
18754        /// Note that all the setters affecting `aggregator` are
18755        /// mutually exclusive.
18756        ///
18757        /// # Example
18758        /// ```ignore,no_run
18759        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18760        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Min;
18761        /// let x = Aggregate::new().set_min(Min::default()/* use setters */);
18762        /// assert!(x.min().is_some());
18763        /// assert!(x.sum().is_none());
18764        /// assert!(x.hllpp_unique_count().is_none());
18765        /// assert!(x.max().is_none());
18766        /// ```
18767        pub fn set_min<
18768            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Min>>,
18769        >(
18770            mut self,
18771            v: T,
18772        ) -> Self {
18773            self.aggregator = std::option::Option::Some(
18774                crate::model::r#type::aggregate::Aggregator::Min(v.into()),
18775            );
18776            self
18777        }
18778    }
18779
18780    impl wkt::message::Message for Aggregate {
18781        fn typename() -> &'static str {
18782            "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate"
18783        }
18784    }
18785
18786    /// Defines additional types related to [Aggregate].
18787    pub mod aggregate {
18788        #[allow(unused_imports)]
18789        use super::*;
18790
18791        /// Computes the sum of the input values.
18792        /// Allowed input: `Int64`
18793        /// State: same as input
18794        #[derive(Clone, Default, PartialEq)]
18795        #[non_exhaustive]
18796        pub struct Sum {
18797            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18798        }
18799
18800        impl Sum {
18801            /// Creates a new default instance.
18802            pub fn new() -> Self {
18803                std::default::Default::default()
18804            }
18805        }
18806
18807        impl wkt::message::Message for Sum {
18808            fn typename() -> &'static str {
18809                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Sum"
18810            }
18811        }
18812
18813        /// Computes the max of the input values.
18814        /// Allowed input: `Int64`
18815        /// State: same as input
18816        #[derive(Clone, Default, PartialEq)]
18817        #[non_exhaustive]
18818        pub struct Max {
18819            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18820        }
18821
18822        impl Max {
18823            /// Creates a new default instance.
18824            pub fn new() -> Self {
18825                std::default::Default::default()
18826            }
18827        }
18828
18829        impl wkt::message::Message for Max {
18830            fn typename() -> &'static str {
18831                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Max"
18832            }
18833        }
18834
18835        /// Computes the min of the input values.
18836        /// Allowed input: `Int64`
18837        /// State: same as input
18838        #[derive(Clone, Default, PartialEq)]
18839        #[non_exhaustive]
18840        pub struct Min {
18841            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18842        }
18843
18844        impl Min {
18845            /// Creates a new default instance.
18846            pub fn new() -> Self {
18847                std::default::Default::default()
18848            }
18849        }
18850
18851        impl wkt::message::Message for Min {
18852            fn typename() -> &'static str {
18853                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Min"
18854            }
18855        }
18856
18857        /// Computes an approximate unique count over the input values. When using
18858        /// raw data as input, be careful to use a consistent encoding. Otherwise
18859        /// the same value encoded differently could count more than once, or two
18860        /// distinct values could count as identical.
18861        /// Input: Any, or omit for Raw
18862        /// State: TBD
18863        /// Special state conversions: `Int64` (the unique count estimate)
18864        #[derive(Clone, Default, PartialEq)]
18865        #[non_exhaustive]
18866        pub struct HyperLogLogPlusPlusUniqueCount {
18867            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18868        }
18869
18870        impl HyperLogLogPlusPlusUniqueCount {
18871            /// Creates a new default instance.
18872            pub fn new() -> Self {
18873                std::default::Default::default()
18874            }
18875        }
18876
18877        impl wkt::message::Message for HyperLogLogPlusPlusUniqueCount {
18878            fn typename() -> &'static str {
18879                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount"
18880            }
18881        }
18882
18883        /// Which aggregator function to use. The configured types must match.
18884        #[derive(Clone, Debug, PartialEq)]
18885        #[non_exhaustive]
18886        pub enum Aggregator {
18887            /// Sum aggregator.
18888            Sum(std::boxed::Box<crate::model::r#type::aggregate::Sum>),
18889            /// HyperLogLogPlusPlusUniqueCount aggregator.
18890            HllppUniqueCount(
18891                std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18892            ),
18893            /// Max aggregator.
18894            Max(std::boxed::Box<crate::model::r#type::aggregate::Max>),
18895            /// Min aggregator.
18896            Min(std::boxed::Box<crate::model::r#type::aggregate::Min>),
18897        }
18898    }
18899
18900    /// The kind of type that this represents.
18901    #[derive(Clone, Debug, PartialEq)]
18902    #[non_exhaustive]
18903    pub enum Kind {
18904        /// Bytes
18905        BytesType(std::boxed::Box<crate::model::r#type::Bytes>),
18906        /// String
18907        StringType(std::boxed::Box<crate::model::r#type::String>),
18908        /// Int64
18909        Int64Type(std::boxed::Box<crate::model::r#type::Int64>),
18910        /// Float32
18911        Float32Type(std::boxed::Box<crate::model::r#type::Float32>),
18912        /// Float64
18913        Float64Type(std::boxed::Box<crate::model::r#type::Float64>),
18914        /// Bool
18915        BoolType(std::boxed::Box<crate::model::r#type::Bool>),
18916        /// Timestamp
18917        TimestampType(std::boxed::Box<crate::model::r#type::Timestamp>),
18918        /// Date
18919        DateType(std::boxed::Box<crate::model::r#type::Date>),
18920        /// Aggregate
18921        AggregateType(std::boxed::Box<crate::model::r#type::Aggregate>),
18922        /// Struct
18923        StructType(std::boxed::Box<crate::model::r#type::Struct>),
18924        /// Array
18925        ArrayType(std::boxed::Box<crate::model::r#type::Array>),
18926        /// Map
18927        MapType(std::boxed::Box<crate::model::r#type::Map>),
18928        /// Proto
18929        ProtoType(std::boxed::Box<crate::model::r#type::Proto>),
18930        /// Enum
18931        EnumType(std::boxed::Box<crate::model::r#type::Enum>),
18932    }
18933}
18934
18935/// Storage media types for persisting Bigtable data.
18936///
18937/// # Working with unknown values
18938///
18939/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18940/// additional enum variants at any time. Adding new variants is not considered
18941/// a breaking change. Applications should write their code in anticipation of:
18942///
18943/// - New values appearing in future releases of the client library, **and**
18944/// - New values received dynamically, without application changes.
18945///
18946/// Please consult the [Working with enums] section in the user guide for some
18947/// guidelines.
18948///
18949/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18950#[derive(Clone, Debug, PartialEq)]
18951#[non_exhaustive]
18952pub enum StorageType {
18953    /// The user did not specify a storage type.
18954    Unspecified,
18955    /// Flash (SSD) storage should be used.
18956    Ssd,
18957    /// Magnetic drive (HDD) storage should be used.
18958    Hdd,
18959    /// If set, the enum was initialized with an unknown value.
18960    ///
18961    /// Applications can examine the value using [StorageType::value] or
18962    /// [StorageType::name].
18963    UnknownValue(storage_type::UnknownValue),
18964}
18965
18966#[doc(hidden)]
18967pub mod storage_type {
18968    #[allow(unused_imports)]
18969    use super::*;
18970    #[derive(Clone, Debug, PartialEq)]
18971    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18972}
18973
18974impl StorageType {
18975    /// Gets the enum value.
18976    ///
18977    /// Returns `None` if the enum contains an unknown value deserialized from
18978    /// the string representation of enums.
18979    pub fn value(&self) -> std::option::Option<i32> {
18980        match self {
18981            Self::Unspecified => std::option::Option::Some(0),
18982            Self::Ssd => std::option::Option::Some(1),
18983            Self::Hdd => std::option::Option::Some(2),
18984            Self::UnknownValue(u) => u.0.value(),
18985        }
18986    }
18987
18988    /// Gets the enum value as a string.
18989    ///
18990    /// Returns `None` if the enum contains an unknown value deserialized from
18991    /// the integer representation of enums.
18992    pub fn name(&self) -> std::option::Option<&str> {
18993        match self {
18994            Self::Unspecified => std::option::Option::Some("STORAGE_TYPE_UNSPECIFIED"),
18995            Self::Ssd => std::option::Option::Some("SSD"),
18996            Self::Hdd => std::option::Option::Some("HDD"),
18997            Self::UnknownValue(u) => u.0.name(),
18998        }
18999    }
19000}
19001
19002impl std::default::Default for StorageType {
19003    fn default() -> Self {
19004        use std::convert::From;
19005        Self::from(0)
19006    }
19007}
19008
19009impl std::fmt::Display for StorageType {
19010    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19011        wkt::internal::display_enum(f, self.name(), self.value())
19012    }
19013}
19014
19015impl std::convert::From<i32> for StorageType {
19016    fn from(value: i32) -> Self {
19017        match value {
19018            0 => Self::Unspecified,
19019            1 => Self::Ssd,
19020            2 => Self::Hdd,
19021            _ => Self::UnknownValue(storage_type::UnknownValue(
19022                wkt::internal::UnknownEnumValue::Integer(value),
19023            )),
19024        }
19025    }
19026}
19027
19028impl std::convert::From<&str> for StorageType {
19029    fn from(value: &str) -> Self {
19030        use std::string::ToString;
19031        match value {
19032            "STORAGE_TYPE_UNSPECIFIED" => Self::Unspecified,
19033            "SSD" => Self::Ssd,
19034            "HDD" => Self::Hdd,
19035            _ => Self::UnknownValue(storage_type::UnknownValue(
19036                wkt::internal::UnknownEnumValue::String(value.to_string()),
19037            )),
19038        }
19039    }
19040}
19041
19042impl serde::ser::Serialize for StorageType {
19043    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19044    where
19045        S: serde::Serializer,
19046    {
19047        match self {
19048            Self::Unspecified => serializer.serialize_i32(0),
19049            Self::Ssd => serializer.serialize_i32(1),
19050            Self::Hdd => serializer.serialize_i32(2),
19051            Self::UnknownValue(u) => u.0.serialize(serializer),
19052        }
19053    }
19054}
19055
19056impl<'de> serde::de::Deserialize<'de> for StorageType {
19057    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19058    where
19059        D: serde::Deserializer<'de>,
19060    {
19061        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageType>::new(
19062            ".google.bigtable.admin.v2.StorageType",
19063        ))
19064    }
19065}
19066
19067/// Indicates the type of the restore source.
19068///
19069/// # Working with unknown values
19070///
19071/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19072/// additional enum variants at any time. Adding new variants is not considered
19073/// a breaking change. Applications should write their code in anticipation of:
19074///
19075/// - New values appearing in future releases of the client library, **and**
19076/// - New values received dynamically, without application changes.
19077///
19078/// Please consult the [Working with enums] section in the user guide for some
19079/// guidelines.
19080///
19081/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
19082#[derive(Clone, Debug, PartialEq)]
19083#[non_exhaustive]
19084pub enum RestoreSourceType {
19085    /// No restore associated.
19086    Unspecified,
19087    /// A backup was used as the source of the restore.
19088    Backup,
19089    /// If set, the enum was initialized with an unknown value.
19090    ///
19091    /// Applications can examine the value using [RestoreSourceType::value] or
19092    /// [RestoreSourceType::name].
19093    UnknownValue(restore_source_type::UnknownValue),
19094}
19095
19096#[doc(hidden)]
19097pub mod restore_source_type {
19098    #[allow(unused_imports)]
19099    use super::*;
19100    #[derive(Clone, Debug, PartialEq)]
19101    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19102}
19103
19104impl RestoreSourceType {
19105    /// Gets the enum value.
19106    ///
19107    /// Returns `None` if the enum contains an unknown value deserialized from
19108    /// the string representation of enums.
19109    pub fn value(&self) -> std::option::Option<i32> {
19110        match self {
19111            Self::Unspecified => std::option::Option::Some(0),
19112            Self::Backup => std::option::Option::Some(1),
19113            Self::UnknownValue(u) => u.0.value(),
19114        }
19115    }
19116
19117    /// Gets the enum value as a string.
19118    ///
19119    /// Returns `None` if the enum contains an unknown value deserialized from
19120    /// the integer representation of enums.
19121    pub fn name(&self) -> std::option::Option<&str> {
19122        match self {
19123            Self::Unspecified => std::option::Option::Some("RESTORE_SOURCE_TYPE_UNSPECIFIED"),
19124            Self::Backup => std::option::Option::Some("BACKUP"),
19125            Self::UnknownValue(u) => u.0.name(),
19126        }
19127    }
19128}
19129
19130impl std::default::Default for RestoreSourceType {
19131    fn default() -> Self {
19132        use std::convert::From;
19133        Self::from(0)
19134    }
19135}
19136
19137impl std::fmt::Display for RestoreSourceType {
19138    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19139        wkt::internal::display_enum(f, self.name(), self.value())
19140    }
19141}
19142
19143impl std::convert::From<i32> for RestoreSourceType {
19144    fn from(value: i32) -> Self {
19145        match value {
19146            0 => Self::Unspecified,
19147            1 => Self::Backup,
19148            _ => Self::UnknownValue(restore_source_type::UnknownValue(
19149                wkt::internal::UnknownEnumValue::Integer(value),
19150            )),
19151        }
19152    }
19153}
19154
19155impl std::convert::From<&str> for RestoreSourceType {
19156    fn from(value: &str) -> Self {
19157        use std::string::ToString;
19158        match value {
19159            "RESTORE_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
19160            "BACKUP" => Self::Backup,
19161            _ => Self::UnknownValue(restore_source_type::UnknownValue(
19162                wkt::internal::UnknownEnumValue::String(value.to_string()),
19163            )),
19164        }
19165    }
19166}
19167
19168impl serde::ser::Serialize for RestoreSourceType {
19169    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19170    where
19171        S: serde::Serializer,
19172    {
19173        match self {
19174            Self::Unspecified => serializer.serialize_i32(0),
19175            Self::Backup => serializer.serialize_i32(1),
19176            Self::UnknownValue(u) => u.0.serialize(serializer),
19177        }
19178    }
19179}
19180
19181impl<'de> serde::de::Deserialize<'de> for RestoreSourceType {
19182    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19183    where
19184        D: serde::Deserializer<'de>,
19185    {
19186        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RestoreSourceType>::new(
19187            ".google.bigtable.admin.v2.RestoreSourceType",
19188        ))
19189    }
19190}