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    /// ```
12549    pub fn set_granularity<T: std::convert::Into<crate::model::table::TimestampGranularity>>(
12550        mut self,
12551        v: T,
12552    ) -> Self {
12553        self.granularity = v.into();
12554        self
12555    }
12556
12557    /// Sets the value of [restore_info][crate::model::Table::restore_info].
12558    ///
12559    /// # Example
12560    /// ```ignore,no_run
12561    /// # use google_cloud_bigtable_admin_v2::model::Table;
12562    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12563    /// let x = Table::new().set_restore_info(RestoreInfo::default()/* use setters */);
12564    /// ```
12565    pub fn set_restore_info<T>(mut self, v: T) -> Self
12566    where
12567        T: std::convert::Into<crate::model::RestoreInfo>,
12568    {
12569        self.restore_info = std::option::Option::Some(v.into());
12570        self
12571    }
12572
12573    /// Sets or clears the value of [restore_info][crate::model::Table::restore_info].
12574    ///
12575    /// # Example
12576    /// ```ignore,no_run
12577    /// # use google_cloud_bigtable_admin_v2::model::Table;
12578    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12579    /// let x = Table::new().set_or_clear_restore_info(Some(RestoreInfo::default()/* use setters */));
12580    /// let x = Table::new().set_or_clear_restore_info(None::<RestoreInfo>);
12581    /// ```
12582    pub fn set_or_clear_restore_info<T>(mut self, v: std::option::Option<T>) -> Self
12583    where
12584        T: std::convert::Into<crate::model::RestoreInfo>,
12585    {
12586        self.restore_info = v.map(|x| x.into());
12587        self
12588    }
12589
12590    /// Sets the value of [change_stream_config][crate::model::Table::change_stream_config].
12591    ///
12592    /// # Example
12593    /// ```ignore,no_run
12594    /// # use google_cloud_bigtable_admin_v2::model::Table;
12595    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12596    /// let x = Table::new().set_change_stream_config(ChangeStreamConfig::default()/* use setters */);
12597    /// ```
12598    pub fn set_change_stream_config<T>(mut self, v: T) -> Self
12599    where
12600        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12601    {
12602        self.change_stream_config = std::option::Option::Some(v.into());
12603        self
12604    }
12605
12606    /// Sets or clears the value of [change_stream_config][crate::model::Table::change_stream_config].
12607    ///
12608    /// # Example
12609    /// ```ignore,no_run
12610    /// # use google_cloud_bigtable_admin_v2::model::Table;
12611    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12612    /// let x = Table::new().set_or_clear_change_stream_config(Some(ChangeStreamConfig::default()/* use setters */));
12613    /// let x = Table::new().set_or_clear_change_stream_config(None::<ChangeStreamConfig>);
12614    /// ```
12615    pub fn set_or_clear_change_stream_config<T>(mut self, v: std::option::Option<T>) -> Self
12616    where
12617        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12618    {
12619        self.change_stream_config = v.map(|x| x.into());
12620        self
12621    }
12622
12623    /// Sets the value of [deletion_protection][crate::model::Table::deletion_protection].
12624    ///
12625    /// # Example
12626    /// ```ignore,no_run
12627    /// # use google_cloud_bigtable_admin_v2::model::Table;
12628    /// let x = Table::new().set_deletion_protection(true);
12629    /// ```
12630    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12631        self.deletion_protection = v.into();
12632        self
12633    }
12634
12635    /// Sets the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
12636    ///
12637    /// # Example
12638    /// ```ignore,no_run
12639    /// # use google_cloud_bigtable_admin_v2::model::Table;
12640    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
12641    /// let x = Table::new().set_tiered_storage_config(TieredStorageConfig::default()/* use setters */);
12642    /// ```
12643    pub fn set_tiered_storage_config<T>(mut self, v: T) -> Self
12644    where
12645        T: std::convert::Into<crate::model::TieredStorageConfig>,
12646    {
12647        self.tiered_storage_config = std::option::Option::Some(v.into());
12648        self
12649    }
12650
12651    /// Sets or clears the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
12652    ///
12653    /// # Example
12654    /// ```ignore,no_run
12655    /// # use google_cloud_bigtable_admin_v2::model::Table;
12656    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
12657    /// let x = Table::new().set_or_clear_tiered_storage_config(Some(TieredStorageConfig::default()/* use setters */));
12658    /// let x = Table::new().set_or_clear_tiered_storage_config(None::<TieredStorageConfig>);
12659    /// ```
12660    pub fn set_or_clear_tiered_storage_config<T>(mut self, v: std::option::Option<T>) -> Self
12661    where
12662        T: std::convert::Into<crate::model::TieredStorageConfig>,
12663    {
12664        self.tiered_storage_config = v.map(|x| x.into());
12665        self
12666    }
12667
12668    /// Sets the value of [row_key_schema][crate::model::Table::row_key_schema].
12669    ///
12670    /// # Example
12671    /// ```ignore,no_run
12672    /// # use google_cloud_bigtable_admin_v2::model::Table;
12673    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12674    /// let x = Table::new().set_row_key_schema(Struct::default()/* use setters */);
12675    /// ```
12676    pub fn set_row_key_schema<T>(mut self, v: T) -> Self
12677    where
12678        T: std::convert::Into<crate::model::r#type::Struct>,
12679    {
12680        self.row_key_schema = std::option::Option::Some(v.into());
12681        self
12682    }
12683
12684    /// Sets or clears the value of [row_key_schema][crate::model::Table::row_key_schema].
12685    ///
12686    /// # Example
12687    /// ```ignore,no_run
12688    /// # use google_cloud_bigtable_admin_v2::model::Table;
12689    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12690    /// let x = Table::new().set_or_clear_row_key_schema(Some(Struct::default()/* use setters */));
12691    /// let x = Table::new().set_or_clear_row_key_schema(None::<Struct>);
12692    /// ```
12693    pub fn set_or_clear_row_key_schema<T>(mut self, v: std::option::Option<T>) -> Self
12694    where
12695        T: std::convert::Into<crate::model::r#type::Struct>,
12696    {
12697        self.row_key_schema = v.map(|x| x.into());
12698        self
12699    }
12700
12701    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config].
12702    ///
12703    /// Note that all the setters affecting `automated_backup_config` are mutually
12704    /// exclusive.
12705    ///
12706    /// # Example
12707    /// ```ignore,no_run
12708    /// # use google_cloud_bigtable_admin_v2::model::Table;
12709    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12710    /// let x = Table::new().set_automated_backup_config(Some(
12711    ///     google_cloud_bigtable_admin_v2::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(AutomatedBackupPolicy::default().into())));
12712    /// ```
12713    pub fn set_automated_backup_config<
12714        T: std::convert::Into<std::option::Option<crate::model::table::AutomatedBackupConfig>>,
12715    >(
12716        mut self,
12717        v: T,
12718    ) -> Self {
12719        self.automated_backup_config = v.into();
12720        self
12721    }
12722
12723    /// The value of [automated_backup_config][crate::model::Table::automated_backup_config]
12724    /// if it holds a `AutomatedBackupPolicy`, `None` if the field is not set or
12725    /// holds a different branch.
12726    pub fn automated_backup_policy(
12727        &self,
12728    ) -> std::option::Option<&std::boxed::Box<crate::model::table::AutomatedBackupPolicy>> {
12729        #[allow(unreachable_patterns)]
12730        self.automated_backup_config.as_ref().and_then(|v| match v {
12731            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v) => {
12732                std::option::Option::Some(v)
12733            }
12734            _ => std::option::Option::None,
12735        })
12736    }
12737
12738    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config]
12739    /// to hold a `AutomatedBackupPolicy`.
12740    ///
12741    /// Note that all the setters affecting `automated_backup_config` are
12742    /// mutually exclusive.
12743    ///
12744    /// # Example
12745    /// ```ignore,no_run
12746    /// # use google_cloud_bigtable_admin_v2::model::Table;
12747    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12748    /// let x = Table::new().set_automated_backup_policy(AutomatedBackupPolicy::default()/* use setters */);
12749    /// assert!(x.automated_backup_policy().is_some());
12750    /// ```
12751    pub fn set_automated_backup_policy<
12752        T: std::convert::Into<std::boxed::Box<crate::model::table::AutomatedBackupPolicy>>,
12753    >(
12754        mut self,
12755        v: T,
12756    ) -> Self {
12757        self.automated_backup_config = std::option::Option::Some(
12758            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v.into()),
12759        );
12760        self
12761    }
12762}
12763
12764impl wkt::message::Message for Table {
12765    fn typename() -> &'static str {
12766        "type.googleapis.com/google.bigtable.admin.v2.Table"
12767    }
12768}
12769
12770/// Defines additional types related to [Table].
12771pub mod table {
12772    #[allow(unused_imports)]
12773    use super::*;
12774
12775    /// The state of a table's data in a particular cluster.
12776    #[derive(Clone, Default, PartialEq)]
12777    #[non_exhaustive]
12778    pub struct ClusterState {
12779        /// Output only. The state of replication for the table in this cluster.
12780        pub replication_state: crate::model::table::cluster_state::ReplicationState,
12781
12782        /// Output only. The encryption information for the table in this cluster.
12783        /// If the encryption key protecting this resource is customer managed, then
12784        /// its version can be rotated in Cloud Key Management Service (Cloud KMS).
12785        /// The primary version of the key and its status will be reflected here when
12786        /// changes propagate from Cloud KMS.
12787        pub encryption_info: std::vec::Vec<crate::model::EncryptionInfo>,
12788
12789        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12790    }
12791
12792    impl ClusterState {
12793        /// Creates a new default instance.
12794        pub fn new() -> Self {
12795            std::default::Default::default()
12796        }
12797
12798        /// Sets the value of [replication_state][crate::model::table::ClusterState::replication_state].
12799        ///
12800        /// # Example
12801        /// ```ignore,no_run
12802        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12803        /// use google_cloud_bigtable_admin_v2::model::table::cluster_state::ReplicationState;
12804        /// let x0 = ClusterState::new().set_replication_state(ReplicationState::Initializing);
12805        /// let x1 = ClusterState::new().set_replication_state(ReplicationState::PlannedMaintenance);
12806        /// let x2 = ClusterState::new().set_replication_state(ReplicationState::UnplannedMaintenance);
12807        /// ```
12808        pub fn set_replication_state<
12809            T: std::convert::Into<crate::model::table::cluster_state::ReplicationState>,
12810        >(
12811            mut self,
12812            v: T,
12813        ) -> Self {
12814            self.replication_state = v.into();
12815            self
12816        }
12817
12818        /// Sets the value of [encryption_info][crate::model::table::ClusterState::encryption_info].
12819        ///
12820        /// # Example
12821        /// ```ignore,no_run
12822        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12823        /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
12824        /// let x = ClusterState::new()
12825        ///     .set_encryption_info([
12826        ///         EncryptionInfo::default()/* use setters */,
12827        ///         EncryptionInfo::default()/* use (different) setters */,
12828        ///     ]);
12829        /// ```
12830        pub fn set_encryption_info<T, V>(mut self, v: T) -> Self
12831        where
12832            T: std::iter::IntoIterator<Item = V>,
12833            V: std::convert::Into<crate::model::EncryptionInfo>,
12834        {
12835            use std::iter::Iterator;
12836            self.encryption_info = v.into_iter().map(|i| i.into()).collect();
12837            self
12838        }
12839    }
12840
12841    impl wkt::message::Message for ClusterState {
12842        fn typename() -> &'static str {
12843            "type.googleapis.com/google.bigtable.admin.v2.Table.ClusterState"
12844        }
12845    }
12846
12847    /// Defines additional types related to [ClusterState].
12848    pub mod cluster_state {
12849        #[allow(unused_imports)]
12850        use super::*;
12851
12852        /// Table replication states.
12853        ///
12854        /// # Working with unknown values
12855        ///
12856        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12857        /// additional enum variants at any time. Adding new variants is not considered
12858        /// a breaking change. Applications should write their code in anticipation of:
12859        ///
12860        /// - New values appearing in future releases of the client library, **and**
12861        /// - New values received dynamically, without application changes.
12862        ///
12863        /// Please consult the [Working with enums] section in the user guide for some
12864        /// guidelines.
12865        ///
12866        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12867        #[derive(Clone, Debug, PartialEq)]
12868        #[non_exhaustive]
12869        pub enum ReplicationState {
12870            /// The replication state of the table is unknown in this cluster.
12871            StateNotKnown,
12872            /// The cluster was recently created, and the table must finish copying
12873            /// over pre-existing data from other clusters before it can begin
12874            /// receiving live replication updates and serving Data API requests.
12875            Initializing,
12876            /// The table is temporarily unable to serve Data API requests from this
12877            /// cluster due to planned internal maintenance.
12878            PlannedMaintenance,
12879            /// The table is temporarily unable to serve Data API requests from this
12880            /// cluster due to unplanned or emergency maintenance.
12881            UnplannedMaintenance,
12882            /// The table can serve Data API requests from this cluster. Depending on
12883            /// replication delay, reads may not immediately reflect the state of the
12884            /// table in other clusters.
12885            Ready,
12886            /// The table is fully created and ready for use after a restore, and is
12887            /// being optimized for performance. When optimizations are complete, the
12888            /// table will transition to `READY` state.
12889            ReadyOptimizing,
12890            /// If set, the enum was initialized with an unknown value.
12891            ///
12892            /// Applications can examine the value using [ReplicationState::value] or
12893            /// [ReplicationState::name].
12894            UnknownValue(replication_state::UnknownValue),
12895        }
12896
12897        #[doc(hidden)]
12898        pub mod replication_state {
12899            #[allow(unused_imports)]
12900            use super::*;
12901            #[derive(Clone, Debug, PartialEq)]
12902            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12903        }
12904
12905        impl ReplicationState {
12906            /// Gets the enum value.
12907            ///
12908            /// Returns `None` if the enum contains an unknown value deserialized from
12909            /// the string representation of enums.
12910            pub fn value(&self) -> std::option::Option<i32> {
12911                match self {
12912                    Self::StateNotKnown => std::option::Option::Some(0),
12913                    Self::Initializing => std::option::Option::Some(1),
12914                    Self::PlannedMaintenance => std::option::Option::Some(2),
12915                    Self::UnplannedMaintenance => std::option::Option::Some(3),
12916                    Self::Ready => std::option::Option::Some(4),
12917                    Self::ReadyOptimizing => std::option::Option::Some(5),
12918                    Self::UnknownValue(u) => u.0.value(),
12919                }
12920            }
12921
12922            /// Gets the enum value as a string.
12923            ///
12924            /// Returns `None` if the enum contains an unknown value deserialized from
12925            /// the integer representation of enums.
12926            pub fn name(&self) -> std::option::Option<&str> {
12927                match self {
12928                    Self::StateNotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
12929                    Self::Initializing => std::option::Option::Some("INITIALIZING"),
12930                    Self::PlannedMaintenance => std::option::Option::Some("PLANNED_MAINTENANCE"),
12931                    Self::UnplannedMaintenance => {
12932                        std::option::Option::Some("UNPLANNED_MAINTENANCE")
12933                    }
12934                    Self::Ready => std::option::Option::Some("READY"),
12935                    Self::ReadyOptimizing => std::option::Option::Some("READY_OPTIMIZING"),
12936                    Self::UnknownValue(u) => u.0.name(),
12937                }
12938            }
12939        }
12940
12941        impl std::default::Default for ReplicationState {
12942            fn default() -> Self {
12943                use std::convert::From;
12944                Self::from(0)
12945            }
12946        }
12947
12948        impl std::fmt::Display for ReplicationState {
12949            fn fmt(
12950                &self,
12951                f: &mut std::fmt::Formatter<'_>,
12952            ) -> std::result::Result<(), std::fmt::Error> {
12953                wkt::internal::display_enum(f, self.name(), self.value())
12954            }
12955        }
12956
12957        impl std::convert::From<i32> for ReplicationState {
12958            fn from(value: i32) -> Self {
12959                match value {
12960                    0 => Self::StateNotKnown,
12961                    1 => Self::Initializing,
12962                    2 => Self::PlannedMaintenance,
12963                    3 => Self::UnplannedMaintenance,
12964                    4 => Self::Ready,
12965                    5 => Self::ReadyOptimizing,
12966                    _ => Self::UnknownValue(replication_state::UnknownValue(
12967                        wkt::internal::UnknownEnumValue::Integer(value),
12968                    )),
12969                }
12970            }
12971        }
12972
12973        impl std::convert::From<&str> for ReplicationState {
12974            fn from(value: &str) -> Self {
12975                use std::string::ToString;
12976                match value {
12977                    "STATE_NOT_KNOWN" => Self::StateNotKnown,
12978                    "INITIALIZING" => Self::Initializing,
12979                    "PLANNED_MAINTENANCE" => Self::PlannedMaintenance,
12980                    "UNPLANNED_MAINTENANCE" => Self::UnplannedMaintenance,
12981                    "READY" => Self::Ready,
12982                    "READY_OPTIMIZING" => Self::ReadyOptimizing,
12983                    _ => Self::UnknownValue(replication_state::UnknownValue(
12984                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12985                    )),
12986                }
12987            }
12988        }
12989
12990        impl serde::ser::Serialize for ReplicationState {
12991            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12992            where
12993                S: serde::Serializer,
12994            {
12995                match self {
12996                    Self::StateNotKnown => serializer.serialize_i32(0),
12997                    Self::Initializing => serializer.serialize_i32(1),
12998                    Self::PlannedMaintenance => serializer.serialize_i32(2),
12999                    Self::UnplannedMaintenance => serializer.serialize_i32(3),
13000                    Self::Ready => serializer.serialize_i32(4),
13001                    Self::ReadyOptimizing => serializer.serialize_i32(5),
13002                    Self::UnknownValue(u) => u.0.serialize(serializer),
13003                }
13004            }
13005        }
13006
13007        impl<'de> serde::de::Deserialize<'de> for ReplicationState {
13008            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13009            where
13010                D: serde::Deserializer<'de>,
13011            {
13012                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReplicationState>::new(
13013                    ".google.bigtable.admin.v2.Table.ClusterState.ReplicationState",
13014                ))
13015            }
13016        }
13017    }
13018
13019    /// Defines an automated backup policy for a table
13020    #[derive(Clone, Default, PartialEq)]
13021    #[non_exhaustive]
13022    pub struct AutomatedBackupPolicy {
13023        /// Required. How long the automated backups should be retained. Values must
13024        /// be at least 3 days and at most 90 days.
13025        pub retention_period: std::option::Option<wkt::Duration>,
13026
13027        /// How frequently automated backups should occur. The only supported value
13028        /// at this time is 24 hours. An undefined frequency is treated as 24 hours.
13029        pub frequency: std::option::Option<wkt::Duration>,
13030
13031        /// Optional. A list of Cloud Bigtable zones where automated backups are
13032        /// allowed to be created. If empty, automated backups will be created in all
13033        /// zones of the instance. Locations are in the format
13034        /// `projects/{project}/locations/{zone}`.
13035        /// This field can only set for tables in Enterprise Plus instances.
13036        pub locations: std::vec::Vec<std::string::String>,
13037
13038        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13039    }
13040
13041    impl AutomatedBackupPolicy {
13042        /// Creates a new default instance.
13043        pub fn new() -> Self {
13044            std::default::Default::default()
13045        }
13046
13047        /// Sets the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
13048        ///
13049        /// # Example
13050        /// ```ignore,no_run
13051        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13052        /// use wkt::Duration;
13053        /// let x = AutomatedBackupPolicy::new().set_retention_period(Duration::default()/* use setters */);
13054        /// ```
13055        pub fn set_retention_period<T>(mut self, v: T) -> Self
13056        where
13057            T: std::convert::Into<wkt::Duration>,
13058        {
13059            self.retention_period = std::option::Option::Some(v.into());
13060            self
13061        }
13062
13063        /// Sets or clears the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
13064        ///
13065        /// # Example
13066        /// ```ignore,no_run
13067        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13068        /// use wkt::Duration;
13069        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
13070        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(None::<Duration>);
13071        /// ```
13072        pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
13073        where
13074            T: std::convert::Into<wkt::Duration>,
13075        {
13076            self.retention_period = v.map(|x| x.into());
13077            self
13078        }
13079
13080        /// Sets the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
13081        ///
13082        /// # Example
13083        /// ```ignore,no_run
13084        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13085        /// use wkt::Duration;
13086        /// let x = AutomatedBackupPolicy::new().set_frequency(Duration::default()/* use setters */);
13087        /// ```
13088        pub fn set_frequency<T>(mut self, v: T) -> Self
13089        where
13090            T: std::convert::Into<wkt::Duration>,
13091        {
13092            self.frequency = std::option::Option::Some(v.into());
13093            self
13094        }
13095
13096        /// Sets or clears the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
13097        ///
13098        /// # Example
13099        /// ```ignore,no_run
13100        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13101        /// use wkt::Duration;
13102        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(Some(Duration::default()/* use setters */));
13103        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(None::<Duration>);
13104        /// ```
13105        pub fn set_or_clear_frequency<T>(mut self, v: std::option::Option<T>) -> Self
13106        where
13107            T: std::convert::Into<wkt::Duration>,
13108        {
13109            self.frequency = v.map(|x| x.into());
13110            self
13111        }
13112
13113        /// Sets the value of [locations][crate::model::table::AutomatedBackupPolicy::locations].
13114        ///
13115        /// # Example
13116        /// ```ignore,no_run
13117        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13118        /// let x = AutomatedBackupPolicy::new().set_locations(["a", "b", "c"]);
13119        /// ```
13120        pub fn set_locations<T, V>(mut self, v: T) -> Self
13121        where
13122            T: std::iter::IntoIterator<Item = V>,
13123            V: std::convert::Into<std::string::String>,
13124        {
13125            use std::iter::Iterator;
13126            self.locations = v.into_iter().map(|i| i.into()).collect();
13127            self
13128        }
13129    }
13130
13131    impl wkt::message::Message for AutomatedBackupPolicy {
13132        fn typename() -> &'static str {
13133            "type.googleapis.com/google.bigtable.admin.v2.Table.AutomatedBackupPolicy"
13134        }
13135    }
13136
13137    /// Possible timestamp granularities to use when keeping multiple versions
13138    /// of data in a table.
13139    ///
13140    /// # Working with unknown values
13141    ///
13142    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13143    /// additional enum variants at any time. Adding new variants is not considered
13144    /// a breaking change. Applications should write their code in anticipation of:
13145    ///
13146    /// - New values appearing in future releases of the client library, **and**
13147    /// - New values received dynamically, without application changes.
13148    ///
13149    /// Please consult the [Working with enums] section in the user guide for some
13150    /// guidelines.
13151    ///
13152    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13153    #[derive(Clone, Debug, PartialEq)]
13154    #[non_exhaustive]
13155    pub enum TimestampGranularity {
13156        /// The user did not specify a granularity. Should not be returned.
13157        /// When specified during table creation, MILLIS will be used.
13158        Unspecified,
13159        /// The table keeps data versioned at a granularity of 1ms.
13160        Millis,
13161        /// If set, the enum was initialized with an unknown value.
13162        ///
13163        /// Applications can examine the value using [TimestampGranularity::value] or
13164        /// [TimestampGranularity::name].
13165        UnknownValue(timestamp_granularity::UnknownValue),
13166    }
13167
13168    #[doc(hidden)]
13169    pub mod timestamp_granularity {
13170        #[allow(unused_imports)]
13171        use super::*;
13172        #[derive(Clone, Debug, PartialEq)]
13173        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13174    }
13175
13176    impl TimestampGranularity {
13177        /// Gets the enum value.
13178        ///
13179        /// Returns `None` if the enum contains an unknown value deserialized from
13180        /// the string representation of enums.
13181        pub fn value(&self) -> std::option::Option<i32> {
13182            match self {
13183                Self::Unspecified => std::option::Option::Some(0),
13184                Self::Millis => std::option::Option::Some(1),
13185                Self::UnknownValue(u) => u.0.value(),
13186            }
13187        }
13188
13189        /// Gets the enum value as a string.
13190        ///
13191        /// Returns `None` if the enum contains an unknown value deserialized from
13192        /// the integer representation of enums.
13193        pub fn name(&self) -> std::option::Option<&str> {
13194            match self {
13195                Self::Unspecified => std::option::Option::Some("TIMESTAMP_GRANULARITY_UNSPECIFIED"),
13196                Self::Millis => std::option::Option::Some("MILLIS"),
13197                Self::UnknownValue(u) => u.0.name(),
13198            }
13199        }
13200    }
13201
13202    impl std::default::Default for TimestampGranularity {
13203        fn default() -> Self {
13204            use std::convert::From;
13205            Self::from(0)
13206        }
13207    }
13208
13209    impl std::fmt::Display for TimestampGranularity {
13210        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13211            wkt::internal::display_enum(f, self.name(), self.value())
13212        }
13213    }
13214
13215    impl std::convert::From<i32> for TimestampGranularity {
13216        fn from(value: i32) -> Self {
13217            match value {
13218                0 => Self::Unspecified,
13219                1 => Self::Millis,
13220                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
13221                    wkt::internal::UnknownEnumValue::Integer(value),
13222                )),
13223            }
13224        }
13225    }
13226
13227    impl std::convert::From<&str> for TimestampGranularity {
13228        fn from(value: &str) -> Self {
13229            use std::string::ToString;
13230            match value {
13231                "TIMESTAMP_GRANULARITY_UNSPECIFIED" => Self::Unspecified,
13232                "MILLIS" => Self::Millis,
13233                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
13234                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13235                )),
13236            }
13237        }
13238    }
13239
13240    impl serde::ser::Serialize for TimestampGranularity {
13241        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13242        where
13243            S: serde::Serializer,
13244        {
13245            match self {
13246                Self::Unspecified => serializer.serialize_i32(0),
13247                Self::Millis => serializer.serialize_i32(1),
13248                Self::UnknownValue(u) => u.0.serialize(serializer),
13249            }
13250        }
13251    }
13252
13253    impl<'de> serde::de::Deserialize<'de> for TimestampGranularity {
13254        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13255        where
13256            D: serde::Deserializer<'de>,
13257        {
13258            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TimestampGranularity>::new(
13259                ".google.bigtable.admin.v2.Table.TimestampGranularity",
13260            ))
13261        }
13262    }
13263
13264    /// Defines a view over a table's fields.
13265    ///
13266    /// # Working with unknown values
13267    ///
13268    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13269    /// additional enum variants at any time. Adding new variants is not considered
13270    /// a breaking change. Applications should write their code in anticipation of:
13271    ///
13272    /// - New values appearing in future releases of the client library, **and**
13273    /// - New values received dynamically, without application changes.
13274    ///
13275    /// Please consult the [Working with enums] section in the user guide for some
13276    /// guidelines.
13277    ///
13278    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13279    #[derive(Clone, Debug, PartialEq)]
13280    #[non_exhaustive]
13281    pub enum View {
13282        /// Uses the default view for each method as documented in its request.
13283        Unspecified,
13284        /// Only populates `name`.
13285        NameOnly,
13286        /// Only populates `name` and fields related to the table's schema.
13287        SchemaView,
13288        /// Only populates `name` and fields related to the table's replication
13289        /// state.
13290        ReplicationView,
13291        /// Only populates `name` and fields related to the table's encryption state.
13292        EncryptionView,
13293        /// Populates all fields.
13294        Full,
13295        /// If set, the enum was initialized with an unknown value.
13296        ///
13297        /// Applications can examine the value using [View::value] or
13298        /// [View::name].
13299        UnknownValue(view::UnknownValue),
13300    }
13301
13302    #[doc(hidden)]
13303    pub mod view {
13304        #[allow(unused_imports)]
13305        use super::*;
13306        #[derive(Clone, Debug, PartialEq)]
13307        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13308    }
13309
13310    impl View {
13311        /// Gets the enum value.
13312        ///
13313        /// Returns `None` if the enum contains an unknown value deserialized from
13314        /// the string representation of enums.
13315        pub fn value(&self) -> std::option::Option<i32> {
13316            match self {
13317                Self::Unspecified => std::option::Option::Some(0),
13318                Self::NameOnly => std::option::Option::Some(1),
13319                Self::SchemaView => std::option::Option::Some(2),
13320                Self::ReplicationView => std::option::Option::Some(3),
13321                Self::EncryptionView => std::option::Option::Some(5),
13322                Self::Full => std::option::Option::Some(4),
13323                Self::UnknownValue(u) => u.0.value(),
13324            }
13325        }
13326
13327        /// Gets the enum value as a string.
13328        ///
13329        /// Returns `None` if the enum contains an unknown value deserialized from
13330        /// the integer representation of enums.
13331        pub fn name(&self) -> std::option::Option<&str> {
13332            match self {
13333                Self::Unspecified => std::option::Option::Some("VIEW_UNSPECIFIED"),
13334                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
13335                Self::SchemaView => std::option::Option::Some("SCHEMA_VIEW"),
13336                Self::ReplicationView => std::option::Option::Some("REPLICATION_VIEW"),
13337                Self::EncryptionView => std::option::Option::Some("ENCRYPTION_VIEW"),
13338                Self::Full => std::option::Option::Some("FULL"),
13339                Self::UnknownValue(u) => u.0.name(),
13340            }
13341        }
13342    }
13343
13344    impl std::default::Default for View {
13345        fn default() -> Self {
13346            use std::convert::From;
13347            Self::from(0)
13348        }
13349    }
13350
13351    impl std::fmt::Display for View {
13352        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13353            wkt::internal::display_enum(f, self.name(), self.value())
13354        }
13355    }
13356
13357    impl std::convert::From<i32> for View {
13358        fn from(value: i32) -> Self {
13359            match value {
13360                0 => Self::Unspecified,
13361                1 => Self::NameOnly,
13362                2 => Self::SchemaView,
13363                3 => Self::ReplicationView,
13364                4 => Self::Full,
13365                5 => Self::EncryptionView,
13366                _ => Self::UnknownValue(view::UnknownValue(
13367                    wkt::internal::UnknownEnumValue::Integer(value),
13368                )),
13369            }
13370        }
13371    }
13372
13373    impl std::convert::From<&str> for View {
13374        fn from(value: &str) -> Self {
13375            use std::string::ToString;
13376            match value {
13377                "VIEW_UNSPECIFIED" => Self::Unspecified,
13378                "NAME_ONLY" => Self::NameOnly,
13379                "SCHEMA_VIEW" => Self::SchemaView,
13380                "REPLICATION_VIEW" => Self::ReplicationView,
13381                "ENCRYPTION_VIEW" => Self::EncryptionView,
13382                "FULL" => Self::Full,
13383                _ => Self::UnknownValue(view::UnknownValue(
13384                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13385                )),
13386            }
13387        }
13388    }
13389
13390    impl serde::ser::Serialize for View {
13391        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13392        where
13393            S: serde::Serializer,
13394        {
13395            match self {
13396                Self::Unspecified => serializer.serialize_i32(0),
13397                Self::NameOnly => serializer.serialize_i32(1),
13398                Self::SchemaView => serializer.serialize_i32(2),
13399                Self::ReplicationView => serializer.serialize_i32(3),
13400                Self::EncryptionView => serializer.serialize_i32(5),
13401                Self::Full => serializer.serialize_i32(4),
13402                Self::UnknownValue(u) => u.0.serialize(serializer),
13403            }
13404        }
13405    }
13406
13407    impl<'de> serde::de::Deserialize<'de> for View {
13408        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13409        where
13410            D: serde::Deserializer<'de>,
13411        {
13412            deserializer.deserialize_any(wkt::internal::EnumVisitor::<View>::new(
13413                ".google.bigtable.admin.v2.Table.View",
13414            ))
13415        }
13416    }
13417
13418    #[allow(missing_docs)]
13419    #[derive(Clone, Debug, PartialEq)]
13420    #[non_exhaustive]
13421    pub enum AutomatedBackupConfig {
13422        /// If specified, automated backups are enabled for this table.
13423        /// Otherwise, automated backups are disabled.
13424        AutomatedBackupPolicy(std::boxed::Box<crate::model::table::AutomatedBackupPolicy>),
13425    }
13426}
13427
13428/// AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users
13429/// can configure access to each Authorized View independently from the table and
13430/// use the existing Data APIs to access the subset of data.
13431#[derive(Clone, Default, PartialEq)]
13432#[non_exhaustive]
13433pub struct AuthorizedView {
13434    /// Identifier. The name of this AuthorizedView.
13435    /// Values are of the form
13436    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`
13437    pub name: std::string::String,
13438
13439    /// The etag for this AuthorizedView.
13440    /// If this is provided on update, it must match the server's etag. The server
13441    /// returns ABORTED error on a mismatched etag.
13442    pub etag: std::string::String,
13443
13444    /// Set to true to make the AuthorizedView protected against deletion.
13445    /// The parent Table and containing Instance cannot be deleted if an
13446    /// AuthorizedView has this bit set.
13447    pub deletion_protection: bool,
13448
13449    /// The type of this AuthorizedView.
13450    pub authorized_view: std::option::Option<crate::model::authorized_view::AuthorizedView>,
13451
13452    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13453}
13454
13455impl AuthorizedView {
13456    /// Creates a new default instance.
13457    pub fn new() -> Self {
13458        std::default::Default::default()
13459    }
13460
13461    /// Sets the value of [name][crate::model::AuthorizedView::name].
13462    ///
13463    /// # Example
13464    /// ```ignore,no_run
13465    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13466    /// # let project_id = "project_id";
13467    /// # let instance_id = "instance_id";
13468    /// # let table_id = "table_id";
13469    /// # let authorized_view_id = "authorized_view_id";
13470    /// let x = AuthorizedView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"));
13471    /// ```
13472    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13473        self.name = v.into();
13474        self
13475    }
13476
13477    /// Sets the value of [etag][crate::model::AuthorizedView::etag].
13478    ///
13479    /// # Example
13480    /// ```ignore,no_run
13481    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13482    /// let x = AuthorizedView::new().set_etag("example");
13483    /// ```
13484    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13485        self.etag = v.into();
13486        self
13487    }
13488
13489    /// Sets the value of [deletion_protection][crate::model::AuthorizedView::deletion_protection].
13490    ///
13491    /// # Example
13492    /// ```ignore,no_run
13493    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13494    /// let x = AuthorizedView::new().set_deletion_protection(true);
13495    /// ```
13496    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13497        self.deletion_protection = v.into();
13498        self
13499    }
13500
13501    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view].
13502    ///
13503    /// Note that all the setters affecting `authorized_view` are mutually
13504    /// exclusive.
13505    ///
13506    /// # Example
13507    /// ```ignore,no_run
13508    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13509    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13510    /// let x = AuthorizedView::new().set_authorized_view(Some(
13511    ///     google_cloud_bigtable_admin_v2::model::authorized_view::AuthorizedView::SubsetView(SubsetView::default().into())));
13512    /// ```
13513    pub fn set_authorized_view<
13514        T: std::convert::Into<std::option::Option<crate::model::authorized_view::AuthorizedView>>,
13515    >(
13516        mut self,
13517        v: T,
13518    ) -> Self {
13519        self.authorized_view = v.into();
13520        self
13521    }
13522
13523    /// The value of [authorized_view][crate::model::AuthorizedView::authorized_view]
13524    /// if it holds a `SubsetView`, `None` if the field is not set or
13525    /// holds a different branch.
13526    pub fn subset_view(
13527        &self,
13528    ) -> std::option::Option<&std::boxed::Box<crate::model::authorized_view::SubsetView>> {
13529        #[allow(unreachable_patterns)]
13530        self.authorized_view.as_ref().and_then(|v| match v {
13531            crate::model::authorized_view::AuthorizedView::SubsetView(v) => {
13532                std::option::Option::Some(v)
13533            }
13534            _ => std::option::Option::None,
13535        })
13536    }
13537
13538    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view]
13539    /// to hold a `SubsetView`.
13540    ///
13541    /// Note that all the setters affecting `authorized_view` are
13542    /// mutually exclusive.
13543    ///
13544    /// # Example
13545    /// ```ignore,no_run
13546    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13547    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13548    /// let x = AuthorizedView::new().set_subset_view(SubsetView::default()/* use setters */);
13549    /// assert!(x.subset_view().is_some());
13550    /// ```
13551    pub fn set_subset_view<
13552        T: std::convert::Into<std::boxed::Box<crate::model::authorized_view::SubsetView>>,
13553    >(
13554        mut self,
13555        v: T,
13556    ) -> Self {
13557        self.authorized_view = std::option::Option::Some(
13558            crate::model::authorized_view::AuthorizedView::SubsetView(v.into()),
13559        );
13560        self
13561    }
13562}
13563
13564impl wkt::message::Message for AuthorizedView {
13565    fn typename() -> &'static str {
13566        "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView"
13567    }
13568}
13569
13570/// Defines additional types related to [AuthorizedView].
13571pub mod authorized_view {
13572    #[allow(unused_imports)]
13573    use super::*;
13574
13575    /// Subsets of a column family that are included in this AuthorizedView.
13576    #[derive(Clone, Default, PartialEq)]
13577    #[non_exhaustive]
13578    pub struct FamilySubsets {
13579        /// Individual exact column qualifiers to be included in the AuthorizedView.
13580        pub qualifiers: std::vec::Vec<::bytes::Bytes>,
13581
13582        /// Prefixes for qualifiers to be included in the AuthorizedView. Every
13583        /// qualifier starting with one of these prefixes is included in the
13584        /// AuthorizedView. To provide access to all qualifiers, include the empty
13585        /// string as a prefix
13586        /// ("").
13587        pub qualifier_prefixes: std::vec::Vec<::bytes::Bytes>,
13588
13589        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13590    }
13591
13592    impl FamilySubsets {
13593        /// Creates a new default instance.
13594        pub fn new() -> Self {
13595            std::default::Default::default()
13596        }
13597
13598        /// Sets the value of [qualifiers][crate::model::authorized_view::FamilySubsets::qualifiers].
13599        ///
13600        /// # Example
13601        /// ```ignore,no_run
13602        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13603        /// let b1 = bytes::Bytes::from_static(b"abc");
13604        /// let b2 = bytes::Bytes::from_static(b"xyz");
13605        /// let x = FamilySubsets::new().set_qualifiers([b1, b2]);
13606        /// ```
13607        pub fn set_qualifiers<T, V>(mut self, v: T) -> Self
13608        where
13609            T: std::iter::IntoIterator<Item = V>,
13610            V: std::convert::Into<::bytes::Bytes>,
13611        {
13612            use std::iter::Iterator;
13613            self.qualifiers = v.into_iter().map(|i| i.into()).collect();
13614            self
13615        }
13616
13617        /// Sets the value of [qualifier_prefixes][crate::model::authorized_view::FamilySubsets::qualifier_prefixes].
13618        ///
13619        /// # Example
13620        /// ```ignore,no_run
13621        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13622        /// let b1 = bytes::Bytes::from_static(b"abc");
13623        /// let b2 = bytes::Bytes::from_static(b"xyz");
13624        /// let x = FamilySubsets::new().set_qualifier_prefixes([b1, b2]);
13625        /// ```
13626        pub fn set_qualifier_prefixes<T, V>(mut self, v: T) -> Self
13627        where
13628            T: std::iter::IntoIterator<Item = V>,
13629            V: std::convert::Into<::bytes::Bytes>,
13630        {
13631            use std::iter::Iterator;
13632            self.qualifier_prefixes = v.into_iter().map(|i| i.into()).collect();
13633            self
13634        }
13635    }
13636
13637    impl wkt::message::Message for FamilySubsets {
13638        fn typename() -> &'static str {
13639            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.FamilySubsets"
13640        }
13641    }
13642
13643    /// Defines a simple AuthorizedView that is a subset of the underlying Table.
13644    #[derive(Clone, Default, PartialEq)]
13645    #[non_exhaustive]
13646    pub struct SubsetView {
13647        /// Row prefixes to be included in the AuthorizedView.
13648        /// To provide access to all rows, include the empty string as a prefix ("").
13649        pub row_prefixes: std::vec::Vec<::bytes::Bytes>,
13650
13651        /// Map from column family name to the columns in this family to be included
13652        /// in the AuthorizedView.
13653        pub family_subsets: std::collections::HashMap<
13654            std::string::String,
13655            crate::model::authorized_view::FamilySubsets,
13656        >,
13657
13658        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13659    }
13660
13661    impl SubsetView {
13662        /// Creates a new default instance.
13663        pub fn new() -> Self {
13664            std::default::Default::default()
13665        }
13666
13667        /// Sets the value of [row_prefixes][crate::model::authorized_view::SubsetView::row_prefixes].
13668        ///
13669        /// # Example
13670        /// ```ignore,no_run
13671        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13672        /// let b1 = bytes::Bytes::from_static(b"abc");
13673        /// let b2 = bytes::Bytes::from_static(b"xyz");
13674        /// let x = SubsetView::new().set_row_prefixes([b1, b2]);
13675        /// ```
13676        pub fn set_row_prefixes<T, V>(mut self, v: T) -> Self
13677        where
13678            T: std::iter::IntoIterator<Item = V>,
13679            V: std::convert::Into<::bytes::Bytes>,
13680        {
13681            use std::iter::Iterator;
13682            self.row_prefixes = v.into_iter().map(|i| i.into()).collect();
13683            self
13684        }
13685
13686        /// Sets the value of [family_subsets][crate::model::authorized_view::SubsetView::family_subsets].
13687        ///
13688        /// # Example
13689        /// ```ignore,no_run
13690        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13691        /// use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13692        /// let x = SubsetView::new().set_family_subsets([
13693        ///     ("key0", FamilySubsets::default()/* use setters */),
13694        ///     ("key1", FamilySubsets::default()/* use (different) setters */),
13695        /// ]);
13696        /// ```
13697        pub fn set_family_subsets<T, K, V>(mut self, v: T) -> Self
13698        where
13699            T: std::iter::IntoIterator<Item = (K, V)>,
13700            K: std::convert::Into<std::string::String>,
13701            V: std::convert::Into<crate::model::authorized_view::FamilySubsets>,
13702        {
13703            use std::iter::Iterator;
13704            self.family_subsets = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13705            self
13706        }
13707    }
13708
13709    impl wkt::message::Message for SubsetView {
13710        fn typename() -> &'static str {
13711            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.SubsetView"
13712        }
13713    }
13714
13715    /// Defines a subset of an AuthorizedView's fields.
13716    ///
13717    /// # Working with unknown values
13718    ///
13719    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13720    /// additional enum variants at any time. Adding new variants is not considered
13721    /// a breaking change. Applications should write their code in anticipation of:
13722    ///
13723    /// - New values appearing in future releases of the client library, **and**
13724    /// - New values received dynamically, without application changes.
13725    ///
13726    /// Please consult the [Working with enums] section in the user guide for some
13727    /// guidelines.
13728    ///
13729    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13730    #[derive(Clone, Debug, PartialEq)]
13731    #[non_exhaustive]
13732    pub enum ResponseView {
13733        /// Uses the default view for each method as documented in the request.
13734        Unspecified,
13735        /// Only populates `name`.
13736        NameOnly,
13737        /// Only populates the AuthorizedView's basic metadata. This includes:
13738        /// name, deletion_protection, etag.
13739        Basic,
13740        /// Populates every fields.
13741        Full,
13742        /// If set, the enum was initialized with an unknown value.
13743        ///
13744        /// Applications can examine the value using [ResponseView::value] or
13745        /// [ResponseView::name].
13746        UnknownValue(response_view::UnknownValue),
13747    }
13748
13749    #[doc(hidden)]
13750    pub mod response_view {
13751        #[allow(unused_imports)]
13752        use super::*;
13753        #[derive(Clone, Debug, PartialEq)]
13754        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13755    }
13756
13757    impl ResponseView {
13758        /// Gets the enum value.
13759        ///
13760        /// Returns `None` if the enum contains an unknown value deserialized from
13761        /// the string representation of enums.
13762        pub fn value(&self) -> std::option::Option<i32> {
13763            match self {
13764                Self::Unspecified => std::option::Option::Some(0),
13765                Self::NameOnly => std::option::Option::Some(1),
13766                Self::Basic => std::option::Option::Some(2),
13767                Self::Full => std::option::Option::Some(3),
13768                Self::UnknownValue(u) => u.0.value(),
13769            }
13770        }
13771
13772        /// Gets the enum value as a string.
13773        ///
13774        /// Returns `None` if the enum contains an unknown value deserialized from
13775        /// the integer representation of enums.
13776        pub fn name(&self) -> std::option::Option<&str> {
13777            match self {
13778                Self::Unspecified => std::option::Option::Some("RESPONSE_VIEW_UNSPECIFIED"),
13779                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
13780                Self::Basic => std::option::Option::Some("BASIC"),
13781                Self::Full => std::option::Option::Some("FULL"),
13782                Self::UnknownValue(u) => u.0.name(),
13783            }
13784        }
13785    }
13786
13787    impl std::default::Default for ResponseView {
13788        fn default() -> Self {
13789            use std::convert::From;
13790            Self::from(0)
13791        }
13792    }
13793
13794    impl std::fmt::Display for ResponseView {
13795        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13796            wkt::internal::display_enum(f, self.name(), self.value())
13797        }
13798    }
13799
13800    impl std::convert::From<i32> for ResponseView {
13801        fn from(value: i32) -> Self {
13802            match value {
13803                0 => Self::Unspecified,
13804                1 => Self::NameOnly,
13805                2 => Self::Basic,
13806                3 => Self::Full,
13807                _ => Self::UnknownValue(response_view::UnknownValue(
13808                    wkt::internal::UnknownEnumValue::Integer(value),
13809                )),
13810            }
13811        }
13812    }
13813
13814    impl std::convert::From<&str> for ResponseView {
13815        fn from(value: &str) -> Self {
13816            use std::string::ToString;
13817            match value {
13818                "RESPONSE_VIEW_UNSPECIFIED" => Self::Unspecified,
13819                "NAME_ONLY" => Self::NameOnly,
13820                "BASIC" => Self::Basic,
13821                "FULL" => Self::Full,
13822                _ => Self::UnknownValue(response_view::UnknownValue(
13823                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13824                )),
13825            }
13826        }
13827    }
13828
13829    impl serde::ser::Serialize for ResponseView {
13830        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13831        where
13832            S: serde::Serializer,
13833        {
13834            match self {
13835                Self::Unspecified => serializer.serialize_i32(0),
13836                Self::NameOnly => serializer.serialize_i32(1),
13837                Self::Basic => serializer.serialize_i32(2),
13838                Self::Full => serializer.serialize_i32(3),
13839                Self::UnknownValue(u) => u.0.serialize(serializer),
13840            }
13841        }
13842    }
13843
13844    impl<'de> serde::de::Deserialize<'de> for ResponseView {
13845        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13846        where
13847            D: serde::Deserializer<'de>,
13848        {
13849            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResponseView>::new(
13850                ".google.bigtable.admin.v2.AuthorizedView.ResponseView",
13851            ))
13852        }
13853    }
13854
13855    /// The type of this AuthorizedView.
13856    #[derive(Clone, Debug, PartialEq)]
13857    #[non_exhaustive]
13858    pub enum AuthorizedView {
13859        /// An AuthorizedView permitting access to an explicit subset of a Table.
13860        SubsetView(std::boxed::Box<crate::model::authorized_view::SubsetView>),
13861    }
13862}
13863
13864/// A set of columns within a table which share a common configuration.
13865#[derive(Clone, Default, PartialEq)]
13866#[non_exhaustive]
13867pub struct ColumnFamily {
13868    /// Garbage collection rule specified as a protobuf.
13869    /// Must serialize to at most 500 bytes.
13870    ///
13871    /// NOTE: Garbage collection executes opportunistically in the background, and
13872    /// so it's possible for reads to return a cell even if it matches the active
13873    /// GC expression for its family.
13874    pub gc_rule: std::option::Option<crate::model::GcRule>,
13875
13876    /// The type of data stored in each of this family's cell values, including its
13877    /// full encoding. If omitted, the family only serves raw untyped bytes.
13878    ///
13879    /// For now, only the `Aggregate` type is supported.
13880    ///
13881    /// `Aggregate` can only be set at family creation and is immutable afterwards.
13882    ///
13883    /// If `value_type` is `Aggregate`, written data must be compatible with:
13884    ///
13885    /// * `value_type.input_type` for `AddInput` mutations
13886    pub value_type: std::option::Option<crate::model::Type>,
13887
13888    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13889}
13890
13891impl ColumnFamily {
13892    /// Creates a new default instance.
13893    pub fn new() -> Self {
13894        std::default::Default::default()
13895    }
13896
13897    /// Sets the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13898    ///
13899    /// # Example
13900    /// ```ignore,no_run
13901    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13902    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13903    /// let x = ColumnFamily::new().set_gc_rule(GcRule::default()/* use setters */);
13904    /// ```
13905    pub fn set_gc_rule<T>(mut self, v: T) -> Self
13906    where
13907        T: std::convert::Into<crate::model::GcRule>,
13908    {
13909        self.gc_rule = std::option::Option::Some(v.into());
13910        self
13911    }
13912
13913    /// Sets or clears the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13914    ///
13915    /// # Example
13916    /// ```ignore,no_run
13917    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13918    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13919    /// let x = ColumnFamily::new().set_or_clear_gc_rule(Some(GcRule::default()/* use setters */));
13920    /// let x = ColumnFamily::new().set_or_clear_gc_rule(None::<GcRule>);
13921    /// ```
13922    pub fn set_or_clear_gc_rule<T>(mut self, v: std::option::Option<T>) -> Self
13923    where
13924        T: std::convert::Into<crate::model::GcRule>,
13925    {
13926        self.gc_rule = v.map(|x| x.into());
13927        self
13928    }
13929
13930    /// Sets the value of [value_type][crate::model::ColumnFamily::value_type].
13931    ///
13932    /// # Example
13933    /// ```ignore,no_run
13934    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13935    /// use google_cloud_bigtable_admin_v2::model::Type;
13936    /// let x = ColumnFamily::new().set_value_type(Type::default()/* use setters */);
13937    /// ```
13938    pub fn set_value_type<T>(mut self, v: T) -> Self
13939    where
13940        T: std::convert::Into<crate::model::Type>,
13941    {
13942        self.value_type = std::option::Option::Some(v.into());
13943        self
13944    }
13945
13946    /// Sets or clears the value of [value_type][crate::model::ColumnFamily::value_type].
13947    ///
13948    /// # Example
13949    /// ```ignore,no_run
13950    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13951    /// use google_cloud_bigtable_admin_v2::model::Type;
13952    /// let x = ColumnFamily::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
13953    /// let x = ColumnFamily::new().set_or_clear_value_type(None::<Type>);
13954    /// ```
13955    pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
13956    where
13957        T: std::convert::Into<crate::model::Type>,
13958    {
13959        self.value_type = v.map(|x| x.into());
13960        self
13961    }
13962}
13963
13964impl wkt::message::Message for ColumnFamily {
13965    fn typename() -> &'static str {
13966        "type.googleapis.com/google.bigtable.admin.v2.ColumnFamily"
13967    }
13968}
13969
13970/// Rule for determining which cells to delete during garbage collection.
13971#[derive(Clone, Default, PartialEq)]
13972#[non_exhaustive]
13973pub struct GcRule {
13974    /// Garbage collection rules.
13975    pub rule: std::option::Option<crate::model::gc_rule::Rule>,
13976
13977    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13978}
13979
13980impl GcRule {
13981    /// Creates a new default instance.
13982    pub fn new() -> Self {
13983        std::default::Default::default()
13984    }
13985
13986    /// Sets the value of [rule][crate::model::GcRule::rule].
13987    ///
13988    /// Note that all the setters affecting `rule` are mutually
13989    /// exclusive.
13990    ///
13991    /// # Example
13992    /// ```ignore,no_run
13993    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13994    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Rule;
13995    /// let x = GcRule::new().set_rule(Some(Rule::MaxNumVersions(42)));
13996    /// ```
13997    pub fn set_rule<T: std::convert::Into<std::option::Option<crate::model::gc_rule::Rule>>>(
13998        mut self,
13999        v: T,
14000    ) -> Self {
14001        self.rule = v.into();
14002        self
14003    }
14004
14005    /// The value of [rule][crate::model::GcRule::rule]
14006    /// if it holds a `MaxNumVersions`, `None` if the field is not set or
14007    /// holds a different branch.
14008    pub fn max_num_versions(&self) -> std::option::Option<&i32> {
14009        #[allow(unreachable_patterns)]
14010        self.rule.as_ref().and_then(|v| match v {
14011            crate::model::gc_rule::Rule::MaxNumVersions(v) => std::option::Option::Some(v),
14012            _ => std::option::Option::None,
14013        })
14014    }
14015
14016    /// Sets the value of [rule][crate::model::GcRule::rule]
14017    /// to hold a `MaxNumVersions`.
14018    ///
14019    /// Note that all the setters affecting `rule` are
14020    /// mutually exclusive.
14021    ///
14022    /// # Example
14023    /// ```ignore,no_run
14024    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14025    /// let x = GcRule::new().set_max_num_versions(42);
14026    /// assert!(x.max_num_versions().is_some());
14027    /// assert!(x.max_age().is_none());
14028    /// assert!(x.intersection().is_none());
14029    /// assert!(x.union().is_none());
14030    /// ```
14031    pub fn set_max_num_versions<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14032        self.rule =
14033            std::option::Option::Some(crate::model::gc_rule::Rule::MaxNumVersions(v.into()));
14034        self
14035    }
14036
14037    /// The value of [rule][crate::model::GcRule::rule]
14038    /// if it holds a `MaxAge`, `None` if the field is not set or
14039    /// holds a different branch.
14040    pub fn max_age(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
14041        #[allow(unreachable_patterns)]
14042        self.rule.as_ref().and_then(|v| match v {
14043            crate::model::gc_rule::Rule::MaxAge(v) => std::option::Option::Some(v),
14044            _ => std::option::Option::None,
14045        })
14046    }
14047
14048    /// Sets the value of [rule][crate::model::GcRule::rule]
14049    /// to hold a `MaxAge`.
14050    ///
14051    /// Note that all the setters affecting `rule` are
14052    /// mutually exclusive.
14053    ///
14054    /// # Example
14055    /// ```ignore,no_run
14056    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14057    /// use wkt::Duration;
14058    /// let x = GcRule::new().set_max_age(Duration::default()/* use setters */);
14059    /// assert!(x.max_age().is_some());
14060    /// assert!(x.max_num_versions().is_none());
14061    /// assert!(x.intersection().is_none());
14062    /// assert!(x.union().is_none());
14063    /// ```
14064    pub fn set_max_age<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
14065        mut self,
14066        v: T,
14067    ) -> Self {
14068        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::MaxAge(v.into()));
14069        self
14070    }
14071
14072    /// The value of [rule][crate::model::GcRule::rule]
14073    /// if it holds a `Intersection`, `None` if the field is not set or
14074    /// holds a different branch.
14075    pub fn intersection(
14076        &self,
14077    ) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Intersection>> {
14078        #[allow(unreachable_patterns)]
14079        self.rule.as_ref().and_then(|v| match v {
14080            crate::model::gc_rule::Rule::Intersection(v) => std::option::Option::Some(v),
14081            _ => std::option::Option::None,
14082        })
14083    }
14084
14085    /// Sets the value of [rule][crate::model::GcRule::rule]
14086    /// to hold a `Intersection`.
14087    ///
14088    /// Note that all the setters affecting `rule` are
14089    /// mutually exclusive.
14090    ///
14091    /// # Example
14092    /// ```ignore,no_run
14093    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14094    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
14095    /// let x = GcRule::new().set_intersection(Intersection::default()/* use setters */);
14096    /// assert!(x.intersection().is_some());
14097    /// assert!(x.max_num_versions().is_none());
14098    /// assert!(x.max_age().is_none());
14099    /// assert!(x.union().is_none());
14100    /// ```
14101    pub fn set_intersection<
14102        T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Intersection>>,
14103    >(
14104        mut self,
14105        v: T,
14106    ) -> Self {
14107        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Intersection(v.into()));
14108        self
14109    }
14110
14111    /// The value of [rule][crate::model::GcRule::rule]
14112    /// if it holds a `Union`, `None` if the field is not set or
14113    /// holds a different branch.
14114    pub fn union(&self) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Union>> {
14115        #[allow(unreachable_patterns)]
14116        self.rule.as_ref().and_then(|v| match v {
14117            crate::model::gc_rule::Rule::Union(v) => std::option::Option::Some(v),
14118            _ => std::option::Option::None,
14119        })
14120    }
14121
14122    /// Sets the value of [rule][crate::model::GcRule::rule]
14123    /// to hold a `Union`.
14124    ///
14125    /// Note that all the setters affecting `rule` are
14126    /// mutually exclusive.
14127    ///
14128    /// # Example
14129    /// ```ignore,no_run
14130    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14131    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
14132    /// let x = GcRule::new().set_union(Union::default()/* use setters */);
14133    /// assert!(x.union().is_some());
14134    /// assert!(x.max_num_versions().is_none());
14135    /// assert!(x.max_age().is_none());
14136    /// assert!(x.intersection().is_none());
14137    /// ```
14138    pub fn set_union<T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Union>>>(
14139        mut self,
14140        v: T,
14141    ) -> Self {
14142        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Union(v.into()));
14143        self
14144    }
14145}
14146
14147impl wkt::message::Message for GcRule {
14148    fn typename() -> &'static str {
14149        "type.googleapis.com/google.bigtable.admin.v2.GcRule"
14150    }
14151}
14152
14153/// Defines additional types related to [GcRule].
14154pub mod gc_rule {
14155    #[allow(unused_imports)]
14156    use super::*;
14157
14158    /// A GcRule which deletes cells matching all of the given rules.
14159    #[derive(Clone, Default, PartialEq)]
14160    #[non_exhaustive]
14161    pub struct Intersection {
14162        /// Only delete cells which would be deleted by every element of `rules`.
14163        pub rules: std::vec::Vec<crate::model::GcRule>,
14164
14165        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14166    }
14167
14168    impl Intersection {
14169        /// Creates a new default instance.
14170        pub fn new() -> Self {
14171            std::default::Default::default()
14172        }
14173
14174        /// Sets the value of [rules][crate::model::gc_rule::Intersection::rules].
14175        ///
14176        /// # Example
14177        /// ```ignore,no_run
14178        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
14179        /// use google_cloud_bigtable_admin_v2::model::GcRule;
14180        /// let x = Intersection::new()
14181        ///     .set_rules([
14182        ///         GcRule::default()/* use setters */,
14183        ///         GcRule::default()/* use (different) setters */,
14184        ///     ]);
14185        /// ```
14186        pub fn set_rules<T, V>(mut self, v: T) -> Self
14187        where
14188            T: std::iter::IntoIterator<Item = V>,
14189            V: std::convert::Into<crate::model::GcRule>,
14190        {
14191            use std::iter::Iterator;
14192            self.rules = v.into_iter().map(|i| i.into()).collect();
14193            self
14194        }
14195    }
14196
14197    impl wkt::message::Message for Intersection {
14198        fn typename() -> &'static str {
14199            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Intersection"
14200        }
14201    }
14202
14203    /// A GcRule which deletes cells matching any of the given rules.
14204    #[derive(Clone, Default, PartialEq)]
14205    #[non_exhaustive]
14206    pub struct Union {
14207        /// Delete cells which would be deleted by any element of `rules`.
14208        pub rules: std::vec::Vec<crate::model::GcRule>,
14209
14210        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14211    }
14212
14213    impl Union {
14214        /// Creates a new default instance.
14215        pub fn new() -> Self {
14216            std::default::Default::default()
14217        }
14218
14219        /// Sets the value of [rules][crate::model::gc_rule::Union::rules].
14220        ///
14221        /// # Example
14222        /// ```ignore,no_run
14223        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
14224        /// use google_cloud_bigtable_admin_v2::model::GcRule;
14225        /// let x = Union::new()
14226        ///     .set_rules([
14227        ///         GcRule::default()/* use setters */,
14228        ///         GcRule::default()/* use (different) setters */,
14229        ///     ]);
14230        /// ```
14231        pub fn set_rules<T, V>(mut self, v: T) -> Self
14232        where
14233            T: std::iter::IntoIterator<Item = V>,
14234            V: std::convert::Into<crate::model::GcRule>,
14235        {
14236            use std::iter::Iterator;
14237            self.rules = v.into_iter().map(|i| i.into()).collect();
14238            self
14239        }
14240    }
14241
14242    impl wkt::message::Message for Union {
14243        fn typename() -> &'static str {
14244            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Union"
14245        }
14246    }
14247
14248    /// Garbage collection rules.
14249    #[derive(Clone, Debug, PartialEq)]
14250    #[non_exhaustive]
14251    pub enum Rule {
14252        /// Delete all cells in a column except the most recent N.
14253        MaxNumVersions(i32),
14254        /// Delete cells in a column older than the given age.
14255        /// Values must be at least one millisecond, and will be truncated to
14256        /// microsecond granularity.
14257        MaxAge(std::boxed::Box<wkt::Duration>),
14258        /// Delete cells that would be deleted by every nested rule.
14259        Intersection(std::boxed::Box<crate::model::gc_rule::Intersection>),
14260        /// Delete cells that would be deleted by any nested rule.
14261        Union(std::boxed::Box<crate::model::gc_rule::Union>),
14262    }
14263}
14264
14265/// Encryption information for a given resource.
14266/// If this resource is protected with customer managed encryption, the in-use
14267/// Cloud Key Management Service (Cloud KMS) key version is specified along with
14268/// its status.
14269#[derive(Clone, Default, PartialEq)]
14270#[non_exhaustive]
14271pub struct EncryptionInfo {
14272    /// Output only. The type of encryption used to protect this resource.
14273    pub encryption_type: crate::model::encryption_info::EncryptionType,
14274
14275    /// Output only. The status of encrypt/decrypt calls on underlying data for
14276    /// this resource. Regardless of status, the existing data is always encrypted
14277    /// at rest.
14278    pub encryption_status: std::option::Option<google_cloud_rpc::model::Status>,
14279
14280    /// Output only. The version of the Cloud KMS key specified in the parent
14281    /// cluster that is in use for the data underlying this table.
14282    pub kms_key_version: std::string::String,
14283
14284    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14285}
14286
14287impl EncryptionInfo {
14288    /// Creates a new default instance.
14289    pub fn new() -> Self {
14290        std::default::Default::default()
14291    }
14292
14293    /// Sets the value of [encryption_type][crate::model::EncryptionInfo::encryption_type].
14294    ///
14295    /// # Example
14296    /// ```ignore,no_run
14297    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14298    /// use google_cloud_bigtable_admin_v2::model::encryption_info::EncryptionType;
14299    /// let x0 = EncryptionInfo::new().set_encryption_type(EncryptionType::GoogleDefaultEncryption);
14300    /// let x1 = EncryptionInfo::new().set_encryption_type(EncryptionType::CustomerManagedEncryption);
14301    /// ```
14302    pub fn set_encryption_type<
14303        T: std::convert::Into<crate::model::encryption_info::EncryptionType>,
14304    >(
14305        mut self,
14306        v: T,
14307    ) -> Self {
14308        self.encryption_type = v.into();
14309        self
14310    }
14311
14312    /// Sets the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
14313    ///
14314    /// # Example
14315    /// ```ignore,no_run
14316    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14317    /// use google_cloud_rpc::model::Status;
14318    /// let x = EncryptionInfo::new().set_encryption_status(Status::default()/* use setters */);
14319    /// ```
14320    pub fn set_encryption_status<T>(mut self, v: T) -> Self
14321    where
14322        T: std::convert::Into<google_cloud_rpc::model::Status>,
14323    {
14324        self.encryption_status = std::option::Option::Some(v.into());
14325        self
14326    }
14327
14328    /// Sets or clears the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
14329    ///
14330    /// # Example
14331    /// ```ignore,no_run
14332    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14333    /// use google_cloud_rpc::model::Status;
14334    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(Some(Status::default()/* use setters */));
14335    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(None::<Status>);
14336    /// ```
14337    pub fn set_or_clear_encryption_status<T>(mut self, v: std::option::Option<T>) -> Self
14338    where
14339        T: std::convert::Into<google_cloud_rpc::model::Status>,
14340    {
14341        self.encryption_status = v.map(|x| x.into());
14342        self
14343    }
14344
14345    /// Sets the value of [kms_key_version][crate::model::EncryptionInfo::kms_key_version].
14346    ///
14347    /// # Example
14348    /// ```ignore,no_run
14349    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14350    /// let x = EncryptionInfo::new().set_kms_key_version("example");
14351    /// ```
14352    pub fn set_kms_key_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14353        self.kms_key_version = v.into();
14354        self
14355    }
14356}
14357
14358impl wkt::message::Message for EncryptionInfo {
14359    fn typename() -> &'static str {
14360        "type.googleapis.com/google.bigtable.admin.v2.EncryptionInfo"
14361    }
14362}
14363
14364/// Defines additional types related to [EncryptionInfo].
14365pub mod encryption_info {
14366    #[allow(unused_imports)]
14367    use super::*;
14368
14369    /// Possible encryption types for a resource.
14370    ///
14371    /// # Working with unknown values
14372    ///
14373    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14374    /// additional enum variants at any time. Adding new variants is not considered
14375    /// a breaking change. Applications should write their code in anticipation of:
14376    ///
14377    /// - New values appearing in future releases of the client library, **and**
14378    /// - New values received dynamically, without application changes.
14379    ///
14380    /// Please consult the [Working with enums] section in the user guide for some
14381    /// guidelines.
14382    ///
14383    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14384    #[derive(Clone, Debug, PartialEq)]
14385    #[non_exhaustive]
14386    pub enum EncryptionType {
14387        /// Encryption type was not specified, though data at rest remains encrypted.
14388        Unspecified,
14389        /// The data backing this resource is encrypted at rest with a key that is
14390        /// fully managed by Google. No key version or status will be populated.
14391        /// This is the default state.
14392        GoogleDefaultEncryption,
14393        /// The data backing this resource is encrypted at rest with a key that is
14394        /// managed by the customer.
14395        /// The in-use version of the key and its status are populated for
14396        /// CMEK-protected tables.
14397        /// CMEK-protected backups are pinned to the key version that was in use at
14398        /// the time the backup was taken. This key version is populated but its
14399        /// status is not tracked and is reported as `UNKNOWN`.
14400        CustomerManagedEncryption,
14401        /// If set, the enum was initialized with an unknown value.
14402        ///
14403        /// Applications can examine the value using [EncryptionType::value] or
14404        /// [EncryptionType::name].
14405        UnknownValue(encryption_type::UnknownValue),
14406    }
14407
14408    #[doc(hidden)]
14409    pub mod encryption_type {
14410        #[allow(unused_imports)]
14411        use super::*;
14412        #[derive(Clone, Debug, PartialEq)]
14413        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14414    }
14415
14416    impl EncryptionType {
14417        /// Gets the enum value.
14418        ///
14419        /// Returns `None` if the enum contains an unknown value deserialized from
14420        /// the string representation of enums.
14421        pub fn value(&self) -> std::option::Option<i32> {
14422            match self {
14423                Self::Unspecified => std::option::Option::Some(0),
14424                Self::GoogleDefaultEncryption => std::option::Option::Some(1),
14425                Self::CustomerManagedEncryption => std::option::Option::Some(2),
14426                Self::UnknownValue(u) => u.0.value(),
14427            }
14428        }
14429
14430        /// Gets the enum value as a string.
14431        ///
14432        /// Returns `None` if the enum contains an unknown value deserialized from
14433        /// the integer representation of enums.
14434        pub fn name(&self) -> std::option::Option<&str> {
14435            match self {
14436                Self::Unspecified => std::option::Option::Some("ENCRYPTION_TYPE_UNSPECIFIED"),
14437                Self::GoogleDefaultEncryption => {
14438                    std::option::Option::Some("GOOGLE_DEFAULT_ENCRYPTION")
14439                }
14440                Self::CustomerManagedEncryption => {
14441                    std::option::Option::Some("CUSTOMER_MANAGED_ENCRYPTION")
14442                }
14443                Self::UnknownValue(u) => u.0.name(),
14444            }
14445        }
14446    }
14447
14448    impl std::default::Default for EncryptionType {
14449        fn default() -> Self {
14450            use std::convert::From;
14451            Self::from(0)
14452        }
14453    }
14454
14455    impl std::fmt::Display for EncryptionType {
14456        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14457            wkt::internal::display_enum(f, self.name(), self.value())
14458        }
14459    }
14460
14461    impl std::convert::From<i32> for EncryptionType {
14462        fn from(value: i32) -> Self {
14463            match value {
14464                0 => Self::Unspecified,
14465                1 => Self::GoogleDefaultEncryption,
14466                2 => Self::CustomerManagedEncryption,
14467                _ => Self::UnknownValue(encryption_type::UnknownValue(
14468                    wkt::internal::UnknownEnumValue::Integer(value),
14469                )),
14470            }
14471        }
14472    }
14473
14474    impl std::convert::From<&str> for EncryptionType {
14475        fn from(value: &str) -> Self {
14476            use std::string::ToString;
14477            match value {
14478                "ENCRYPTION_TYPE_UNSPECIFIED" => Self::Unspecified,
14479                "GOOGLE_DEFAULT_ENCRYPTION" => Self::GoogleDefaultEncryption,
14480                "CUSTOMER_MANAGED_ENCRYPTION" => Self::CustomerManagedEncryption,
14481                _ => Self::UnknownValue(encryption_type::UnknownValue(
14482                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14483                )),
14484            }
14485        }
14486    }
14487
14488    impl serde::ser::Serialize for EncryptionType {
14489        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14490        where
14491            S: serde::Serializer,
14492        {
14493            match self {
14494                Self::Unspecified => serializer.serialize_i32(0),
14495                Self::GoogleDefaultEncryption => serializer.serialize_i32(1),
14496                Self::CustomerManagedEncryption => serializer.serialize_i32(2),
14497                Self::UnknownValue(u) => u.0.serialize(serializer),
14498            }
14499        }
14500    }
14501
14502    impl<'de> serde::de::Deserialize<'de> for EncryptionType {
14503        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14504        where
14505            D: serde::Deserializer<'de>,
14506        {
14507            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionType>::new(
14508                ".google.bigtable.admin.v2.EncryptionInfo.EncryptionType",
14509            ))
14510        }
14511    }
14512}
14513
14514/// A snapshot of a table at a particular time. A snapshot can be used as a
14515/// checkpoint for data restoration or a data source for a new table.
14516///
14517/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
14518/// feature is not currently available to most Cloud Bigtable customers. This
14519/// feature might be changed in backward-incompatible ways and is not recommended
14520/// for production use. It is not subject to any SLA or deprecation policy.
14521#[derive(Clone, Default, PartialEq)]
14522#[non_exhaustive]
14523pub struct Snapshot {
14524    /// The unique name of the snapshot.
14525    /// Values are of the form
14526    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
14527    pub name: std::string::String,
14528
14529    /// Output only. The source table at the time the snapshot was taken.
14530    pub source_table: std::option::Option<crate::model::Table>,
14531
14532    /// Output only. The size of the data in the source table at the time the
14533    /// snapshot was taken. In some cases, this value may be computed
14534    /// asynchronously via a background process and a placeholder of 0 will be used
14535    /// in the meantime.
14536    pub data_size_bytes: i64,
14537
14538    /// Output only. The time when the snapshot is created.
14539    pub create_time: std::option::Option<wkt::Timestamp>,
14540
14541    /// The time when the snapshot will be deleted. The maximum amount of time a
14542    /// snapshot can stay active is 365 days. If 'ttl' is not specified,
14543    /// the default maximum of 365 days will be used.
14544    pub delete_time: std::option::Option<wkt::Timestamp>,
14545
14546    /// Output only. The current state of the snapshot.
14547    pub state: crate::model::snapshot::State,
14548
14549    /// Description of the snapshot.
14550    pub description: std::string::String,
14551
14552    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14553}
14554
14555impl Snapshot {
14556    /// Creates a new default instance.
14557    pub fn new() -> Self {
14558        std::default::Default::default()
14559    }
14560
14561    /// Sets the value of [name][crate::model::Snapshot::name].
14562    ///
14563    /// # Example
14564    /// ```ignore,no_run
14565    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14566    /// # let project_id = "project_id";
14567    /// # let instance_id = "instance_id";
14568    /// # let cluster_id = "cluster_id";
14569    /// # let snapshot_id = "snapshot_id";
14570    /// let x = Snapshot::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
14571    /// ```
14572    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14573        self.name = v.into();
14574        self
14575    }
14576
14577    /// Sets the value of [source_table][crate::model::Snapshot::source_table].
14578    ///
14579    /// # Example
14580    /// ```ignore,no_run
14581    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14582    /// use google_cloud_bigtable_admin_v2::model::Table;
14583    /// let x = Snapshot::new().set_source_table(Table::default()/* use setters */);
14584    /// ```
14585    pub fn set_source_table<T>(mut self, v: T) -> Self
14586    where
14587        T: std::convert::Into<crate::model::Table>,
14588    {
14589        self.source_table = std::option::Option::Some(v.into());
14590        self
14591    }
14592
14593    /// Sets or clears the value of [source_table][crate::model::Snapshot::source_table].
14594    ///
14595    /// # Example
14596    /// ```ignore,no_run
14597    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14598    /// use google_cloud_bigtable_admin_v2::model::Table;
14599    /// let x = Snapshot::new().set_or_clear_source_table(Some(Table::default()/* use setters */));
14600    /// let x = Snapshot::new().set_or_clear_source_table(None::<Table>);
14601    /// ```
14602    pub fn set_or_clear_source_table<T>(mut self, v: std::option::Option<T>) -> Self
14603    where
14604        T: std::convert::Into<crate::model::Table>,
14605    {
14606        self.source_table = v.map(|x| x.into());
14607        self
14608    }
14609
14610    /// Sets the value of [data_size_bytes][crate::model::Snapshot::data_size_bytes].
14611    ///
14612    /// # Example
14613    /// ```ignore,no_run
14614    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14615    /// let x = Snapshot::new().set_data_size_bytes(42);
14616    /// ```
14617    pub fn set_data_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14618        self.data_size_bytes = v.into();
14619        self
14620    }
14621
14622    /// Sets the value of [create_time][crate::model::Snapshot::create_time].
14623    ///
14624    /// # Example
14625    /// ```ignore,no_run
14626    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14627    /// use wkt::Timestamp;
14628    /// let x = Snapshot::new().set_create_time(Timestamp::default()/* use setters */);
14629    /// ```
14630    pub fn set_create_time<T>(mut self, v: T) -> Self
14631    where
14632        T: std::convert::Into<wkt::Timestamp>,
14633    {
14634        self.create_time = std::option::Option::Some(v.into());
14635        self
14636    }
14637
14638    /// Sets or clears the value of [create_time][crate::model::Snapshot::create_time].
14639    ///
14640    /// # Example
14641    /// ```ignore,no_run
14642    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14643    /// use wkt::Timestamp;
14644    /// let x = Snapshot::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14645    /// let x = Snapshot::new().set_or_clear_create_time(None::<Timestamp>);
14646    /// ```
14647    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14648    where
14649        T: std::convert::Into<wkt::Timestamp>,
14650    {
14651        self.create_time = v.map(|x| x.into());
14652        self
14653    }
14654
14655    /// Sets the value of [delete_time][crate::model::Snapshot::delete_time].
14656    ///
14657    /// # Example
14658    /// ```ignore,no_run
14659    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14660    /// use wkt::Timestamp;
14661    /// let x = Snapshot::new().set_delete_time(Timestamp::default()/* use setters */);
14662    /// ```
14663    pub fn set_delete_time<T>(mut self, v: T) -> Self
14664    where
14665        T: std::convert::Into<wkt::Timestamp>,
14666    {
14667        self.delete_time = std::option::Option::Some(v.into());
14668        self
14669    }
14670
14671    /// Sets or clears the value of [delete_time][crate::model::Snapshot::delete_time].
14672    ///
14673    /// # Example
14674    /// ```ignore,no_run
14675    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14676    /// use wkt::Timestamp;
14677    /// let x = Snapshot::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
14678    /// let x = Snapshot::new().set_or_clear_delete_time(None::<Timestamp>);
14679    /// ```
14680    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
14681    where
14682        T: std::convert::Into<wkt::Timestamp>,
14683    {
14684        self.delete_time = v.map(|x| x.into());
14685        self
14686    }
14687
14688    /// Sets the value of [state][crate::model::Snapshot::state].
14689    ///
14690    /// # Example
14691    /// ```ignore,no_run
14692    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14693    /// use google_cloud_bigtable_admin_v2::model::snapshot::State;
14694    /// let x0 = Snapshot::new().set_state(State::Ready);
14695    /// let x1 = Snapshot::new().set_state(State::Creating);
14696    /// ```
14697    pub fn set_state<T: std::convert::Into<crate::model::snapshot::State>>(mut self, v: T) -> Self {
14698        self.state = v.into();
14699        self
14700    }
14701
14702    /// Sets the value of [description][crate::model::Snapshot::description].
14703    ///
14704    /// # Example
14705    /// ```ignore,no_run
14706    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14707    /// let x = Snapshot::new().set_description("example");
14708    /// ```
14709    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14710        self.description = v.into();
14711        self
14712    }
14713}
14714
14715impl wkt::message::Message for Snapshot {
14716    fn typename() -> &'static str {
14717        "type.googleapis.com/google.bigtable.admin.v2.Snapshot"
14718    }
14719}
14720
14721/// Defines additional types related to [Snapshot].
14722pub mod snapshot {
14723    #[allow(unused_imports)]
14724    use super::*;
14725
14726    /// Possible states of a snapshot.
14727    ///
14728    /// # Working with unknown values
14729    ///
14730    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14731    /// additional enum variants at any time. Adding new variants is not considered
14732    /// a breaking change. Applications should write their code in anticipation of:
14733    ///
14734    /// - New values appearing in future releases of the client library, **and**
14735    /// - New values received dynamically, without application changes.
14736    ///
14737    /// Please consult the [Working with enums] section in the user guide for some
14738    /// guidelines.
14739    ///
14740    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14741    #[derive(Clone, Debug, PartialEq)]
14742    #[non_exhaustive]
14743    pub enum State {
14744        /// The state of the snapshot could not be determined.
14745        NotKnown,
14746        /// The snapshot has been successfully created and can serve all requests.
14747        Ready,
14748        /// The snapshot is currently being created, and may be destroyed if the
14749        /// creation process encounters an error. A snapshot may not be restored to a
14750        /// table while it is being created.
14751        Creating,
14752        /// If set, the enum was initialized with an unknown value.
14753        ///
14754        /// Applications can examine the value using [State::value] or
14755        /// [State::name].
14756        UnknownValue(state::UnknownValue),
14757    }
14758
14759    #[doc(hidden)]
14760    pub mod state {
14761        #[allow(unused_imports)]
14762        use super::*;
14763        #[derive(Clone, Debug, PartialEq)]
14764        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14765    }
14766
14767    impl State {
14768        /// Gets the enum value.
14769        ///
14770        /// Returns `None` if the enum contains an unknown value deserialized from
14771        /// the string representation of enums.
14772        pub fn value(&self) -> std::option::Option<i32> {
14773            match self {
14774                Self::NotKnown => std::option::Option::Some(0),
14775                Self::Ready => std::option::Option::Some(1),
14776                Self::Creating => std::option::Option::Some(2),
14777                Self::UnknownValue(u) => u.0.value(),
14778            }
14779        }
14780
14781        /// Gets the enum value as a string.
14782        ///
14783        /// Returns `None` if the enum contains an unknown value deserialized from
14784        /// the integer representation of enums.
14785        pub fn name(&self) -> std::option::Option<&str> {
14786            match self {
14787                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
14788                Self::Ready => std::option::Option::Some("READY"),
14789                Self::Creating => std::option::Option::Some("CREATING"),
14790                Self::UnknownValue(u) => u.0.name(),
14791            }
14792        }
14793    }
14794
14795    impl std::default::Default for State {
14796        fn default() -> Self {
14797            use std::convert::From;
14798            Self::from(0)
14799        }
14800    }
14801
14802    impl std::fmt::Display for State {
14803        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14804            wkt::internal::display_enum(f, self.name(), self.value())
14805        }
14806    }
14807
14808    impl std::convert::From<i32> for State {
14809        fn from(value: i32) -> Self {
14810            match value {
14811                0 => Self::NotKnown,
14812                1 => Self::Ready,
14813                2 => Self::Creating,
14814                _ => Self::UnknownValue(state::UnknownValue(
14815                    wkt::internal::UnknownEnumValue::Integer(value),
14816                )),
14817            }
14818        }
14819    }
14820
14821    impl std::convert::From<&str> for State {
14822        fn from(value: &str) -> Self {
14823            use std::string::ToString;
14824            match value {
14825                "STATE_NOT_KNOWN" => Self::NotKnown,
14826                "READY" => Self::Ready,
14827                "CREATING" => Self::Creating,
14828                _ => Self::UnknownValue(state::UnknownValue(
14829                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14830                )),
14831            }
14832        }
14833    }
14834
14835    impl serde::ser::Serialize for State {
14836        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14837        where
14838            S: serde::Serializer,
14839        {
14840            match self {
14841                Self::NotKnown => serializer.serialize_i32(0),
14842                Self::Ready => serializer.serialize_i32(1),
14843                Self::Creating => serializer.serialize_i32(2),
14844                Self::UnknownValue(u) => u.0.serialize(serializer),
14845            }
14846        }
14847    }
14848
14849    impl<'de> serde::de::Deserialize<'de> for State {
14850        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14851        where
14852            D: serde::Deserializer<'de>,
14853        {
14854            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14855                ".google.bigtable.admin.v2.Snapshot.State",
14856            ))
14857        }
14858    }
14859}
14860
14861/// A backup of a Cloud Bigtable table.
14862#[derive(Clone, Default, PartialEq)]
14863#[non_exhaustive]
14864pub struct Backup {
14865    /// A globally unique identifier for the backup which cannot be
14866    /// changed. Values are of the form
14867    /// `projects/{project}/instances/{instance}/clusters/{cluster}/
14868    /// backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
14869    /// The final segment of the name must be between 1 and 50 characters
14870    /// in length.
14871    ///
14872    /// The backup is stored in the cluster identified by the prefix of the backup
14873    /// name of the form
14874    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
14875    pub name: std::string::String,
14876
14877    /// Required. Immutable. Name of the table from which this backup was created.
14878    /// This needs to be in the same instance as the backup. Values are of the form
14879    /// `projects/{project}/instances/{instance}/tables/{source_table}`.
14880    pub source_table: std::string::String,
14881
14882    /// Output only. Name of the backup from which this backup was copied. If a
14883    /// backup is not created by copying a backup, this field will be empty. Values
14884    /// are of the form:
14885    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
14886    pub source_backup: std::string::String,
14887
14888    /// Required. The expiration time of the backup.
14889    /// When creating a backup or updating its `expire_time`, the value must be
14890    /// greater than the backup creation time by:
14891    ///
14892    /// - At least 6 hours
14893    /// - At most 90 days
14894    ///
14895    /// Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
14896    pub expire_time: std::option::Option<wkt::Timestamp>,
14897
14898    /// Output only. `start_time` is the time that the backup was started
14899    /// (i.e. approximately the time the
14900    /// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]
14901    /// request is received).  The row data in this backup will be no older than
14902    /// this timestamp.
14903    ///
14904    /// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
14905    pub start_time: std::option::Option<wkt::Timestamp>,
14906
14907    /// Output only. `end_time` is the time that the backup was finished. The row
14908    /// data in the backup will be no newer than this timestamp.
14909    pub end_time: std::option::Option<wkt::Timestamp>,
14910
14911    /// Output only. Size of the backup in bytes.
14912    pub size_bytes: i64,
14913
14914    /// Output only. The current state of the backup.
14915    pub state: crate::model::backup::State,
14916
14917    /// Output only. The encryption information for the backup.
14918    pub encryption_info: std::option::Option<crate::model::EncryptionInfo>,
14919
14920    /// Indicates the backup type of the backup.
14921    pub backup_type: crate::model::backup::BackupType,
14922
14923    /// The time at which the hot backup will be converted to a standard backup.
14924    /// Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
14925    /// hot backup to a standard backup. This value must be greater than the backup
14926    /// creation time by:
14927    ///
14928    /// - At least 24 hours
14929    ///
14930    /// This field only applies for hot backups. When creating or updating a
14931    /// standard backup, attempting to set this field will fail the request.
14932    pub hot_to_standard_time: std::option::Option<wkt::Timestamp>,
14933
14934    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14935}
14936
14937impl Backup {
14938    /// Creates a new default instance.
14939    pub fn new() -> Self {
14940        std::default::Default::default()
14941    }
14942
14943    /// Sets the value of [name][crate::model::Backup::name].
14944    ///
14945    /// # Example
14946    /// ```ignore,no_run
14947    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14948    /// # let project_id = "project_id";
14949    /// # let instance_id = "instance_id";
14950    /// # let cluster_id = "cluster_id";
14951    /// # let backup_id = "backup_id";
14952    /// let x = Backup::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
14953    /// ```
14954    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14955        self.name = v.into();
14956        self
14957    }
14958
14959    /// Sets the value of [source_table][crate::model::Backup::source_table].
14960    ///
14961    /// # Example
14962    /// ```ignore,no_run
14963    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14964    /// let x = Backup::new().set_source_table("example");
14965    /// ```
14966    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14967        self.source_table = v.into();
14968        self
14969    }
14970
14971    /// Sets the value of [source_backup][crate::model::Backup::source_backup].
14972    ///
14973    /// # Example
14974    /// ```ignore,no_run
14975    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14976    /// let x = Backup::new().set_source_backup("example");
14977    /// ```
14978    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14979        self.source_backup = v.into();
14980        self
14981    }
14982
14983    /// Sets the value of [expire_time][crate::model::Backup::expire_time].
14984    ///
14985    /// # Example
14986    /// ```ignore,no_run
14987    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14988    /// use wkt::Timestamp;
14989    /// let x = Backup::new().set_expire_time(Timestamp::default()/* use setters */);
14990    /// ```
14991    pub fn set_expire_time<T>(mut self, v: T) -> Self
14992    where
14993        T: std::convert::Into<wkt::Timestamp>,
14994    {
14995        self.expire_time = std::option::Option::Some(v.into());
14996        self
14997    }
14998
14999    /// Sets or clears the value of [expire_time][crate::model::Backup::expire_time].
15000    ///
15001    /// # Example
15002    /// ```ignore,no_run
15003    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15004    /// use wkt::Timestamp;
15005    /// let x = Backup::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
15006    /// let x = Backup::new().set_or_clear_expire_time(None::<Timestamp>);
15007    /// ```
15008    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
15009    where
15010        T: std::convert::Into<wkt::Timestamp>,
15011    {
15012        self.expire_time = v.map(|x| x.into());
15013        self
15014    }
15015
15016    /// Sets the value of [start_time][crate::model::Backup::start_time].
15017    ///
15018    /// # Example
15019    /// ```ignore,no_run
15020    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15021    /// use wkt::Timestamp;
15022    /// let x = Backup::new().set_start_time(Timestamp::default()/* use setters */);
15023    /// ```
15024    pub fn set_start_time<T>(mut self, v: T) -> Self
15025    where
15026        T: std::convert::Into<wkt::Timestamp>,
15027    {
15028        self.start_time = std::option::Option::Some(v.into());
15029        self
15030    }
15031
15032    /// Sets or clears the value of [start_time][crate::model::Backup::start_time].
15033    ///
15034    /// # Example
15035    /// ```ignore,no_run
15036    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15037    /// use wkt::Timestamp;
15038    /// let x = Backup::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
15039    /// let x = Backup::new().set_or_clear_start_time(None::<Timestamp>);
15040    /// ```
15041    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
15042    where
15043        T: std::convert::Into<wkt::Timestamp>,
15044    {
15045        self.start_time = v.map(|x| x.into());
15046        self
15047    }
15048
15049    /// Sets the value of [end_time][crate::model::Backup::end_time].
15050    ///
15051    /// # Example
15052    /// ```ignore,no_run
15053    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15054    /// use wkt::Timestamp;
15055    /// let x = Backup::new().set_end_time(Timestamp::default()/* use setters */);
15056    /// ```
15057    pub fn set_end_time<T>(mut self, v: T) -> Self
15058    where
15059        T: std::convert::Into<wkt::Timestamp>,
15060    {
15061        self.end_time = std::option::Option::Some(v.into());
15062        self
15063    }
15064
15065    /// Sets or clears the value of [end_time][crate::model::Backup::end_time].
15066    ///
15067    /// # Example
15068    /// ```ignore,no_run
15069    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15070    /// use wkt::Timestamp;
15071    /// let x = Backup::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15072    /// let x = Backup::new().set_or_clear_end_time(None::<Timestamp>);
15073    /// ```
15074    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15075    where
15076        T: std::convert::Into<wkt::Timestamp>,
15077    {
15078        self.end_time = v.map(|x| x.into());
15079        self
15080    }
15081
15082    /// Sets the value of [size_bytes][crate::model::Backup::size_bytes].
15083    ///
15084    /// # Example
15085    /// ```ignore,no_run
15086    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15087    /// let x = Backup::new().set_size_bytes(42);
15088    /// ```
15089    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15090        self.size_bytes = v.into();
15091        self
15092    }
15093
15094    /// Sets the value of [state][crate::model::Backup::state].
15095    ///
15096    /// # Example
15097    /// ```ignore,no_run
15098    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15099    /// use google_cloud_bigtable_admin_v2::model::backup::State;
15100    /// let x0 = Backup::new().set_state(State::Creating);
15101    /// let x1 = Backup::new().set_state(State::Ready);
15102    /// ```
15103    pub fn set_state<T: std::convert::Into<crate::model::backup::State>>(mut self, v: T) -> Self {
15104        self.state = v.into();
15105        self
15106    }
15107
15108    /// Sets the value of [encryption_info][crate::model::Backup::encryption_info].
15109    ///
15110    /// # Example
15111    /// ```ignore,no_run
15112    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15113    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
15114    /// let x = Backup::new().set_encryption_info(EncryptionInfo::default()/* use setters */);
15115    /// ```
15116    pub fn set_encryption_info<T>(mut self, v: T) -> Self
15117    where
15118        T: std::convert::Into<crate::model::EncryptionInfo>,
15119    {
15120        self.encryption_info = std::option::Option::Some(v.into());
15121        self
15122    }
15123
15124    /// Sets or clears the value of [encryption_info][crate::model::Backup::encryption_info].
15125    ///
15126    /// # Example
15127    /// ```ignore,no_run
15128    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15129    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
15130    /// let x = Backup::new().set_or_clear_encryption_info(Some(EncryptionInfo::default()/* use setters */));
15131    /// let x = Backup::new().set_or_clear_encryption_info(None::<EncryptionInfo>);
15132    /// ```
15133    pub fn set_or_clear_encryption_info<T>(mut self, v: std::option::Option<T>) -> Self
15134    where
15135        T: std::convert::Into<crate::model::EncryptionInfo>,
15136    {
15137        self.encryption_info = v.map(|x| x.into());
15138        self
15139    }
15140
15141    /// Sets the value of [backup_type][crate::model::Backup::backup_type].
15142    ///
15143    /// # Example
15144    /// ```ignore,no_run
15145    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15146    /// use google_cloud_bigtable_admin_v2::model::backup::BackupType;
15147    /// let x0 = Backup::new().set_backup_type(BackupType::Standard);
15148    /// let x1 = Backup::new().set_backup_type(BackupType::Hot);
15149    /// ```
15150    pub fn set_backup_type<T: std::convert::Into<crate::model::backup::BackupType>>(
15151        mut self,
15152        v: T,
15153    ) -> Self {
15154        self.backup_type = v.into();
15155        self
15156    }
15157
15158    /// Sets the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
15159    ///
15160    /// # Example
15161    /// ```ignore,no_run
15162    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15163    /// use wkt::Timestamp;
15164    /// let x = Backup::new().set_hot_to_standard_time(Timestamp::default()/* use setters */);
15165    /// ```
15166    pub fn set_hot_to_standard_time<T>(mut self, v: T) -> Self
15167    where
15168        T: std::convert::Into<wkt::Timestamp>,
15169    {
15170        self.hot_to_standard_time = std::option::Option::Some(v.into());
15171        self
15172    }
15173
15174    /// Sets or clears the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
15175    ///
15176    /// # Example
15177    /// ```ignore,no_run
15178    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15179    /// use wkt::Timestamp;
15180    /// let x = Backup::new().set_or_clear_hot_to_standard_time(Some(Timestamp::default()/* use setters */));
15181    /// let x = Backup::new().set_or_clear_hot_to_standard_time(None::<Timestamp>);
15182    /// ```
15183    pub fn set_or_clear_hot_to_standard_time<T>(mut self, v: std::option::Option<T>) -> Self
15184    where
15185        T: std::convert::Into<wkt::Timestamp>,
15186    {
15187        self.hot_to_standard_time = v.map(|x| x.into());
15188        self
15189    }
15190}
15191
15192impl wkt::message::Message for Backup {
15193    fn typename() -> &'static str {
15194        "type.googleapis.com/google.bigtable.admin.v2.Backup"
15195    }
15196}
15197
15198/// Defines additional types related to [Backup].
15199pub mod backup {
15200    #[allow(unused_imports)]
15201    use super::*;
15202
15203    /// Indicates the current state of the backup.
15204    ///
15205    /// # Working with unknown values
15206    ///
15207    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15208    /// additional enum variants at any time. Adding new variants is not considered
15209    /// a breaking change. Applications should write their code in anticipation of:
15210    ///
15211    /// - New values appearing in future releases of the client library, **and**
15212    /// - New values received dynamically, without application changes.
15213    ///
15214    /// Please consult the [Working with enums] section in the user guide for some
15215    /// guidelines.
15216    ///
15217    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15218    #[derive(Clone, Debug, PartialEq)]
15219    #[non_exhaustive]
15220    pub enum State {
15221        /// Not specified.
15222        Unspecified,
15223        /// The pending backup is still being created. Operations on the
15224        /// backup may fail with `FAILED_PRECONDITION` in this state.
15225        Creating,
15226        /// The backup is complete and ready for use.
15227        Ready,
15228        /// If set, the enum was initialized with an unknown value.
15229        ///
15230        /// Applications can examine the value using [State::value] or
15231        /// [State::name].
15232        UnknownValue(state::UnknownValue),
15233    }
15234
15235    #[doc(hidden)]
15236    pub mod state {
15237        #[allow(unused_imports)]
15238        use super::*;
15239        #[derive(Clone, Debug, PartialEq)]
15240        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15241    }
15242
15243    impl State {
15244        /// Gets the enum value.
15245        ///
15246        /// Returns `None` if the enum contains an unknown value deserialized from
15247        /// the string representation of enums.
15248        pub fn value(&self) -> std::option::Option<i32> {
15249            match self {
15250                Self::Unspecified => std::option::Option::Some(0),
15251                Self::Creating => std::option::Option::Some(1),
15252                Self::Ready => std::option::Option::Some(2),
15253                Self::UnknownValue(u) => u.0.value(),
15254            }
15255        }
15256
15257        /// Gets the enum value as a string.
15258        ///
15259        /// Returns `None` if the enum contains an unknown value deserialized from
15260        /// the integer representation of enums.
15261        pub fn name(&self) -> std::option::Option<&str> {
15262            match self {
15263                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
15264                Self::Creating => std::option::Option::Some("CREATING"),
15265                Self::Ready => std::option::Option::Some("READY"),
15266                Self::UnknownValue(u) => u.0.name(),
15267            }
15268        }
15269    }
15270
15271    impl std::default::Default for State {
15272        fn default() -> Self {
15273            use std::convert::From;
15274            Self::from(0)
15275        }
15276    }
15277
15278    impl std::fmt::Display for State {
15279        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15280            wkt::internal::display_enum(f, self.name(), self.value())
15281        }
15282    }
15283
15284    impl std::convert::From<i32> for State {
15285        fn from(value: i32) -> Self {
15286            match value {
15287                0 => Self::Unspecified,
15288                1 => Self::Creating,
15289                2 => Self::Ready,
15290                _ => Self::UnknownValue(state::UnknownValue(
15291                    wkt::internal::UnknownEnumValue::Integer(value),
15292                )),
15293            }
15294        }
15295    }
15296
15297    impl std::convert::From<&str> for State {
15298        fn from(value: &str) -> Self {
15299            use std::string::ToString;
15300            match value {
15301                "STATE_UNSPECIFIED" => Self::Unspecified,
15302                "CREATING" => Self::Creating,
15303                "READY" => Self::Ready,
15304                _ => Self::UnknownValue(state::UnknownValue(
15305                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15306                )),
15307            }
15308        }
15309    }
15310
15311    impl serde::ser::Serialize for State {
15312        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15313        where
15314            S: serde::Serializer,
15315        {
15316            match self {
15317                Self::Unspecified => serializer.serialize_i32(0),
15318                Self::Creating => serializer.serialize_i32(1),
15319                Self::Ready => serializer.serialize_i32(2),
15320                Self::UnknownValue(u) => u.0.serialize(serializer),
15321            }
15322        }
15323    }
15324
15325    impl<'de> serde::de::Deserialize<'de> for State {
15326        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15327        where
15328            D: serde::Deserializer<'de>,
15329        {
15330            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15331                ".google.bigtable.admin.v2.Backup.State",
15332            ))
15333        }
15334    }
15335
15336    /// The type of the backup.
15337    ///
15338    /// # Working with unknown values
15339    ///
15340    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15341    /// additional enum variants at any time. Adding new variants is not considered
15342    /// a breaking change. Applications should write their code in anticipation of:
15343    ///
15344    /// - New values appearing in future releases of the client library, **and**
15345    /// - New values received dynamically, without application changes.
15346    ///
15347    /// Please consult the [Working with enums] section in the user guide for some
15348    /// guidelines.
15349    ///
15350    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15351    #[derive(Clone, Debug, PartialEq)]
15352    #[non_exhaustive]
15353    pub enum BackupType {
15354        /// Not specified.
15355        Unspecified,
15356        /// The default type for Cloud Bigtable managed backups. Supported for
15357        /// backups created in both HDD and SSD instances. Requires optimization when
15358        /// restored to a table in an SSD instance.
15359        Standard,
15360        /// A backup type with faster restore to SSD performance. Only supported for
15361        /// backups created in SSD instances. A new SSD table restored from a hot
15362        /// backup reaches production performance more quickly than a standard
15363        /// backup.
15364        Hot,
15365        /// If set, the enum was initialized with an unknown value.
15366        ///
15367        /// Applications can examine the value using [BackupType::value] or
15368        /// [BackupType::name].
15369        UnknownValue(backup_type::UnknownValue),
15370    }
15371
15372    #[doc(hidden)]
15373    pub mod backup_type {
15374        #[allow(unused_imports)]
15375        use super::*;
15376        #[derive(Clone, Debug, PartialEq)]
15377        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15378    }
15379
15380    impl BackupType {
15381        /// Gets the enum value.
15382        ///
15383        /// Returns `None` if the enum contains an unknown value deserialized from
15384        /// the string representation of enums.
15385        pub fn value(&self) -> std::option::Option<i32> {
15386            match self {
15387                Self::Unspecified => std::option::Option::Some(0),
15388                Self::Standard => std::option::Option::Some(1),
15389                Self::Hot => std::option::Option::Some(2),
15390                Self::UnknownValue(u) => u.0.value(),
15391            }
15392        }
15393
15394        /// Gets the enum value as a string.
15395        ///
15396        /// Returns `None` if the enum contains an unknown value deserialized from
15397        /// the integer representation of enums.
15398        pub fn name(&self) -> std::option::Option<&str> {
15399            match self {
15400                Self::Unspecified => std::option::Option::Some("BACKUP_TYPE_UNSPECIFIED"),
15401                Self::Standard => std::option::Option::Some("STANDARD"),
15402                Self::Hot => std::option::Option::Some("HOT"),
15403                Self::UnknownValue(u) => u.0.name(),
15404            }
15405        }
15406    }
15407
15408    impl std::default::Default for BackupType {
15409        fn default() -> Self {
15410            use std::convert::From;
15411            Self::from(0)
15412        }
15413    }
15414
15415    impl std::fmt::Display for BackupType {
15416        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15417            wkt::internal::display_enum(f, self.name(), self.value())
15418        }
15419    }
15420
15421    impl std::convert::From<i32> for BackupType {
15422        fn from(value: i32) -> Self {
15423            match value {
15424                0 => Self::Unspecified,
15425                1 => Self::Standard,
15426                2 => Self::Hot,
15427                _ => Self::UnknownValue(backup_type::UnknownValue(
15428                    wkt::internal::UnknownEnumValue::Integer(value),
15429                )),
15430            }
15431        }
15432    }
15433
15434    impl std::convert::From<&str> for BackupType {
15435        fn from(value: &str) -> Self {
15436            use std::string::ToString;
15437            match value {
15438                "BACKUP_TYPE_UNSPECIFIED" => Self::Unspecified,
15439                "STANDARD" => Self::Standard,
15440                "HOT" => Self::Hot,
15441                _ => Self::UnknownValue(backup_type::UnknownValue(
15442                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15443                )),
15444            }
15445        }
15446    }
15447
15448    impl serde::ser::Serialize for BackupType {
15449        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15450        where
15451            S: serde::Serializer,
15452        {
15453            match self {
15454                Self::Unspecified => serializer.serialize_i32(0),
15455                Self::Standard => serializer.serialize_i32(1),
15456                Self::Hot => serializer.serialize_i32(2),
15457                Self::UnknownValue(u) => u.0.serialize(serializer),
15458            }
15459        }
15460    }
15461
15462    impl<'de> serde::de::Deserialize<'de> for BackupType {
15463        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15464        where
15465            D: serde::Deserializer<'de>,
15466        {
15467            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupType>::new(
15468                ".google.bigtable.admin.v2.Backup.BackupType",
15469            ))
15470        }
15471    }
15472}
15473
15474/// Information about a backup.
15475#[derive(Clone, Default, PartialEq)]
15476#[non_exhaustive]
15477pub struct BackupInfo {
15478    /// Output only. Name of the backup.
15479    pub backup: std::string::String,
15480
15481    /// Output only. The time that the backup was started. Row data in the backup
15482    /// will be no older than this timestamp.
15483    pub start_time: std::option::Option<wkt::Timestamp>,
15484
15485    /// Output only. This time that the backup was finished. Row data in the
15486    /// backup will be no newer than this timestamp.
15487    pub end_time: std::option::Option<wkt::Timestamp>,
15488
15489    /// Output only. Name of the table the backup was created from.
15490    pub source_table: std::string::String,
15491
15492    /// Output only. Name of the backup from which this backup was copied. If a
15493    /// backup is not created by copying a backup, this field will be empty. Values
15494    /// are of the form:
15495    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
15496    pub source_backup: std::string::String,
15497
15498    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15499}
15500
15501impl BackupInfo {
15502    /// Creates a new default instance.
15503    pub fn new() -> Self {
15504        std::default::Default::default()
15505    }
15506
15507    /// Sets the value of [backup][crate::model::BackupInfo::backup].
15508    ///
15509    /// # Example
15510    /// ```ignore,no_run
15511    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15512    /// let x = BackupInfo::new().set_backup("example");
15513    /// ```
15514    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15515        self.backup = v.into();
15516        self
15517    }
15518
15519    /// Sets the value of [start_time][crate::model::BackupInfo::start_time].
15520    ///
15521    /// # Example
15522    /// ```ignore,no_run
15523    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15524    /// use wkt::Timestamp;
15525    /// let x = BackupInfo::new().set_start_time(Timestamp::default()/* use setters */);
15526    /// ```
15527    pub fn set_start_time<T>(mut self, v: T) -> Self
15528    where
15529        T: std::convert::Into<wkt::Timestamp>,
15530    {
15531        self.start_time = std::option::Option::Some(v.into());
15532        self
15533    }
15534
15535    /// Sets or clears the value of [start_time][crate::model::BackupInfo::start_time].
15536    ///
15537    /// # Example
15538    /// ```ignore,no_run
15539    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15540    /// use wkt::Timestamp;
15541    /// let x = BackupInfo::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
15542    /// let x = BackupInfo::new().set_or_clear_start_time(None::<Timestamp>);
15543    /// ```
15544    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
15545    where
15546        T: std::convert::Into<wkt::Timestamp>,
15547    {
15548        self.start_time = v.map(|x| x.into());
15549        self
15550    }
15551
15552    /// Sets the value of [end_time][crate::model::BackupInfo::end_time].
15553    ///
15554    /// # Example
15555    /// ```ignore,no_run
15556    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15557    /// use wkt::Timestamp;
15558    /// let x = BackupInfo::new().set_end_time(Timestamp::default()/* use setters */);
15559    /// ```
15560    pub fn set_end_time<T>(mut self, v: T) -> Self
15561    where
15562        T: std::convert::Into<wkt::Timestamp>,
15563    {
15564        self.end_time = std::option::Option::Some(v.into());
15565        self
15566    }
15567
15568    /// Sets or clears the value of [end_time][crate::model::BackupInfo::end_time].
15569    ///
15570    /// # Example
15571    /// ```ignore,no_run
15572    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15573    /// use wkt::Timestamp;
15574    /// let x = BackupInfo::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15575    /// let x = BackupInfo::new().set_or_clear_end_time(None::<Timestamp>);
15576    /// ```
15577    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15578    where
15579        T: std::convert::Into<wkt::Timestamp>,
15580    {
15581        self.end_time = v.map(|x| x.into());
15582        self
15583    }
15584
15585    /// Sets the value of [source_table][crate::model::BackupInfo::source_table].
15586    ///
15587    /// # Example
15588    /// ```ignore,no_run
15589    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15590    /// let x = BackupInfo::new().set_source_table("example");
15591    /// ```
15592    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15593        self.source_table = v.into();
15594        self
15595    }
15596
15597    /// Sets the value of [source_backup][crate::model::BackupInfo::source_backup].
15598    ///
15599    /// # Example
15600    /// ```ignore,no_run
15601    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15602    /// let x = BackupInfo::new().set_source_backup("example");
15603    /// ```
15604    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15605        self.source_backup = v.into();
15606        self
15607    }
15608}
15609
15610impl wkt::message::Message for BackupInfo {
15611    fn typename() -> &'static str {
15612        "type.googleapis.com/google.bigtable.admin.v2.BackupInfo"
15613    }
15614}
15615
15616/// Config for tiered storage.
15617/// A valid config must have a valid TieredStorageRule. Otherwise the whole
15618/// TieredStorageConfig must be unset.
15619/// By default all data is stored in the SSD tier (only SSD instances can
15620/// configure tiered storage).
15621#[derive(Clone, Default, PartialEq)]
15622#[non_exhaustive]
15623pub struct TieredStorageConfig {
15624    /// Rule to specify what data is stored in the infrequent access(IA) tier.
15625    /// The IA tier allows storing more data per node with reduced performance.
15626    pub infrequent_access: std::option::Option<crate::model::TieredStorageRule>,
15627
15628    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15629}
15630
15631impl TieredStorageConfig {
15632    /// Creates a new default instance.
15633    pub fn new() -> Self {
15634        std::default::Default::default()
15635    }
15636
15637    /// Sets the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
15638    ///
15639    /// # Example
15640    /// ```ignore,no_run
15641    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
15642    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15643    /// let x = TieredStorageConfig::new().set_infrequent_access(TieredStorageRule::default()/* use setters */);
15644    /// ```
15645    pub fn set_infrequent_access<T>(mut self, v: T) -> Self
15646    where
15647        T: std::convert::Into<crate::model::TieredStorageRule>,
15648    {
15649        self.infrequent_access = std::option::Option::Some(v.into());
15650        self
15651    }
15652
15653    /// Sets or clears the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
15654    ///
15655    /// # Example
15656    /// ```ignore,no_run
15657    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
15658    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15659    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(Some(TieredStorageRule::default()/* use setters */));
15660    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(None::<TieredStorageRule>);
15661    /// ```
15662    pub fn set_or_clear_infrequent_access<T>(mut self, v: std::option::Option<T>) -> Self
15663    where
15664        T: std::convert::Into<crate::model::TieredStorageRule>,
15665    {
15666        self.infrequent_access = v.map(|x| x.into());
15667        self
15668    }
15669}
15670
15671impl wkt::message::Message for TieredStorageConfig {
15672    fn typename() -> &'static str {
15673        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageConfig"
15674    }
15675}
15676
15677/// Rule to specify what data is stored in a storage tier.
15678#[derive(Clone, Default, PartialEq)]
15679#[non_exhaustive]
15680pub struct TieredStorageRule {
15681    /// Rules to specify what data is stored in this tier.
15682    pub rule: std::option::Option<crate::model::tiered_storage_rule::Rule>,
15683
15684    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15685}
15686
15687impl TieredStorageRule {
15688    /// Creates a new default instance.
15689    pub fn new() -> Self {
15690        std::default::Default::default()
15691    }
15692
15693    /// Sets the value of [rule][crate::model::TieredStorageRule::rule].
15694    ///
15695    /// Note that all the setters affecting `rule` are mutually
15696    /// exclusive.
15697    ///
15698    /// # Example
15699    /// ```ignore,no_run
15700    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15701    /// use wkt::Duration;
15702    /// let x = TieredStorageRule::new().set_rule(Some(
15703    ///     google_cloud_bigtable_admin_v2::model::tiered_storage_rule::Rule::IncludeIfOlderThan(Duration::default().into())));
15704    /// ```
15705    pub fn set_rule<
15706        T: std::convert::Into<std::option::Option<crate::model::tiered_storage_rule::Rule>>,
15707    >(
15708        mut self,
15709        v: T,
15710    ) -> Self {
15711        self.rule = v.into();
15712        self
15713    }
15714
15715    /// The value of [rule][crate::model::TieredStorageRule::rule]
15716    /// if it holds a `IncludeIfOlderThan`, `None` if the field is not set or
15717    /// holds a different branch.
15718    pub fn include_if_older_than(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
15719        #[allow(unreachable_patterns)]
15720        self.rule.as_ref().and_then(|v| match v {
15721            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v) => {
15722                std::option::Option::Some(v)
15723            }
15724            _ => std::option::Option::None,
15725        })
15726    }
15727
15728    /// Sets the value of [rule][crate::model::TieredStorageRule::rule]
15729    /// to hold a `IncludeIfOlderThan`.
15730    ///
15731    /// Note that all the setters affecting `rule` are
15732    /// mutually exclusive.
15733    ///
15734    /// # Example
15735    /// ```ignore,no_run
15736    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15737    /// use wkt::Duration;
15738    /// let x = TieredStorageRule::new().set_include_if_older_than(Duration::default()/* use setters */);
15739    /// assert!(x.include_if_older_than().is_some());
15740    /// ```
15741    pub fn set_include_if_older_than<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
15742        mut self,
15743        v: T,
15744    ) -> Self {
15745        self.rule = std::option::Option::Some(
15746            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v.into()),
15747        );
15748        self
15749    }
15750}
15751
15752impl wkt::message::Message for TieredStorageRule {
15753    fn typename() -> &'static str {
15754        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageRule"
15755    }
15756}
15757
15758/// Defines additional types related to [TieredStorageRule].
15759pub mod tiered_storage_rule {
15760    #[allow(unused_imports)]
15761    use super::*;
15762
15763    /// Rules to specify what data is stored in this tier.
15764    #[derive(Clone, Debug, PartialEq)]
15765    #[non_exhaustive]
15766    pub enum Rule {
15767        /// Include cells older than the given age.
15768        /// For the infrequent access tier, this value must be at least 30 days.
15769        IncludeIfOlderThan(std::boxed::Box<wkt::Duration>),
15770    }
15771}
15772
15773/// Represents a protobuf schema.
15774#[derive(Clone, Default, PartialEq)]
15775#[non_exhaustive]
15776pub struct ProtoSchema {
15777    /// Required. Contains a protobuf-serialized
15778    /// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
15779    /// which could include multiple proto files.
15780    /// To generate it, [install](https://grpc.io/docs/protoc-installation/) and
15781    /// run `protoc` with
15782    /// `--include_imports` and `--descriptor_set_out`. For example, to generate
15783    /// for moon/shot/app.proto, run
15784    ///
15785    /// ```norust
15786    /// $protoc  --proto_path=/app_path --proto_path=/lib_path \
15787    ///          --include_imports \
15788    ///          --descriptor_set_out=descriptors.pb \
15789    ///          moon/shot/app.proto
15790    /// ```
15791    ///
15792    /// For more details, see protobuffer [self
15793    /// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
15794    pub proto_descriptors: ::bytes::Bytes,
15795
15796    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15797}
15798
15799impl ProtoSchema {
15800    /// Creates a new default instance.
15801    pub fn new() -> Self {
15802        std::default::Default::default()
15803    }
15804
15805    /// Sets the value of [proto_descriptors][crate::model::ProtoSchema::proto_descriptors].
15806    ///
15807    /// # Example
15808    /// ```ignore,no_run
15809    /// # use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15810    /// let x = ProtoSchema::new().set_proto_descriptors(bytes::Bytes::from_static(b"example"));
15811    /// ```
15812    pub fn set_proto_descriptors<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
15813        self.proto_descriptors = v.into();
15814        self
15815    }
15816}
15817
15818impl wkt::message::Message for ProtoSchema {
15819    fn typename() -> &'static str {
15820        "type.googleapis.com/google.bigtable.admin.v2.ProtoSchema"
15821    }
15822}
15823
15824/// A named collection of related schemas.
15825#[derive(Clone, Default, PartialEq)]
15826#[non_exhaustive]
15827pub struct SchemaBundle {
15828    /// Identifier. The unique name identifying this schema bundle.
15829    /// Values are of the form
15830    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
15831    pub name: std::string::String,
15832
15833    /// Optional. The etag for this schema bundle.
15834    /// This may be sent on update and delete requests to ensure the
15835    /// client has an up-to-date value before proceeding. The server
15836    /// returns an ABORTED error on a mismatched etag.
15837    pub etag: std::string::String,
15838
15839    /// The type of this schema bundle. The oneof case cannot change after
15840    /// creation.
15841    pub r#type: std::option::Option<crate::model::schema_bundle::Type>,
15842
15843    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15844}
15845
15846impl SchemaBundle {
15847    /// Creates a new default instance.
15848    pub fn new() -> Self {
15849        std::default::Default::default()
15850    }
15851
15852    /// Sets the value of [name][crate::model::SchemaBundle::name].
15853    ///
15854    /// # Example
15855    /// ```ignore,no_run
15856    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15857    /// # let project_id = "project_id";
15858    /// # let instance_id = "instance_id";
15859    /// # let table_id = "table_id";
15860    /// # let schema_bundle_id = "schema_bundle_id";
15861    /// let x = SchemaBundle::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"));
15862    /// ```
15863    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15864        self.name = v.into();
15865        self
15866    }
15867
15868    /// Sets the value of [etag][crate::model::SchemaBundle::etag].
15869    ///
15870    /// # Example
15871    /// ```ignore,no_run
15872    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15873    /// let x = SchemaBundle::new().set_etag("example");
15874    /// ```
15875    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15876        self.etag = v.into();
15877        self
15878    }
15879
15880    /// Sets the value of [r#type][crate::model::SchemaBundle::type].
15881    ///
15882    /// Note that all the setters affecting `r#type` are mutually
15883    /// exclusive.
15884    ///
15885    /// # Example
15886    /// ```ignore,no_run
15887    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15888    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15889    /// let x = SchemaBundle::new().set_type(Some(
15890    ///     google_cloud_bigtable_admin_v2::model::schema_bundle::Type::ProtoSchema(ProtoSchema::default().into())));
15891    /// ```
15892    pub fn set_type<
15893        T: std::convert::Into<std::option::Option<crate::model::schema_bundle::Type>>,
15894    >(
15895        mut self,
15896        v: T,
15897    ) -> Self {
15898        self.r#type = v.into();
15899        self
15900    }
15901
15902    /// The value of [r#type][crate::model::SchemaBundle::r#type]
15903    /// if it holds a `ProtoSchema`, `None` if the field is not set or
15904    /// holds a different branch.
15905    pub fn proto_schema(&self) -> std::option::Option<&std::boxed::Box<crate::model::ProtoSchema>> {
15906        #[allow(unreachable_patterns)]
15907        self.r#type.as_ref().and_then(|v| match v {
15908            crate::model::schema_bundle::Type::ProtoSchema(v) => std::option::Option::Some(v),
15909            _ => std::option::Option::None,
15910        })
15911    }
15912
15913    /// Sets the value of [r#type][crate::model::SchemaBundle::r#type]
15914    /// to hold a `ProtoSchema`.
15915    ///
15916    /// Note that all the setters affecting `r#type` are
15917    /// mutually exclusive.
15918    ///
15919    /// # Example
15920    /// ```ignore,no_run
15921    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15922    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15923    /// let x = SchemaBundle::new().set_proto_schema(ProtoSchema::default()/* use setters */);
15924    /// assert!(x.proto_schema().is_some());
15925    /// ```
15926    pub fn set_proto_schema<T: std::convert::Into<std::boxed::Box<crate::model::ProtoSchema>>>(
15927        mut self,
15928        v: T,
15929    ) -> Self {
15930        self.r#type =
15931            std::option::Option::Some(crate::model::schema_bundle::Type::ProtoSchema(v.into()));
15932        self
15933    }
15934}
15935
15936impl wkt::message::Message for SchemaBundle {
15937    fn typename() -> &'static str {
15938        "type.googleapis.com/google.bigtable.admin.v2.SchemaBundle"
15939    }
15940}
15941
15942/// Defines additional types related to [SchemaBundle].
15943pub mod schema_bundle {
15944    #[allow(unused_imports)]
15945    use super::*;
15946
15947    /// The type of this schema bundle. The oneof case cannot change after
15948    /// creation.
15949    #[derive(Clone, Debug, PartialEq)]
15950    #[non_exhaustive]
15951    pub enum Type {
15952        /// Schema for Protobufs.
15953        ProtoSchema(std::boxed::Box<crate::model::ProtoSchema>),
15954    }
15955}
15956
15957/// `Type` represents the type of data that is written to, read from, or stored
15958/// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
15959/// familiarity and consistency across products and features.
15960///
15961/// For compatibility with Bigtable's existing untyped APIs, each `Type` includes
15962/// an `Encoding` which describes how to convert to or from the underlying data.
15963///
15964/// Each encoding can operate in one of two modes:
15965///
15966/// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)`
15967///   if and only if `X <= Y`. This is useful anywhere sort order is important,
15968///   for example when encoding keys.
15969/// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then
15970///   `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For
15971///   example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}"
15972///   are valid encodings of the same JSON value.
15973///
15974/// The API clearly documents which mode is used wherever an encoding can be
15975/// configured. Each encoding also documents which values are supported in which
15976/// modes. For example, when encoding INT64 as a numeric STRING, negative numbers
15977/// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but
15978/// `STRING("-00001") > STRING("00001")`.
15979#[derive(Clone, Default, PartialEq)]
15980#[non_exhaustive]
15981pub struct Type {
15982    /// The kind of type that this represents.
15983    pub kind: std::option::Option<crate::model::r#type::Kind>,
15984
15985    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15986}
15987
15988impl Type {
15989    /// Creates a new default instance.
15990    pub fn new() -> Self {
15991        std::default::Default::default()
15992    }
15993
15994    /// Sets the value of [kind][crate::model::Type::kind].
15995    ///
15996    /// Note that all the setters affecting `kind` are mutually
15997    /// exclusive.
15998    ///
15999    /// # Example
16000    /// ```ignore,no_run
16001    /// # use google_cloud_bigtable_admin_v2::model::Type;
16002    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16003    /// let x = Type::new().set_kind(Some(
16004    ///     google_cloud_bigtable_admin_v2::model::r#type::Kind::BytesType(Bytes::default().into())));
16005    /// ```
16006    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::r#type::Kind>>>(
16007        mut self,
16008        v: T,
16009    ) -> Self {
16010        self.kind = v.into();
16011        self
16012    }
16013
16014    /// The value of [kind][crate::model::Type::kind]
16015    /// if it holds a `BytesType`, `None` if the field is not set or
16016    /// holds a different branch.
16017    pub fn bytes_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bytes>> {
16018        #[allow(unreachable_patterns)]
16019        self.kind.as_ref().and_then(|v| match v {
16020            crate::model::r#type::Kind::BytesType(v) => std::option::Option::Some(v),
16021            _ => std::option::Option::None,
16022        })
16023    }
16024
16025    /// Sets the value of [kind][crate::model::Type::kind]
16026    /// to hold a `BytesType`.
16027    ///
16028    /// Note that all the setters affecting `kind` are
16029    /// mutually exclusive.
16030    ///
16031    /// # Example
16032    /// ```ignore,no_run
16033    /// # use google_cloud_bigtable_admin_v2::model::Type;
16034    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16035    /// let x = Type::new().set_bytes_type(Bytes::default()/* use setters */);
16036    /// assert!(x.bytes_type().is_some());
16037    /// assert!(x.string_type().is_none());
16038    /// assert!(x.int64_type().is_none());
16039    /// assert!(x.float32_type().is_none());
16040    /// assert!(x.float64_type().is_none());
16041    /// assert!(x.bool_type().is_none());
16042    /// assert!(x.timestamp_type().is_none());
16043    /// assert!(x.date_type().is_none());
16044    /// assert!(x.aggregate_type().is_none());
16045    /// assert!(x.struct_type().is_none());
16046    /// assert!(x.array_type().is_none());
16047    /// assert!(x.map_type().is_none());
16048    /// assert!(x.proto_type().is_none());
16049    /// assert!(x.enum_type().is_none());
16050    /// ```
16051    pub fn set_bytes_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bytes>>>(
16052        mut self,
16053        v: T,
16054    ) -> Self {
16055        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BytesType(v.into()));
16056        self
16057    }
16058
16059    /// The value of [kind][crate::model::Type::kind]
16060    /// if it holds a `StringType`, `None` if the field is not set or
16061    /// holds a different branch.
16062    pub fn string_type(
16063        &self,
16064    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::String>> {
16065        #[allow(unreachable_patterns)]
16066        self.kind.as_ref().and_then(|v| match v {
16067            crate::model::r#type::Kind::StringType(v) => std::option::Option::Some(v),
16068            _ => std::option::Option::None,
16069        })
16070    }
16071
16072    /// Sets the value of [kind][crate::model::Type::kind]
16073    /// to hold a `StringType`.
16074    ///
16075    /// Note that all the setters affecting `kind` are
16076    /// mutually exclusive.
16077    ///
16078    /// # Example
16079    /// ```ignore,no_run
16080    /// # use google_cloud_bigtable_admin_v2::model::Type;
16081    /// use google_cloud_bigtable_admin_v2::model::r#type::String;
16082    /// let x = Type::new().set_string_type(String::default()/* use setters */);
16083    /// assert!(x.string_type().is_some());
16084    /// assert!(x.bytes_type().is_none());
16085    /// assert!(x.int64_type().is_none());
16086    /// assert!(x.float32_type().is_none());
16087    /// assert!(x.float64_type().is_none());
16088    /// assert!(x.bool_type().is_none());
16089    /// assert!(x.timestamp_type().is_none());
16090    /// assert!(x.date_type().is_none());
16091    /// assert!(x.aggregate_type().is_none());
16092    /// assert!(x.struct_type().is_none());
16093    /// assert!(x.array_type().is_none());
16094    /// assert!(x.map_type().is_none());
16095    /// assert!(x.proto_type().is_none());
16096    /// assert!(x.enum_type().is_none());
16097    /// ```
16098    pub fn set_string_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::String>>>(
16099        mut self,
16100        v: T,
16101    ) -> Self {
16102        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StringType(v.into()));
16103        self
16104    }
16105
16106    /// The value of [kind][crate::model::Type::kind]
16107    /// if it holds a `Int64Type`, `None` if the field is not set or
16108    /// holds a different branch.
16109    pub fn int64_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Int64>> {
16110        #[allow(unreachable_patterns)]
16111        self.kind.as_ref().and_then(|v| match v {
16112            crate::model::r#type::Kind::Int64Type(v) => std::option::Option::Some(v),
16113            _ => std::option::Option::None,
16114        })
16115    }
16116
16117    /// Sets the value of [kind][crate::model::Type::kind]
16118    /// to hold a `Int64Type`.
16119    ///
16120    /// Note that all the setters affecting `kind` are
16121    /// mutually exclusive.
16122    ///
16123    /// # Example
16124    /// ```ignore,no_run
16125    /// # use google_cloud_bigtable_admin_v2::model::Type;
16126    /// use google_cloud_bigtable_admin_v2::model::r#type::Int64;
16127    /// let x = Type::new().set_int64_type(Int64::default()/* use setters */);
16128    /// assert!(x.int64_type().is_some());
16129    /// assert!(x.bytes_type().is_none());
16130    /// assert!(x.string_type().is_none());
16131    /// assert!(x.float32_type().is_none());
16132    /// assert!(x.float64_type().is_none());
16133    /// assert!(x.bool_type().is_none());
16134    /// assert!(x.timestamp_type().is_none());
16135    /// assert!(x.date_type().is_none());
16136    /// assert!(x.aggregate_type().is_none());
16137    /// assert!(x.struct_type().is_none());
16138    /// assert!(x.array_type().is_none());
16139    /// assert!(x.map_type().is_none());
16140    /// assert!(x.proto_type().is_none());
16141    /// assert!(x.enum_type().is_none());
16142    /// ```
16143    pub fn set_int64_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Int64>>>(
16144        mut self,
16145        v: T,
16146    ) -> Self {
16147        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Int64Type(v.into()));
16148        self
16149    }
16150
16151    /// The value of [kind][crate::model::Type::kind]
16152    /// if it holds a `Float32Type`, `None` if the field is not set or
16153    /// holds a different branch.
16154    pub fn float32_type(
16155        &self,
16156    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float32>> {
16157        #[allow(unreachable_patterns)]
16158        self.kind.as_ref().and_then(|v| match v {
16159            crate::model::r#type::Kind::Float32Type(v) => std::option::Option::Some(v),
16160            _ => std::option::Option::None,
16161        })
16162    }
16163
16164    /// Sets the value of [kind][crate::model::Type::kind]
16165    /// to hold a `Float32Type`.
16166    ///
16167    /// Note that all the setters affecting `kind` are
16168    /// mutually exclusive.
16169    ///
16170    /// # Example
16171    /// ```ignore,no_run
16172    /// # use google_cloud_bigtable_admin_v2::model::Type;
16173    /// use google_cloud_bigtable_admin_v2::model::r#type::Float32;
16174    /// let x = Type::new().set_float32_type(Float32::default()/* use setters */);
16175    /// assert!(x.float32_type().is_some());
16176    /// assert!(x.bytes_type().is_none());
16177    /// assert!(x.string_type().is_none());
16178    /// assert!(x.int64_type().is_none());
16179    /// assert!(x.float64_type().is_none());
16180    /// assert!(x.bool_type().is_none());
16181    /// assert!(x.timestamp_type().is_none());
16182    /// assert!(x.date_type().is_none());
16183    /// assert!(x.aggregate_type().is_none());
16184    /// assert!(x.struct_type().is_none());
16185    /// assert!(x.array_type().is_none());
16186    /// assert!(x.map_type().is_none());
16187    /// assert!(x.proto_type().is_none());
16188    /// assert!(x.enum_type().is_none());
16189    /// ```
16190    pub fn set_float32_type<
16191        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float32>>,
16192    >(
16193        mut self,
16194        v: T,
16195    ) -> Self {
16196        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float32Type(v.into()));
16197        self
16198    }
16199
16200    /// The value of [kind][crate::model::Type::kind]
16201    /// if it holds a `Float64Type`, `None` if the field is not set or
16202    /// holds a different branch.
16203    pub fn float64_type(
16204        &self,
16205    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float64>> {
16206        #[allow(unreachable_patterns)]
16207        self.kind.as_ref().and_then(|v| match v {
16208            crate::model::r#type::Kind::Float64Type(v) => std::option::Option::Some(v),
16209            _ => std::option::Option::None,
16210        })
16211    }
16212
16213    /// Sets the value of [kind][crate::model::Type::kind]
16214    /// to hold a `Float64Type`.
16215    ///
16216    /// Note that all the setters affecting `kind` are
16217    /// mutually exclusive.
16218    ///
16219    /// # Example
16220    /// ```ignore,no_run
16221    /// # use google_cloud_bigtable_admin_v2::model::Type;
16222    /// use google_cloud_bigtable_admin_v2::model::r#type::Float64;
16223    /// let x = Type::new().set_float64_type(Float64::default()/* use setters */);
16224    /// assert!(x.float64_type().is_some());
16225    /// assert!(x.bytes_type().is_none());
16226    /// assert!(x.string_type().is_none());
16227    /// assert!(x.int64_type().is_none());
16228    /// assert!(x.float32_type().is_none());
16229    /// assert!(x.bool_type().is_none());
16230    /// assert!(x.timestamp_type().is_none());
16231    /// assert!(x.date_type().is_none());
16232    /// assert!(x.aggregate_type().is_none());
16233    /// assert!(x.struct_type().is_none());
16234    /// assert!(x.array_type().is_none());
16235    /// assert!(x.map_type().is_none());
16236    /// assert!(x.proto_type().is_none());
16237    /// assert!(x.enum_type().is_none());
16238    /// ```
16239    pub fn set_float64_type<
16240        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float64>>,
16241    >(
16242        mut self,
16243        v: T,
16244    ) -> Self {
16245        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float64Type(v.into()));
16246        self
16247    }
16248
16249    /// The value of [kind][crate::model::Type::kind]
16250    /// if it holds a `BoolType`, `None` if the field is not set or
16251    /// holds a different branch.
16252    pub fn bool_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bool>> {
16253        #[allow(unreachable_patterns)]
16254        self.kind.as_ref().and_then(|v| match v {
16255            crate::model::r#type::Kind::BoolType(v) => std::option::Option::Some(v),
16256            _ => std::option::Option::None,
16257        })
16258    }
16259
16260    /// Sets the value of [kind][crate::model::Type::kind]
16261    /// to hold a `BoolType`.
16262    ///
16263    /// Note that all the setters affecting `kind` are
16264    /// mutually exclusive.
16265    ///
16266    /// # Example
16267    /// ```ignore,no_run
16268    /// # use google_cloud_bigtable_admin_v2::model::Type;
16269    /// use google_cloud_bigtable_admin_v2::model::r#type::Bool;
16270    /// let x = Type::new().set_bool_type(Bool::default()/* use setters */);
16271    /// assert!(x.bool_type().is_some());
16272    /// assert!(x.bytes_type().is_none());
16273    /// assert!(x.string_type().is_none());
16274    /// assert!(x.int64_type().is_none());
16275    /// assert!(x.float32_type().is_none());
16276    /// assert!(x.float64_type().is_none());
16277    /// assert!(x.timestamp_type().is_none());
16278    /// assert!(x.date_type().is_none());
16279    /// assert!(x.aggregate_type().is_none());
16280    /// assert!(x.struct_type().is_none());
16281    /// assert!(x.array_type().is_none());
16282    /// assert!(x.map_type().is_none());
16283    /// assert!(x.proto_type().is_none());
16284    /// assert!(x.enum_type().is_none());
16285    /// ```
16286    pub fn set_bool_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bool>>>(
16287        mut self,
16288        v: T,
16289    ) -> Self {
16290        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BoolType(v.into()));
16291        self
16292    }
16293
16294    /// The value of [kind][crate::model::Type::kind]
16295    /// if it holds a `TimestampType`, `None` if the field is not set or
16296    /// holds a different branch.
16297    pub fn timestamp_type(
16298        &self,
16299    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Timestamp>> {
16300        #[allow(unreachable_patterns)]
16301        self.kind.as_ref().and_then(|v| match v {
16302            crate::model::r#type::Kind::TimestampType(v) => std::option::Option::Some(v),
16303            _ => std::option::Option::None,
16304        })
16305    }
16306
16307    /// Sets the value of [kind][crate::model::Type::kind]
16308    /// to hold a `TimestampType`.
16309    ///
16310    /// Note that all the setters affecting `kind` are
16311    /// mutually exclusive.
16312    ///
16313    /// # Example
16314    /// ```ignore,no_run
16315    /// # use google_cloud_bigtable_admin_v2::model::Type;
16316    /// use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
16317    /// let x = Type::new().set_timestamp_type(Timestamp::default()/* use setters */);
16318    /// assert!(x.timestamp_type().is_some());
16319    /// assert!(x.bytes_type().is_none());
16320    /// assert!(x.string_type().is_none());
16321    /// assert!(x.int64_type().is_none());
16322    /// assert!(x.float32_type().is_none());
16323    /// assert!(x.float64_type().is_none());
16324    /// assert!(x.bool_type().is_none());
16325    /// assert!(x.date_type().is_none());
16326    /// assert!(x.aggregate_type().is_none());
16327    /// assert!(x.struct_type().is_none());
16328    /// assert!(x.array_type().is_none());
16329    /// assert!(x.map_type().is_none());
16330    /// assert!(x.proto_type().is_none());
16331    /// assert!(x.enum_type().is_none());
16332    /// ```
16333    pub fn set_timestamp_type<
16334        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Timestamp>>,
16335    >(
16336        mut self,
16337        v: T,
16338    ) -> Self {
16339        self.kind = std::option::Option::Some(crate::model::r#type::Kind::TimestampType(v.into()));
16340        self
16341    }
16342
16343    /// The value of [kind][crate::model::Type::kind]
16344    /// if it holds a `DateType`, `None` if the field is not set or
16345    /// holds a different branch.
16346    pub fn date_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Date>> {
16347        #[allow(unreachable_patterns)]
16348        self.kind.as_ref().and_then(|v| match v {
16349            crate::model::r#type::Kind::DateType(v) => std::option::Option::Some(v),
16350            _ => std::option::Option::None,
16351        })
16352    }
16353
16354    /// Sets the value of [kind][crate::model::Type::kind]
16355    /// to hold a `DateType`.
16356    ///
16357    /// Note that all the setters affecting `kind` are
16358    /// mutually exclusive.
16359    ///
16360    /// # Example
16361    /// ```ignore,no_run
16362    /// # use google_cloud_bigtable_admin_v2::model::Type;
16363    /// use google_cloud_bigtable_admin_v2::model::r#type::Date;
16364    /// let x = Type::new().set_date_type(Date::default()/* use setters */);
16365    /// assert!(x.date_type().is_some());
16366    /// assert!(x.bytes_type().is_none());
16367    /// assert!(x.string_type().is_none());
16368    /// assert!(x.int64_type().is_none());
16369    /// assert!(x.float32_type().is_none());
16370    /// assert!(x.float64_type().is_none());
16371    /// assert!(x.bool_type().is_none());
16372    /// assert!(x.timestamp_type().is_none());
16373    /// assert!(x.aggregate_type().is_none());
16374    /// assert!(x.struct_type().is_none());
16375    /// assert!(x.array_type().is_none());
16376    /// assert!(x.map_type().is_none());
16377    /// assert!(x.proto_type().is_none());
16378    /// assert!(x.enum_type().is_none());
16379    /// ```
16380    pub fn set_date_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Date>>>(
16381        mut self,
16382        v: T,
16383    ) -> Self {
16384        self.kind = std::option::Option::Some(crate::model::r#type::Kind::DateType(v.into()));
16385        self
16386    }
16387
16388    /// The value of [kind][crate::model::Type::kind]
16389    /// if it holds a `AggregateType`, `None` if the field is not set or
16390    /// holds a different branch.
16391    pub fn aggregate_type(
16392        &self,
16393    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Aggregate>> {
16394        #[allow(unreachable_patterns)]
16395        self.kind.as_ref().and_then(|v| match v {
16396            crate::model::r#type::Kind::AggregateType(v) => std::option::Option::Some(v),
16397            _ => std::option::Option::None,
16398        })
16399    }
16400
16401    /// Sets the value of [kind][crate::model::Type::kind]
16402    /// to hold a `AggregateType`.
16403    ///
16404    /// Note that all the setters affecting `kind` are
16405    /// mutually exclusive.
16406    ///
16407    /// # Example
16408    /// ```ignore,no_run
16409    /// # use google_cloud_bigtable_admin_v2::model::Type;
16410    /// use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
16411    /// let x = Type::new().set_aggregate_type(Aggregate::default()/* use setters */);
16412    /// assert!(x.aggregate_type().is_some());
16413    /// assert!(x.bytes_type().is_none());
16414    /// assert!(x.string_type().is_none());
16415    /// assert!(x.int64_type().is_none());
16416    /// assert!(x.float32_type().is_none());
16417    /// assert!(x.float64_type().is_none());
16418    /// assert!(x.bool_type().is_none());
16419    /// assert!(x.timestamp_type().is_none());
16420    /// assert!(x.date_type().is_none());
16421    /// assert!(x.struct_type().is_none());
16422    /// assert!(x.array_type().is_none());
16423    /// assert!(x.map_type().is_none());
16424    /// assert!(x.proto_type().is_none());
16425    /// assert!(x.enum_type().is_none());
16426    /// ```
16427    pub fn set_aggregate_type<
16428        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Aggregate>>,
16429    >(
16430        mut self,
16431        v: T,
16432    ) -> Self {
16433        self.kind = std::option::Option::Some(crate::model::r#type::Kind::AggregateType(v.into()));
16434        self
16435    }
16436
16437    /// The value of [kind][crate::model::Type::kind]
16438    /// if it holds a `StructType`, `None` if the field is not set or
16439    /// holds a different branch.
16440    pub fn struct_type(
16441        &self,
16442    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Struct>> {
16443        #[allow(unreachable_patterns)]
16444        self.kind.as_ref().and_then(|v| match v {
16445            crate::model::r#type::Kind::StructType(v) => std::option::Option::Some(v),
16446            _ => std::option::Option::None,
16447        })
16448    }
16449
16450    /// Sets the value of [kind][crate::model::Type::kind]
16451    /// to hold a `StructType`.
16452    ///
16453    /// Note that all the setters affecting `kind` are
16454    /// mutually exclusive.
16455    ///
16456    /// # Example
16457    /// ```ignore,no_run
16458    /// # use google_cloud_bigtable_admin_v2::model::Type;
16459    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
16460    /// let x = Type::new().set_struct_type(Struct::default()/* use setters */);
16461    /// assert!(x.struct_type().is_some());
16462    /// assert!(x.bytes_type().is_none());
16463    /// assert!(x.string_type().is_none());
16464    /// assert!(x.int64_type().is_none());
16465    /// assert!(x.float32_type().is_none());
16466    /// assert!(x.float64_type().is_none());
16467    /// assert!(x.bool_type().is_none());
16468    /// assert!(x.timestamp_type().is_none());
16469    /// assert!(x.date_type().is_none());
16470    /// assert!(x.aggregate_type().is_none());
16471    /// assert!(x.array_type().is_none());
16472    /// assert!(x.map_type().is_none());
16473    /// assert!(x.proto_type().is_none());
16474    /// assert!(x.enum_type().is_none());
16475    /// ```
16476    pub fn set_struct_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Struct>>>(
16477        mut self,
16478        v: T,
16479    ) -> Self {
16480        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StructType(v.into()));
16481        self
16482    }
16483
16484    /// The value of [kind][crate::model::Type::kind]
16485    /// if it holds a `ArrayType`, `None` if the field is not set or
16486    /// holds a different branch.
16487    pub fn array_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Array>> {
16488        #[allow(unreachable_patterns)]
16489        self.kind.as_ref().and_then(|v| match v {
16490            crate::model::r#type::Kind::ArrayType(v) => std::option::Option::Some(v),
16491            _ => std::option::Option::None,
16492        })
16493    }
16494
16495    /// Sets the value of [kind][crate::model::Type::kind]
16496    /// to hold a `ArrayType`.
16497    ///
16498    /// Note that all the setters affecting `kind` are
16499    /// mutually exclusive.
16500    ///
16501    /// # Example
16502    /// ```ignore,no_run
16503    /// # use google_cloud_bigtable_admin_v2::model::Type;
16504    /// use google_cloud_bigtable_admin_v2::model::r#type::Array;
16505    /// let x = Type::new().set_array_type(Array::default()/* use setters */);
16506    /// assert!(x.array_type().is_some());
16507    /// assert!(x.bytes_type().is_none());
16508    /// assert!(x.string_type().is_none());
16509    /// assert!(x.int64_type().is_none());
16510    /// assert!(x.float32_type().is_none());
16511    /// assert!(x.float64_type().is_none());
16512    /// assert!(x.bool_type().is_none());
16513    /// assert!(x.timestamp_type().is_none());
16514    /// assert!(x.date_type().is_none());
16515    /// assert!(x.aggregate_type().is_none());
16516    /// assert!(x.struct_type().is_none());
16517    /// assert!(x.map_type().is_none());
16518    /// assert!(x.proto_type().is_none());
16519    /// assert!(x.enum_type().is_none());
16520    /// ```
16521    pub fn set_array_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Array>>>(
16522        mut self,
16523        v: T,
16524    ) -> Self {
16525        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ArrayType(v.into()));
16526        self
16527    }
16528
16529    /// The value of [kind][crate::model::Type::kind]
16530    /// if it holds a `MapType`, `None` if the field is not set or
16531    /// holds a different branch.
16532    pub fn map_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Map>> {
16533        #[allow(unreachable_patterns)]
16534        self.kind.as_ref().and_then(|v| match v {
16535            crate::model::r#type::Kind::MapType(v) => std::option::Option::Some(v),
16536            _ => std::option::Option::None,
16537        })
16538    }
16539
16540    /// Sets the value of [kind][crate::model::Type::kind]
16541    /// to hold a `MapType`.
16542    ///
16543    /// Note that all the setters affecting `kind` are
16544    /// mutually exclusive.
16545    ///
16546    /// # Example
16547    /// ```ignore,no_run
16548    /// # use google_cloud_bigtable_admin_v2::model::Type;
16549    /// use google_cloud_bigtable_admin_v2::model::r#type::Map;
16550    /// let x = Type::new().set_map_type(Map::default()/* use setters */);
16551    /// assert!(x.map_type().is_some());
16552    /// assert!(x.bytes_type().is_none());
16553    /// assert!(x.string_type().is_none());
16554    /// assert!(x.int64_type().is_none());
16555    /// assert!(x.float32_type().is_none());
16556    /// assert!(x.float64_type().is_none());
16557    /// assert!(x.bool_type().is_none());
16558    /// assert!(x.timestamp_type().is_none());
16559    /// assert!(x.date_type().is_none());
16560    /// assert!(x.aggregate_type().is_none());
16561    /// assert!(x.struct_type().is_none());
16562    /// assert!(x.array_type().is_none());
16563    /// assert!(x.proto_type().is_none());
16564    /// assert!(x.enum_type().is_none());
16565    /// ```
16566    pub fn set_map_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Map>>>(
16567        mut self,
16568        v: T,
16569    ) -> Self {
16570        self.kind = std::option::Option::Some(crate::model::r#type::Kind::MapType(v.into()));
16571        self
16572    }
16573
16574    /// The value of [kind][crate::model::Type::kind]
16575    /// if it holds a `ProtoType`, `None` if the field is not set or
16576    /// holds a different branch.
16577    pub fn proto_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Proto>> {
16578        #[allow(unreachable_patterns)]
16579        self.kind.as_ref().and_then(|v| match v {
16580            crate::model::r#type::Kind::ProtoType(v) => std::option::Option::Some(v),
16581            _ => std::option::Option::None,
16582        })
16583    }
16584
16585    /// Sets the value of [kind][crate::model::Type::kind]
16586    /// to hold a `ProtoType`.
16587    ///
16588    /// Note that all the setters affecting `kind` are
16589    /// mutually exclusive.
16590    ///
16591    /// # Example
16592    /// ```ignore,no_run
16593    /// # use google_cloud_bigtable_admin_v2::model::Type;
16594    /// use google_cloud_bigtable_admin_v2::model::r#type::Proto;
16595    /// let x = Type::new().set_proto_type(Proto::default()/* use setters */);
16596    /// assert!(x.proto_type().is_some());
16597    /// assert!(x.bytes_type().is_none());
16598    /// assert!(x.string_type().is_none());
16599    /// assert!(x.int64_type().is_none());
16600    /// assert!(x.float32_type().is_none());
16601    /// assert!(x.float64_type().is_none());
16602    /// assert!(x.bool_type().is_none());
16603    /// assert!(x.timestamp_type().is_none());
16604    /// assert!(x.date_type().is_none());
16605    /// assert!(x.aggregate_type().is_none());
16606    /// assert!(x.struct_type().is_none());
16607    /// assert!(x.array_type().is_none());
16608    /// assert!(x.map_type().is_none());
16609    /// assert!(x.enum_type().is_none());
16610    /// ```
16611    pub fn set_proto_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Proto>>>(
16612        mut self,
16613        v: T,
16614    ) -> Self {
16615        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ProtoType(v.into()));
16616        self
16617    }
16618
16619    /// The value of [kind][crate::model::Type::kind]
16620    /// if it holds a `EnumType`, `None` if the field is not set or
16621    /// holds a different branch.
16622    pub fn enum_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Enum>> {
16623        #[allow(unreachable_patterns)]
16624        self.kind.as_ref().and_then(|v| match v {
16625            crate::model::r#type::Kind::EnumType(v) => std::option::Option::Some(v),
16626            _ => std::option::Option::None,
16627        })
16628    }
16629
16630    /// Sets the value of [kind][crate::model::Type::kind]
16631    /// to hold a `EnumType`.
16632    ///
16633    /// Note that all the setters affecting `kind` are
16634    /// mutually exclusive.
16635    ///
16636    /// # Example
16637    /// ```ignore,no_run
16638    /// # use google_cloud_bigtable_admin_v2::model::Type;
16639    /// use google_cloud_bigtable_admin_v2::model::r#type::Enum;
16640    /// let x = Type::new().set_enum_type(Enum::default()/* use setters */);
16641    /// assert!(x.enum_type().is_some());
16642    /// assert!(x.bytes_type().is_none());
16643    /// assert!(x.string_type().is_none());
16644    /// assert!(x.int64_type().is_none());
16645    /// assert!(x.float32_type().is_none());
16646    /// assert!(x.float64_type().is_none());
16647    /// assert!(x.bool_type().is_none());
16648    /// assert!(x.timestamp_type().is_none());
16649    /// assert!(x.date_type().is_none());
16650    /// assert!(x.aggregate_type().is_none());
16651    /// assert!(x.struct_type().is_none());
16652    /// assert!(x.array_type().is_none());
16653    /// assert!(x.map_type().is_none());
16654    /// assert!(x.proto_type().is_none());
16655    /// ```
16656    pub fn set_enum_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Enum>>>(
16657        mut self,
16658        v: T,
16659    ) -> Self {
16660        self.kind = std::option::Option::Some(crate::model::r#type::Kind::EnumType(v.into()));
16661        self
16662    }
16663}
16664
16665impl wkt::message::Message for Type {
16666    fn typename() -> &'static str {
16667        "type.googleapis.com/google.bigtable.admin.v2.Type"
16668    }
16669}
16670
16671/// Defines additional types related to [Type].
16672pub mod r#type {
16673    #[allow(unused_imports)]
16674    use super::*;
16675
16676    /// Bytes
16677    /// Values of type `Bytes` are stored in `Value.bytes_value`.
16678    #[derive(Clone, Default, PartialEq)]
16679    #[non_exhaustive]
16680    pub struct Bytes {
16681        /// The encoding to use when converting to or from lower level types.
16682        pub encoding: std::option::Option<crate::model::r#type::bytes::Encoding>,
16683
16684        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16685    }
16686
16687    impl Bytes {
16688        /// Creates a new default instance.
16689        pub fn new() -> Self {
16690            std::default::Default::default()
16691        }
16692
16693        /// Sets the value of [encoding][crate::model::r#type::Bytes::encoding].
16694        ///
16695        /// # Example
16696        /// ```ignore,no_run
16697        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16698        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16699        /// let x = Bytes::new().set_encoding(Encoding::default()/* use setters */);
16700        /// ```
16701        pub fn set_encoding<T>(mut self, v: T) -> Self
16702        where
16703            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
16704        {
16705            self.encoding = std::option::Option::Some(v.into());
16706            self
16707        }
16708
16709        /// Sets or clears the value of [encoding][crate::model::r#type::Bytes::encoding].
16710        ///
16711        /// # Example
16712        /// ```ignore,no_run
16713        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16714        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16715        /// let x = Bytes::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16716        /// let x = Bytes::new().set_or_clear_encoding(None::<Encoding>);
16717        /// ```
16718        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16719        where
16720            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
16721        {
16722            self.encoding = v.map(|x| x.into());
16723            self
16724        }
16725    }
16726
16727    impl wkt::message::Message for Bytes {
16728        fn typename() -> &'static str {
16729            "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes"
16730        }
16731    }
16732
16733    /// Defines additional types related to [Bytes].
16734    pub mod bytes {
16735        #[allow(unused_imports)]
16736        use super::*;
16737
16738        /// Rules used to convert to or from lower level types.
16739        #[derive(Clone, Default, PartialEq)]
16740        #[non_exhaustive]
16741        pub struct Encoding {
16742            /// Which encoding to use.
16743            pub encoding: std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16744
16745            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16746        }
16747
16748        impl Encoding {
16749            /// Creates a new default instance.
16750            pub fn new() -> Self {
16751                std::default::Default::default()
16752            }
16753
16754            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding].
16755            ///
16756            /// Note that all the setters affecting `encoding` are mutually
16757            /// exclusive.
16758            ///
16759            /// # Example
16760            /// ```ignore,no_run
16761            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16762            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16763            /// let x = Encoding::new().set_encoding(Some(
16764            ///     google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Encoding::Raw(Raw::default().into())));
16765            /// ```
16766            pub fn set_encoding<
16767                T: std::convert::Into<
16768                        std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16769                    >,
16770            >(
16771                mut self,
16772                v: T,
16773            ) -> Self {
16774                self.encoding = v.into();
16775                self
16776            }
16777
16778            /// The value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16779            /// if it holds a `Raw`, `None` if the field is not set or
16780            /// holds a different branch.
16781            pub fn raw(
16782                &self,
16783            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>
16784            {
16785                #[allow(unreachable_patterns)]
16786                self.encoding.as_ref().and_then(|v| match v {
16787                    crate::model::r#type::bytes::encoding::Encoding::Raw(v) => {
16788                        std::option::Option::Some(v)
16789                    }
16790                    _ => std::option::Option::None,
16791                })
16792            }
16793
16794            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16795            /// to hold a `Raw`.
16796            ///
16797            /// Note that all the setters affecting `encoding` are
16798            /// mutually exclusive.
16799            ///
16800            /// # Example
16801            /// ```ignore,no_run
16802            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16803            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16804            /// let x = Encoding::new().set_raw(Raw::default()/* use setters */);
16805            /// assert!(x.raw().is_some());
16806            /// ```
16807            pub fn set_raw<
16808                T: std::convert::Into<std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>,
16809            >(
16810                mut self,
16811                v: T,
16812            ) -> Self {
16813                self.encoding = std::option::Option::Some(
16814                    crate::model::r#type::bytes::encoding::Encoding::Raw(v.into()),
16815                );
16816                self
16817            }
16818        }
16819
16820        impl wkt::message::Message for Encoding {
16821            fn typename() -> &'static str {
16822                "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding"
16823            }
16824        }
16825
16826        /// Defines additional types related to [Encoding].
16827        pub mod encoding {
16828            #[allow(unused_imports)]
16829            use super::*;
16830
16831            /// Leaves the value as-is.
16832            ///
16833            /// Sorted mode: all values are supported.
16834            ///
16835            /// Distinct mode: all values are supported.
16836            #[derive(Clone, Default, PartialEq)]
16837            #[non_exhaustive]
16838            pub struct Raw {
16839                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16840            }
16841
16842            impl Raw {
16843                /// Creates a new default instance.
16844                pub fn new() -> Self {
16845                    std::default::Default::default()
16846                }
16847            }
16848
16849            impl wkt::message::Message for Raw {
16850                fn typename() -> &'static str {
16851                    "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding.Raw"
16852                }
16853            }
16854
16855            /// Which encoding to use.
16856            #[derive(Clone, Debug, PartialEq)]
16857            #[non_exhaustive]
16858            pub enum Encoding {
16859                /// Use `Raw` encoding.
16860                Raw(std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>),
16861            }
16862        }
16863    }
16864
16865    /// String
16866    /// Values of type `String` are stored in `Value.string_value`.
16867    #[derive(Clone, Default, PartialEq)]
16868    #[non_exhaustive]
16869    pub struct String {
16870        /// The encoding to use when converting to or from lower level types.
16871        pub encoding: std::option::Option<crate::model::r#type::string::Encoding>,
16872
16873        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16874    }
16875
16876    impl String {
16877        /// Creates a new default instance.
16878        pub fn new() -> Self {
16879            std::default::Default::default()
16880        }
16881
16882        /// Sets the value of [encoding][crate::model::r#type::String::encoding].
16883        ///
16884        /// # Example
16885        /// ```ignore,no_run
16886        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16887        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16888        /// let x = String::new().set_encoding(Encoding::default()/* use setters */);
16889        /// ```
16890        pub fn set_encoding<T>(mut self, v: T) -> Self
16891        where
16892            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16893        {
16894            self.encoding = std::option::Option::Some(v.into());
16895            self
16896        }
16897
16898        /// Sets or clears the value of [encoding][crate::model::r#type::String::encoding].
16899        ///
16900        /// # Example
16901        /// ```ignore,no_run
16902        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16903        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16904        /// let x = String::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16905        /// let x = String::new().set_or_clear_encoding(None::<Encoding>);
16906        /// ```
16907        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16908        where
16909            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16910        {
16911            self.encoding = v.map(|x| x.into());
16912            self
16913        }
16914    }
16915
16916    impl wkt::message::Message for String {
16917        fn typename() -> &'static str {
16918            "type.googleapis.com/google.bigtable.admin.v2.Type.String"
16919        }
16920    }
16921
16922    /// Defines additional types related to [String].
16923    pub mod string {
16924        #[allow(unused_imports)]
16925        use super::*;
16926
16927        /// Rules used to convert to or from lower level types.
16928        #[derive(Clone, Default, PartialEq)]
16929        #[non_exhaustive]
16930        pub struct Encoding {
16931            /// Which encoding to use.
16932            pub encoding: std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16933
16934            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16935        }
16936
16937        impl Encoding {
16938            /// Creates a new default instance.
16939            pub fn new() -> Self {
16940                std::default::Default::default()
16941            }
16942
16943            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding].
16944            ///
16945            /// Note that all the setters affecting `encoding` are mutually
16946            /// exclusive.
16947            ///
16948            /// # Example
16949            /// ```ignore,no_run
16950            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16951            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
16952            /// let x = Encoding::new().set_encoding(Some(
16953            ///     google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Encoding::Utf8Bytes(Utf8Bytes::default().into())));
16954            /// ```
16955            pub fn set_encoding<
16956                T: std::convert::Into<
16957                        std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16958                    >,
16959            >(
16960                mut self,
16961                v: T,
16962            ) -> Self {
16963                self.encoding = v.into();
16964                self
16965            }
16966
16967            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
16968            /// if it holds a `Utf8Raw`, `None` if the field is not set or
16969            /// holds a different branch.
16970            #[deprecated]
16971            pub fn utf8_raw(
16972                &self,
16973            ) -> std::option::Option<
16974                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
16975            > {
16976                #[allow(unreachable_patterns)]
16977                self.encoding.as_ref().and_then(|v| match v {
16978                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v) => {
16979                        std::option::Option::Some(v)
16980                    }
16981                    _ => std::option::Option::None,
16982                })
16983            }
16984
16985            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
16986            /// to hold a `Utf8Raw`.
16987            ///
16988            /// Note that all the setters affecting `encoding` are
16989            /// mutually exclusive.
16990            ///
16991            /// # Example
16992            /// ```ignore,no_run
16993            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16994            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Raw;
16995            /// let x = Encoding::new().set_utf8_raw(Utf8Raw::default()/* use setters */);
16996            /// assert!(x.utf8_raw().is_some());
16997            /// assert!(x.utf8_bytes().is_none());
16998            /// ```
16999            #[deprecated]
17000            pub fn set_utf8_raw<
17001                T: std::convert::Into<
17002                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
17003                    >,
17004            >(
17005                mut self,
17006                v: T,
17007            ) -> Self {
17008                self.encoding = std::option::Option::Some(
17009                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v.into()),
17010                );
17011                self
17012            }
17013
17014            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
17015            /// if it holds a `Utf8Bytes`, `None` if the field is not set or
17016            /// holds a different branch.
17017            pub fn utf8_bytes(
17018                &self,
17019            ) -> std::option::Option<
17020                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
17021            > {
17022                #[allow(unreachable_patterns)]
17023                self.encoding.as_ref().and_then(|v| match v {
17024                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v) => {
17025                        std::option::Option::Some(v)
17026                    }
17027                    _ => std::option::Option::None,
17028                })
17029            }
17030
17031            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
17032            /// to hold a `Utf8Bytes`.
17033            ///
17034            /// Note that all the setters affecting `encoding` are
17035            /// mutually exclusive.
17036            ///
17037            /// # Example
17038            /// ```ignore,no_run
17039            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
17040            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
17041            /// let x = Encoding::new().set_utf8_bytes(Utf8Bytes::default()/* use setters */);
17042            /// assert!(x.utf8_bytes().is_some());
17043            /// assert!(x.utf8_raw().is_none());
17044            /// ```
17045            pub fn set_utf8_bytes<
17046                T: std::convert::Into<
17047                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
17048                    >,
17049            >(
17050                mut self,
17051                v: T,
17052            ) -> Self {
17053                self.encoding = std::option::Option::Some(
17054                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v.into()),
17055                );
17056                self
17057            }
17058        }
17059
17060        impl wkt::message::Message for Encoding {
17061            fn typename() -> &'static str {
17062                "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding"
17063            }
17064        }
17065
17066        /// Defines additional types related to [Encoding].
17067        pub mod encoding {
17068            #[allow(unused_imports)]
17069            use super::*;
17070
17071            /// Deprecated: prefer the equivalent `Utf8Bytes`.
17072            #[derive(Clone, Default, PartialEq)]
17073            #[non_exhaustive]
17074            #[deprecated]
17075            pub struct Utf8Raw {
17076                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17077            }
17078
17079            impl Utf8Raw {
17080                /// Creates a new default instance.
17081                pub fn new() -> Self {
17082                    std::default::Default::default()
17083                }
17084            }
17085
17086            impl wkt::message::Message for Utf8Raw {
17087                fn typename() -> &'static str {
17088                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw"
17089                }
17090            }
17091
17092            /// UTF-8 encoding.
17093            ///
17094            /// Sorted mode:
17095            ///
17096            /// - All values are supported.
17097            /// - Code point order is preserved.
17098            ///
17099            /// Distinct mode: all values are supported.
17100            ///
17101            /// Compatible with:
17102            ///
17103            /// - BigQuery `TEXT` encoding
17104            /// - HBase `Bytes.toBytes`
17105            /// - Java `String#getBytes(StandardCharsets.UTF_8)`
17106            #[derive(Clone, Default, PartialEq)]
17107            #[non_exhaustive]
17108            pub struct Utf8Bytes {
17109                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17110            }
17111
17112            impl Utf8Bytes {
17113                /// Creates a new default instance.
17114                pub fn new() -> Self {
17115                    std::default::Default::default()
17116                }
17117            }
17118
17119            impl wkt::message::Message for Utf8Bytes {
17120                fn typename() -> &'static str {
17121                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes"
17122                }
17123            }
17124
17125            /// Which encoding to use.
17126            #[derive(Clone, Debug, PartialEq)]
17127            #[non_exhaustive]
17128            pub enum Encoding {
17129                /// Deprecated: if set, converts to an empty `utf8_bytes`.
17130                #[deprecated]
17131                Utf8Raw(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>),
17132                /// Use `Utf8Bytes` encoding.
17133                Utf8Bytes(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>),
17134            }
17135        }
17136    }
17137
17138    /// Int64
17139    /// Values of type `Int64` are stored in `Value.int_value`.
17140    #[derive(Clone, Default, PartialEq)]
17141    #[non_exhaustive]
17142    pub struct Int64 {
17143        /// The encoding to use when converting to or from lower level types.
17144        pub encoding: std::option::Option<crate::model::r#type::int_64::Encoding>,
17145
17146        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17147    }
17148
17149    impl Int64 {
17150        /// Creates a new default instance.
17151        pub fn new() -> Self {
17152            std::default::Default::default()
17153        }
17154
17155        /// Sets the value of [encoding][crate::model::r#type::Int64::encoding].
17156        ///
17157        /// # Example
17158        /// ```ignore,no_run
17159        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
17160        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17161        /// let x = Int64::new().set_encoding(Encoding::default()/* use setters */);
17162        /// ```
17163        pub fn set_encoding<T>(mut self, v: T) -> Self
17164        where
17165            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
17166        {
17167            self.encoding = std::option::Option::Some(v.into());
17168            self
17169        }
17170
17171        /// Sets or clears the value of [encoding][crate::model::r#type::Int64::encoding].
17172        ///
17173        /// # Example
17174        /// ```ignore,no_run
17175        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
17176        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17177        /// let x = Int64::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17178        /// let x = Int64::new().set_or_clear_encoding(None::<Encoding>);
17179        /// ```
17180        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17181        where
17182            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
17183        {
17184            self.encoding = v.map(|x| x.into());
17185            self
17186        }
17187    }
17188
17189    impl wkt::message::Message for Int64 {
17190        fn typename() -> &'static str {
17191            "type.googleapis.com/google.bigtable.admin.v2.Type.Int64"
17192        }
17193    }
17194
17195    /// Defines additional types related to [Int64].
17196    pub mod int_64 {
17197        #[allow(unused_imports)]
17198        use super::*;
17199
17200        /// Rules used to convert to or from lower level types.
17201        #[derive(Clone, Default, PartialEq)]
17202        #[non_exhaustive]
17203        pub struct Encoding {
17204            /// Which encoding to use.
17205            pub encoding: std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
17206
17207            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17208        }
17209
17210        impl Encoding {
17211            /// Creates a new default instance.
17212            pub fn new() -> Self {
17213                std::default::Default::default()
17214            }
17215
17216            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding].
17217            ///
17218            /// Note that all the setters affecting `encoding` are mutually
17219            /// exclusive.
17220            ///
17221            /// # Example
17222            /// ```ignore,no_run
17223            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17224            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17225            /// let x = Encoding::new().set_encoding(Some(
17226            ///     google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::Encoding::BigEndianBytes(BigEndianBytes::default().into())));
17227            /// ```
17228            pub fn set_encoding<
17229                T: std::convert::Into<
17230                        std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
17231                    >,
17232            >(
17233                mut self,
17234                v: T,
17235            ) -> Self {
17236                self.encoding = v.into();
17237                self
17238            }
17239
17240            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17241            /// if it holds a `BigEndianBytes`, `None` if the field is not set or
17242            /// holds a different branch.
17243            pub fn big_endian_bytes(
17244                &self,
17245            ) -> std::option::Option<
17246                &std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17247            > {
17248                #[allow(unreachable_patterns)]
17249                self.encoding.as_ref().and_then(|v| match v {
17250                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v) => {
17251                        std::option::Option::Some(v)
17252                    }
17253                    _ => std::option::Option::None,
17254                })
17255            }
17256
17257            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17258            /// to hold a `BigEndianBytes`.
17259            ///
17260            /// Note that all the setters affecting `encoding` are
17261            /// mutually exclusive.
17262            ///
17263            /// # Example
17264            /// ```ignore,no_run
17265            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17266            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17267            /// let x = Encoding::new().set_big_endian_bytes(BigEndianBytes::default()/* use setters */);
17268            /// assert!(x.big_endian_bytes().is_some());
17269            /// assert!(x.ordered_code_bytes().is_none());
17270            /// ```
17271            pub fn set_big_endian_bytes<
17272                T: std::convert::Into<
17273                        std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17274                    >,
17275            >(
17276                mut self,
17277                v: T,
17278            ) -> Self {
17279                self.encoding = std::option::Option::Some(
17280                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v.into()),
17281                );
17282                self
17283            }
17284
17285            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17286            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
17287            /// holds a different branch.
17288            pub fn ordered_code_bytes(
17289                &self,
17290            ) -> std::option::Option<
17291                &std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17292            > {
17293                #[allow(unreachable_patterns)]
17294                self.encoding.as_ref().and_then(|v| match v {
17295                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v) => {
17296                        std::option::Option::Some(v)
17297                    }
17298                    _ => std::option::Option::None,
17299                })
17300            }
17301
17302            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17303            /// to hold a `OrderedCodeBytes`.
17304            ///
17305            /// Note that all the setters affecting `encoding` are
17306            /// mutually exclusive.
17307            ///
17308            /// # Example
17309            /// ```ignore,no_run
17310            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17311            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::OrderedCodeBytes;
17312            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
17313            /// assert!(x.ordered_code_bytes().is_some());
17314            /// assert!(x.big_endian_bytes().is_none());
17315            /// ```
17316            pub fn set_ordered_code_bytes<
17317                T: std::convert::Into<
17318                        std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17319                    >,
17320            >(
17321                mut self,
17322                v: T,
17323            ) -> Self {
17324                self.encoding = std::option::Option::Some(
17325                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v.into()),
17326                );
17327                self
17328            }
17329        }
17330
17331        impl wkt::message::Message for Encoding {
17332            fn typename() -> &'static str {
17333                "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding"
17334            }
17335        }
17336
17337        /// Defines additional types related to [Encoding].
17338        pub mod encoding {
17339            #[allow(unused_imports)]
17340            use super::*;
17341
17342            /// Encodes the value as an 8-byte big-endian two's complement value.
17343            ///
17344            /// Sorted mode: non-negative values are supported.
17345            ///
17346            /// Distinct mode: all values are supported.
17347            ///
17348            /// Compatible with:
17349            ///
17350            /// - BigQuery `BINARY` encoding
17351            /// - HBase `Bytes.toBytes`
17352            /// - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
17353            #[derive(Clone, Default, PartialEq)]
17354            #[non_exhaustive]
17355            pub struct BigEndianBytes {
17356                /// Deprecated: ignored if set.
17357                #[deprecated]
17358                pub bytes_type: std::option::Option<crate::model::r#type::Bytes>,
17359
17360                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17361            }
17362
17363            impl BigEndianBytes {
17364                /// Creates a new default instance.
17365                pub fn new() -> Self {
17366                    std::default::Default::default()
17367                }
17368
17369                /// Sets the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
17370                ///
17371                /// # Example
17372                /// ```ignore,no_run
17373                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17374                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17375                /// let x = BigEndianBytes::new().set_bytes_type(Bytes::default()/* use setters */);
17376                /// ```
17377                #[deprecated]
17378                pub fn set_bytes_type<T>(mut self, v: T) -> Self
17379                where
17380                    T: std::convert::Into<crate::model::r#type::Bytes>,
17381                {
17382                    self.bytes_type = std::option::Option::Some(v.into());
17383                    self
17384                }
17385
17386                /// Sets or clears the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
17387                ///
17388                /// # Example
17389                /// ```ignore,no_run
17390                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17391                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17392                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(Some(Bytes::default()/* use setters */));
17393                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(None::<Bytes>);
17394                /// ```
17395                #[deprecated]
17396                pub fn set_or_clear_bytes_type<T>(mut self, v: std::option::Option<T>) -> Self
17397                where
17398                    T: std::convert::Into<crate::model::r#type::Bytes>,
17399                {
17400                    self.bytes_type = v.map(|x| x.into());
17401                    self
17402                }
17403            }
17404
17405            impl wkt::message::Message for BigEndianBytes {
17406                fn typename() -> &'static str {
17407                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes"
17408                }
17409            }
17410
17411            /// Encodes the value in a variable length binary format of up to 10 bytes.
17412            /// Values that are closer to zero use fewer bytes.
17413            ///
17414            /// Sorted mode: all values are supported.
17415            ///
17416            /// Distinct mode: all values are supported.
17417            #[derive(Clone, Default, PartialEq)]
17418            #[non_exhaustive]
17419            pub struct OrderedCodeBytes {
17420                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17421            }
17422
17423            impl OrderedCodeBytes {
17424                /// Creates a new default instance.
17425                pub fn new() -> Self {
17426                    std::default::Default::default()
17427                }
17428            }
17429
17430            impl wkt::message::Message for OrderedCodeBytes {
17431                fn typename() -> &'static str {
17432                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes"
17433                }
17434            }
17435
17436            /// Which encoding to use.
17437            #[derive(Clone, Debug, PartialEq)]
17438            #[non_exhaustive]
17439            pub enum Encoding {
17440                /// Use `BigEndianBytes` encoding.
17441                BigEndianBytes(
17442                    std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17443                ),
17444                /// Use `OrderedCodeBytes` encoding.
17445                OrderedCodeBytes(
17446                    std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17447                ),
17448            }
17449        }
17450    }
17451
17452    /// bool
17453    /// Values of type `Bool` are stored in `Value.bool_value`.
17454    #[derive(Clone, Default, PartialEq)]
17455    #[non_exhaustive]
17456    pub struct Bool {
17457        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17458    }
17459
17460    impl Bool {
17461        /// Creates a new default instance.
17462        pub fn new() -> Self {
17463            std::default::Default::default()
17464        }
17465    }
17466
17467    impl wkt::message::Message for Bool {
17468        fn typename() -> &'static str {
17469            "type.googleapis.com/google.bigtable.admin.v2.Type.Bool"
17470        }
17471    }
17472
17473    /// Float32
17474    /// Values of type `Float32` are stored in `Value.float_value`.
17475    #[derive(Clone, Default, PartialEq)]
17476    #[non_exhaustive]
17477    pub struct Float32 {
17478        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17479    }
17480
17481    impl Float32 {
17482        /// Creates a new default instance.
17483        pub fn new() -> Self {
17484            std::default::Default::default()
17485        }
17486    }
17487
17488    impl wkt::message::Message for Float32 {
17489        fn typename() -> &'static str {
17490            "type.googleapis.com/google.bigtable.admin.v2.Type.Float32"
17491        }
17492    }
17493
17494    /// Float64
17495    /// Values of type `Float64` are stored in `Value.float_value`.
17496    #[derive(Clone, Default, PartialEq)]
17497    #[non_exhaustive]
17498    pub struct Float64 {
17499        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17500    }
17501
17502    impl Float64 {
17503        /// Creates a new default instance.
17504        pub fn new() -> Self {
17505            std::default::Default::default()
17506        }
17507    }
17508
17509    impl wkt::message::Message for Float64 {
17510        fn typename() -> &'static str {
17511            "type.googleapis.com/google.bigtable.admin.v2.Type.Float64"
17512        }
17513    }
17514
17515    /// Timestamp
17516    /// Values of type `Timestamp` are stored in `Value.timestamp_value`.
17517    #[derive(Clone, Default, PartialEq)]
17518    #[non_exhaustive]
17519    pub struct Timestamp {
17520        /// The encoding to use when converting to or from lower level types.
17521        pub encoding: std::option::Option<crate::model::r#type::timestamp::Encoding>,
17522
17523        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17524    }
17525
17526    impl Timestamp {
17527        /// Creates a new default instance.
17528        pub fn new() -> Self {
17529            std::default::Default::default()
17530        }
17531
17532        /// Sets the value of [encoding][crate::model::r#type::Timestamp::encoding].
17533        ///
17534        /// # Example
17535        /// ```ignore,no_run
17536        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17537        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17538        /// let x = Timestamp::new().set_encoding(Encoding::default()/* use setters */);
17539        /// ```
17540        pub fn set_encoding<T>(mut self, v: T) -> Self
17541        where
17542            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
17543        {
17544            self.encoding = std::option::Option::Some(v.into());
17545            self
17546        }
17547
17548        /// Sets or clears the value of [encoding][crate::model::r#type::Timestamp::encoding].
17549        ///
17550        /// # Example
17551        /// ```ignore,no_run
17552        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17553        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17554        /// let x = Timestamp::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17555        /// let x = Timestamp::new().set_or_clear_encoding(None::<Encoding>);
17556        /// ```
17557        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17558        where
17559            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
17560        {
17561            self.encoding = v.map(|x| x.into());
17562            self
17563        }
17564    }
17565
17566    impl wkt::message::Message for Timestamp {
17567        fn typename() -> &'static str {
17568            "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp"
17569        }
17570    }
17571
17572    /// Defines additional types related to [Timestamp].
17573    pub mod timestamp {
17574        #[allow(unused_imports)]
17575        use super::*;
17576
17577        /// Rules used to convert to or from lower level types.
17578        #[derive(Clone, Default, PartialEq)]
17579        #[non_exhaustive]
17580        pub struct Encoding {
17581            /// Which encoding to use.
17582            pub encoding: std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
17583
17584            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17585        }
17586
17587        impl Encoding {
17588            /// Creates a new default instance.
17589            pub fn new() -> Self {
17590                std::default::Default::default()
17591            }
17592
17593            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding].
17594            ///
17595            /// Note that all the setters affecting `encoding` are mutually
17596            /// exclusive.
17597            ///
17598            /// # Example
17599            /// ```ignore,no_run
17600            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17601            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
17602            /// let x = Encoding::new().set_encoding(Some(
17603            ///     google_cloud_bigtable_admin_v2::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(UnixMicrosInt64::default().into())));
17604            /// ```
17605            pub fn set_encoding<
17606                T: std::convert::Into<
17607                        std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
17608                    >,
17609            >(
17610                mut self,
17611                v: T,
17612            ) -> Self {
17613                self.encoding = v.into();
17614                self
17615            }
17616
17617            /// The value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
17618            /// if it holds a `UnixMicrosInt64`, `None` if the field is not set or
17619            /// holds a different branch.
17620            pub fn unix_micros_int64(
17621                &self,
17622            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::int_64::Encoding>>
17623            {
17624                #[allow(unreachable_patterns)]
17625                self.encoding.as_ref().and_then(|v| match v {
17626                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v) => {
17627                        std::option::Option::Some(v)
17628                    }
17629                    _ => std::option::Option::None,
17630                })
17631            }
17632
17633            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
17634            /// to hold a `UnixMicrosInt64`.
17635            ///
17636            /// Note that all the setters affecting `encoding` are
17637            /// mutually exclusive.
17638            ///
17639            /// # Example
17640            /// ```ignore,no_run
17641            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17642            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
17643            /// let x = Encoding::new().set_unix_micros_int64(UnixMicrosInt64::default()/* use setters */);
17644            /// assert!(x.unix_micros_int64().is_some());
17645            /// ```
17646            pub fn set_unix_micros_int64<
17647                T: std::convert::Into<std::boxed::Box<crate::model::r#type::int_64::Encoding>>,
17648            >(
17649                mut self,
17650                v: T,
17651            ) -> Self {
17652                self.encoding = std::option::Option::Some(
17653                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v.into()),
17654                );
17655                self
17656            }
17657        }
17658
17659        impl wkt::message::Message for Encoding {
17660            fn typename() -> &'static str {
17661                "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp.Encoding"
17662            }
17663        }
17664
17665        /// Defines additional types related to [Encoding].
17666        pub mod encoding {
17667            #[allow(unused_imports)]
17668            use super::*;
17669
17670            /// Which encoding to use.
17671            #[derive(Clone, Debug, PartialEq)]
17672            #[non_exhaustive]
17673            pub enum Encoding {
17674                /// Encodes the number of microseconds since the Unix epoch using the
17675                /// given `Int64` encoding. Values must be microsecond-aligned.
17676                ///
17677                /// Compatible with:
17678                ///
17679                /// - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
17680                UnixMicrosInt64(std::boxed::Box<crate::model::r#type::int_64::Encoding>),
17681            }
17682        }
17683    }
17684
17685    /// Date
17686    /// Values of type `Date` are stored in `Value.date_value`.
17687    #[derive(Clone, Default, PartialEq)]
17688    #[non_exhaustive]
17689    pub struct Date {
17690        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17691    }
17692
17693    impl Date {
17694        /// Creates a new default instance.
17695        pub fn new() -> Self {
17696            std::default::Default::default()
17697        }
17698    }
17699
17700    impl wkt::message::Message for Date {
17701        fn typename() -> &'static str {
17702            "type.googleapis.com/google.bigtable.admin.v2.Type.Date"
17703        }
17704    }
17705
17706    /// A structured data value, consisting of fields which map to dynamically
17707    /// typed values.
17708    /// Values of type `Struct` are stored in `Value.array_value` where entries are
17709    /// in the same order and number as `field_types`.
17710    #[derive(Clone, Default, PartialEq)]
17711    #[non_exhaustive]
17712    pub struct Struct {
17713        /// The names and types of the fields in this struct.
17714        pub fields: std::vec::Vec<crate::model::r#type::r#struct::Field>,
17715
17716        /// The encoding to use when converting to or from lower level types.
17717        pub encoding: std::option::Option<crate::model::r#type::r#struct::Encoding>,
17718
17719        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17720    }
17721
17722    impl Struct {
17723        /// Creates a new default instance.
17724        pub fn new() -> Self {
17725            std::default::Default::default()
17726        }
17727
17728        /// Sets the value of [fields][crate::model::r#type::Struct::fields].
17729        ///
17730        /// # Example
17731        /// ```ignore,no_run
17732        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17733        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17734        /// let x = Struct::new()
17735        ///     .set_fields([
17736        ///         Field::default()/* use setters */,
17737        ///         Field::default()/* use (different) setters */,
17738        ///     ]);
17739        /// ```
17740        pub fn set_fields<T, V>(mut self, v: T) -> Self
17741        where
17742            T: std::iter::IntoIterator<Item = V>,
17743            V: std::convert::Into<crate::model::r#type::r#struct::Field>,
17744        {
17745            use std::iter::Iterator;
17746            self.fields = v.into_iter().map(|i| i.into()).collect();
17747            self
17748        }
17749
17750        /// Sets the value of [encoding][crate::model::r#type::Struct::encoding].
17751        ///
17752        /// # Example
17753        /// ```ignore,no_run
17754        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17755        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17756        /// let x = Struct::new().set_encoding(Encoding::default()/* use setters */);
17757        /// ```
17758        pub fn set_encoding<T>(mut self, v: T) -> Self
17759        where
17760            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17761        {
17762            self.encoding = std::option::Option::Some(v.into());
17763            self
17764        }
17765
17766        /// Sets or clears the value of [encoding][crate::model::r#type::Struct::encoding].
17767        ///
17768        /// # Example
17769        /// ```ignore,no_run
17770        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17771        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17772        /// let x = Struct::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17773        /// let x = Struct::new().set_or_clear_encoding(None::<Encoding>);
17774        /// ```
17775        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17776        where
17777            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17778        {
17779            self.encoding = v.map(|x| x.into());
17780            self
17781        }
17782    }
17783
17784    impl wkt::message::Message for Struct {
17785        fn typename() -> &'static str {
17786            "type.googleapis.com/google.bigtable.admin.v2.Type.Struct"
17787        }
17788    }
17789
17790    /// Defines additional types related to [Struct].
17791    pub mod r#struct {
17792        #[allow(unused_imports)]
17793        use super::*;
17794
17795        /// A struct field and its type.
17796        #[derive(Clone, Default, PartialEq)]
17797        #[non_exhaustive]
17798        pub struct Field {
17799            /// The field name (optional). Fields without a `field_name` are considered
17800            /// anonymous and cannot be referenced by name.
17801            pub field_name: std::string::String,
17802
17803            /// The type of values in this field.
17804            pub r#type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17805
17806            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17807        }
17808
17809        impl Field {
17810            /// Creates a new default instance.
17811            pub fn new() -> Self {
17812                std::default::Default::default()
17813            }
17814
17815            /// Sets the value of [field_name][crate::model::r#type::r#struct::Field::field_name].
17816            ///
17817            /// # Example
17818            /// ```ignore,no_run
17819            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17820            /// let x = Field::new().set_field_name("example");
17821            /// ```
17822            pub fn set_field_name<T: std::convert::Into<std::string::String>>(
17823                mut self,
17824                v: T,
17825            ) -> Self {
17826                self.field_name = v.into();
17827                self
17828            }
17829
17830            /// Sets the value of [r#type][crate::model::r#type::r#struct::Field::type].
17831            ///
17832            /// # Example
17833            /// ```ignore,no_run
17834            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17835            /// use google_cloud_bigtable_admin_v2::model::Type;
17836            /// let x = Field::new().set_type(Type::default()/* use setters */);
17837            /// ```
17838            pub fn set_type<T>(mut self, v: T) -> Self
17839            where
17840                T: std::convert::Into<crate::model::Type>,
17841            {
17842                self.r#type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17843                self
17844            }
17845
17846            /// Sets or clears the value of [r#type][crate::model::r#type::r#struct::Field::type].
17847            ///
17848            /// # Example
17849            /// ```ignore,no_run
17850            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17851            /// use google_cloud_bigtable_admin_v2::model::Type;
17852            /// let x = Field::new().set_or_clear_type(Some(Type::default()/* use setters */));
17853            /// let x = Field::new().set_or_clear_type(None::<Type>);
17854            /// ```
17855            pub fn set_or_clear_type<T>(mut self, v: std::option::Option<T>) -> Self
17856            where
17857                T: std::convert::Into<crate::model::Type>,
17858            {
17859                self.r#type = v.map(|x| std::boxed::Box::new(x.into()));
17860                self
17861            }
17862        }
17863
17864        impl wkt::message::Message for Field {
17865            fn typename() -> &'static str {
17866                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Field"
17867            }
17868        }
17869
17870        /// Rules used to convert to or from lower level types.
17871        #[derive(Clone, Default, PartialEq)]
17872        #[non_exhaustive]
17873        pub struct Encoding {
17874            /// Which encoding to use.
17875            pub encoding: std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17876
17877            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17878        }
17879
17880        impl Encoding {
17881            /// Creates a new default instance.
17882            pub fn new() -> Self {
17883                std::default::Default::default()
17884            }
17885
17886            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding].
17887            ///
17888            /// Note that all the setters affecting `encoding` are mutually
17889            /// exclusive.
17890            ///
17891            /// # Example
17892            /// ```ignore,no_run
17893            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17894            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17895            /// let x = Encoding::new().set_encoding(Some(
17896            ///     google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Encoding::Singleton(Singleton::default().into())));
17897            /// ```
17898            pub fn set_encoding<
17899                T: std::convert::Into<
17900                        std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17901                    >,
17902            >(
17903                mut self,
17904                v: T,
17905            ) -> Self {
17906                self.encoding = v.into();
17907                self
17908            }
17909
17910            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17911            /// if it holds a `Singleton`, `None` if the field is not set or
17912            /// holds a different branch.
17913            pub fn singleton(
17914                &self,
17915            ) -> std::option::Option<
17916                &std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17917            > {
17918                #[allow(unreachable_patterns)]
17919                self.encoding.as_ref().and_then(|v| match v {
17920                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v) => {
17921                        std::option::Option::Some(v)
17922                    }
17923                    _ => std::option::Option::None,
17924                })
17925            }
17926
17927            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17928            /// to hold a `Singleton`.
17929            ///
17930            /// Note that all the setters affecting `encoding` are
17931            /// mutually exclusive.
17932            ///
17933            /// # Example
17934            /// ```ignore,no_run
17935            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17936            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17937            /// let x = Encoding::new().set_singleton(Singleton::default()/* use setters */);
17938            /// assert!(x.singleton().is_some());
17939            /// assert!(x.delimited_bytes().is_none());
17940            /// assert!(x.ordered_code_bytes().is_none());
17941            /// ```
17942            pub fn set_singleton<
17943                T: std::convert::Into<
17944                        std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17945                    >,
17946            >(
17947                mut self,
17948                v: T,
17949            ) -> Self {
17950                self.encoding = std::option::Option::Some(
17951                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v.into()),
17952                );
17953                self
17954            }
17955
17956            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17957            /// if it holds a `DelimitedBytes`, `None` if the field is not set or
17958            /// holds a different branch.
17959            pub fn delimited_bytes(
17960                &self,
17961            ) -> std::option::Option<
17962                &std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17963            > {
17964                #[allow(unreachable_patterns)]
17965                self.encoding.as_ref().and_then(|v| match v {
17966                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v) => {
17967                        std::option::Option::Some(v)
17968                    }
17969                    _ => std::option::Option::None,
17970                })
17971            }
17972
17973            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17974            /// to hold a `DelimitedBytes`.
17975            ///
17976            /// Note that all the setters affecting `encoding` are
17977            /// mutually exclusive.
17978            ///
17979            /// # Example
17980            /// ```ignore,no_run
17981            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17982            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
17983            /// let x = Encoding::new().set_delimited_bytes(DelimitedBytes::default()/* use setters */);
17984            /// assert!(x.delimited_bytes().is_some());
17985            /// assert!(x.singleton().is_none());
17986            /// assert!(x.ordered_code_bytes().is_none());
17987            /// ```
17988            pub fn set_delimited_bytes<
17989                T: std::convert::Into<
17990                        std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17991                    >,
17992            >(
17993                mut self,
17994                v: T,
17995            ) -> Self {
17996                self.encoding = std::option::Option::Some(
17997                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v.into()),
17998                );
17999                self
18000            }
18001
18002            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
18003            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
18004            /// holds a different branch.
18005            pub fn ordered_code_bytes(
18006                &self,
18007            ) -> std::option::Option<
18008                &std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
18009            > {
18010                #[allow(unreachable_patterns)]
18011                self.encoding.as_ref().and_then(|v| match v {
18012                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v) => {
18013                        std::option::Option::Some(v)
18014                    }
18015                    _ => std::option::Option::None,
18016                })
18017            }
18018
18019            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
18020            /// to hold a `OrderedCodeBytes`.
18021            ///
18022            /// Note that all the setters affecting `encoding` are
18023            /// mutually exclusive.
18024            ///
18025            /// # Example
18026            /// ```ignore,no_run
18027            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
18028            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::OrderedCodeBytes;
18029            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
18030            /// assert!(x.ordered_code_bytes().is_some());
18031            /// assert!(x.singleton().is_none());
18032            /// assert!(x.delimited_bytes().is_none());
18033            /// ```
18034            pub fn set_ordered_code_bytes<
18035                T: std::convert::Into<
18036                        std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
18037                    >,
18038            >(
18039                mut self,
18040                v: T,
18041            ) -> Self {
18042                self.encoding = std::option::Option::Some(
18043                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v.into()),
18044                );
18045                self
18046            }
18047        }
18048
18049        impl wkt::message::Message for Encoding {
18050            fn typename() -> &'static str {
18051                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding"
18052            }
18053        }
18054
18055        /// Defines additional types related to [Encoding].
18056        pub mod encoding {
18057            #[allow(unused_imports)]
18058            use super::*;
18059
18060            /// Uses the encoding of `fields[0].type` as-is.
18061            /// Only valid if `fields.size == 1`.
18062            #[derive(Clone, Default, PartialEq)]
18063            #[non_exhaustive]
18064            pub struct Singleton {
18065                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18066            }
18067
18068            impl Singleton {
18069                /// Creates a new default instance.
18070                pub fn new() -> Self {
18071                    std::default::Default::default()
18072                }
18073            }
18074
18075            impl wkt::message::Message for Singleton {
18076                fn typename() -> &'static str {
18077                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.Singleton"
18078                }
18079            }
18080
18081            /// Fields are encoded independently and concatenated with a configurable
18082            /// `delimiter` in between.
18083            ///
18084            /// A struct with no fields defined is encoded as a single `delimiter`.
18085            ///
18086            /// Sorted mode:
18087            ///
18088            /// - Fields are encoded in sorted mode.
18089            /// - Encoded field values must not contain any bytes <= `delimiter[0]`
18090            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
18091            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
18092            ///
18093            /// Distinct mode:
18094            ///
18095            /// - Fields are encoded in distinct mode.
18096            /// - Encoded field values must not contain `delimiter[0]`.
18097            #[derive(Clone, Default, PartialEq)]
18098            #[non_exhaustive]
18099            pub struct DelimitedBytes {
18100                /// Byte sequence used to delimit concatenated fields. The delimiter must
18101                /// contain at least 1 character and at most 50 characters.
18102                pub delimiter: ::bytes::Bytes,
18103
18104                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18105            }
18106
18107            impl DelimitedBytes {
18108                /// Creates a new default instance.
18109                pub fn new() -> Self {
18110                    std::default::Default::default()
18111                }
18112
18113                /// Sets the value of [delimiter][crate::model::r#type::r#struct::encoding::DelimitedBytes::delimiter].
18114                ///
18115                /// # Example
18116                /// ```ignore,no_run
18117                /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
18118                /// let x = DelimitedBytes::new().set_delimiter(bytes::Bytes::from_static(b"example"));
18119                /// ```
18120                pub fn set_delimiter<T: std::convert::Into<::bytes::Bytes>>(
18121                    mut self,
18122                    v: T,
18123                ) -> Self {
18124                    self.delimiter = v.into();
18125                    self
18126                }
18127            }
18128
18129            impl wkt::message::Message for DelimitedBytes {
18130                fn typename() -> &'static str {
18131                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes"
18132                }
18133            }
18134
18135            /// Fields are encoded independently and concatenated with the fixed byte
18136            /// pair {0x00, 0x01} in between.
18137            ///
18138            /// Any null (0x00) byte in an encoded field is replaced by the fixed byte
18139            /// pair {0x00, 0xFF}.
18140            ///
18141            /// Fields that encode to the empty string "" have special handling:
18142            ///
18143            /// - If *every* field encodes to "", or if the STRUCT has no fields
18144            ///   defined, then the STRUCT is encoded as the fixed byte pair
18145            ///   {0x00, 0x00}.
18146            /// - Otherwise, the STRUCT only encodes until the last non-empty field,
18147            ///   omitting any trailing empty fields. Any empty fields that aren't
18148            ///   omitted are replaced with the fixed byte pair {0x00, 0x00}.
18149            ///
18150            /// Examples:
18151            ///
18152            /// - STRUCT()             -> "\00\00"
18153            /// - STRUCT("")           -> "\00\00"
18154            /// - STRUCT("", "")       -> "\00\00"
18155            /// - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
18156            /// - STRUCT("A", "")      -> "A"
18157            /// - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
18158            /// - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
18159            ///
18160            /// Since null bytes are always escaped, this encoding can cause size
18161            /// blowup for encodings like `Int64.BigEndianBytes` that are likely to
18162            /// produce many such bytes.
18163            ///
18164            /// Sorted mode:
18165            ///
18166            /// - Fields are encoded in sorted mode.
18167            /// - All values supported by the field encodings are allowed
18168            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
18169            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
18170            ///
18171            /// Distinct mode:
18172            ///
18173            /// - Fields are encoded in distinct mode.
18174            /// - All values supported by the field encodings are allowed.
18175            #[derive(Clone, Default, PartialEq)]
18176            #[non_exhaustive]
18177            pub struct OrderedCodeBytes {
18178                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18179            }
18180
18181            impl OrderedCodeBytes {
18182                /// Creates a new default instance.
18183                pub fn new() -> Self {
18184                    std::default::Default::default()
18185                }
18186            }
18187
18188            impl wkt::message::Message for OrderedCodeBytes {
18189                fn typename() -> &'static str {
18190                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes"
18191                }
18192            }
18193
18194            /// Which encoding to use.
18195            #[derive(Clone, Debug, PartialEq)]
18196            #[non_exhaustive]
18197            pub enum Encoding {
18198                /// Use `Singleton` encoding.
18199                Singleton(std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>),
18200                /// Use `DelimitedBytes` encoding.
18201                DelimitedBytes(
18202                    std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
18203                ),
18204                /// User `OrderedCodeBytes` encoding.
18205                OrderedCodeBytes(
18206                    std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
18207                ),
18208            }
18209        }
18210    }
18211
18212    /// A protobuf message type.
18213    /// Values of type `Proto` are stored in `Value.bytes_value`.
18214    #[derive(Clone, Default, PartialEq)]
18215    #[non_exhaustive]
18216    pub struct Proto {
18217        /// The ID of the schema bundle that this proto is defined in.
18218        pub schema_bundle_id: std::string::String,
18219
18220        /// The fully qualified name of the protobuf message, including package. In
18221        /// the format of "foo.bar.Message".
18222        pub message_name: std::string::String,
18223
18224        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18225    }
18226
18227    impl Proto {
18228        /// Creates a new default instance.
18229        pub fn new() -> Self {
18230            std::default::Default::default()
18231        }
18232
18233        /// Sets the value of [schema_bundle_id][crate::model::r#type::Proto::schema_bundle_id].
18234        ///
18235        /// # Example
18236        /// ```ignore,no_run
18237        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
18238        /// let x = Proto::new().set_schema_bundle_id("example");
18239        /// ```
18240        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
18241            mut self,
18242            v: T,
18243        ) -> Self {
18244            self.schema_bundle_id = v.into();
18245            self
18246        }
18247
18248        /// Sets the value of [message_name][crate::model::r#type::Proto::message_name].
18249        ///
18250        /// # Example
18251        /// ```ignore,no_run
18252        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
18253        /// let x = Proto::new().set_message_name("example");
18254        /// ```
18255        pub fn set_message_name<T: std::convert::Into<std::string::String>>(
18256            mut self,
18257            v: T,
18258        ) -> Self {
18259            self.message_name = v.into();
18260            self
18261        }
18262    }
18263
18264    impl wkt::message::Message for Proto {
18265        fn typename() -> &'static str {
18266            "type.googleapis.com/google.bigtable.admin.v2.Type.Proto"
18267        }
18268    }
18269
18270    /// A protobuf enum type.
18271    /// Values of type `Enum` are stored in `Value.int_value`.
18272    #[derive(Clone, Default, PartialEq)]
18273    #[non_exhaustive]
18274    pub struct Enum {
18275        /// The ID of the schema bundle that this enum is defined in.
18276        pub schema_bundle_id: std::string::String,
18277
18278        /// The fully qualified name of the protobuf enum message, including package.
18279        /// In the format of "foo.bar.EnumMessage".
18280        pub enum_name: std::string::String,
18281
18282        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18283    }
18284
18285    impl Enum {
18286        /// Creates a new default instance.
18287        pub fn new() -> Self {
18288            std::default::Default::default()
18289        }
18290
18291        /// Sets the value of [schema_bundle_id][crate::model::r#type::Enum::schema_bundle_id].
18292        ///
18293        /// # Example
18294        /// ```ignore,no_run
18295        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
18296        /// let x = Enum::new().set_schema_bundle_id("example");
18297        /// ```
18298        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
18299            mut self,
18300            v: T,
18301        ) -> Self {
18302            self.schema_bundle_id = v.into();
18303            self
18304        }
18305
18306        /// Sets the value of [enum_name][crate::model::r#type::Enum::enum_name].
18307        ///
18308        /// # Example
18309        /// ```ignore,no_run
18310        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
18311        /// let x = Enum::new().set_enum_name("example");
18312        /// ```
18313        pub fn set_enum_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18314            self.enum_name = v.into();
18315            self
18316        }
18317    }
18318
18319    impl wkt::message::Message for Enum {
18320        fn typename() -> &'static str {
18321            "type.googleapis.com/google.bigtable.admin.v2.Type.Enum"
18322        }
18323    }
18324
18325    /// An ordered list of elements of a given type.
18326    /// Values of type `Array` are stored in `Value.array_value`.
18327    #[derive(Clone, Default, PartialEq)]
18328    #[non_exhaustive]
18329    pub struct Array {
18330        /// The type of the elements in the array. This must not be `Array`.
18331        pub element_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18332
18333        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18334    }
18335
18336    impl Array {
18337        /// Creates a new default instance.
18338        pub fn new() -> Self {
18339            std::default::Default::default()
18340        }
18341
18342        /// Sets the value of [element_type][crate::model::r#type::Array::element_type].
18343        ///
18344        /// # Example
18345        /// ```ignore,no_run
18346        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
18347        /// use google_cloud_bigtable_admin_v2::model::Type;
18348        /// let x = Array::new().set_element_type(Type::default()/* use setters */);
18349        /// ```
18350        pub fn set_element_type<T>(mut self, v: T) -> Self
18351        where
18352            T: std::convert::Into<crate::model::Type>,
18353        {
18354            self.element_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18355            self
18356        }
18357
18358        /// Sets or clears the value of [element_type][crate::model::r#type::Array::element_type].
18359        ///
18360        /// # Example
18361        /// ```ignore,no_run
18362        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
18363        /// use google_cloud_bigtable_admin_v2::model::Type;
18364        /// let x = Array::new().set_or_clear_element_type(Some(Type::default()/* use setters */));
18365        /// let x = Array::new().set_or_clear_element_type(None::<Type>);
18366        /// ```
18367        pub fn set_or_clear_element_type<T>(mut self, v: std::option::Option<T>) -> Self
18368        where
18369            T: std::convert::Into<crate::model::Type>,
18370        {
18371            self.element_type = v.map(|x| std::boxed::Box::new(x.into()));
18372            self
18373        }
18374    }
18375
18376    impl wkt::message::Message for Array {
18377        fn typename() -> &'static str {
18378            "type.googleapis.com/google.bigtable.admin.v2.Type.Array"
18379        }
18380    }
18381
18382    /// A mapping of keys to values of a given type.
18383    /// Values of type `Map` are stored in a `Value.array_value` where each entry
18384    /// is another `Value.array_value` with two elements (the key and the value,
18385    /// in that order).
18386    /// Normally encoded Map values won't have repeated keys, however, clients are
18387    /// expected to handle the case in which they do. If the same key appears
18388    /// multiple times, the _last_ value takes precedence.
18389    #[derive(Clone, Default, PartialEq)]
18390    #[non_exhaustive]
18391    pub struct Map {
18392        /// The type of a map key.
18393        /// Only `Bytes`, `String`, and `Int64` are allowed as key types.
18394        pub key_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18395
18396        /// The type of the values in a map.
18397        pub value_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18398
18399        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18400    }
18401
18402    impl Map {
18403        /// Creates a new default instance.
18404        pub fn new() -> Self {
18405            std::default::Default::default()
18406        }
18407
18408        /// Sets the value of [key_type][crate::model::r#type::Map::key_type].
18409        ///
18410        /// # Example
18411        /// ```ignore,no_run
18412        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18413        /// use google_cloud_bigtable_admin_v2::model::Type;
18414        /// let x = Map::new().set_key_type(Type::default()/* use setters */);
18415        /// ```
18416        pub fn set_key_type<T>(mut self, v: T) -> Self
18417        where
18418            T: std::convert::Into<crate::model::Type>,
18419        {
18420            self.key_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18421            self
18422        }
18423
18424        /// Sets or clears the value of [key_type][crate::model::r#type::Map::key_type].
18425        ///
18426        /// # Example
18427        /// ```ignore,no_run
18428        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18429        /// use google_cloud_bigtable_admin_v2::model::Type;
18430        /// let x = Map::new().set_or_clear_key_type(Some(Type::default()/* use setters */));
18431        /// let x = Map::new().set_or_clear_key_type(None::<Type>);
18432        /// ```
18433        pub fn set_or_clear_key_type<T>(mut self, v: std::option::Option<T>) -> Self
18434        where
18435            T: std::convert::Into<crate::model::Type>,
18436        {
18437            self.key_type = v.map(|x| std::boxed::Box::new(x.into()));
18438            self
18439        }
18440
18441        /// Sets the value of [value_type][crate::model::r#type::Map::value_type].
18442        ///
18443        /// # Example
18444        /// ```ignore,no_run
18445        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18446        /// use google_cloud_bigtable_admin_v2::model::Type;
18447        /// let x = Map::new().set_value_type(Type::default()/* use setters */);
18448        /// ```
18449        pub fn set_value_type<T>(mut self, v: T) -> Self
18450        where
18451            T: std::convert::Into<crate::model::Type>,
18452        {
18453            self.value_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18454            self
18455        }
18456
18457        /// Sets or clears the value of [value_type][crate::model::r#type::Map::value_type].
18458        ///
18459        /// # Example
18460        /// ```ignore,no_run
18461        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18462        /// use google_cloud_bigtable_admin_v2::model::Type;
18463        /// let x = Map::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
18464        /// let x = Map::new().set_or_clear_value_type(None::<Type>);
18465        /// ```
18466        pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
18467        where
18468            T: std::convert::Into<crate::model::Type>,
18469        {
18470            self.value_type = v.map(|x| std::boxed::Box::new(x.into()));
18471            self
18472        }
18473    }
18474
18475    impl wkt::message::Message for Map {
18476        fn typename() -> &'static str {
18477            "type.googleapis.com/google.bigtable.admin.v2.Type.Map"
18478        }
18479    }
18480
18481    /// A value that combines incremental updates into a summarized value.
18482    ///
18483    /// Data is never directly written or read using type `Aggregate`. Writes will
18484    /// provide either the `input_type` or `state_type`, and reads will always
18485    /// return the `state_type` .
18486    #[derive(Clone, Default, PartialEq)]
18487    #[non_exhaustive]
18488    pub struct Aggregate {
18489        /// Type of the inputs that are accumulated by this `Aggregate`, which must
18490        /// specify a full encoding.
18491        /// Use `AddInput` mutations to accumulate new inputs.
18492        pub input_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18493
18494        /// Output only. Type that holds the internal accumulator state for the
18495        /// `Aggregate`. This is a function of the `input_type` and `aggregator`
18496        /// chosen, and will always specify a full encoding.
18497        pub state_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18498
18499        /// Which aggregator function to use. The configured types must match.
18500        pub aggregator: std::option::Option<crate::model::r#type::aggregate::Aggregator>,
18501
18502        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18503    }
18504
18505    impl Aggregate {
18506        /// Creates a new default instance.
18507        pub fn new() -> Self {
18508            std::default::Default::default()
18509        }
18510
18511        /// Sets the value of [input_type][crate::model::r#type::Aggregate::input_type].
18512        ///
18513        /// # Example
18514        /// ```ignore,no_run
18515        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18516        /// use google_cloud_bigtable_admin_v2::model::Type;
18517        /// let x = Aggregate::new().set_input_type(Type::default()/* use setters */);
18518        /// ```
18519        pub fn set_input_type<T>(mut self, v: T) -> Self
18520        where
18521            T: std::convert::Into<crate::model::Type>,
18522        {
18523            self.input_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18524            self
18525        }
18526
18527        /// Sets or clears the value of [input_type][crate::model::r#type::Aggregate::input_type].
18528        ///
18529        /// # Example
18530        /// ```ignore,no_run
18531        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18532        /// use google_cloud_bigtable_admin_v2::model::Type;
18533        /// let x = Aggregate::new().set_or_clear_input_type(Some(Type::default()/* use setters */));
18534        /// let x = Aggregate::new().set_or_clear_input_type(None::<Type>);
18535        /// ```
18536        pub fn set_or_clear_input_type<T>(mut self, v: std::option::Option<T>) -> Self
18537        where
18538            T: std::convert::Into<crate::model::Type>,
18539        {
18540            self.input_type = v.map(|x| std::boxed::Box::new(x.into()));
18541            self
18542        }
18543
18544        /// Sets the value of [state_type][crate::model::r#type::Aggregate::state_type].
18545        ///
18546        /// # Example
18547        /// ```ignore,no_run
18548        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18549        /// use google_cloud_bigtable_admin_v2::model::Type;
18550        /// let x = Aggregate::new().set_state_type(Type::default()/* use setters */);
18551        /// ```
18552        pub fn set_state_type<T>(mut self, v: T) -> Self
18553        where
18554            T: std::convert::Into<crate::model::Type>,
18555        {
18556            self.state_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18557            self
18558        }
18559
18560        /// Sets or clears the value of [state_type][crate::model::r#type::Aggregate::state_type].
18561        ///
18562        /// # Example
18563        /// ```ignore,no_run
18564        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18565        /// use google_cloud_bigtable_admin_v2::model::Type;
18566        /// let x = Aggregate::new().set_or_clear_state_type(Some(Type::default()/* use setters */));
18567        /// let x = Aggregate::new().set_or_clear_state_type(None::<Type>);
18568        /// ```
18569        pub fn set_or_clear_state_type<T>(mut self, v: std::option::Option<T>) -> Self
18570        where
18571            T: std::convert::Into<crate::model::Type>,
18572        {
18573            self.state_type = v.map(|x| std::boxed::Box::new(x.into()));
18574            self
18575        }
18576
18577        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator].
18578        ///
18579        /// Note that all the setters affecting `aggregator` are mutually
18580        /// exclusive.
18581        ///
18582        /// # Example
18583        /// ```ignore,no_run
18584        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18585        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
18586        /// let x = Aggregate::new().set_aggregator(Some(
18587        ///     google_cloud_bigtable_admin_v2::model::r#type::aggregate::Aggregator::Sum(Sum::default().into())));
18588        /// ```
18589        pub fn set_aggregator<
18590            T: std::convert::Into<std::option::Option<crate::model::r#type::aggregate::Aggregator>>,
18591        >(
18592            mut self,
18593            v: T,
18594        ) -> Self {
18595            self.aggregator = v.into();
18596            self
18597        }
18598
18599        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18600        /// if it holds a `Sum`, `None` if the field is not set or
18601        /// holds a different branch.
18602        pub fn sum(
18603            &self,
18604        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Sum>> {
18605            #[allow(unreachable_patterns)]
18606            self.aggregator.as_ref().and_then(|v| match v {
18607                crate::model::r#type::aggregate::Aggregator::Sum(v) => std::option::Option::Some(v),
18608                _ => std::option::Option::None,
18609            })
18610        }
18611
18612        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18613        /// to hold a `Sum`.
18614        ///
18615        /// Note that all the setters affecting `aggregator` are
18616        /// mutually exclusive.
18617        ///
18618        /// # Example
18619        /// ```ignore,no_run
18620        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18621        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
18622        /// let x = Aggregate::new().set_sum(Sum::default()/* use setters */);
18623        /// assert!(x.sum().is_some());
18624        /// assert!(x.hllpp_unique_count().is_none());
18625        /// assert!(x.max().is_none());
18626        /// assert!(x.min().is_none());
18627        /// ```
18628        pub fn set_sum<
18629            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Sum>>,
18630        >(
18631            mut self,
18632            v: T,
18633        ) -> Self {
18634            self.aggregator = std::option::Option::Some(
18635                crate::model::r#type::aggregate::Aggregator::Sum(v.into()),
18636            );
18637            self
18638        }
18639
18640        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18641        /// if it holds a `HllppUniqueCount`, `None` if the field is not set or
18642        /// holds a different branch.
18643        pub fn hllpp_unique_count(
18644            &self,
18645        ) -> std::option::Option<
18646            &std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18647        > {
18648            #[allow(unreachable_patterns)]
18649            self.aggregator.as_ref().and_then(|v| match v {
18650                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v) => {
18651                    std::option::Option::Some(v)
18652                }
18653                _ => std::option::Option::None,
18654            })
18655        }
18656
18657        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18658        /// to hold a `HllppUniqueCount`.
18659        ///
18660        /// Note that all the setters affecting `aggregator` are
18661        /// mutually exclusive.
18662        ///
18663        /// # Example
18664        /// ```ignore,no_run
18665        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18666        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount;
18667        /// let x = Aggregate::new().set_hllpp_unique_count(HyperLogLogPlusPlusUniqueCount::default()/* use setters */);
18668        /// assert!(x.hllpp_unique_count().is_some());
18669        /// assert!(x.sum().is_none());
18670        /// assert!(x.max().is_none());
18671        /// assert!(x.min().is_none());
18672        /// ```
18673        pub fn set_hllpp_unique_count<
18674            T: std::convert::Into<
18675                    std::boxed::Box<
18676                        crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount,
18677                    >,
18678                >,
18679        >(
18680            mut self,
18681            v: T,
18682        ) -> Self {
18683            self.aggregator = std::option::Option::Some(
18684                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v.into()),
18685            );
18686            self
18687        }
18688
18689        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18690        /// if it holds a `Max`, `None` if the field is not set or
18691        /// holds a different branch.
18692        pub fn max(
18693            &self,
18694        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Max>> {
18695            #[allow(unreachable_patterns)]
18696            self.aggregator.as_ref().and_then(|v| match v {
18697                crate::model::r#type::aggregate::Aggregator::Max(v) => std::option::Option::Some(v),
18698                _ => std::option::Option::None,
18699            })
18700        }
18701
18702        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18703        /// to hold a `Max`.
18704        ///
18705        /// Note that all the setters affecting `aggregator` are
18706        /// mutually exclusive.
18707        ///
18708        /// # Example
18709        /// ```ignore,no_run
18710        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18711        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Max;
18712        /// let x = Aggregate::new().set_max(Max::default()/* use setters */);
18713        /// assert!(x.max().is_some());
18714        /// assert!(x.sum().is_none());
18715        /// assert!(x.hllpp_unique_count().is_none());
18716        /// assert!(x.min().is_none());
18717        /// ```
18718        pub fn set_max<
18719            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Max>>,
18720        >(
18721            mut self,
18722            v: T,
18723        ) -> Self {
18724            self.aggregator = std::option::Option::Some(
18725                crate::model::r#type::aggregate::Aggregator::Max(v.into()),
18726            );
18727            self
18728        }
18729
18730        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18731        /// if it holds a `Min`, `None` if the field is not set or
18732        /// holds a different branch.
18733        pub fn min(
18734            &self,
18735        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Min>> {
18736            #[allow(unreachable_patterns)]
18737            self.aggregator.as_ref().and_then(|v| match v {
18738                crate::model::r#type::aggregate::Aggregator::Min(v) => std::option::Option::Some(v),
18739                _ => std::option::Option::None,
18740            })
18741        }
18742
18743        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18744        /// to hold a `Min`.
18745        ///
18746        /// Note that all the setters affecting `aggregator` are
18747        /// mutually exclusive.
18748        ///
18749        /// # Example
18750        /// ```ignore,no_run
18751        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18752        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Min;
18753        /// let x = Aggregate::new().set_min(Min::default()/* use setters */);
18754        /// assert!(x.min().is_some());
18755        /// assert!(x.sum().is_none());
18756        /// assert!(x.hllpp_unique_count().is_none());
18757        /// assert!(x.max().is_none());
18758        /// ```
18759        pub fn set_min<
18760            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Min>>,
18761        >(
18762            mut self,
18763            v: T,
18764        ) -> Self {
18765            self.aggregator = std::option::Option::Some(
18766                crate::model::r#type::aggregate::Aggregator::Min(v.into()),
18767            );
18768            self
18769        }
18770    }
18771
18772    impl wkt::message::Message for Aggregate {
18773        fn typename() -> &'static str {
18774            "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate"
18775        }
18776    }
18777
18778    /// Defines additional types related to [Aggregate].
18779    pub mod aggregate {
18780        #[allow(unused_imports)]
18781        use super::*;
18782
18783        /// Computes the sum of the input values.
18784        /// Allowed input: `Int64`
18785        /// State: same as input
18786        #[derive(Clone, Default, PartialEq)]
18787        #[non_exhaustive]
18788        pub struct Sum {
18789            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18790        }
18791
18792        impl Sum {
18793            /// Creates a new default instance.
18794            pub fn new() -> Self {
18795                std::default::Default::default()
18796            }
18797        }
18798
18799        impl wkt::message::Message for Sum {
18800            fn typename() -> &'static str {
18801                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Sum"
18802            }
18803        }
18804
18805        /// Computes the max of the input values.
18806        /// Allowed input: `Int64`
18807        /// State: same as input
18808        #[derive(Clone, Default, PartialEq)]
18809        #[non_exhaustive]
18810        pub struct Max {
18811            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18812        }
18813
18814        impl Max {
18815            /// Creates a new default instance.
18816            pub fn new() -> Self {
18817                std::default::Default::default()
18818            }
18819        }
18820
18821        impl wkt::message::Message for Max {
18822            fn typename() -> &'static str {
18823                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Max"
18824            }
18825        }
18826
18827        /// Computes the min of the input values.
18828        /// Allowed input: `Int64`
18829        /// State: same as input
18830        #[derive(Clone, Default, PartialEq)]
18831        #[non_exhaustive]
18832        pub struct Min {
18833            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18834        }
18835
18836        impl Min {
18837            /// Creates a new default instance.
18838            pub fn new() -> Self {
18839                std::default::Default::default()
18840            }
18841        }
18842
18843        impl wkt::message::Message for Min {
18844            fn typename() -> &'static str {
18845                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Min"
18846            }
18847        }
18848
18849        /// Computes an approximate unique count over the input values. When using
18850        /// raw data as input, be careful to use a consistent encoding. Otherwise
18851        /// the same value encoded differently could count more than once, or two
18852        /// distinct values could count as identical.
18853        /// Input: Any, or omit for Raw
18854        /// State: TBD
18855        /// Special state conversions: `Int64` (the unique count estimate)
18856        #[derive(Clone, Default, PartialEq)]
18857        #[non_exhaustive]
18858        pub struct HyperLogLogPlusPlusUniqueCount {
18859            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18860        }
18861
18862        impl HyperLogLogPlusPlusUniqueCount {
18863            /// Creates a new default instance.
18864            pub fn new() -> Self {
18865                std::default::Default::default()
18866            }
18867        }
18868
18869        impl wkt::message::Message for HyperLogLogPlusPlusUniqueCount {
18870            fn typename() -> &'static str {
18871                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount"
18872            }
18873        }
18874
18875        /// Which aggregator function to use. The configured types must match.
18876        #[derive(Clone, Debug, PartialEq)]
18877        #[non_exhaustive]
18878        pub enum Aggregator {
18879            /// Sum aggregator.
18880            Sum(std::boxed::Box<crate::model::r#type::aggregate::Sum>),
18881            /// HyperLogLogPlusPlusUniqueCount aggregator.
18882            HllppUniqueCount(
18883                std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18884            ),
18885            /// Max aggregator.
18886            Max(std::boxed::Box<crate::model::r#type::aggregate::Max>),
18887            /// Min aggregator.
18888            Min(std::boxed::Box<crate::model::r#type::aggregate::Min>),
18889        }
18890    }
18891
18892    /// The kind of type that this represents.
18893    #[derive(Clone, Debug, PartialEq)]
18894    #[non_exhaustive]
18895    pub enum Kind {
18896        /// Bytes
18897        BytesType(std::boxed::Box<crate::model::r#type::Bytes>),
18898        /// String
18899        StringType(std::boxed::Box<crate::model::r#type::String>),
18900        /// Int64
18901        Int64Type(std::boxed::Box<crate::model::r#type::Int64>),
18902        /// Float32
18903        Float32Type(std::boxed::Box<crate::model::r#type::Float32>),
18904        /// Float64
18905        Float64Type(std::boxed::Box<crate::model::r#type::Float64>),
18906        /// Bool
18907        BoolType(std::boxed::Box<crate::model::r#type::Bool>),
18908        /// Timestamp
18909        TimestampType(std::boxed::Box<crate::model::r#type::Timestamp>),
18910        /// Date
18911        DateType(std::boxed::Box<crate::model::r#type::Date>),
18912        /// Aggregate
18913        AggregateType(std::boxed::Box<crate::model::r#type::Aggregate>),
18914        /// Struct
18915        StructType(std::boxed::Box<crate::model::r#type::Struct>),
18916        /// Array
18917        ArrayType(std::boxed::Box<crate::model::r#type::Array>),
18918        /// Map
18919        MapType(std::boxed::Box<crate::model::r#type::Map>),
18920        /// Proto
18921        ProtoType(std::boxed::Box<crate::model::r#type::Proto>),
18922        /// Enum
18923        EnumType(std::boxed::Box<crate::model::r#type::Enum>),
18924    }
18925}
18926
18927/// Storage media types for persisting Bigtable data.
18928///
18929/// # Working with unknown values
18930///
18931/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18932/// additional enum variants at any time. Adding new variants is not considered
18933/// a breaking change. Applications should write their code in anticipation of:
18934///
18935/// - New values appearing in future releases of the client library, **and**
18936/// - New values received dynamically, without application changes.
18937///
18938/// Please consult the [Working with enums] section in the user guide for some
18939/// guidelines.
18940///
18941/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18942#[derive(Clone, Debug, PartialEq)]
18943#[non_exhaustive]
18944pub enum StorageType {
18945    /// The user did not specify a storage type.
18946    Unspecified,
18947    /// Flash (SSD) storage should be used.
18948    Ssd,
18949    /// Magnetic drive (HDD) storage should be used.
18950    Hdd,
18951    /// If set, the enum was initialized with an unknown value.
18952    ///
18953    /// Applications can examine the value using [StorageType::value] or
18954    /// [StorageType::name].
18955    UnknownValue(storage_type::UnknownValue),
18956}
18957
18958#[doc(hidden)]
18959pub mod storage_type {
18960    #[allow(unused_imports)]
18961    use super::*;
18962    #[derive(Clone, Debug, PartialEq)]
18963    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18964}
18965
18966impl StorageType {
18967    /// Gets the enum value.
18968    ///
18969    /// Returns `None` if the enum contains an unknown value deserialized from
18970    /// the string representation of enums.
18971    pub fn value(&self) -> std::option::Option<i32> {
18972        match self {
18973            Self::Unspecified => std::option::Option::Some(0),
18974            Self::Ssd => std::option::Option::Some(1),
18975            Self::Hdd => std::option::Option::Some(2),
18976            Self::UnknownValue(u) => u.0.value(),
18977        }
18978    }
18979
18980    /// Gets the enum value as a string.
18981    ///
18982    /// Returns `None` if the enum contains an unknown value deserialized from
18983    /// the integer representation of enums.
18984    pub fn name(&self) -> std::option::Option<&str> {
18985        match self {
18986            Self::Unspecified => std::option::Option::Some("STORAGE_TYPE_UNSPECIFIED"),
18987            Self::Ssd => std::option::Option::Some("SSD"),
18988            Self::Hdd => std::option::Option::Some("HDD"),
18989            Self::UnknownValue(u) => u.0.name(),
18990        }
18991    }
18992}
18993
18994impl std::default::Default for StorageType {
18995    fn default() -> Self {
18996        use std::convert::From;
18997        Self::from(0)
18998    }
18999}
19000
19001impl std::fmt::Display for StorageType {
19002    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19003        wkt::internal::display_enum(f, self.name(), self.value())
19004    }
19005}
19006
19007impl std::convert::From<i32> for StorageType {
19008    fn from(value: i32) -> Self {
19009        match value {
19010            0 => Self::Unspecified,
19011            1 => Self::Ssd,
19012            2 => Self::Hdd,
19013            _ => Self::UnknownValue(storage_type::UnknownValue(
19014                wkt::internal::UnknownEnumValue::Integer(value),
19015            )),
19016        }
19017    }
19018}
19019
19020impl std::convert::From<&str> for StorageType {
19021    fn from(value: &str) -> Self {
19022        use std::string::ToString;
19023        match value {
19024            "STORAGE_TYPE_UNSPECIFIED" => Self::Unspecified,
19025            "SSD" => Self::Ssd,
19026            "HDD" => Self::Hdd,
19027            _ => Self::UnknownValue(storage_type::UnknownValue(
19028                wkt::internal::UnknownEnumValue::String(value.to_string()),
19029            )),
19030        }
19031    }
19032}
19033
19034impl serde::ser::Serialize for StorageType {
19035    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19036    where
19037        S: serde::Serializer,
19038    {
19039        match self {
19040            Self::Unspecified => serializer.serialize_i32(0),
19041            Self::Ssd => serializer.serialize_i32(1),
19042            Self::Hdd => serializer.serialize_i32(2),
19043            Self::UnknownValue(u) => u.0.serialize(serializer),
19044        }
19045    }
19046}
19047
19048impl<'de> serde::de::Deserialize<'de> for StorageType {
19049    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19050    where
19051        D: serde::Deserializer<'de>,
19052    {
19053        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageType>::new(
19054            ".google.bigtable.admin.v2.StorageType",
19055        ))
19056    }
19057}
19058
19059/// Indicates the type of the restore source.
19060///
19061/// # Working with unknown values
19062///
19063/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19064/// additional enum variants at any time. Adding new variants is not considered
19065/// a breaking change. Applications should write their code in anticipation of:
19066///
19067/// - New values appearing in future releases of the client library, **and**
19068/// - New values received dynamically, without application changes.
19069///
19070/// Please consult the [Working with enums] section in the user guide for some
19071/// guidelines.
19072///
19073/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
19074#[derive(Clone, Debug, PartialEq)]
19075#[non_exhaustive]
19076pub enum RestoreSourceType {
19077    /// No restore associated.
19078    Unspecified,
19079    /// A backup was used as the source of the restore.
19080    Backup,
19081    /// If set, the enum was initialized with an unknown value.
19082    ///
19083    /// Applications can examine the value using [RestoreSourceType::value] or
19084    /// [RestoreSourceType::name].
19085    UnknownValue(restore_source_type::UnknownValue),
19086}
19087
19088#[doc(hidden)]
19089pub mod restore_source_type {
19090    #[allow(unused_imports)]
19091    use super::*;
19092    #[derive(Clone, Debug, PartialEq)]
19093    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19094}
19095
19096impl RestoreSourceType {
19097    /// Gets the enum value.
19098    ///
19099    /// Returns `None` if the enum contains an unknown value deserialized from
19100    /// the string representation of enums.
19101    pub fn value(&self) -> std::option::Option<i32> {
19102        match self {
19103            Self::Unspecified => std::option::Option::Some(0),
19104            Self::Backup => std::option::Option::Some(1),
19105            Self::UnknownValue(u) => u.0.value(),
19106        }
19107    }
19108
19109    /// Gets the enum value as a string.
19110    ///
19111    /// Returns `None` if the enum contains an unknown value deserialized from
19112    /// the integer representation of enums.
19113    pub fn name(&self) -> std::option::Option<&str> {
19114        match self {
19115            Self::Unspecified => std::option::Option::Some("RESTORE_SOURCE_TYPE_UNSPECIFIED"),
19116            Self::Backup => std::option::Option::Some("BACKUP"),
19117            Self::UnknownValue(u) => u.0.name(),
19118        }
19119    }
19120}
19121
19122impl std::default::Default for RestoreSourceType {
19123    fn default() -> Self {
19124        use std::convert::From;
19125        Self::from(0)
19126    }
19127}
19128
19129impl std::fmt::Display for RestoreSourceType {
19130    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19131        wkt::internal::display_enum(f, self.name(), self.value())
19132    }
19133}
19134
19135impl std::convert::From<i32> for RestoreSourceType {
19136    fn from(value: i32) -> Self {
19137        match value {
19138            0 => Self::Unspecified,
19139            1 => Self::Backup,
19140            _ => Self::UnknownValue(restore_source_type::UnknownValue(
19141                wkt::internal::UnknownEnumValue::Integer(value),
19142            )),
19143        }
19144    }
19145}
19146
19147impl std::convert::From<&str> for RestoreSourceType {
19148    fn from(value: &str) -> Self {
19149        use std::string::ToString;
19150        match value {
19151            "RESTORE_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
19152            "BACKUP" => Self::Backup,
19153            _ => Self::UnknownValue(restore_source_type::UnknownValue(
19154                wkt::internal::UnknownEnumValue::String(value.to_string()),
19155            )),
19156        }
19157    }
19158}
19159
19160impl serde::ser::Serialize for RestoreSourceType {
19161    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19162    where
19163        S: serde::Serializer,
19164    {
19165        match self {
19166            Self::Unspecified => serializer.serialize_i32(0),
19167            Self::Backup => serializer.serialize_i32(1),
19168            Self::UnknownValue(u) => u.0.serialize(serializer),
19169        }
19170    }
19171}
19172
19173impl<'de> serde::de::Deserialize<'de> for RestoreSourceType {
19174    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19175    where
19176        D: serde::Deserializer<'de>,
19177    {
19178        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RestoreSourceType>::new(
19179            ".google.bigtable.admin.v2.RestoreSourceType",
19180        ))
19181    }
19182}