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::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate iam_v1;
25extern crate lazy_static;
26extern crate longrunning;
27extern crate lro;
28extern crate reqwest;
29extern crate 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    pub fn new() -> Self {
69        std::default::Default::default()
70    }
71
72    /// Sets the value of [parent][crate::model::CreateInstanceRequest::parent].
73    ///
74    /// # Example
75    /// ```ignore,no_run
76    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
77    /// let x = CreateInstanceRequest::new().set_parent("example");
78    /// ```
79    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
80        self.parent = v.into();
81        self
82    }
83
84    /// Sets the value of [instance_id][crate::model::CreateInstanceRequest::instance_id].
85    ///
86    /// # Example
87    /// ```ignore,no_run
88    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
89    /// let x = CreateInstanceRequest::new().set_instance_id("example");
90    /// ```
91    pub fn set_instance_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
92        self.instance_id = v.into();
93        self
94    }
95
96    /// Sets the value of [instance][crate::model::CreateInstanceRequest::instance].
97    ///
98    /// # Example
99    /// ```ignore,no_run
100    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
101    /// use google_cloud_bigtable_admin_v2::model::Instance;
102    /// let x = CreateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
103    /// ```
104    pub fn set_instance<T>(mut self, v: T) -> Self
105    where
106        T: std::convert::Into<crate::model::Instance>,
107    {
108        self.instance = std::option::Option::Some(v.into());
109        self
110    }
111
112    /// Sets or clears the value of [instance][crate::model::CreateInstanceRequest::instance].
113    ///
114    /// # Example
115    /// ```ignore,no_run
116    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
117    /// use google_cloud_bigtable_admin_v2::model::Instance;
118    /// let x = CreateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
119    /// let x = CreateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
120    /// ```
121    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
122    where
123        T: std::convert::Into<crate::model::Instance>,
124    {
125        self.instance = v.map(|x| x.into());
126        self
127    }
128
129    /// Sets the value of [clusters][crate::model::CreateInstanceRequest::clusters].
130    ///
131    /// # Example
132    /// ```ignore,no_run
133    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
134    /// use google_cloud_bigtable_admin_v2::model::Cluster;
135    /// let x = CreateInstanceRequest::new().set_clusters([
136    ///     ("key0", Cluster::default()/* use setters */),
137    ///     ("key1", Cluster::default()/* use (different) setters */),
138    /// ]);
139    /// ```
140    pub fn set_clusters<T, K, V>(mut self, v: T) -> Self
141    where
142        T: std::iter::IntoIterator<Item = (K, V)>,
143        K: std::convert::Into<std::string::String>,
144        V: std::convert::Into<crate::model::Cluster>,
145    {
146        use std::iter::Iterator;
147        self.clusters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
148        self
149    }
150}
151
152impl wkt::message::Message for CreateInstanceRequest {
153    fn typename() -> &'static str {
154        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceRequest"
155    }
156}
157
158/// Request message for BigtableInstanceAdmin.GetInstance.
159#[derive(Clone, Default, PartialEq)]
160#[non_exhaustive]
161pub struct GetInstanceRequest {
162    /// Required. The unique name of the requested instance. Values are of the form
163    /// `projects/{project}/instances/{instance}`.
164    pub name: std::string::String,
165
166    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
167}
168
169impl GetInstanceRequest {
170    pub fn new() -> Self {
171        std::default::Default::default()
172    }
173
174    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
175    ///
176    /// # Example
177    /// ```ignore,no_run
178    /// # use google_cloud_bigtable_admin_v2::model::GetInstanceRequest;
179    /// let x = GetInstanceRequest::new().set_name("example");
180    /// ```
181    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
182        self.name = v.into();
183        self
184    }
185}
186
187impl wkt::message::Message for GetInstanceRequest {
188    fn typename() -> &'static str {
189        "type.googleapis.com/google.bigtable.admin.v2.GetInstanceRequest"
190    }
191}
192
193/// Request message for BigtableInstanceAdmin.ListInstances.
194#[derive(Clone, Default, PartialEq)]
195#[non_exhaustive]
196pub struct ListInstancesRequest {
197    /// Required. The unique name of the project for which a list of instances is
198    /// requested. Values are of the form `projects/{project}`.
199    pub parent: std::string::String,
200
201    /// DEPRECATED: This field is unused and ignored.
202    pub page_token: std::string::String,
203
204    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
205}
206
207impl ListInstancesRequest {
208    pub fn new() -> Self {
209        std::default::Default::default()
210    }
211
212    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
213    ///
214    /// # Example
215    /// ```ignore,no_run
216    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
217    /// let x = ListInstancesRequest::new().set_parent("example");
218    /// ```
219    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
220        self.parent = v.into();
221        self
222    }
223
224    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
225    ///
226    /// # Example
227    /// ```ignore,no_run
228    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
229    /// let x = ListInstancesRequest::new().set_page_token("example");
230    /// ```
231    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
232        self.page_token = v.into();
233        self
234    }
235}
236
237impl wkt::message::Message for ListInstancesRequest {
238    fn typename() -> &'static str {
239        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesRequest"
240    }
241}
242
243/// Response message for BigtableInstanceAdmin.ListInstances.
244#[derive(Clone, Default, PartialEq)]
245#[non_exhaustive]
246pub struct ListInstancesResponse {
247    /// The list of requested instances.
248    pub instances: std::vec::Vec<crate::model::Instance>,
249
250    /// Locations from which Instance information could not be retrieved,
251    /// due to an outage or some other transient condition.
252    /// Instances whose Clusters are all in one of the failed locations
253    /// may be missing from `instances`, and Instances with at least one
254    /// Cluster in a failed location may only have partial information returned.
255    /// Values are of the form `projects/<project>/locations/<zone_id>`
256    pub failed_locations: std::vec::Vec<std::string::String>,
257
258    /// DEPRECATED: This field is unused and ignored.
259    pub next_page_token: std::string::String,
260
261    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
262}
263
264impl ListInstancesResponse {
265    pub fn new() -> Self {
266        std::default::Default::default()
267    }
268
269    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
270    ///
271    /// # Example
272    /// ```ignore,no_run
273    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
274    /// use google_cloud_bigtable_admin_v2::model::Instance;
275    /// let x = ListInstancesResponse::new()
276    ///     .set_instances([
277    ///         Instance::default()/* use setters */,
278    ///         Instance::default()/* use (different) setters */,
279    ///     ]);
280    /// ```
281    pub fn set_instances<T, V>(mut self, v: T) -> Self
282    where
283        T: std::iter::IntoIterator<Item = V>,
284        V: std::convert::Into<crate::model::Instance>,
285    {
286        use std::iter::Iterator;
287        self.instances = v.into_iter().map(|i| i.into()).collect();
288        self
289    }
290
291    /// Sets the value of [failed_locations][crate::model::ListInstancesResponse::failed_locations].
292    ///
293    /// # Example
294    /// ```ignore,no_run
295    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
296    /// let x = ListInstancesResponse::new().set_failed_locations(["a", "b", "c"]);
297    /// ```
298    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
299    where
300        T: std::iter::IntoIterator<Item = V>,
301        V: std::convert::Into<std::string::String>,
302    {
303        use std::iter::Iterator;
304        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
305        self
306    }
307
308    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
309    ///
310    /// # Example
311    /// ```ignore,no_run
312    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
313    /// let x = ListInstancesResponse::new().set_next_page_token("example");
314    /// ```
315    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
316        self.next_page_token = v.into();
317        self
318    }
319}
320
321impl wkt::message::Message for ListInstancesResponse {
322    fn typename() -> &'static str {
323        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesResponse"
324    }
325}
326
327/// Request message for BigtableInstanceAdmin.PartialUpdateInstance.
328#[derive(Clone, Default, PartialEq)]
329#[non_exhaustive]
330pub struct PartialUpdateInstanceRequest {
331    /// Required. The Instance which will (partially) replace the current value.
332    pub instance: std::option::Option<crate::model::Instance>,
333
334    /// Required. The subset of Instance fields which should be replaced.
335    /// Must be explicitly set.
336    pub update_mask: std::option::Option<wkt::FieldMask>,
337
338    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
339}
340
341impl PartialUpdateInstanceRequest {
342    pub fn new() -> Self {
343        std::default::Default::default()
344    }
345
346    /// Sets the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
347    ///
348    /// # Example
349    /// ```ignore,no_run
350    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
351    /// use google_cloud_bigtable_admin_v2::model::Instance;
352    /// let x = PartialUpdateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
353    /// ```
354    pub fn set_instance<T>(mut self, v: T) -> Self
355    where
356        T: std::convert::Into<crate::model::Instance>,
357    {
358        self.instance = std::option::Option::Some(v.into());
359        self
360    }
361
362    /// Sets or clears the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
363    ///
364    /// # Example
365    /// ```ignore,no_run
366    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
367    /// use google_cloud_bigtable_admin_v2::model::Instance;
368    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
369    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
370    /// ```
371    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
372    where
373        T: std::convert::Into<crate::model::Instance>,
374    {
375        self.instance = v.map(|x| x.into());
376        self
377    }
378
379    /// Sets the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
380    ///
381    /// # Example
382    /// ```ignore,no_run
383    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
384    /// use wkt::FieldMask;
385    /// let x = PartialUpdateInstanceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
386    /// ```
387    pub fn set_update_mask<T>(mut self, v: T) -> Self
388    where
389        T: std::convert::Into<wkt::FieldMask>,
390    {
391        self.update_mask = std::option::Option::Some(v.into());
392        self
393    }
394
395    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
396    ///
397    /// # Example
398    /// ```ignore,no_run
399    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
400    /// use wkt::FieldMask;
401    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
402    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
403    /// ```
404    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
405    where
406        T: std::convert::Into<wkt::FieldMask>,
407    {
408        self.update_mask = v.map(|x| x.into());
409        self
410    }
411}
412
413impl wkt::message::Message for PartialUpdateInstanceRequest {
414    fn typename() -> &'static str {
415        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateInstanceRequest"
416    }
417}
418
419/// Request message for BigtableInstanceAdmin.DeleteInstance.
420#[derive(Clone, Default, PartialEq)]
421#[non_exhaustive]
422pub struct DeleteInstanceRequest {
423    /// Required. The unique name of the instance to be deleted.
424    /// Values are of the form `projects/{project}/instances/{instance}`.
425    pub name: std::string::String,
426
427    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
428}
429
430impl DeleteInstanceRequest {
431    pub fn new() -> Self {
432        std::default::Default::default()
433    }
434
435    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
436    ///
437    /// # Example
438    /// ```ignore,no_run
439    /// # use google_cloud_bigtable_admin_v2::model::DeleteInstanceRequest;
440    /// let x = DeleteInstanceRequest::new().set_name("example");
441    /// ```
442    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
443        self.name = v.into();
444        self
445    }
446}
447
448impl wkt::message::Message for DeleteInstanceRequest {
449    fn typename() -> &'static str {
450        "type.googleapis.com/google.bigtable.admin.v2.DeleteInstanceRequest"
451    }
452}
453
454/// Request message for BigtableInstanceAdmin.CreateCluster.
455#[derive(Clone, Default, PartialEq)]
456#[non_exhaustive]
457pub struct CreateClusterRequest {
458    /// Required. The unique name of the instance in which to create the new
459    /// cluster. Values are of the form `projects/{project}/instances/{instance}`.
460    pub parent: std::string::String,
461
462    /// Required. The ID to be used when referring to the new cluster within its
463    /// instance, e.g., just `mycluster` rather than
464    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
465    pub cluster_id: std::string::String,
466
467    /// Required. The cluster to be created.
468    /// Fields marked `OutputOnly` must be left blank.
469    pub cluster: std::option::Option<crate::model::Cluster>,
470
471    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
472}
473
474impl CreateClusterRequest {
475    pub fn new() -> Self {
476        std::default::Default::default()
477    }
478
479    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
480    ///
481    /// # Example
482    /// ```ignore,no_run
483    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
484    /// let x = CreateClusterRequest::new().set_parent("example");
485    /// ```
486    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
487        self.parent = v.into();
488        self
489    }
490
491    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
492    ///
493    /// # Example
494    /// ```ignore,no_run
495    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
496    /// let x = CreateClusterRequest::new().set_cluster_id("example");
497    /// ```
498    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
499        self.cluster_id = v.into();
500        self
501    }
502
503    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
504    ///
505    /// # Example
506    /// ```ignore,no_run
507    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
508    /// use google_cloud_bigtable_admin_v2::model::Cluster;
509    /// let x = CreateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
510    /// ```
511    pub fn set_cluster<T>(mut self, v: T) -> Self
512    where
513        T: std::convert::Into<crate::model::Cluster>,
514    {
515        self.cluster = std::option::Option::Some(v.into());
516        self
517    }
518
519    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
520    ///
521    /// # Example
522    /// ```ignore,no_run
523    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
524    /// use google_cloud_bigtable_admin_v2::model::Cluster;
525    /// let x = CreateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
526    /// let x = CreateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
527    /// ```
528    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
529    where
530        T: std::convert::Into<crate::model::Cluster>,
531    {
532        self.cluster = v.map(|x| x.into());
533        self
534    }
535}
536
537impl wkt::message::Message for CreateClusterRequest {
538    fn typename() -> &'static str {
539        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterRequest"
540    }
541}
542
543/// Request message for BigtableInstanceAdmin.GetCluster.
544#[derive(Clone, Default, PartialEq)]
545#[non_exhaustive]
546pub struct GetClusterRequest {
547    /// Required. The unique name of the requested cluster. Values are of the form
548    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
549    pub name: std::string::String,
550
551    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
552}
553
554impl GetClusterRequest {
555    pub fn new() -> Self {
556        std::default::Default::default()
557    }
558
559    /// Sets the value of [name][crate::model::GetClusterRequest::name].
560    ///
561    /// # Example
562    /// ```ignore,no_run
563    /// # use google_cloud_bigtable_admin_v2::model::GetClusterRequest;
564    /// let x = GetClusterRequest::new().set_name("example");
565    /// ```
566    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
567        self.name = v.into();
568        self
569    }
570}
571
572impl wkt::message::Message for GetClusterRequest {
573    fn typename() -> &'static str {
574        "type.googleapis.com/google.bigtable.admin.v2.GetClusterRequest"
575    }
576}
577
578/// Request message for BigtableInstanceAdmin.ListClusters.
579#[derive(Clone, Default, PartialEq)]
580#[non_exhaustive]
581pub struct ListClustersRequest {
582    /// Required. The unique name of the instance for which a list of clusters is
583    /// requested. Values are of the form
584    /// `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list
585    /// Clusters for all Instances in a project, e.g.,
586    /// `projects/myproject/instances/-`.
587    pub parent: std::string::String,
588
589    /// DEPRECATED: This field is unused and ignored.
590    pub page_token: std::string::String,
591
592    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
593}
594
595impl ListClustersRequest {
596    pub fn new() -> Self {
597        std::default::Default::default()
598    }
599
600    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
601    ///
602    /// # Example
603    /// ```ignore,no_run
604    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
605    /// let x = ListClustersRequest::new().set_parent("example");
606    /// ```
607    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
608        self.parent = v.into();
609        self
610    }
611
612    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
613    ///
614    /// # Example
615    /// ```ignore,no_run
616    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
617    /// let x = ListClustersRequest::new().set_page_token("example");
618    /// ```
619    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
620        self.page_token = v.into();
621        self
622    }
623}
624
625impl wkt::message::Message for ListClustersRequest {
626    fn typename() -> &'static str {
627        "type.googleapis.com/google.bigtable.admin.v2.ListClustersRequest"
628    }
629}
630
631/// Response message for BigtableInstanceAdmin.ListClusters.
632#[derive(Clone, Default, PartialEq)]
633#[non_exhaustive]
634pub struct ListClustersResponse {
635    /// The list of requested clusters.
636    pub clusters: std::vec::Vec<crate::model::Cluster>,
637
638    /// Locations from which Cluster information could not be retrieved,
639    /// due to an outage or some other transient condition.
640    /// Clusters from these locations may be missing from `clusters`,
641    /// or may only have partial information returned.
642    /// Values are of the form `projects/<project>/locations/<zone_id>`
643    pub failed_locations: std::vec::Vec<std::string::String>,
644
645    /// DEPRECATED: This field is unused and ignored.
646    pub next_page_token: std::string::String,
647
648    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
649}
650
651impl ListClustersResponse {
652    pub fn new() -> Self {
653        std::default::Default::default()
654    }
655
656    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
657    ///
658    /// # Example
659    /// ```ignore,no_run
660    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
661    /// use google_cloud_bigtable_admin_v2::model::Cluster;
662    /// let x = ListClustersResponse::new()
663    ///     .set_clusters([
664    ///         Cluster::default()/* use setters */,
665    ///         Cluster::default()/* use (different) setters */,
666    ///     ]);
667    /// ```
668    pub fn set_clusters<T, V>(mut self, v: T) -> Self
669    where
670        T: std::iter::IntoIterator<Item = V>,
671        V: std::convert::Into<crate::model::Cluster>,
672    {
673        use std::iter::Iterator;
674        self.clusters = v.into_iter().map(|i| i.into()).collect();
675        self
676    }
677
678    /// Sets the value of [failed_locations][crate::model::ListClustersResponse::failed_locations].
679    ///
680    /// # Example
681    /// ```ignore,no_run
682    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
683    /// let x = ListClustersResponse::new().set_failed_locations(["a", "b", "c"]);
684    /// ```
685    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
686    where
687        T: std::iter::IntoIterator<Item = V>,
688        V: std::convert::Into<std::string::String>,
689    {
690        use std::iter::Iterator;
691        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
692        self
693    }
694
695    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
696    ///
697    /// # Example
698    /// ```ignore,no_run
699    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
700    /// let x = ListClustersResponse::new().set_next_page_token("example");
701    /// ```
702    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
703        self.next_page_token = v.into();
704        self
705    }
706}
707
708impl wkt::message::Message for ListClustersResponse {
709    fn typename() -> &'static str {
710        "type.googleapis.com/google.bigtable.admin.v2.ListClustersResponse"
711    }
712}
713
714/// Request message for BigtableInstanceAdmin.DeleteCluster.
715#[derive(Clone, Default, PartialEq)]
716#[non_exhaustive]
717pub struct DeleteClusterRequest {
718    /// Required. The unique name of the cluster to be deleted. Values are of the
719    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
720    pub name: std::string::String,
721
722    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
723}
724
725impl DeleteClusterRequest {
726    pub fn new() -> Self {
727        std::default::Default::default()
728    }
729
730    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
731    ///
732    /// # Example
733    /// ```ignore,no_run
734    /// # use google_cloud_bigtable_admin_v2::model::DeleteClusterRequest;
735    /// let x = DeleteClusterRequest::new().set_name("example");
736    /// ```
737    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
738        self.name = v.into();
739        self
740    }
741}
742
743impl wkt::message::Message for DeleteClusterRequest {
744    fn typename() -> &'static str {
745        "type.googleapis.com/google.bigtable.admin.v2.DeleteClusterRequest"
746    }
747}
748
749/// The metadata for the Operation returned by CreateInstance.
750#[derive(Clone, Default, PartialEq)]
751#[non_exhaustive]
752pub struct CreateInstanceMetadata {
753    /// The request that prompted the initiation of this CreateInstance operation.
754    pub original_request: std::option::Option<crate::model::CreateInstanceRequest>,
755
756    /// The time at which the original request was received.
757    pub request_time: std::option::Option<wkt::Timestamp>,
758
759    /// The time at which the operation failed or was completed successfully.
760    pub finish_time: std::option::Option<wkt::Timestamp>,
761
762    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
763}
764
765impl CreateInstanceMetadata {
766    pub fn new() -> Self {
767        std::default::Default::default()
768    }
769
770    /// Sets the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
771    ///
772    /// # Example
773    /// ```ignore,no_run
774    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
775    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
776    /// let x = CreateInstanceMetadata::new().set_original_request(CreateInstanceRequest::default()/* use setters */);
777    /// ```
778    pub fn set_original_request<T>(mut self, v: T) -> Self
779    where
780        T: std::convert::Into<crate::model::CreateInstanceRequest>,
781    {
782        self.original_request = std::option::Option::Some(v.into());
783        self
784    }
785
786    /// Sets or clears the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
787    ///
788    /// # Example
789    /// ```ignore,no_run
790    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
791    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
792    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(Some(CreateInstanceRequest::default()/* use setters */));
793    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(None::<CreateInstanceRequest>);
794    /// ```
795    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
796    where
797        T: std::convert::Into<crate::model::CreateInstanceRequest>,
798    {
799        self.original_request = v.map(|x| x.into());
800        self
801    }
802
803    /// Sets the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
804    ///
805    /// # Example
806    /// ```ignore,no_run
807    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
808    /// use wkt::Timestamp;
809    /// let x = CreateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
810    /// ```
811    pub fn set_request_time<T>(mut self, v: T) -> Self
812    where
813        T: std::convert::Into<wkt::Timestamp>,
814    {
815        self.request_time = std::option::Option::Some(v.into());
816        self
817    }
818
819    /// Sets or clears the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
820    ///
821    /// # Example
822    /// ```ignore,no_run
823    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
824    /// use wkt::Timestamp;
825    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
826    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
827    /// ```
828    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
829    where
830        T: std::convert::Into<wkt::Timestamp>,
831    {
832        self.request_time = v.map(|x| x.into());
833        self
834    }
835
836    /// Sets the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
837    ///
838    /// # Example
839    /// ```ignore,no_run
840    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
841    /// use wkt::Timestamp;
842    /// let x = CreateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
843    /// ```
844    pub fn set_finish_time<T>(mut self, v: T) -> Self
845    where
846        T: std::convert::Into<wkt::Timestamp>,
847    {
848        self.finish_time = std::option::Option::Some(v.into());
849        self
850    }
851
852    /// Sets or clears the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
853    ///
854    /// # Example
855    /// ```ignore,no_run
856    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
857    /// use wkt::Timestamp;
858    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
859    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
860    /// ```
861    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
862    where
863        T: std::convert::Into<wkt::Timestamp>,
864    {
865        self.finish_time = v.map(|x| x.into());
866        self
867    }
868}
869
870impl wkt::message::Message for CreateInstanceMetadata {
871    fn typename() -> &'static str {
872        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceMetadata"
873    }
874}
875
876/// The metadata for the Operation returned by UpdateInstance.
877#[derive(Clone, Default, PartialEq)]
878#[non_exhaustive]
879pub struct UpdateInstanceMetadata {
880    /// The request that prompted the initiation of this UpdateInstance operation.
881    pub original_request: std::option::Option<crate::model::PartialUpdateInstanceRequest>,
882
883    /// The time at which the original request was received.
884    pub request_time: std::option::Option<wkt::Timestamp>,
885
886    /// The time at which the operation failed or was completed successfully.
887    pub finish_time: std::option::Option<wkt::Timestamp>,
888
889    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
890}
891
892impl UpdateInstanceMetadata {
893    pub fn new() -> Self {
894        std::default::Default::default()
895    }
896
897    /// Sets the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
898    ///
899    /// # Example
900    /// ```ignore,no_run
901    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
902    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
903    /// let x = UpdateInstanceMetadata::new().set_original_request(PartialUpdateInstanceRequest::default()/* use setters */);
904    /// ```
905    pub fn set_original_request<T>(mut self, v: T) -> Self
906    where
907        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
908    {
909        self.original_request = std::option::Option::Some(v.into());
910        self
911    }
912
913    /// Sets or clears the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
914    ///
915    /// # Example
916    /// ```ignore,no_run
917    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
918    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
919    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(Some(PartialUpdateInstanceRequest::default()/* use setters */));
920    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(None::<PartialUpdateInstanceRequest>);
921    /// ```
922    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
923    where
924        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
925    {
926        self.original_request = v.map(|x| x.into());
927        self
928    }
929
930    /// Sets the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
931    ///
932    /// # Example
933    /// ```ignore,no_run
934    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
935    /// use wkt::Timestamp;
936    /// let x = UpdateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
937    /// ```
938    pub fn set_request_time<T>(mut self, v: T) -> Self
939    where
940        T: std::convert::Into<wkt::Timestamp>,
941    {
942        self.request_time = std::option::Option::Some(v.into());
943        self
944    }
945
946    /// Sets or clears the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
947    ///
948    /// # Example
949    /// ```ignore,no_run
950    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
951    /// use wkt::Timestamp;
952    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
953    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
954    /// ```
955    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
956    where
957        T: std::convert::Into<wkt::Timestamp>,
958    {
959        self.request_time = v.map(|x| x.into());
960        self
961    }
962
963    /// Sets the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
964    ///
965    /// # Example
966    /// ```ignore,no_run
967    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
968    /// use wkt::Timestamp;
969    /// let x = UpdateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
970    /// ```
971    pub fn set_finish_time<T>(mut self, v: T) -> Self
972    where
973        T: std::convert::Into<wkt::Timestamp>,
974    {
975        self.finish_time = std::option::Option::Some(v.into());
976        self
977    }
978
979    /// Sets or clears the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
980    ///
981    /// # Example
982    /// ```ignore,no_run
983    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
984    /// use wkt::Timestamp;
985    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
986    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
987    /// ```
988    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
989    where
990        T: std::convert::Into<wkt::Timestamp>,
991    {
992        self.finish_time = v.map(|x| x.into());
993        self
994    }
995}
996
997impl wkt::message::Message for UpdateInstanceMetadata {
998    fn typename() -> &'static str {
999        "type.googleapis.com/google.bigtable.admin.v2.UpdateInstanceMetadata"
1000    }
1001}
1002
1003/// The metadata for the Operation returned by CreateCluster.
1004#[derive(Clone, Default, PartialEq)]
1005#[non_exhaustive]
1006pub struct CreateClusterMetadata {
1007    /// The request that prompted the initiation of this CreateCluster operation.
1008    pub original_request: std::option::Option<crate::model::CreateClusterRequest>,
1009
1010    /// The time at which the original request was received.
1011    pub request_time: std::option::Option<wkt::Timestamp>,
1012
1013    /// The time at which the operation failed or was completed successfully.
1014    pub finish_time: std::option::Option<wkt::Timestamp>,
1015
1016    /// Keys: the full `name` of each table that existed in the instance when
1017    /// CreateCluster was first called, i.e.
1018    /// `projects/<project>/instances/<instance>/tables/<table>`. Any table added
1019    /// to the instance by a later API call will be created in the new cluster by
1020    /// that API call, not this one.
1021    ///
1022    /// Values: information on how much of a table's data has been copied to the
1023    /// newly-created cluster so far.
1024    pub tables: std::collections::HashMap<
1025        std::string::String,
1026        crate::model::create_cluster_metadata::TableProgress,
1027    >,
1028
1029    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1030}
1031
1032impl CreateClusterMetadata {
1033    pub fn new() -> Self {
1034        std::default::Default::default()
1035    }
1036
1037    /// Sets the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1038    ///
1039    /// # Example
1040    /// ```ignore,no_run
1041    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1042    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1043    /// let x = CreateClusterMetadata::new().set_original_request(CreateClusterRequest::default()/* use setters */);
1044    /// ```
1045    pub fn set_original_request<T>(mut self, v: T) -> Self
1046    where
1047        T: std::convert::Into<crate::model::CreateClusterRequest>,
1048    {
1049        self.original_request = std::option::Option::Some(v.into());
1050        self
1051    }
1052
1053    /// Sets or clears the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1054    ///
1055    /// # Example
1056    /// ```ignore,no_run
1057    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1058    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1059    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(Some(CreateClusterRequest::default()/* use setters */));
1060    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(None::<CreateClusterRequest>);
1061    /// ```
1062    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1063    where
1064        T: std::convert::Into<crate::model::CreateClusterRequest>,
1065    {
1066        self.original_request = v.map(|x| x.into());
1067        self
1068    }
1069
1070    /// Sets the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1071    ///
1072    /// # Example
1073    /// ```ignore,no_run
1074    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1075    /// use wkt::Timestamp;
1076    /// let x = CreateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1077    /// ```
1078    pub fn set_request_time<T>(mut self, v: T) -> Self
1079    where
1080        T: std::convert::Into<wkt::Timestamp>,
1081    {
1082        self.request_time = std::option::Option::Some(v.into());
1083        self
1084    }
1085
1086    /// Sets or clears the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1087    ///
1088    /// # Example
1089    /// ```ignore,no_run
1090    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1091    /// use wkt::Timestamp;
1092    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1093    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1094    /// ```
1095    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1096    where
1097        T: std::convert::Into<wkt::Timestamp>,
1098    {
1099        self.request_time = v.map(|x| x.into());
1100        self
1101    }
1102
1103    /// Sets the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1104    ///
1105    /// # Example
1106    /// ```ignore,no_run
1107    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1108    /// use wkt::Timestamp;
1109    /// let x = CreateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1110    /// ```
1111    pub fn set_finish_time<T>(mut self, v: T) -> Self
1112    where
1113        T: std::convert::Into<wkt::Timestamp>,
1114    {
1115        self.finish_time = std::option::Option::Some(v.into());
1116        self
1117    }
1118
1119    /// Sets or clears the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1120    ///
1121    /// # Example
1122    /// ```ignore,no_run
1123    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1124    /// use wkt::Timestamp;
1125    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1126    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1127    /// ```
1128    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1129    where
1130        T: std::convert::Into<wkt::Timestamp>,
1131    {
1132        self.finish_time = v.map(|x| x.into());
1133        self
1134    }
1135
1136    /// Sets the value of [tables][crate::model::CreateClusterMetadata::tables].
1137    ///
1138    /// # Example
1139    /// ```ignore,no_run
1140    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1141    /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1142    /// let x = CreateClusterMetadata::new().set_tables([
1143    ///     ("key0", TableProgress::default()/* use setters */),
1144    ///     ("key1", TableProgress::default()/* use (different) setters */),
1145    /// ]);
1146    /// ```
1147    pub fn set_tables<T, K, V>(mut self, v: T) -> Self
1148    where
1149        T: std::iter::IntoIterator<Item = (K, V)>,
1150        K: std::convert::Into<std::string::String>,
1151        V: std::convert::Into<crate::model::create_cluster_metadata::TableProgress>,
1152    {
1153        use std::iter::Iterator;
1154        self.tables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1155        self
1156    }
1157}
1158
1159impl wkt::message::Message for CreateClusterMetadata {
1160    fn typename() -> &'static str {
1161        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata"
1162    }
1163}
1164
1165/// Defines additional types related to [CreateClusterMetadata].
1166pub mod create_cluster_metadata {
1167    #[allow(unused_imports)]
1168    use super::*;
1169
1170    /// Progress info for copying a table's data to the new cluster.
1171    #[derive(Clone, Default, PartialEq)]
1172    #[non_exhaustive]
1173    pub struct TableProgress {
1174        /// Estimate of the size of the table to be copied.
1175        pub estimated_size_bytes: i64,
1176
1177        /// Estimate of the number of bytes copied so far for this table.
1178        /// This will eventually reach 'estimated_size_bytes' unless the table copy
1179        /// is CANCELLED.
1180        pub estimated_copied_bytes: i64,
1181
1182        pub state: crate::model::create_cluster_metadata::table_progress::State,
1183
1184        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1185    }
1186
1187    impl TableProgress {
1188        pub fn new() -> Self {
1189            std::default::Default::default()
1190        }
1191
1192        /// Sets the value of [estimated_size_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_size_bytes].
1193        ///
1194        /// # Example
1195        /// ```ignore,no_run
1196        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1197        /// let x = TableProgress::new().set_estimated_size_bytes(42);
1198        /// ```
1199        pub fn set_estimated_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1200            self.estimated_size_bytes = v.into();
1201            self
1202        }
1203
1204        /// Sets the value of [estimated_copied_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_copied_bytes].
1205        ///
1206        /// # Example
1207        /// ```ignore,no_run
1208        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1209        /// let x = TableProgress::new().set_estimated_copied_bytes(42);
1210        /// ```
1211        pub fn set_estimated_copied_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1212            self.estimated_copied_bytes = v.into();
1213            self
1214        }
1215
1216        /// Sets the value of [state][crate::model::create_cluster_metadata::TableProgress::state].
1217        ///
1218        /// # Example
1219        /// ```ignore,no_run
1220        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1221        /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::table_progress::State;
1222        /// let x0 = TableProgress::new().set_state(State::Pending);
1223        /// let x1 = TableProgress::new().set_state(State::Copying);
1224        /// let x2 = TableProgress::new().set_state(State::Completed);
1225        /// ```
1226        pub fn set_state<
1227            T: std::convert::Into<crate::model::create_cluster_metadata::table_progress::State>,
1228        >(
1229            mut self,
1230            v: T,
1231        ) -> Self {
1232            self.state = v.into();
1233            self
1234        }
1235    }
1236
1237    impl wkt::message::Message for TableProgress {
1238        fn typename() -> &'static str {
1239            "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata.TableProgress"
1240        }
1241    }
1242
1243    /// Defines additional types related to [TableProgress].
1244    pub mod table_progress {
1245        #[allow(unused_imports)]
1246        use super::*;
1247
1248        ///
1249        /// # Working with unknown values
1250        ///
1251        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1252        /// additional enum variants at any time. Adding new variants is not considered
1253        /// a breaking change. Applications should write their code in anticipation of:
1254        ///
1255        /// - New values appearing in future releases of the client library, **and**
1256        /// - New values received dynamically, without application changes.
1257        ///
1258        /// Please consult the [Working with enums] section in the user guide for some
1259        /// guidelines.
1260        ///
1261        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1262        #[derive(Clone, Debug, PartialEq)]
1263        #[non_exhaustive]
1264        pub enum State {
1265            Unspecified,
1266            /// The table has not yet begun copying to the new cluster.
1267            Pending,
1268            /// The table is actively being copied to the new cluster.
1269            Copying,
1270            /// The table has been fully copied to the new cluster.
1271            Completed,
1272            /// The table was deleted before it finished copying to the new cluster.
1273            /// Note that tables deleted after completion will stay marked as
1274            /// COMPLETED, not CANCELLED.
1275            Cancelled,
1276            /// If set, the enum was initialized with an unknown value.
1277            ///
1278            /// Applications can examine the value using [State::value] or
1279            /// [State::name].
1280            UnknownValue(state::UnknownValue),
1281        }
1282
1283        #[doc(hidden)]
1284        pub mod state {
1285            #[allow(unused_imports)]
1286            use super::*;
1287            #[derive(Clone, Debug, PartialEq)]
1288            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1289        }
1290
1291        impl State {
1292            /// Gets the enum value.
1293            ///
1294            /// Returns `None` if the enum contains an unknown value deserialized from
1295            /// the string representation of enums.
1296            pub fn value(&self) -> std::option::Option<i32> {
1297                match self {
1298                    Self::Unspecified => std::option::Option::Some(0),
1299                    Self::Pending => std::option::Option::Some(1),
1300                    Self::Copying => std::option::Option::Some(2),
1301                    Self::Completed => std::option::Option::Some(3),
1302                    Self::Cancelled => std::option::Option::Some(4),
1303                    Self::UnknownValue(u) => u.0.value(),
1304                }
1305            }
1306
1307            /// Gets the enum value as a string.
1308            ///
1309            /// Returns `None` if the enum contains an unknown value deserialized from
1310            /// the integer representation of enums.
1311            pub fn name(&self) -> std::option::Option<&str> {
1312                match self {
1313                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1314                    Self::Pending => std::option::Option::Some("PENDING"),
1315                    Self::Copying => std::option::Option::Some("COPYING"),
1316                    Self::Completed => std::option::Option::Some("COMPLETED"),
1317                    Self::Cancelled => std::option::Option::Some("CANCELLED"),
1318                    Self::UnknownValue(u) => u.0.name(),
1319                }
1320            }
1321        }
1322
1323        impl std::default::Default for State {
1324            fn default() -> Self {
1325                use std::convert::From;
1326                Self::from(0)
1327            }
1328        }
1329
1330        impl std::fmt::Display for State {
1331            fn fmt(
1332                &self,
1333                f: &mut std::fmt::Formatter<'_>,
1334            ) -> std::result::Result<(), std::fmt::Error> {
1335                wkt::internal::display_enum(f, self.name(), self.value())
1336            }
1337        }
1338
1339        impl std::convert::From<i32> for State {
1340            fn from(value: i32) -> Self {
1341                match value {
1342                    0 => Self::Unspecified,
1343                    1 => Self::Pending,
1344                    2 => Self::Copying,
1345                    3 => Self::Completed,
1346                    4 => Self::Cancelled,
1347                    _ => Self::UnknownValue(state::UnknownValue(
1348                        wkt::internal::UnknownEnumValue::Integer(value),
1349                    )),
1350                }
1351            }
1352        }
1353
1354        impl std::convert::From<&str> for State {
1355            fn from(value: &str) -> Self {
1356                use std::string::ToString;
1357                match value {
1358                    "STATE_UNSPECIFIED" => Self::Unspecified,
1359                    "PENDING" => Self::Pending,
1360                    "COPYING" => Self::Copying,
1361                    "COMPLETED" => Self::Completed,
1362                    "CANCELLED" => Self::Cancelled,
1363                    _ => Self::UnknownValue(state::UnknownValue(
1364                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1365                    )),
1366                }
1367            }
1368        }
1369
1370        impl serde::ser::Serialize for State {
1371            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1372            where
1373                S: serde::Serializer,
1374            {
1375                match self {
1376                    Self::Unspecified => serializer.serialize_i32(0),
1377                    Self::Pending => serializer.serialize_i32(1),
1378                    Self::Copying => serializer.serialize_i32(2),
1379                    Self::Completed => serializer.serialize_i32(3),
1380                    Self::Cancelled => serializer.serialize_i32(4),
1381                    Self::UnknownValue(u) => u.0.serialize(serializer),
1382                }
1383            }
1384        }
1385
1386        impl<'de> serde::de::Deserialize<'de> for State {
1387            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1388            where
1389                D: serde::Deserializer<'de>,
1390            {
1391                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1392                    ".google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State",
1393                ))
1394            }
1395        }
1396    }
1397}
1398
1399/// The metadata for the Operation returned by UpdateCluster.
1400#[derive(Clone, Default, PartialEq)]
1401#[non_exhaustive]
1402pub struct UpdateClusterMetadata {
1403    /// The request that prompted the initiation of this UpdateCluster operation.
1404    pub original_request: std::option::Option<crate::model::Cluster>,
1405
1406    /// The time at which the original request was received.
1407    pub request_time: std::option::Option<wkt::Timestamp>,
1408
1409    /// The time at which the operation failed or was completed successfully.
1410    pub finish_time: std::option::Option<wkt::Timestamp>,
1411
1412    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1413}
1414
1415impl UpdateClusterMetadata {
1416    pub fn new() -> Self {
1417        std::default::Default::default()
1418    }
1419
1420    /// Sets the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1421    ///
1422    /// # Example
1423    /// ```ignore,no_run
1424    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1425    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1426    /// let x = UpdateClusterMetadata::new().set_original_request(Cluster::default()/* use setters */);
1427    /// ```
1428    pub fn set_original_request<T>(mut self, v: T) -> Self
1429    where
1430        T: std::convert::Into<crate::model::Cluster>,
1431    {
1432        self.original_request = std::option::Option::Some(v.into());
1433        self
1434    }
1435
1436    /// Sets or clears the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1437    ///
1438    /// # Example
1439    /// ```ignore,no_run
1440    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1441    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1442    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(Some(Cluster::default()/* use setters */));
1443    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(None::<Cluster>);
1444    /// ```
1445    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1446    where
1447        T: std::convert::Into<crate::model::Cluster>,
1448    {
1449        self.original_request = v.map(|x| x.into());
1450        self
1451    }
1452
1453    /// Sets the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1454    ///
1455    /// # Example
1456    /// ```ignore,no_run
1457    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1458    /// use wkt::Timestamp;
1459    /// let x = UpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1460    /// ```
1461    pub fn set_request_time<T>(mut self, v: T) -> Self
1462    where
1463        T: std::convert::Into<wkt::Timestamp>,
1464    {
1465        self.request_time = std::option::Option::Some(v.into());
1466        self
1467    }
1468
1469    /// Sets or clears the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1470    ///
1471    /// # Example
1472    /// ```ignore,no_run
1473    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1474    /// use wkt::Timestamp;
1475    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1476    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1477    /// ```
1478    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1479    where
1480        T: std::convert::Into<wkt::Timestamp>,
1481    {
1482        self.request_time = v.map(|x| x.into());
1483        self
1484    }
1485
1486    /// Sets the value of [finish_time][crate::model::UpdateClusterMetadata::finish_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_finish_time(Timestamp::default()/* use setters */);
1493    /// ```
1494    pub fn set_finish_time<T>(mut self, v: T) -> Self
1495    where
1496        T: std::convert::Into<wkt::Timestamp>,
1497    {
1498        self.finish_time = std::option::Option::Some(v.into());
1499        self
1500    }
1501
1502    /// Sets or clears the value of [finish_time][crate::model::UpdateClusterMetadata::finish_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_finish_time(Some(Timestamp::default()/* use setters */));
1509    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1510    /// ```
1511    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1512    where
1513        T: std::convert::Into<wkt::Timestamp>,
1514    {
1515        self.finish_time = v.map(|x| x.into());
1516        self
1517    }
1518}
1519
1520impl wkt::message::Message for UpdateClusterMetadata {
1521    fn typename() -> &'static str {
1522        "type.googleapis.com/google.bigtable.admin.v2.UpdateClusterMetadata"
1523    }
1524}
1525
1526/// The metadata for the Operation returned by PartialUpdateCluster.
1527#[derive(Clone, Default, PartialEq)]
1528#[non_exhaustive]
1529pub struct PartialUpdateClusterMetadata {
1530    /// The time at which the original request was received.
1531    pub request_time: std::option::Option<wkt::Timestamp>,
1532
1533    /// The time at which the operation failed or was completed successfully.
1534    pub finish_time: std::option::Option<wkt::Timestamp>,
1535
1536    /// The original request for PartialUpdateCluster.
1537    pub original_request: std::option::Option<crate::model::PartialUpdateClusterRequest>,
1538
1539    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1540}
1541
1542impl PartialUpdateClusterMetadata {
1543    pub fn new() -> Self {
1544        std::default::Default::default()
1545    }
1546
1547    /// Sets the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1548    ///
1549    /// # Example
1550    /// ```ignore,no_run
1551    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1552    /// use wkt::Timestamp;
1553    /// let x = PartialUpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1554    /// ```
1555    pub fn set_request_time<T>(mut self, v: T) -> Self
1556    where
1557        T: std::convert::Into<wkt::Timestamp>,
1558    {
1559        self.request_time = std::option::Option::Some(v.into());
1560        self
1561    }
1562
1563    /// Sets or clears the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1564    ///
1565    /// # Example
1566    /// ```ignore,no_run
1567    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1568    /// use wkt::Timestamp;
1569    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1570    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1571    /// ```
1572    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1573    where
1574        T: std::convert::Into<wkt::Timestamp>,
1575    {
1576        self.request_time = v.map(|x| x.into());
1577        self
1578    }
1579
1580    /// Sets the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1581    ///
1582    /// # Example
1583    /// ```ignore,no_run
1584    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1585    /// use wkt::Timestamp;
1586    /// let x = PartialUpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1587    /// ```
1588    pub fn set_finish_time<T>(mut self, v: T) -> Self
1589    where
1590        T: std::convert::Into<wkt::Timestamp>,
1591    {
1592        self.finish_time = std::option::Option::Some(v.into());
1593        self
1594    }
1595
1596    /// Sets or clears the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1597    ///
1598    /// # Example
1599    /// ```ignore,no_run
1600    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1601    /// use wkt::Timestamp;
1602    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1603    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1604    /// ```
1605    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1606    where
1607        T: std::convert::Into<wkt::Timestamp>,
1608    {
1609        self.finish_time = v.map(|x| x.into());
1610        self
1611    }
1612
1613    /// Sets the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1614    ///
1615    /// # Example
1616    /// ```ignore,no_run
1617    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1618    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1619    /// let x = PartialUpdateClusterMetadata::new().set_original_request(PartialUpdateClusterRequest::default()/* use setters */);
1620    /// ```
1621    pub fn set_original_request<T>(mut self, v: T) -> Self
1622    where
1623        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1624    {
1625        self.original_request = std::option::Option::Some(v.into());
1626        self
1627    }
1628
1629    /// Sets or clears the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1630    ///
1631    /// # Example
1632    /// ```ignore,no_run
1633    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1634    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1635    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(Some(PartialUpdateClusterRequest::default()/* use setters */));
1636    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(None::<PartialUpdateClusterRequest>);
1637    /// ```
1638    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1639    where
1640        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1641    {
1642        self.original_request = v.map(|x| x.into());
1643        self
1644    }
1645}
1646
1647impl wkt::message::Message for PartialUpdateClusterMetadata {
1648    fn typename() -> &'static str {
1649        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterMetadata"
1650    }
1651}
1652
1653/// Request message for BigtableInstanceAdmin.PartialUpdateCluster.
1654#[derive(Clone, Default, PartialEq)]
1655#[non_exhaustive]
1656pub struct PartialUpdateClusterRequest {
1657    /// Required. The Cluster which contains the partial updates to be applied,
1658    /// subject to the update_mask.
1659    pub cluster: std::option::Option<crate::model::Cluster>,
1660
1661    /// Required. The subset of Cluster fields which should be replaced.
1662    pub update_mask: std::option::Option<wkt::FieldMask>,
1663
1664    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1665}
1666
1667impl PartialUpdateClusterRequest {
1668    pub fn new() -> Self {
1669        std::default::Default::default()
1670    }
1671
1672    /// Sets the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1673    ///
1674    /// # Example
1675    /// ```ignore,no_run
1676    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1677    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1678    /// let x = PartialUpdateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
1679    /// ```
1680    pub fn set_cluster<T>(mut self, v: T) -> Self
1681    where
1682        T: std::convert::Into<crate::model::Cluster>,
1683    {
1684        self.cluster = std::option::Option::Some(v.into());
1685        self
1686    }
1687
1688    /// Sets or clears the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1689    ///
1690    /// # Example
1691    /// ```ignore,no_run
1692    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1693    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1694    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
1695    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
1696    /// ```
1697    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1698    where
1699        T: std::convert::Into<crate::model::Cluster>,
1700    {
1701        self.cluster = v.map(|x| x.into());
1702        self
1703    }
1704
1705    /// Sets the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1706    ///
1707    /// # Example
1708    /// ```ignore,no_run
1709    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1710    /// use wkt::FieldMask;
1711    /// let x = PartialUpdateClusterRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1712    /// ```
1713    pub fn set_update_mask<T>(mut self, v: T) -> Self
1714    where
1715        T: std::convert::Into<wkt::FieldMask>,
1716    {
1717        self.update_mask = std::option::Option::Some(v.into());
1718        self
1719    }
1720
1721    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1722    ///
1723    /// # Example
1724    /// ```ignore,no_run
1725    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1726    /// use wkt::FieldMask;
1727    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1728    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1729    /// ```
1730    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1731    where
1732        T: std::convert::Into<wkt::FieldMask>,
1733    {
1734        self.update_mask = v.map(|x| x.into());
1735        self
1736    }
1737}
1738
1739impl wkt::message::Message for PartialUpdateClusterRequest {
1740    fn typename() -> &'static str {
1741        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterRequest"
1742    }
1743}
1744
1745/// Request message for BigtableInstanceAdmin.CreateAppProfile.
1746#[derive(Clone, Default, PartialEq)]
1747#[non_exhaustive]
1748pub struct CreateAppProfileRequest {
1749    /// Required. The unique name of the instance in which to create the new app
1750    /// profile. Values are of the form `projects/{project}/instances/{instance}`.
1751    pub parent: std::string::String,
1752
1753    /// Required. The ID to be used when referring to the new app profile within
1754    /// its instance, e.g., just `myprofile` rather than
1755    /// `projects/myproject/instances/myinstance/appProfiles/myprofile`.
1756    pub app_profile_id: std::string::String,
1757
1758    /// Required. The app profile to be created.
1759    /// Fields marked `OutputOnly` will be ignored.
1760    pub app_profile: std::option::Option<crate::model::AppProfile>,
1761
1762    /// If true, ignore safety checks when creating the app profile.
1763    pub ignore_warnings: bool,
1764
1765    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1766}
1767
1768impl CreateAppProfileRequest {
1769    pub fn new() -> Self {
1770        std::default::Default::default()
1771    }
1772
1773    /// Sets the value of [parent][crate::model::CreateAppProfileRequest::parent].
1774    ///
1775    /// # Example
1776    /// ```ignore,no_run
1777    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1778    /// let x = CreateAppProfileRequest::new().set_parent("example");
1779    /// ```
1780    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1781        self.parent = v.into();
1782        self
1783    }
1784
1785    /// Sets the value of [app_profile_id][crate::model::CreateAppProfileRequest::app_profile_id].
1786    ///
1787    /// # Example
1788    /// ```ignore,no_run
1789    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1790    /// let x = CreateAppProfileRequest::new().set_app_profile_id("example");
1791    /// ```
1792    pub fn set_app_profile_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1793        self.app_profile_id = v.into();
1794        self
1795    }
1796
1797    /// Sets the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1798    ///
1799    /// # Example
1800    /// ```ignore,no_run
1801    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1802    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1803    /// let x = CreateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
1804    /// ```
1805    pub fn set_app_profile<T>(mut self, v: T) -> Self
1806    where
1807        T: std::convert::Into<crate::model::AppProfile>,
1808    {
1809        self.app_profile = std::option::Option::Some(v.into());
1810        self
1811    }
1812
1813    /// Sets or clears the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1814    ///
1815    /// # Example
1816    /// ```ignore,no_run
1817    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1818    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1819    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
1820    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
1821    /// ```
1822    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1823    where
1824        T: std::convert::Into<crate::model::AppProfile>,
1825    {
1826        self.app_profile = v.map(|x| x.into());
1827        self
1828    }
1829
1830    /// Sets the value of [ignore_warnings][crate::model::CreateAppProfileRequest::ignore_warnings].
1831    ///
1832    /// # Example
1833    /// ```ignore,no_run
1834    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1835    /// let x = CreateAppProfileRequest::new().set_ignore_warnings(true);
1836    /// ```
1837    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1838        self.ignore_warnings = v.into();
1839        self
1840    }
1841}
1842
1843impl wkt::message::Message for CreateAppProfileRequest {
1844    fn typename() -> &'static str {
1845        "type.googleapis.com/google.bigtable.admin.v2.CreateAppProfileRequest"
1846    }
1847}
1848
1849/// Request message for BigtableInstanceAdmin.GetAppProfile.
1850#[derive(Clone, Default, PartialEq)]
1851#[non_exhaustive]
1852pub struct GetAppProfileRequest {
1853    /// Required. The unique name of the requested app profile. Values are of the
1854    /// form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
1855    pub name: std::string::String,
1856
1857    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1858}
1859
1860impl GetAppProfileRequest {
1861    pub fn new() -> Self {
1862        std::default::Default::default()
1863    }
1864
1865    /// Sets the value of [name][crate::model::GetAppProfileRequest::name].
1866    ///
1867    /// # Example
1868    /// ```ignore,no_run
1869    /// # use google_cloud_bigtable_admin_v2::model::GetAppProfileRequest;
1870    /// let x = GetAppProfileRequest::new().set_name("example");
1871    /// ```
1872    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1873        self.name = v.into();
1874        self
1875    }
1876}
1877
1878impl wkt::message::Message for GetAppProfileRequest {
1879    fn typename() -> &'static str {
1880        "type.googleapis.com/google.bigtable.admin.v2.GetAppProfileRequest"
1881    }
1882}
1883
1884/// Request message for BigtableInstanceAdmin.ListAppProfiles.
1885#[derive(Clone, Default, PartialEq)]
1886#[non_exhaustive]
1887pub struct ListAppProfilesRequest {
1888    /// Required. The unique name of the instance for which a list of app profiles
1889    /// is requested. Values are of the form
1890    /// `projects/{project}/instances/{instance}`.
1891    /// Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
1892    /// e.g., `projects/myproject/instances/-`.
1893    pub parent: std::string::String,
1894
1895    /// Maximum number of results per page.
1896    ///
1897    /// A page_size of zero lets the server choose the number of items to return.
1898    /// A page_size which is strictly positive will return at most that many items.
1899    /// A negative page_size will cause an error.
1900    ///
1901    /// Following the first request, subsequent paginated calls are not required
1902    /// to pass a page_size. If a page_size is set in subsequent calls, it must
1903    /// match the page_size given in the first request.
1904    pub page_size: i32,
1905
1906    /// The value of `next_page_token` returned by a previous call.
1907    pub page_token: std::string::String,
1908
1909    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1910}
1911
1912impl ListAppProfilesRequest {
1913    pub fn new() -> Self {
1914        std::default::Default::default()
1915    }
1916
1917    /// Sets the value of [parent][crate::model::ListAppProfilesRequest::parent].
1918    ///
1919    /// # Example
1920    /// ```ignore,no_run
1921    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1922    /// let x = ListAppProfilesRequest::new().set_parent("example");
1923    /// ```
1924    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1925        self.parent = v.into();
1926        self
1927    }
1928
1929    /// Sets the value of [page_size][crate::model::ListAppProfilesRequest::page_size].
1930    ///
1931    /// # Example
1932    /// ```ignore,no_run
1933    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1934    /// let x = ListAppProfilesRequest::new().set_page_size(42);
1935    /// ```
1936    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1937        self.page_size = v.into();
1938        self
1939    }
1940
1941    /// Sets the value of [page_token][crate::model::ListAppProfilesRequest::page_token].
1942    ///
1943    /// # Example
1944    /// ```ignore,no_run
1945    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1946    /// let x = ListAppProfilesRequest::new().set_page_token("example");
1947    /// ```
1948    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1949        self.page_token = v.into();
1950        self
1951    }
1952}
1953
1954impl wkt::message::Message for ListAppProfilesRequest {
1955    fn typename() -> &'static str {
1956        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesRequest"
1957    }
1958}
1959
1960/// Response message for BigtableInstanceAdmin.ListAppProfiles.
1961#[derive(Clone, Default, PartialEq)]
1962#[non_exhaustive]
1963pub struct ListAppProfilesResponse {
1964    /// The list of requested app profiles.
1965    pub app_profiles: std::vec::Vec<crate::model::AppProfile>,
1966
1967    /// Set if not all app profiles could be returned in a single response.
1968    /// Pass this value to `page_token` in another request to get the next
1969    /// page of results.
1970    pub next_page_token: std::string::String,
1971
1972    /// Locations from which AppProfile information could not be retrieved,
1973    /// due to an outage or some other transient condition.
1974    /// AppProfiles from these locations may be missing from `app_profiles`.
1975    /// Values are of the form `projects/<project>/locations/<zone_id>`
1976    pub failed_locations: std::vec::Vec<std::string::String>,
1977
1978    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1979}
1980
1981impl ListAppProfilesResponse {
1982    pub fn new() -> Self {
1983        std::default::Default::default()
1984    }
1985
1986    /// Sets the value of [app_profiles][crate::model::ListAppProfilesResponse::app_profiles].
1987    ///
1988    /// # Example
1989    /// ```ignore,no_run
1990    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
1991    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1992    /// let x = ListAppProfilesResponse::new()
1993    ///     .set_app_profiles([
1994    ///         AppProfile::default()/* use setters */,
1995    ///         AppProfile::default()/* use (different) setters */,
1996    ///     ]);
1997    /// ```
1998    pub fn set_app_profiles<T, V>(mut self, v: T) -> Self
1999    where
2000        T: std::iter::IntoIterator<Item = V>,
2001        V: std::convert::Into<crate::model::AppProfile>,
2002    {
2003        use std::iter::Iterator;
2004        self.app_profiles = v.into_iter().map(|i| i.into()).collect();
2005        self
2006    }
2007
2008    /// Sets the value of [next_page_token][crate::model::ListAppProfilesResponse::next_page_token].
2009    ///
2010    /// # Example
2011    /// ```ignore,no_run
2012    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2013    /// let x = ListAppProfilesResponse::new().set_next_page_token("example");
2014    /// ```
2015    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2016        self.next_page_token = v.into();
2017        self
2018    }
2019
2020    /// Sets the value of [failed_locations][crate::model::ListAppProfilesResponse::failed_locations].
2021    ///
2022    /// # Example
2023    /// ```ignore,no_run
2024    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2025    /// let x = ListAppProfilesResponse::new().set_failed_locations(["a", "b", "c"]);
2026    /// ```
2027    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
2028    where
2029        T: std::iter::IntoIterator<Item = V>,
2030        V: std::convert::Into<std::string::String>,
2031    {
2032        use std::iter::Iterator;
2033        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
2034        self
2035    }
2036}
2037
2038impl wkt::message::Message for ListAppProfilesResponse {
2039    fn typename() -> &'static str {
2040        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesResponse"
2041    }
2042}
2043
2044#[doc(hidden)]
2045impl gax::paginator::internal::PageableResponse for ListAppProfilesResponse {
2046    type PageItem = crate::model::AppProfile;
2047
2048    fn items(self) -> std::vec::Vec<Self::PageItem> {
2049        self.app_profiles
2050    }
2051
2052    fn next_page_token(&self) -> std::string::String {
2053        use std::clone::Clone;
2054        self.next_page_token.clone()
2055    }
2056}
2057
2058/// Request message for BigtableInstanceAdmin.UpdateAppProfile.
2059#[derive(Clone, Default, PartialEq)]
2060#[non_exhaustive]
2061pub struct UpdateAppProfileRequest {
2062    /// Required. The app profile which will (partially) replace the current value.
2063    pub app_profile: std::option::Option<crate::model::AppProfile>,
2064
2065    /// Required. The subset of app profile fields which should be replaced.
2066    /// If unset, all fields will be replaced.
2067    pub update_mask: std::option::Option<wkt::FieldMask>,
2068
2069    /// If true, ignore safety checks when updating the app profile.
2070    pub ignore_warnings: bool,
2071
2072    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2073}
2074
2075impl UpdateAppProfileRequest {
2076    pub fn new() -> Self {
2077        std::default::Default::default()
2078    }
2079
2080    /// Sets the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2081    ///
2082    /// # Example
2083    /// ```ignore,no_run
2084    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2085    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2086    /// let x = UpdateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
2087    /// ```
2088    pub fn set_app_profile<T>(mut self, v: T) -> Self
2089    where
2090        T: std::convert::Into<crate::model::AppProfile>,
2091    {
2092        self.app_profile = std::option::Option::Some(v.into());
2093        self
2094    }
2095
2096    /// Sets or clears the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2097    ///
2098    /// # Example
2099    /// ```ignore,no_run
2100    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2101    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2102    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
2103    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
2104    /// ```
2105    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
2106    where
2107        T: std::convert::Into<crate::model::AppProfile>,
2108    {
2109        self.app_profile = v.map(|x| x.into());
2110        self
2111    }
2112
2113    /// Sets the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2114    ///
2115    /// # Example
2116    /// ```ignore,no_run
2117    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2118    /// use wkt::FieldMask;
2119    /// let x = UpdateAppProfileRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2120    /// ```
2121    pub fn set_update_mask<T>(mut self, v: T) -> Self
2122    where
2123        T: std::convert::Into<wkt::FieldMask>,
2124    {
2125        self.update_mask = std::option::Option::Some(v.into());
2126        self
2127    }
2128
2129    /// Sets or clears the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2130    ///
2131    /// # Example
2132    /// ```ignore,no_run
2133    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2134    /// use wkt::FieldMask;
2135    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2136    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2137    /// ```
2138    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2139    where
2140        T: std::convert::Into<wkt::FieldMask>,
2141    {
2142        self.update_mask = v.map(|x| x.into());
2143        self
2144    }
2145
2146    /// Sets the value of [ignore_warnings][crate::model::UpdateAppProfileRequest::ignore_warnings].
2147    ///
2148    /// # Example
2149    /// ```ignore,no_run
2150    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2151    /// let x = UpdateAppProfileRequest::new().set_ignore_warnings(true);
2152    /// ```
2153    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2154        self.ignore_warnings = v.into();
2155        self
2156    }
2157}
2158
2159impl wkt::message::Message for UpdateAppProfileRequest {
2160    fn typename() -> &'static str {
2161        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileRequest"
2162    }
2163}
2164
2165/// Request message for BigtableInstanceAdmin.DeleteAppProfile.
2166#[derive(Clone, Default, PartialEq)]
2167#[non_exhaustive]
2168pub struct DeleteAppProfileRequest {
2169    /// Required. The unique name of the app profile to be deleted. Values are of
2170    /// the form
2171    /// `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
2172    pub name: std::string::String,
2173
2174    /// Required. If true, ignore safety checks when deleting the app profile.
2175    pub ignore_warnings: bool,
2176
2177    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2178}
2179
2180impl DeleteAppProfileRequest {
2181    pub fn new() -> Self {
2182        std::default::Default::default()
2183    }
2184
2185    /// Sets the value of [name][crate::model::DeleteAppProfileRequest::name].
2186    ///
2187    /// # Example
2188    /// ```ignore,no_run
2189    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2190    /// let x = DeleteAppProfileRequest::new().set_name("example");
2191    /// ```
2192    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2193        self.name = v.into();
2194        self
2195    }
2196
2197    /// Sets the value of [ignore_warnings][crate::model::DeleteAppProfileRequest::ignore_warnings].
2198    ///
2199    /// # Example
2200    /// ```ignore,no_run
2201    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2202    /// let x = DeleteAppProfileRequest::new().set_ignore_warnings(true);
2203    /// ```
2204    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2205        self.ignore_warnings = v.into();
2206        self
2207    }
2208}
2209
2210impl wkt::message::Message for DeleteAppProfileRequest {
2211    fn typename() -> &'static str {
2212        "type.googleapis.com/google.bigtable.admin.v2.DeleteAppProfileRequest"
2213    }
2214}
2215
2216/// The metadata for the Operation returned by UpdateAppProfile.
2217#[derive(Clone, Default, PartialEq)]
2218#[non_exhaustive]
2219pub struct UpdateAppProfileMetadata {
2220    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2221}
2222
2223impl UpdateAppProfileMetadata {
2224    pub fn new() -> Self {
2225        std::default::Default::default()
2226    }
2227}
2228
2229impl wkt::message::Message for UpdateAppProfileMetadata {
2230    fn typename() -> &'static str {
2231        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileMetadata"
2232    }
2233}
2234
2235/// Request message for BigtableInstanceAdmin.ListHotTablets.
2236#[derive(Clone, Default, PartialEq)]
2237#[non_exhaustive]
2238pub struct ListHotTabletsRequest {
2239    /// Required. The cluster name to list hot tablets.
2240    /// Value is in the following form:
2241    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
2242    pub parent: std::string::String,
2243
2244    /// The start time to list hot tablets. The hot tablets in the response will
2245    /// have start times between the requested start time and end time. Start time
2246    /// defaults to Now if it is unset, and end time defaults to Now - 24 hours if
2247    /// it is unset. The start time should be less than the end time, and the
2248    /// maximum allowed time range between start time and end time is 48 hours.
2249    /// Start time and end time should have values between Now and Now - 14 days.
2250    pub start_time: std::option::Option<wkt::Timestamp>,
2251
2252    /// The end time to list hot tablets.
2253    pub end_time: std::option::Option<wkt::Timestamp>,
2254
2255    /// Maximum number of results per page.
2256    ///
2257    /// A page_size that is empty or zero lets the server choose the number of
2258    /// items to return. A page_size which is strictly positive will return at most
2259    /// that many items. A negative page_size will cause an error.
2260    ///
2261    /// Following the first request, subsequent paginated calls do not need a
2262    /// page_size field. If a page_size is set in subsequent calls, it must match
2263    /// the page_size given in the first request.
2264    pub page_size: i32,
2265
2266    /// The value of `next_page_token` returned by a previous call.
2267    pub page_token: std::string::String,
2268
2269    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2270}
2271
2272impl ListHotTabletsRequest {
2273    pub fn new() -> Self {
2274        std::default::Default::default()
2275    }
2276
2277    /// Sets the value of [parent][crate::model::ListHotTabletsRequest::parent].
2278    ///
2279    /// # Example
2280    /// ```ignore,no_run
2281    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2282    /// let x = ListHotTabletsRequest::new().set_parent("example");
2283    /// ```
2284    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2285        self.parent = v.into();
2286        self
2287    }
2288
2289    /// Sets the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2290    ///
2291    /// # Example
2292    /// ```ignore,no_run
2293    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2294    /// use wkt::Timestamp;
2295    /// let x = ListHotTabletsRequest::new().set_start_time(Timestamp::default()/* use setters */);
2296    /// ```
2297    pub fn set_start_time<T>(mut self, v: T) -> Self
2298    where
2299        T: std::convert::Into<wkt::Timestamp>,
2300    {
2301        self.start_time = std::option::Option::Some(v.into());
2302        self
2303    }
2304
2305    /// Sets or clears the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2306    ///
2307    /// # Example
2308    /// ```ignore,no_run
2309    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2310    /// use wkt::Timestamp;
2311    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2312    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(None::<Timestamp>);
2313    /// ```
2314    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2315    where
2316        T: std::convert::Into<wkt::Timestamp>,
2317    {
2318        self.start_time = v.map(|x| x.into());
2319        self
2320    }
2321
2322    /// Sets the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2323    ///
2324    /// # Example
2325    /// ```ignore,no_run
2326    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2327    /// use wkt::Timestamp;
2328    /// let x = ListHotTabletsRequest::new().set_end_time(Timestamp::default()/* use setters */);
2329    /// ```
2330    pub fn set_end_time<T>(mut self, v: T) -> Self
2331    where
2332        T: std::convert::Into<wkt::Timestamp>,
2333    {
2334        self.end_time = std::option::Option::Some(v.into());
2335        self
2336    }
2337
2338    /// Sets or clears the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2339    ///
2340    /// # Example
2341    /// ```ignore,no_run
2342    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2343    /// use wkt::Timestamp;
2344    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2345    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(None::<Timestamp>);
2346    /// ```
2347    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2348    where
2349        T: std::convert::Into<wkt::Timestamp>,
2350    {
2351        self.end_time = v.map(|x| x.into());
2352        self
2353    }
2354
2355    /// Sets the value of [page_size][crate::model::ListHotTabletsRequest::page_size].
2356    ///
2357    /// # Example
2358    /// ```ignore,no_run
2359    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2360    /// let x = ListHotTabletsRequest::new().set_page_size(42);
2361    /// ```
2362    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2363        self.page_size = v.into();
2364        self
2365    }
2366
2367    /// Sets the value of [page_token][crate::model::ListHotTabletsRequest::page_token].
2368    ///
2369    /// # Example
2370    /// ```ignore,no_run
2371    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2372    /// let x = ListHotTabletsRequest::new().set_page_token("example");
2373    /// ```
2374    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2375        self.page_token = v.into();
2376        self
2377    }
2378}
2379
2380impl wkt::message::Message for ListHotTabletsRequest {
2381    fn typename() -> &'static str {
2382        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsRequest"
2383    }
2384}
2385
2386/// Response message for BigtableInstanceAdmin.ListHotTablets.
2387#[derive(Clone, Default, PartialEq)]
2388#[non_exhaustive]
2389pub struct ListHotTabletsResponse {
2390    /// List of hot tablets in the tables of the requested cluster that fall
2391    /// within the requested time range. Hot tablets are ordered by node cpu usage
2392    /// percent. If there are multiple hot tablets that correspond to the same
2393    /// tablet within a 15-minute interval, only the hot tablet with the highest
2394    /// node cpu usage will be included in the response.
2395    pub hot_tablets: std::vec::Vec<crate::model::HotTablet>,
2396
2397    /// Set if not all hot tablets could be returned in a single response.
2398    /// Pass this value to `page_token` in another request to get the next
2399    /// page of results.
2400    pub next_page_token: std::string::String,
2401
2402    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2403}
2404
2405impl ListHotTabletsResponse {
2406    pub fn new() -> Self {
2407        std::default::Default::default()
2408    }
2409
2410    /// Sets the value of [hot_tablets][crate::model::ListHotTabletsResponse::hot_tablets].
2411    ///
2412    /// # Example
2413    /// ```ignore,no_run
2414    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2415    /// use google_cloud_bigtable_admin_v2::model::HotTablet;
2416    /// let x = ListHotTabletsResponse::new()
2417    ///     .set_hot_tablets([
2418    ///         HotTablet::default()/* use setters */,
2419    ///         HotTablet::default()/* use (different) setters */,
2420    ///     ]);
2421    /// ```
2422    pub fn set_hot_tablets<T, V>(mut self, v: T) -> Self
2423    where
2424        T: std::iter::IntoIterator<Item = V>,
2425        V: std::convert::Into<crate::model::HotTablet>,
2426    {
2427        use std::iter::Iterator;
2428        self.hot_tablets = v.into_iter().map(|i| i.into()).collect();
2429        self
2430    }
2431
2432    /// Sets the value of [next_page_token][crate::model::ListHotTabletsResponse::next_page_token].
2433    ///
2434    /// # Example
2435    /// ```ignore,no_run
2436    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2437    /// let x = ListHotTabletsResponse::new().set_next_page_token("example");
2438    /// ```
2439    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2440        self.next_page_token = v.into();
2441        self
2442    }
2443}
2444
2445impl wkt::message::Message for ListHotTabletsResponse {
2446    fn typename() -> &'static str {
2447        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsResponse"
2448    }
2449}
2450
2451#[doc(hidden)]
2452impl gax::paginator::internal::PageableResponse for ListHotTabletsResponse {
2453    type PageItem = crate::model::HotTablet;
2454
2455    fn items(self) -> std::vec::Vec<Self::PageItem> {
2456        self.hot_tablets
2457    }
2458
2459    fn next_page_token(&self) -> std::string::String {
2460        use std::clone::Clone;
2461        self.next_page_token.clone()
2462    }
2463}
2464
2465/// Request message for BigtableInstanceAdmin.CreateLogicalView.
2466#[derive(Clone, Default, PartialEq)]
2467#[non_exhaustive]
2468pub struct CreateLogicalViewRequest {
2469    /// Required. The parent instance where this logical view will be created.
2470    /// Format: `projects/{project}/instances/{instance}`.
2471    pub parent: std::string::String,
2472
2473    /// Required. The ID to use for the logical view, which will become the final
2474    /// component of the logical view's resource name.
2475    pub logical_view_id: std::string::String,
2476
2477    /// Required. The logical view to create.
2478    pub logical_view: std::option::Option<crate::model::LogicalView>,
2479
2480    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2481}
2482
2483impl CreateLogicalViewRequest {
2484    pub fn new() -> Self {
2485        std::default::Default::default()
2486    }
2487
2488    /// Sets the value of [parent][crate::model::CreateLogicalViewRequest::parent].
2489    ///
2490    /// # Example
2491    /// ```ignore,no_run
2492    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2493    /// let x = CreateLogicalViewRequest::new().set_parent("example");
2494    /// ```
2495    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2496        self.parent = v.into();
2497        self
2498    }
2499
2500    /// Sets the value of [logical_view_id][crate::model::CreateLogicalViewRequest::logical_view_id].
2501    ///
2502    /// # Example
2503    /// ```ignore,no_run
2504    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2505    /// let x = CreateLogicalViewRequest::new().set_logical_view_id("example");
2506    /// ```
2507    pub fn set_logical_view_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2508        self.logical_view_id = v.into();
2509        self
2510    }
2511
2512    /// Sets the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2513    ///
2514    /// # Example
2515    /// ```ignore,no_run
2516    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2517    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2518    /// let x = CreateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
2519    /// ```
2520    pub fn set_logical_view<T>(mut self, v: T) -> Self
2521    where
2522        T: std::convert::Into<crate::model::LogicalView>,
2523    {
2524        self.logical_view = std::option::Option::Some(v.into());
2525        self
2526    }
2527
2528    /// Sets or clears the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2529    ///
2530    /// # Example
2531    /// ```ignore,no_run
2532    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2533    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2534    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
2535    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
2536    /// ```
2537    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2538    where
2539        T: std::convert::Into<crate::model::LogicalView>,
2540    {
2541        self.logical_view = v.map(|x| x.into());
2542        self
2543    }
2544}
2545
2546impl wkt::message::Message for CreateLogicalViewRequest {
2547    fn typename() -> &'static str {
2548        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewRequest"
2549    }
2550}
2551
2552/// The metadata for the Operation returned by CreateLogicalView.
2553#[derive(Clone, Default, PartialEq)]
2554#[non_exhaustive]
2555pub struct CreateLogicalViewMetadata {
2556    /// The request that prompted the initiation of this CreateLogicalView
2557    /// operation.
2558    pub original_request: std::option::Option<crate::model::CreateLogicalViewRequest>,
2559
2560    /// The time at which this operation started.
2561    pub start_time: std::option::Option<wkt::Timestamp>,
2562
2563    /// If set, the time at which this operation finished or was canceled.
2564    pub end_time: std::option::Option<wkt::Timestamp>,
2565
2566    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2567}
2568
2569impl CreateLogicalViewMetadata {
2570    pub fn new() -> Self {
2571        std::default::Default::default()
2572    }
2573
2574    /// Sets the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
2575    ///
2576    /// # Example
2577    /// ```ignore,no_run
2578    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2579    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2580    /// let x = CreateLogicalViewMetadata::new().set_original_request(CreateLogicalViewRequest::default()/* use setters */);
2581    /// ```
2582    pub fn set_original_request<T>(mut self, v: T) -> Self
2583    where
2584        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
2585    {
2586        self.original_request = std::option::Option::Some(v.into());
2587        self
2588    }
2589
2590    /// Sets or clears the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
2591    ///
2592    /// # Example
2593    /// ```ignore,no_run
2594    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2595    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2596    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(Some(CreateLogicalViewRequest::default()/* use setters */));
2597    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(None::<CreateLogicalViewRequest>);
2598    /// ```
2599    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
2600    where
2601        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
2602    {
2603        self.original_request = v.map(|x| x.into());
2604        self
2605    }
2606
2607    /// Sets the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
2608    ///
2609    /// # Example
2610    /// ```ignore,no_run
2611    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2612    /// use wkt::Timestamp;
2613    /// let x = CreateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
2614    /// ```
2615    pub fn set_start_time<T>(mut self, v: T) -> Self
2616    where
2617        T: std::convert::Into<wkt::Timestamp>,
2618    {
2619        self.start_time = std::option::Option::Some(v.into());
2620        self
2621    }
2622
2623    /// Sets or clears the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
2624    ///
2625    /// # Example
2626    /// ```ignore,no_run
2627    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2628    /// use wkt::Timestamp;
2629    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2630    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
2631    /// ```
2632    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2633    where
2634        T: std::convert::Into<wkt::Timestamp>,
2635    {
2636        self.start_time = v.map(|x| x.into());
2637        self
2638    }
2639
2640    /// Sets the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
2641    ///
2642    /// # Example
2643    /// ```ignore,no_run
2644    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2645    /// use wkt::Timestamp;
2646    /// let x = CreateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
2647    /// ```
2648    pub fn set_end_time<T>(mut self, v: T) -> Self
2649    where
2650        T: std::convert::Into<wkt::Timestamp>,
2651    {
2652        self.end_time = std::option::Option::Some(v.into());
2653        self
2654    }
2655
2656    /// Sets or clears the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
2657    ///
2658    /// # Example
2659    /// ```ignore,no_run
2660    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2661    /// use wkt::Timestamp;
2662    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2663    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
2664    /// ```
2665    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2666    where
2667        T: std::convert::Into<wkt::Timestamp>,
2668    {
2669        self.end_time = v.map(|x| x.into());
2670        self
2671    }
2672}
2673
2674impl wkt::message::Message for CreateLogicalViewMetadata {
2675    fn typename() -> &'static str {
2676        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewMetadata"
2677    }
2678}
2679
2680/// Request message for BigtableInstanceAdmin.GetLogicalView.
2681#[derive(Clone, Default, PartialEq)]
2682#[non_exhaustive]
2683pub struct GetLogicalViewRequest {
2684    /// Required. The unique name of the requested logical view. Values are of the
2685    /// form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2686    pub name: std::string::String,
2687
2688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2689}
2690
2691impl GetLogicalViewRequest {
2692    pub fn new() -> Self {
2693        std::default::Default::default()
2694    }
2695
2696    /// Sets the value of [name][crate::model::GetLogicalViewRequest::name].
2697    ///
2698    /// # Example
2699    /// ```ignore,no_run
2700    /// # use google_cloud_bigtable_admin_v2::model::GetLogicalViewRequest;
2701    /// let x = GetLogicalViewRequest::new().set_name("example");
2702    /// ```
2703    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2704        self.name = v.into();
2705        self
2706    }
2707}
2708
2709impl wkt::message::Message for GetLogicalViewRequest {
2710    fn typename() -> &'static str {
2711        "type.googleapis.com/google.bigtable.admin.v2.GetLogicalViewRequest"
2712    }
2713}
2714
2715/// Request message for BigtableInstanceAdmin.ListLogicalViews.
2716#[derive(Clone, Default, PartialEq)]
2717#[non_exhaustive]
2718pub struct ListLogicalViewsRequest {
2719    /// Required. The unique name of the instance for which the list of logical
2720    /// views is requested. Values are of the form
2721    /// `projects/{project}/instances/{instance}`.
2722    pub parent: std::string::String,
2723
2724    /// Optional. The maximum number of logical views to return. The service may
2725    /// return fewer than this value
2726    pub page_size: i32,
2727
2728    /// Optional. A page token, received from a previous `ListLogicalViews` call.
2729    /// Provide this to retrieve the subsequent page.
2730    ///
2731    /// When paginating, all other parameters provided to `ListLogicalViews` must
2732    /// match the call that provided the page token.
2733    pub page_token: std::string::String,
2734
2735    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2736}
2737
2738impl ListLogicalViewsRequest {
2739    pub fn new() -> Self {
2740        std::default::Default::default()
2741    }
2742
2743    /// Sets the value of [parent][crate::model::ListLogicalViewsRequest::parent].
2744    ///
2745    /// # Example
2746    /// ```ignore,no_run
2747    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2748    /// let x = ListLogicalViewsRequest::new().set_parent("example");
2749    /// ```
2750    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2751        self.parent = v.into();
2752        self
2753    }
2754
2755    /// Sets the value of [page_size][crate::model::ListLogicalViewsRequest::page_size].
2756    ///
2757    /// # Example
2758    /// ```ignore,no_run
2759    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2760    /// let x = ListLogicalViewsRequest::new().set_page_size(42);
2761    /// ```
2762    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2763        self.page_size = v.into();
2764        self
2765    }
2766
2767    /// Sets the value of [page_token][crate::model::ListLogicalViewsRequest::page_token].
2768    ///
2769    /// # Example
2770    /// ```ignore,no_run
2771    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2772    /// let x = ListLogicalViewsRequest::new().set_page_token("example");
2773    /// ```
2774    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2775        self.page_token = v.into();
2776        self
2777    }
2778}
2779
2780impl wkt::message::Message for ListLogicalViewsRequest {
2781    fn typename() -> &'static str {
2782        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsRequest"
2783    }
2784}
2785
2786/// Response message for BigtableInstanceAdmin.ListLogicalViews.
2787#[derive(Clone, Default, PartialEq)]
2788#[non_exhaustive]
2789pub struct ListLogicalViewsResponse {
2790    /// The list of requested logical views.
2791    pub logical_views: std::vec::Vec<crate::model::LogicalView>,
2792
2793    /// A token, which can be sent as `page_token` to retrieve the next page.
2794    /// If this field is omitted, there are no subsequent pages.
2795    pub next_page_token: std::string::String,
2796
2797    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2798}
2799
2800impl ListLogicalViewsResponse {
2801    pub fn new() -> Self {
2802        std::default::Default::default()
2803    }
2804
2805    /// Sets the value of [logical_views][crate::model::ListLogicalViewsResponse::logical_views].
2806    ///
2807    /// # Example
2808    /// ```ignore,no_run
2809    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
2810    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2811    /// let x = ListLogicalViewsResponse::new()
2812    ///     .set_logical_views([
2813    ///         LogicalView::default()/* use setters */,
2814    ///         LogicalView::default()/* use (different) setters */,
2815    ///     ]);
2816    /// ```
2817    pub fn set_logical_views<T, V>(mut self, v: T) -> Self
2818    where
2819        T: std::iter::IntoIterator<Item = V>,
2820        V: std::convert::Into<crate::model::LogicalView>,
2821    {
2822        use std::iter::Iterator;
2823        self.logical_views = v.into_iter().map(|i| i.into()).collect();
2824        self
2825    }
2826
2827    /// Sets the value of [next_page_token][crate::model::ListLogicalViewsResponse::next_page_token].
2828    ///
2829    /// # Example
2830    /// ```ignore,no_run
2831    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
2832    /// let x = ListLogicalViewsResponse::new().set_next_page_token("example");
2833    /// ```
2834    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2835        self.next_page_token = v.into();
2836        self
2837    }
2838}
2839
2840impl wkt::message::Message for ListLogicalViewsResponse {
2841    fn typename() -> &'static str {
2842        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsResponse"
2843    }
2844}
2845
2846#[doc(hidden)]
2847impl gax::paginator::internal::PageableResponse for ListLogicalViewsResponse {
2848    type PageItem = crate::model::LogicalView;
2849
2850    fn items(self) -> std::vec::Vec<Self::PageItem> {
2851        self.logical_views
2852    }
2853
2854    fn next_page_token(&self) -> std::string::String {
2855        use std::clone::Clone;
2856        self.next_page_token.clone()
2857    }
2858}
2859
2860/// Request message for BigtableInstanceAdmin.UpdateLogicalView.
2861#[derive(Clone, Default, PartialEq)]
2862#[non_exhaustive]
2863pub struct UpdateLogicalViewRequest {
2864    /// Required. The logical view to update.
2865    ///
2866    /// The logical view's `name` field is used to identify the view to update.
2867    /// Format:
2868    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2869    pub logical_view: std::option::Option<crate::model::LogicalView>,
2870
2871    /// Optional. The list of fields to update.
2872    pub update_mask: std::option::Option<wkt::FieldMask>,
2873
2874    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2875}
2876
2877impl UpdateLogicalViewRequest {
2878    pub fn new() -> Self {
2879        std::default::Default::default()
2880    }
2881
2882    /// Sets the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2883    ///
2884    /// # Example
2885    /// ```ignore,no_run
2886    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2887    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2888    /// let x = UpdateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
2889    /// ```
2890    pub fn set_logical_view<T>(mut self, v: T) -> Self
2891    where
2892        T: std::convert::Into<crate::model::LogicalView>,
2893    {
2894        self.logical_view = std::option::Option::Some(v.into());
2895        self
2896    }
2897
2898    /// Sets or clears the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2899    ///
2900    /// # Example
2901    /// ```ignore,no_run
2902    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2903    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2904    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
2905    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
2906    /// ```
2907    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2908    where
2909        T: std::convert::Into<crate::model::LogicalView>,
2910    {
2911        self.logical_view = v.map(|x| x.into());
2912        self
2913    }
2914
2915    /// Sets the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
2916    ///
2917    /// # Example
2918    /// ```ignore,no_run
2919    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2920    /// use wkt::FieldMask;
2921    /// let x = UpdateLogicalViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2922    /// ```
2923    pub fn set_update_mask<T>(mut self, v: T) -> Self
2924    where
2925        T: std::convert::Into<wkt::FieldMask>,
2926    {
2927        self.update_mask = std::option::Option::Some(v.into());
2928        self
2929    }
2930
2931    /// Sets or clears the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
2932    ///
2933    /// # Example
2934    /// ```ignore,no_run
2935    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2936    /// use wkt::FieldMask;
2937    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2938    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2939    /// ```
2940    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2941    where
2942        T: std::convert::Into<wkt::FieldMask>,
2943    {
2944        self.update_mask = v.map(|x| x.into());
2945        self
2946    }
2947}
2948
2949impl wkt::message::Message for UpdateLogicalViewRequest {
2950    fn typename() -> &'static str {
2951        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewRequest"
2952    }
2953}
2954
2955/// The metadata for the Operation returned by UpdateLogicalView.
2956#[derive(Clone, Default, PartialEq)]
2957#[non_exhaustive]
2958pub struct UpdateLogicalViewMetadata {
2959    /// The request that prompted the initiation of this UpdateLogicalView
2960    /// operation.
2961    pub original_request: std::option::Option<crate::model::UpdateLogicalViewRequest>,
2962
2963    /// The time at which this operation was started.
2964    pub start_time: std::option::Option<wkt::Timestamp>,
2965
2966    /// If set, the time at which this operation finished or was canceled.
2967    pub end_time: std::option::Option<wkt::Timestamp>,
2968
2969    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2970}
2971
2972impl UpdateLogicalViewMetadata {
2973    pub fn new() -> Self {
2974        std::default::Default::default()
2975    }
2976
2977    /// Sets the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
2978    ///
2979    /// # Example
2980    /// ```ignore,no_run
2981    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
2982    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2983    /// let x = UpdateLogicalViewMetadata::new().set_original_request(UpdateLogicalViewRequest::default()/* use setters */);
2984    /// ```
2985    pub fn set_original_request<T>(mut self, v: T) -> Self
2986    where
2987        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
2988    {
2989        self.original_request = std::option::Option::Some(v.into());
2990        self
2991    }
2992
2993    /// Sets or clears the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
2994    ///
2995    /// # Example
2996    /// ```ignore,no_run
2997    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
2998    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2999    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(Some(UpdateLogicalViewRequest::default()/* use setters */));
3000    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(None::<UpdateLogicalViewRequest>);
3001    /// ```
3002    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3003    where
3004        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
3005    {
3006        self.original_request = v.map(|x| x.into());
3007        self
3008    }
3009
3010    /// Sets the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3011    ///
3012    /// # Example
3013    /// ```ignore,no_run
3014    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3015    /// use wkt::Timestamp;
3016    /// let x = UpdateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3017    /// ```
3018    pub fn set_start_time<T>(mut self, v: T) -> Self
3019    where
3020        T: std::convert::Into<wkt::Timestamp>,
3021    {
3022        self.start_time = std::option::Option::Some(v.into());
3023        self
3024    }
3025
3026    /// Sets or clears the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3027    ///
3028    /// # Example
3029    /// ```ignore,no_run
3030    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3031    /// use wkt::Timestamp;
3032    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3033    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3034    /// ```
3035    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3036    where
3037        T: std::convert::Into<wkt::Timestamp>,
3038    {
3039        self.start_time = v.map(|x| x.into());
3040        self
3041    }
3042
3043    /// Sets the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3044    ///
3045    /// # Example
3046    /// ```ignore,no_run
3047    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3048    /// use wkt::Timestamp;
3049    /// let x = UpdateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3050    /// ```
3051    pub fn set_end_time<T>(mut self, v: T) -> Self
3052    where
3053        T: std::convert::Into<wkt::Timestamp>,
3054    {
3055        self.end_time = std::option::Option::Some(v.into());
3056        self
3057    }
3058
3059    /// Sets or clears the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3060    ///
3061    /// # Example
3062    /// ```ignore,no_run
3063    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3064    /// use wkt::Timestamp;
3065    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3066    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3067    /// ```
3068    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3069    where
3070        T: std::convert::Into<wkt::Timestamp>,
3071    {
3072        self.end_time = v.map(|x| x.into());
3073        self
3074    }
3075}
3076
3077impl wkt::message::Message for UpdateLogicalViewMetadata {
3078    fn typename() -> &'static str {
3079        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewMetadata"
3080    }
3081}
3082
3083/// Request message for BigtableInstanceAdmin.DeleteLogicalView.
3084#[derive(Clone, Default, PartialEq)]
3085#[non_exhaustive]
3086pub struct DeleteLogicalViewRequest {
3087    /// Required. The unique name of the logical view to be deleted.
3088    /// Format:
3089    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
3090    pub name: std::string::String,
3091
3092    /// Optional. The current etag of the logical view.
3093    /// If an etag is provided and does not match the current etag of the
3094    /// logical view, deletion will be blocked and an ABORTED error will be
3095    /// returned.
3096    pub etag: std::string::String,
3097
3098    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3099}
3100
3101impl DeleteLogicalViewRequest {
3102    pub fn new() -> Self {
3103        std::default::Default::default()
3104    }
3105
3106    /// Sets the value of [name][crate::model::DeleteLogicalViewRequest::name].
3107    ///
3108    /// # Example
3109    /// ```ignore,no_run
3110    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3111    /// let x = DeleteLogicalViewRequest::new().set_name("example");
3112    /// ```
3113    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3114        self.name = v.into();
3115        self
3116    }
3117
3118    /// Sets the value of [etag][crate::model::DeleteLogicalViewRequest::etag].
3119    ///
3120    /// # Example
3121    /// ```ignore,no_run
3122    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3123    /// let x = DeleteLogicalViewRequest::new().set_etag("example");
3124    /// ```
3125    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3126        self.etag = v.into();
3127        self
3128    }
3129}
3130
3131impl wkt::message::Message for DeleteLogicalViewRequest {
3132    fn typename() -> &'static str {
3133        "type.googleapis.com/google.bigtable.admin.v2.DeleteLogicalViewRequest"
3134    }
3135}
3136
3137/// Request message for BigtableInstanceAdmin.CreateMaterializedView.
3138#[derive(Clone, Default, PartialEq)]
3139#[non_exhaustive]
3140pub struct CreateMaterializedViewRequest {
3141    /// Required. The parent instance where this materialized view will be created.
3142    /// Format: `projects/{project}/instances/{instance}`.
3143    pub parent: std::string::String,
3144
3145    /// Required. The ID to use for the materialized view, which will become the
3146    /// final component of the materialized view's resource name.
3147    pub materialized_view_id: std::string::String,
3148
3149    /// Required. The materialized view to create.
3150    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3151
3152    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3153}
3154
3155impl CreateMaterializedViewRequest {
3156    pub fn new() -> Self {
3157        std::default::Default::default()
3158    }
3159
3160    /// Sets the value of [parent][crate::model::CreateMaterializedViewRequest::parent].
3161    ///
3162    /// # Example
3163    /// ```ignore,no_run
3164    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3165    /// let x = CreateMaterializedViewRequest::new().set_parent("example");
3166    /// ```
3167    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3168        self.parent = v.into();
3169        self
3170    }
3171
3172    /// Sets the value of [materialized_view_id][crate::model::CreateMaterializedViewRequest::materialized_view_id].
3173    ///
3174    /// # Example
3175    /// ```ignore,no_run
3176    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3177    /// let x = CreateMaterializedViewRequest::new().set_materialized_view_id("example");
3178    /// ```
3179    pub fn set_materialized_view_id<T: std::convert::Into<std::string::String>>(
3180        mut self,
3181        v: T,
3182    ) -> Self {
3183        self.materialized_view_id = v.into();
3184        self
3185    }
3186
3187    /// Sets the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3188    ///
3189    /// # Example
3190    /// ```ignore,no_run
3191    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3192    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3193    /// let x = CreateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3194    /// ```
3195    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3196    where
3197        T: std::convert::Into<crate::model::MaterializedView>,
3198    {
3199        self.materialized_view = std::option::Option::Some(v.into());
3200        self
3201    }
3202
3203    /// Sets or clears the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3204    ///
3205    /// # Example
3206    /// ```ignore,no_run
3207    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3208    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3209    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3210    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3211    /// ```
3212    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3213    where
3214        T: std::convert::Into<crate::model::MaterializedView>,
3215    {
3216        self.materialized_view = v.map(|x| x.into());
3217        self
3218    }
3219}
3220
3221impl wkt::message::Message for CreateMaterializedViewRequest {
3222    fn typename() -> &'static str {
3223        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewRequest"
3224    }
3225}
3226
3227/// The metadata for the Operation returned by CreateMaterializedView.
3228#[derive(Clone, Default, PartialEq)]
3229#[non_exhaustive]
3230pub struct CreateMaterializedViewMetadata {
3231    /// The request that prompted the initiation of this CreateMaterializedView
3232    /// operation.
3233    pub original_request: std::option::Option<crate::model::CreateMaterializedViewRequest>,
3234
3235    /// The time at which this operation started.
3236    pub start_time: std::option::Option<wkt::Timestamp>,
3237
3238    /// If set, the time at which this operation finished or was canceled.
3239    pub end_time: std::option::Option<wkt::Timestamp>,
3240
3241    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3242}
3243
3244impl CreateMaterializedViewMetadata {
3245    pub fn new() -> Self {
3246        std::default::Default::default()
3247    }
3248
3249    /// Sets the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3250    ///
3251    /// # Example
3252    /// ```ignore,no_run
3253    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3254    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3255    /// let x = CreateMaterializedViewMetadata::new().set_original_request(CreateMaterializedViewRequest::default()/* use setters */);
3256    /// ```
3257    pub fn set_original_request<T>(mut self, v: T) -> Self
3258    where
3259        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3260    {
3261        self.original_request = std::option::Option::Some(v.into());
3262        self
3263    }
3264
3265    /// Sets or clears the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3266    ///
3267    /// # Example
3268    /// ```ignore,no_run
3269    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3270    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3271    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(Some(CreateMaterializedViewRequest::default()/* use setters */));
3272    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(None::<CreateMaterializedViewRequest>);
3273    /// ```
3274    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3275    where
3276        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3277    {
3278        self.original_request = v.map(|x| x.into());
3279        self
3280    }
3281
3282    /// Sets the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3283    ///
3284    /// # Example
3285    /// ```ignore,no_run
3286    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3287    /// use wkt::Timestamp;
3288    /// let x = CreateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3289    /// ```
3290    pub fn set_start_time<T>(mut self, v: T) -> Self
3291    where
3292        T: std::convert::Into<wkt::Timestamp>,
3293    {
3294        self.start_time = std::option::Option::Some(v.into());
3295        self
3296    }
3297
3298    /// Sets or clears the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3299    ///
3300    /// # Example
3301    /// ```ignore,no_run
3302    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3303    /// use wkt::Timestamp;
3304    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3305    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3306    /// ```
3307    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3308    where
3309        T: std::convert::Into<wkt::Timestamp>,
3310    {
3311        self.start_time = v.map(|x| x.into());
3312        self
3313    }
3314
3315    /// Sets the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3316    ///
3317    /// # Example
3318    /// ```ignore,no_run
3319    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3320    /// use wkt::Timestamp;
3321    /// let x = CreateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3322    /// ```
3323    pub fn set_end_time<T>(mut self, v: T) -> Self
3324    where
3325        T: std::convert::Into<wkt::Timestamp>,
3326    {
3327        self.end_time = std::option::Option::Some(v.into());
3328        self
3329    }
3330
3331    /// Sets or clears the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3332    ///
3333    /// # Example
3334    /// ```ignore,no_run
3335    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3336    /// use wkt::Timestamp;
3337    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3338    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3339    /// ```
3340    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3341    where
3342        T: std::convert::Into<wkt::Timestamp>,
3343    {
3344        self.end_time = v.map(|x| x.into());
3345        self
3346    }
3347}
3348
3349impl wkt::message::Message for CreateMaterializedViewMetadata {
3350    fn typename() -> &'static str {
3351        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewMetadata"
3352    }
3353}
3354
3355/// Request message for BigtableInstanceAdmin.GetMaterializedView.
3356#[derive(Clone, Default, PartialEq)]
3357#[non_exhaustive]
3358pub struct GetMaterializedViewRequest {
3359    /// Required. The unique name of the requested materialized view. Values are of
3360    /// the form
3361    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3362    pub name: std::string::String,
3363
3364    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3365}
3366
3367impl GetMaterializedViewRequest {
3368    pub fn new() -> Self {
3369        std::default::Default::default()
3370    }
3371
3372    /// Sets the value of [name][crate::model::GetMaterializedViewRequest::name].
3373    ///
3374    /// # Example
3375    /// ```ignore,no_run
3376    /// # use google_cloud_bigtable_admin_v2::model::GetMaterializedViewRequest;
3377    /// let x = GetMaterializedViewRequest::new().set_name("example");
3378    /// ```
3379    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3380        self.name = v.into();
3381        self
3382    }
3383}
3384
3385impl wkt::message::Message for GetMaterializedViewRequest {
3386    fn typename() -> &'static str {
3387        "type.googleapis.com/google.bigtable.admin.v2.GetMaterializedViewRequest"
3388    }
3389}
3390
3391/// Request message for BigtableInstanceAdmin.ListMaterializedViews.
3392#[derive(Clone, Default, PartialEq)]
3393#[non_exhaustive]
3394pub struct ListMaterializedViewsRequest {
3395    /// Required. The unique name of the instance for which the list of
3396    /// materialized views is requested. Values are of the form
3397    /// `projects/{project}/instances/{instance}`.
3398    pub parent: std::string::String,
3399
3400    /// Optional. The maximum number of materialized views to return. The service
3401    /// may return fewer than this value
3402    pub page_size: i32,
3403
3404    /// Optional. A page token, received from a previous `ListMaterializedViews`
3405    /// call. Provide this to retrieve the subsequent page.
3406    ///
3407    /// When paginating, all other parameters provided to `ListMaterializedViews`
3408    /// must match the call that provided the page token.
3409    pub page_token: std::string::String,
3410
3411    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3412}
3413
3414impl ListMaterializedViewsRequest {
3415    pub fn new() -> Self {
3416        std::default::Default::default()
3417    }
3418
3419    /// Sets the value of [parent][crate::model::ListMaterializedViewsRequest::parent].
3420    ///
3421    /// # Example
3422    /// ```ignore,no_run
3423    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3424    /// let x = ListMaterializedViewsRequest::new().set_parent("example");
3425    /// ```
3426    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3427        self.parent = v.into();
3428        self
3429    }
3430
3431    /// Sets the value of [page_size][crate::model::ListMaterializedViewsRequest::page_size].
3432    ///
3433    /// # Example
3434    /// ```ignore,no_run
3435    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3436    /// let x = ListMaterializedViewsRequest::new().set_page_size(42);
3437    /// ```
3438    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3439        self.page_size = v.into();
3440        self
3441    }
3442
3443    /// Sets the value of [page_token][crate::model::ListMaterializedViewsRequest::page_token].
3444    ///
3445    /// # Example
3446    /// ```ignore,no_run
3447    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3448    /// let x = ListMaterializedViewsRequest::new().set_page_token("example");
3449    /// ```
3450    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3451        self.page_token = v.into();
3452        self
3453    }
3454}
3455
3456impl wkt::message::Message for ListMaterializedViewsRequest {
3457    fn typename() -> &'static str {
3458        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsRequest"
3459    }
3460}
3461
3462/// Response message for BigtableInstanceAdmin.ListMaterializedViews.
3463#[derive(Clone, Default, PartialEq)]
3464#[non_exhaustive]
3465pub struct ListMaterializedViewsResponse {
3466    /// The list of requested materialized views.
3467    pub materialized_views: std::vec::Vec<crate::model::MaterializedView>,
3468
3469    /// A token, which can be sent as `page_token` to retrieve the next page.
3470    /// If this field is omitted, there are no subsequent pages.
3471    pub next_page_token: std::string::String,
3472
3473    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3474}
3475
3476impl ListMaterializedViewsResponse {
3477    pub fn new() -> Self {
3478        std::default::Default::default()
3479    }
3480
3481    /// Sets the value of [materialized_views][crate::model::ListMaterializedViewsResponse::materialized_views].
3482    ///
3483    /// # Example
3484    /// ```ignore,no_run
3485    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
3486    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3487    /// let x = ListMaterializedViewsResponse::new()
3488    ///     .set_materialized_views([
3489    ///         MaterializedView::default()/* use setters */,
3490    ///         MaterializedView::default()/* use (different) setters */,
3491    ///     ]);
3492    /// ```
3493    pub fn set_materialized_views<T, V>(mut self, v: T) -> Self
3494    where
3495        T: std::iter::IntoIterator<Item = V>,
3496        V: std::convert::Into<crate::model::MaterializedView>,
3497    {
3498        use std::iter::Iterator;
3499        self.materialized_views = v.into_iter().map(|i| i.into()).collect();
3500        self
3501    }
3502
3503    /// Sets the value of [next_page_token][crate::model::ListMaterializedViewsResponse::next_page_token].
3504    ///
3505    /// # Example
3506    /// ```ignore,no_run
3507    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
3508    /// let x = ListMaterializedViewsResponse::new().set_next_page_token("example");
3509    /// ```
3510    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3511        self.next_page_token = v.into();
3512        self
3513    }
3514}
3515
3516impl wkt::message::Message for ListMaterializedViewsResponse {
3517    fn typename() -> &'static str {
3518        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsResponse"
3519    }
3520}
3521
3522#[doc(hidden)]
3523impl gax::paginator::internal::PageableResponse for ListMaterializedViewsResponse {
3524    type PageItem = crate::model::MaterializedView;
3525
3526    fn items(self) -> std::vec::Vec<Self::PageItem> {
3527        self.materialized_views
3528    }
3529
3530    fn next_page_token(&self) -> std::string::String {
3531        use std::clone::Clone;
3532        self.next_page_token.clone()
3533    }
3534}
3535
3536/// Request message for BigtableInstanceAdmin.UpdateMaterializedView.
3537#[derive(Clone, Default, PartialEq)]
3538#[non_exhaustive]
3539pub struct UpdateMaterializedViewRequest {
3540    /// Required. The materialized view to update.
3541    ///
3542    /// The materialized view's `name` field is used to identify the view to
3543    /// update. Format:
3544    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3545    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3546
3547    /// Optional. The list of fields to update.
3548    pub update_mask: std::option::Option<wkt::FieldMask>,
3549
3550    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3551}
3552
3553impl UpdateMaterializedViewRequest {
3554    pub fn new() -> Self {
3555        std::default::Default::default()
3556    }
3557
3558    /// Sets the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3559    ///
3560    /// # Example
3561    /// ```ignore,no_run
3562    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3563    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3564    /// let x = UpdateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3565    /// ```
3566    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3567    where
3568        T: std::convert::Into<crate::model::MaterializedView>,
3569    {
3570        self.materialized_view = std::option::Option::Some(v.into());
3571        self
3572    }
3573
3574    /// Sets or clears the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3575    ///
3576    /// # Example
3577    /// ```ignore,no_run
3578    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3579    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3580    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3581    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3582    /// ```
3583    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3584    where
3585        T: std::convert::Into<crate::model::MaterializedView>,
3586    {
3587        self.materialized_view = v.map(|x| x.into());
3588        self
3589    }
3590
3591    /// Sets the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3592    ///
3593    /// # Example
3594    /// ```ignore,no_run
3595    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3596    /// use wkt::FieldMask;
3597    /// let x = UpdateMaterializedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3598    /// ```
3599    pub fn set_update_mask<T>(mut self, v: T) -> Self
3600    where
3601        T: std::convert::Into<wkt::FieldMask>,
3602    {
3603        self.update_mask = std::option::Option::Some(v.into());
3604        self
3605    }
3606
3607    /// Sets or clears the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3608    ///
3609    /// # Example
3610    /// ```ignore,no_run
3611    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3612    /// use wkt::FieldMask;
3613    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3614    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3615    /// ```
3616    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3617    where
3618        T: std::convert::Into<wkt::FieldMask>,
3619    {
3620        self.update_mask = v.map(|x| x.into());
3621        self
3622    }
3623}
3624
3625impl wkt::message::Message for UpdateMaterializedViewRequest {
3626    fn typename() -> &'static str {
3627        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewRequest"
3628    }
3629}
3630
3631/// The metadata for the Operation returned by UpdateMaterializedView.
3632#[derive(Clone, Default, PartialEq)]
3633#[non_exhaustive]
3634pub struct UpdateMaterializedViewMetadata {
3635    /// The request that prompted the initiation of this UpdateMaterializedView
3636    /// operation.
3637    pub original_request: std::option::Option<crate::model::UpdateMaterializedViewRequest>,
3638
3639    /// The time at which this operation was started.
3640    pub start_time: std::option::Option<wkt::Timestamp>,
3641
3642    /// If set, the time at which this operation finished or was canceled.
3643    pub end_time: std::option::Option<wkt::Timestamp>,
3644
3645    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3646}
3647
3648impl UpdateMaterializedViewMetadata {
3649    pub fn new() -> Self {
3650        std::default::Default::default()
3651    }
3652
3653    /// Sets the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
3654    ///
3655    /// # Example
3656    /// ```ignore,no_run
3657    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3658    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3659    /// let x = UpdateMaterializedViewMetadata::new().set_original_request(UpdateMaterializedViewRequest::default()/* use setters */);
3660    /// ```
3661    pub fn set_original_request<T>(mut self, v: T) -> Self
3662    where
3663        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
3664    {
3665        self.original_request = std::option::Option::Some(v.into());
3666        self
3667    }
3668
3669    /// Sets or clears the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
3670    ///
3671    /// # Example
3672    /// ```ignore,no_run
3673    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3674    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3675    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(Some(UpdateMaterializedViewRequest::default()/* use setters */));
3676    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(None::<UpdateMaterializedViewRequest>);
3677    /// ```
3678    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3679    where
3680        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
3681    {
3682        self.original_request = v.map(|x| x.into());
3683        self
3684    }
3685
3686    /// Sets the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
3687    ///
3688    /// # Example
3689    /// ```ignore,no_run
3690    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3691    /// use wkt::Timestamp;
3692    /// let x = UpdateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3693    /// ```
3694    pub fn set_start_time<T>(mut self, v: T) -> Self
3695    where
3696        T: std::convert::Into<wkt::Timestamp>,
3697    {
3698        self.start_time = std::option::Option::Some(v.into());
3699        self
3700    }
3701
3702    /// Sets or clears the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
3703    ///
3704    /// # Example
3705    /// ```ignore,no_run
3706    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3707    /// use wkt::Timestamp;
3708    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3709    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3710    /// ```
3711    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3712    where
3713        T: std::convert::Into<wkt::Timestamp>,
3714    {
3715        self.start_time = v.map(|x| x.into());
3716        self
3717    }
3718
3719    /// Sets the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
3720    ///
3721    /// # Example
3722    /// ```ignore,no_run
3723    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3724    /// use wkt::Timestamp;
3725    /// let x = UpdateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3726    /// ```
3727    pub fn set_end_time<T>(mut self, v: T) -> Self
3728    where
3729        T: std::convert::Into<wkt::Timestamp>,
3730    {
3731        self.end_time = std::option::Option::Some(v.into());
3732        self
3733    }
3734
3735    /// Sets or clears the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
3736    ///
3737    /// # Example
3738    /// ```ignore,no_run
3739    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3740    /// use wkt::Timestamp;
3741    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3742    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3743    /// ```
3744    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3745    where
3746        T: std::convert::Into<wkt::Timestamp>,
3747    {
3748        self.end_time = v.map(|x| x.into());
3749        self
3750    }
3751}
3752
3753impl wkt::message::Message for UpdateMaterializedViewMetadata {
3754    fn typename() -> &'static str {
3755        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewMetadata"
3756    }
3757}
3758
3759/// Request message for BigtableInstanceAdmin.DeleteMaterializedView.
3760#[derive(Clone, Default, PartialEq)]
3761#[non_exhaustive]
3762pub struct DeleteMaterializedViewRequest {
3763    /// Required. The unique name of the materialized view to be deleted.
3764    /// Format:
3765    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3766    pub name: std::string::String,
3767
3768    /// Optional. The current etag of the materialized view.
3769    /// If an etag is provided and does not match the current etag of the
3770    /// materialized view, deletion will be blocked and an ABORTED error will be
3771    /// returned.
3772    pub etag: std::string::String,
3773
3774    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3775}
3776
3777impl DeleteMaterializedViewRequest {
3778    pub fn new() -> Self {
3779        std::default::Default::default()
3780    }
3781
3782    /// Sets the value of [name][crate::model::DeleteMaterializedViewRequest::name].
3783    ///
3784    /// # Example
3785    /// ```ignore,no_run
3786    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
3787    /// let x = DeleteMaterializedViewRequest::new().set_name("example");
3788    /// ```
3789    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3790        self.name = v.into();
3791        self
3792    }
3793
3794    /// Sets the value of [etag][crate::model::DeleteMaterializedViewRequest::etag].
3795    ///
3796    /// # Example
3797    /// ```ignore,no_run
3798    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
3799    /// let x = DeleteMaterializedViewRequest::new().set_etag("example");
3800    /// ```
3801    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3802        self.etag = v.into();
3803        self
3804    }
3805}
3806
3807impl wkt::message::Message for DeleteMaterializedViewRequest {
3808    fn typename() -> &'static str {
3809        "type.googleapis.com/google.bigtable.admin.v2.DeleteMaterializedViewRequest"
3810    }
3811}
3812
3813/// The request for
3814/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
3815///
3816/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
3817#[derive(Clone, Default, PartialEq)]
3818#[non_exhaustive]
3819pub struct RestoreTableRequest {
3820    /// Required. The name of the instance in which to create the restored
3821    /// table. Values are of the form `projects/<project>/instances/<instance>`.
3822    pub parent: std::string::String,
3823
3824    /// Required. The id of the table to create and restore to. This
3825    /// table must not already exist. The `table_id` appended to
3826    /// `parent` forms the full table name of the form
3827    /// `projects/<project>/instances/<instance>/tables/<table_id>`.
3828    pub table_id: std::string::String,
3829
3830    /// Required. The source from which to restore.
3831    pub source: std::option::Option<crate::model::restore_table_request::Source>,
3832
3833    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3834}
3835
3836impl RestoreTableRequest {
3837    pub fn new() -> Self {
3838        std::default::Default::default()
3839    }
3840
3841    /// Sets the value of [parent][crate::model::RestoreTableRequest::parent].
3842    ///
3843    /// # Example
3844    /// ```ignore,no_run
3845    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3846    /// let x = RestoreTableRequest::new().set_parent("example");
3847    /// ```
3848    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3849        self.parent = v.into();
3850        self
3851    }
3852
3853    /// Sets the value of [table_id][crate::model::RestoreTableRequest::table_id].
3854    ///
3855    /// # Example
3856    /// ```ignore,no_run
3857    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3858    /// let x = RestoreTableRequest::new().set_table_id("example");
3859    /// ```
3860    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3861        self.table_id = v.into();
3862        self
3863    }
3864
3865    /// Sets the value of [source][crate::model::RestoreTableRequest::source].
3866    ///
3867    /// Note that all the setters affecting `source` are mutually
3868    /// exclusive.
3869    ///
3870    /// # Example
3871    /// ```ignore,no_run
3872    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3873    /// use google_cloud_bigtable_admin_v2::model::restore_table_request::Source;
3874    /// let x = RestoreTableRequest::new().set_source(Some(Source::Backup("example".to_string())));
3875    /// ```
3876    pub fn set_source<
3877        T: std::convert::Into<std::option::Option<crate::model::restore_table_request::Source>>,
3878    >(
3879        mut self,
3880        v: T,
3881    ) -> Self {
3882        self.source = v.into();
3883        self
3884    }
3885
3886    /// The value of [source][crate::model::RestoreTableRequest::source]
3887    /// if it holds a `Backup`, `None` if the field is not set or
3888    /// holds a different branch.
3889    pub fn backup(&self) -> std::option::Option<&std::string::String> {
3890        #[allow(unreachable_patterns)]
3891        self.source.as_ref().and_then(|v| match v {
3892            crate::model::restore_table_request::Source::Backup(v) => std::option::Option::Some(v),
3893            _ => std::option::Option::None,
3894        })
3895    }
3896
3897    /// Sets the value of [source][crate::model::RestoreTableRequest::source]
3898    /// to hold a `Backup`.
3899    ///
3900    /// Note that all the setters affecting `source` are
3901    /// mutually exclusive.
3902    ///
3903    /// # Example
3904    /// ```ignore,no_run
3905    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3906    /// let x = RestoreTableRequest::new().set_backup("example");
3907    /// assert!(x.backup().is_some());
3908    /// ```
3909    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3910        self.source = std::option::Option::Some(
3911            crate::model::restore_table_request::Source::Backup(v.into()),
3912        );
3913        self
3914    }
3915}
3916
3917impl wkt::message::Message for RestoreTableRequest {
3918    fn typename() -> &'static str {
3919        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableRequest"
3920    }
3921}
3922
3923/// Defines additional types related to [RestoreTableRequest].
3924pub mod restore_table_request {
3925    #[allow(unused_imports)]
3926    use super::*;
3927
3928    /// Required. The source from which to restore.
3929    #[derive(Clone, Debug, PartialEq)]
3930    #[non_exhaustive]
3931    pub enum Source {
3932        /// Name of the backup from which to restore.  Values are of the form
3933        /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
3934        Backup(std::string::String),
3935    }
3936}
3937
3938/// Metadata type for the long-running operation returned by
3939/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
3940///
3941/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
3942#[derive(Clone, Default, PartialEq)]
3943#[non_exhaustive]
3944pub struct RestoreTableMetadata {
3945    /// Name of the table being created and restored to.
3946    pub name: std::string::String,
3947
3948    /// The type of the restore source.
3949    pub source_type: crate::model::RestoreSourceType,
3950
3951    /// If exists, the name of the long-running operation that will be used to
3952    /// track the post-restore optimization process to optimize the performance of
3953    /// the restored table. The metadata type of the long-running operation is
3954    /// [OptimizeRestoreTableMetadata][]. The response type is
3955    /// [Empty][google.protobuf.Empty]. This long-running operation may be
3956    /// automatically created by the system if applicable after the
3957    /// RestoreTable long-running operation completes successfully. This operation
3958    /// may not be created if the table is already optimized or the restore was
3959    /// not successful.
3960    ///
3961    /// [google.protobuf.Empty]: wkt::Empty
3962    pub optimize_table_operation_name: std::string::String,
3963
3964    /// The progress of the
3965    /// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]
3966    /// operation.
3967    ///
3968    /// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
3969    pub progress: std::option::Option<crate::model::OperationProgress>,
3970
3971    /// Information about the source used to restore the table, as specified by
3972    /// `source` in
3973    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
3974    ///
3975    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
3976    pub source_info: std::option::Option<crate::model::restore_table_metadata::SourceInfo>,
3977
3978    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3979}
3980
3981impl RestoreTableMetadata {
3982    pub fn new() -> Self {
3983        std::default::Default::default()
3984    }
3985
3986    /// Sets the value of [name][crate::model::RestoreTableMetadata::name].
3987    ///
3988    /// # Example
3989    /// ```ignore,no_run
3990    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
3991    /// let x = RestoreTableMetadata::new().set_name("example");
3992    /// ```
3993    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3994        self.name = v.into();
3995        self
3996    }
3997
3998    /// Sets the value of [source_type][crate::model::RestoreTableMetadata::source_type].
3999    ///
4000    /// # Example
4001    /// ```ignore,no_run
4002    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4003    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
4004    /// let x0 = RestoreTableMetadata::new().set_source_type(RestoreSourceType::Backup);
4005    /// ```
4006    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
4007        mut self,
4008        v: T,
4009    ) -> Self {
4010        self.source_type = v.into();
4011        self
4012    }
4013
4014    /// Sets the value of [optimize_table_operation_name][crate::model::RestoreTableMetadata::optimize_table_operation_name].
4015    ///
4016    /// # Example
4017    /// ```ignore,no_run
4018    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4019    /// let x = RestoreTableMetadata::new().set_optimize_table_operation_name("example");
4020    /// ```
4021    pub fn set_optimize_table_operation_name<T: std::convert::Into<std::string::String>>(
4022        mut self,
4023        v: T,
4024    ) -> Self {
4025        self.optimize_table_operation_name = v.into();
4026        self
4027    }
4028
4029    /// Sets the value of [progress][crate::model::RestoreTableMetadata::progress].
4030    ///
4031    /// # Example
4032    /// ```ignore,no_run
4033    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4034    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4035    /// let x = RestoreTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4036    /// ```
4037    pub fn set_progress<T>(mut self, v: T) -> Self
4038    where
4039        T: std::convert::Into<crate::model::OperationProgress>,
4040    {
4041        self.progress = std::option::Option::Some(v.into());
4042        self
4043    }
4044
4045    /// Sets or clears the value of [progress][crate::model::RestoreTableMetadata::progress].
4046    ///
4047    /// # Example
4048    /// ```ignore,no_run
4049    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4050    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4051    /// let x = RestoreTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4052    /// let x = RestoreTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4053    /// ```
4054    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4055    where
4056        T: std::convert::Into<crate::model::OperationProgress>,
4057    {
4058        self.progress = v.map(|x| x.into());
4059        self
4060    }
4061
4062    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info].
4063    ///
4064    /// Note that all the setters affecting `source_info` are mutually
4065    /// exclusive.
4066    ///
4067    /// # Example
4068    /// ```ignore,no_run
4069    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4070    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4071    /// let x = RestoreTableMetadata::new().set_source_info(Some(
4072    ///     google_cloud_bigtable_admin_v2::model::restore_table_metadata::SourceInfo::BackupInfo(BackupInfo::default().into())));
4073    /// ```
4074    pub fn set_source_info<
4075        T: std::convert::Into<std::option::Option<crate::model::restore_table_metadata::SourceInfo>>,
4076    >(
4077        mut self,
4078        v: T,
4079    ) -> Self {
4080        self.source_info = v.into();
4081        self
4082    }
4083
4084    /// The value of [source_info][crate::model::RestoreTableMetadata::source_info]
4085    /// if it holds a `BackupInfo`, `None` if the field is not set or
4086    /// holds a different branch.
4087    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
4088        #[allow(unreachable_patterns)]
4089        self.source_info.as_ref().and_then(|v| match v {
4090            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v) => {
4091                std::option::Option::Some(v)
4092            }
4093            _ => std::option::Option::None,
4094        })
4095    }
4096
4097    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info]
4098    /// to hold a `BackupInfo`.
4099    ///
4100    /// Note that all the setters affecting `source_info` are
4101    /// mutually exclusive.
4102    ///
4103    /// # Example
4104    /// ```ignore,no_run
4105    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4106    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4107    /// let x = RestoreTableMetadata::new().set_backup_info(BackupInfo::default()/* use setters */);
4108    /// assert!(x.backup_info().is_some());
4109    /// ```
4110    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
4111        mut self,
4112        v: T,
4113    ) -> Self {
4114        self.source_info = std::option::Option::Some(
4115            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v.into()),
4116        );
4117        self
4118    }
4119}
4120
4121impl wkt::message::Message for RestoreTableMetadata {
4122    fn typename() -> &'static str {
4123        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableMetadata"
4124    }
4125}
4126
4127/// Defines additional types related to [RestoreTableMetadata].
4128pub mod restore_table_metadata {
4129    #[allow(unused_imports)]
4130    use super::*;
4131
4132    /// Information about the source used to restore the table, as specified by
4133    /// `source` in
4134    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
4135    ///
4136    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
4137    #[derive(Clone, Debug, PartialEq)]
4138    #[non_exhaustive]
4139    pub enum SourceInfo {
4140        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
4141    }
4142}
4143
4144/// Metadata type for the long-running operation used to track the progress
4145/// of optimizations performed on a newly restored table. This long-running
4146/// operation is automatically created by the system after the successful
4147/// completion of a table restore, and cannot be cancelled.
4148#[derive(Clone, Default, PartialEq)]
4149#[non_exhaustive]
4150pub struct OptimizeRestoredTableMetadata {
4151    /// Name of the restored table being optimized.
4152    pub name: std::string::String,
4153
4154    /// The progress of the post-restore optimizations.
4155    pub progress: std::option::Option<crate::model::OperationProgress>,
4156
4157    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4158}
4159
4160impl OptimizeRestoredTableMetadata {
4161    pub fn new() -> Self {
4162        std::default::Default::default()
4163    }
4164
4165    /// Sets the value of [name][crate::model::OptimizeRestoredTableMetadata::name].
4166    ///
4167    /// # Example
4168    /// ```ignore,no_run
4169    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4170    /// let x = OptimizeRestoredTableMetadata::new().set_name("example");
4171    /// ```
4172    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4173        self.name = v.into();
4174        self
4175    }
4176
4177    /// Sets the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4178    ///
4179    /// # Example
4180    /// ```ignore,no_run
4181    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4182    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4183    /// let x = OptimizeRestoredTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4184    /// ```
4185    pub fn set_progress<T>(mut self, v: T) -> Self
4186    where
4187        T: std::convert::Into<crate::model::OperationProgress>,
4188    {
4189        self.progress = std::option::Option::Some(v.into());
4190        self
4191    }
4192
4193    /// Sets or clears the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4194    ///
4195    /// # Example
4196    /// ```ignore,no_run
4197    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4198    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4199    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4200    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4201    /// ```
4202    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4203    where
4204        T: std::convert::Into<crate::model::OperationProgress>,
4205    {
4206        self.progress = v.map(|x| x.into());
4207        self
4208    }
4209}
4210
4211impl wkt::message::Message for OptimizeRestoredTableMetadata {
4212    fn typename() -> &'static str {
4213        "type.googleapis.com/google.bigtable.admin.v2.OptimizeRestoredTableMetadata"
4214    }
4215}
4216
4217/// Request message for
4218/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
4219///
4220/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]: crate::client::BigtableTableAdmin::create_table
4221#[derive(Clone, Default, PartialEq)]
4222#[non_exhaustive]
4223pub struct CreateTableRequest {
4224    /// Required. The unique name of the instance in which to create the table.
4225    /// Values are of the form `projects/{project}/instances/{instance}`.
4226    pub parent: std::string::String,
4227
4228    /// Required. The name by which the new table should be referred to within the
4229    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4230    /// Maximum 50 characters.
4231    pub table_id: std::string::String,
4232
4233    /// Required. The Table to create.
4234    pub table: std::option::Option<crate::model::Table>,
4235
4236    /// The optional list of row keys that will be used to initially split the
4237    /// table into several tablets (tablets are similar to HBase regions).
4238    /// Given two split keys, `s1` and `s2`, three tablets will be created,
4239    /// spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
4240    ///
4241    /// Example:
4242    ///
4243    /// * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
4244    ///   `"other", "zz"]`
4245    /// * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
4246    /// * Key assignment:
4247    ///   - Tablet 1 `[, apple)                => {"a"}.`
4248    ///   - Tablet 2 `[apple, customer_1)      => {"apple", "custom"}.`
4249    ///   - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
4250    ///   - Tablet 4 `[customer_2, other)      => {"customer_2"}.`
4251    ///   - Tablet 5 `[other, )                => {"other", "zz"}.`
4252    pub initial_splits: std::vec::Vec<crate::model::create_table_request::Split>,
4253
4254    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4255}
4256
4257impl CreateTableRequest {
4258    pub fn new() -> Self {
4259        std::default::Default::default()
4260    }
4261
4262    /// Sets the value of [parent][crate::model::CreateTableRequest::parent].
4263    ///
4264    /// # Example
4265    /// ```ignore,no_run
4266    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4267    /// let x = CreateTableRequest::new().set_parent("example");
4268    /// ```
4269    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4270        self.parent = v.into();
4271        self
4272    }
4273
4274    /// Sets the value of [table_id][crate::model::CreateTableRequest::table_id].
4275    ///
4276    /// # Example
4277    /// ```ignore,no_run
4278    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4279    /// let x = CreateTableRequest::new().set_table_id("example");
4280    /// ```
4281    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4282        self.table_id = v.into();
4283        self
4284    }
4285
4286    /// Sets the value of [table][crate::model::CreateTableRequest::table].
4287    ///
4288    /// # Example
4289    /// ```ignore,no_run
4290    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4291    /// use google_cloud_bigtable_admin_v2::model::Table;
4292    /// let x = CreateTableRequest::new().set_table(Table::default()/* use setters */);
4293    /// ```
4294    pub fn set_table<T>(mut self, v: T) -> Self
4295    where
4296        T: std::convert::Into<crate::model::Table>,
4297    {
4298        self.table = std::option::Option::Some(v.into());
4299        self
4300    }
4301
4302    /// Sets or clears the value of [table][crate::model::CreateTableRequest::table].
4303    ///
4304    /// # Example
4305    /// ```ignore,no_run
4306    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4307    /// use google_cloud_bigtable_admin_v2::model::Table;
4308    /// let x = CreateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
4309    /// let x = CreateTableRequest::new().set_or_clear_table(None::<Table>);
4310    /// ```
4311    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4312    where
4313        T: std::convert::Into<crate::model::Table>,
4314    {
4315        self.table = v.map(|x| x.into());
4316        self
4317    }
4318
4319    /// Sets the value of [initial_splits][crate::model::CreateTableRequest::initial_splits].
4320    ///
4321    /// # Example
4322    /// ```ignore,no_run
4323    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4324    /// use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4325    /// let x = CreateTableRequest::new()
4326    ///     .set_initial_splits([
4327    ///         Split::default()/* use setters */,
4328    ///         Split::default()/* use (different) setters */,
4329    ///     ]);
4330    /// ```
4331    pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
4332    where
4333        T: std::iter::IntoIterator<Item = V>,
4334        V: std::convert::Into<crate::model::create_table_request::Split>,
4335    {
4336        use std::iter::Iterator;
4337        self.initial_splits = v.into_iter().map(|i| i.into()).collect();
4338        self
4339    }
4340}
4341
4342impl wkt::message::Message for CreateTableRequest {
4343    fn typename() -> &'static str {
4344        "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest"
4345    }
4346}
4347
4348/// Defines additional types related to [CreateTableRequest].
4349pub mod create_table_request {
4350    #[allow(unused_imports)]
4351    use super::*;
4352
4353    /// An initial split point for a newly created table.
4354    #[derive(Clone, Default, PartialEq)]
4355    #[non_exhaustive]
4356    pub struct Split {
4357        /// Row key to use as an initial tablet boundary.
4358        pub key: ::bytes::Bytes,
4359
4360        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4361    }
4362
4363    impl Split {
4364        pub fn new() -> Self {
4365            std::default::Default::default()
4366        }
4367
4368        /// Sets the value of [key][crate::model::create_table_request::Split::key].
4369        ///
4370        /// # Example
4371        /// ```ignore,no_run
4372        /// # use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4373        /// let x = Split::new().set_key(bytes::Bytes::from_static(b"example"));
4374        /// ```
4375        pub fn set_key<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4376            self.key = v.into();
4377            self
4378        }
4379    }
4380
4381    impl wkt::message::Message for Split {
4382        fn typename() -> &'static str {
4383            "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest.Split"
4384        }
4385    }
4386}
4387
4388/// Request message for
4389/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
4390///
4391/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4392/// feature is not currently available to most Cloud Bigtable customers. This
4393/// feature might be changed in backward-incompatible ways and is not recommended
4394/// for production use. It is not subject to any SLA or deprecation policy.
4395///
4396/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]: crate::client::BigtableTableAdmin::create_table_from_snapshot
4397#[derive(Clone, Default, PartialEq)]
4398#[non_exhaustive]
4399pub struct CreateTableFromSnapshotRequest {
4400    /// Required. The unique name of the instance in which to create the table.
4401    /// Values are of the form `projects/{project}/instances/{instance}`.
4402    pub parent: std::string::String,
4403
4404    /// Required. The name by which the new table should be referred to within the
4405    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4406    pub table_id: std::string::String,
4407
4408    /// Required. The unique name of the snapshot from which to restore the table.
4409    /// The snapshot and the table must be in the same instance. Values are of the
4410    /// form
4411    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
4412    pub source_snapshot: std::string::String,
4413
4414    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4415}
4416
4417impl CreateTableFromSnapshotRequest {
4418    pub fn new() -> Self {
4419        std::default::Default::default()
4420    }
4421
4422    /// Sets the value of [parent][crate::model::CreateTableFromSnapshotRequest::parent].
4423    ///
4424    /// # Example
4425    /// ```ignore,no_run
4426    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4427    /// let x = CreateTableFromSnapshotRequest::new().set_parent("example");
4428    /// ```
4429    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4430        self.parent = v.into();
4431        self
4432    }
4433
4434    /// Sets the value of [table_id][crate::model::CreateTableFromSnapshotRequest::table_id].
4435    ///
4436    /// # Example
4437    /// ```ignore,no_run
4438    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4439    /// let x = CreateTableFromSnapshotRequest::new().set_table_id("example");
4440    /// ```
4441    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4442        self.table_id = v.into();
4443        self
4444    }
4445
4446    /// Sets the value of [source_snapshot][crate::model::CreateTableFromSnapshotRequest::source_snapshot].
4447    ///
4448    /// # Example
4449    /// ```ignore,no_run
4450    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4451    /// let x = CreateTableFromSnapshotRequest::new().set_source_snapshot("example");
4452    /// ```
4453    pub fn set_source_snapshot<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4454        self.source_snapshot = v.into();
4455        self
4456    }
4457}
4458
4459impl wkt::message::Message for CreateTableFromSnapshotRequest {
4460    fn typename() -> &'static str {
4461        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotRequest"
4462    }
4463}
4464
4465/// Request message for
4466/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
4467///
4468/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]: crate::client::BigtableTableAdmin::drop_row_range
4469#[derive(Clone, Default, PartialEq)]
4470#[non_exhaustive]
4471pub struct DropRowRangeRequest {
4472    /// Required. The unique name of the table on which to drop a range of rows.
4473    /// Values are of the form
4474    /// `projects/{project}/instances/{instance}/tables/{table}`.
4475    pub name: std::string::String,
4476
4477    /// Delete all rows or by prefix.
4478    pub target: std::option::Option<crate::model::drop_row_range_request::Target>,
4479
4480    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4481}
4482
4483impl DropRowRangeRequest {
4484    pub fn new() -> Self {
4485        std::default::Default::default()
4486    }
4487
4488    /// Sets the value of [name][crate::model::DropRowRangeRequest::name].
4489    ///
4490    /// # Example
4491    /// ```ignore,no_run
4492    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4493    /// let x = DropRowRangeRequest::new().set_name("example");
4494    /// ```
4495    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4496        self.name = v.into();
4497        self
4498    }
4499
4500    /// Sets the value of [target][crate::model::DropRowRangeRequest::target].
4501    ///
4502    /// Note that all the setters affecting `target` are mutually
4503    /// exclusive.
4504    ///
4505    /// # Example
4506    /// ```ignore,no_run
4507    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4508    /// use google_cloud_bigtable_admin_v2::model::drop_row_range_request::Target;
4509    /// let x = DropRowRangeRequest::new().set_target(Some(Target::RowKeyPrefix(bytes::Bytes::from_static(b"example"))));
4510    /// ```
4511    pub fn set_target<
4512        T: std::convert::Into<std::option::Option<crate::model::drop_row_range_request::Target>>,
4513    >(
4514        mut self,
4515        v: T,
4516    ) -> Self {
4517        self.target = v.into();
4518        self
4519    }
4520
4521    /// The value of [target][crate::model::DropRowRangeRequest::target]
4522    /// if it holds a `RowKeyPrefix`, `None` if the field is not set or
4523    /// holds a different branch.
4524    pub fn row_key_prefix(&self) -> std::option::Option<&::bytes::Bytes> {
4525        #[allow(unreachable_patterns)]
4526        self.target.as_ref().and_then(|v| match v {
4527            crate::model::drop_row_range_request::Target::RowKeyPrefix(v) => {
4528                std::option::Option::Some(v)
4529            }
4530            _ => std::option::Option::None,
4531        })
4532    }
4533
4534    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
4535    /// to hold a `RowKeyPrefix`.
4536    ///
4537    /// Note that all the setters affecting `target` are
4538    /// mutually exclusive.
4539    ///
4540    /// # Example
4541    /// ```ignore,no_run
4542    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4543    /// let x = DropRowRangeRequest::new().set_row_key_prefix(bytes::Bytes::from_static(b"example"));
4544    /// assert!(x.row_key_prefix().is_some());
4545    /// assert!(x.delete_all_data_from_table().is_none());
4546    /// ```
4547    pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4548        self.target = std::option::Option::Some(
4549            crate::model::drop_row_range_request::Target::RowKeyPrefix(v.into()),
4550        );
4551        self
4552    }
4553
4554    /// The value of [target][crate::model::DropRowRangeRequest::target]
4555    /// if it holds a `DeleteAllDataFromTable`, `None` if the field is not set or
4556    /// holds a different branch.
4557    pub fn delete_all_data_from_table(&self) -> std::option::Option<&bool> {
4558        #[allow(unreachable_patterns)]
4559        self.target.as_ref().and_then(|v| match v {
4560            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v) => {
4561                std::option::Option::Some(v)
4562            }
4563            _ => std::option::Option::None,
4564        })
4565    }
4566
4567    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
4568    /// to hold a `DeleteAllDataFromTable`.
4569    ///
4570    /// Note that all the setters affecting `target` are
4571    /// mutually exclusive.
4572    ///
4573    /// # Example
4574    /// ```ignore,no_run
4575    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4576    /// let x = DropRowRangeRequest::new().set_delete_all_data_from_table(true);
4577    /// assert!(x.delete_all_data_from_table().is_some());
4578    /// assert!(x.row_key_prefix().is_none());
4579    /// ```
4580    pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4581        self.target = std::option::Option::Some(
4582            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v.into()),
4583        );
4584        self
4585    }
4586}
4587
4588impl wkt::message::Message for DropRowRangeRequest {
4589    fn typename() -> &'static str {
4590        "type.googleapis.com/google.bigtable.admin.v2.DropRowRangeRequest"
4591    }
4592}
4593
4594/// Defines additional types related to [DropRowRangeRequest].
4595pub mod drop_row_range_request {
4596    #[allow(unused_imports)]
4597    use super::*;
4598
4599    /// Delete all rows or by prefix.
4600    #[derive(Clone, Debug, PartialEq)]
4601    #[non_exhaustive]
4602    pub enum Target {
4603        /// Delete all rows that start with this row key prefix. Prefix cannot be
4604        /// zero length.
4605        RowKeyPrefix(::bytes::Bytes),
4606        /// Delete all rows in the table. Setting this to false is a no-op.
4607        DeleteAllDataFromTable(bool),
4608    }
4609}
4610
4611/// Request message for
4612/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
4613///
4614/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
4615#[derive(Clone, Default, PartialEq)]
4616#[non_exhaustive]
4617pub struct ListTablesRequest {
4618    /// Required. The unique name of the instance for which tables should be
4619    /// listed. Values are of the form `projects/{project}/instances/{instance}`.
4620    pub parent: std::string::String,
4621
4622    /// The view to be applied to the returned tables' fields.
4623    /// NAME_ONLY view (default) and REPLICATION_VIEW are supported.
4624    pub view: crate::model::table::View,
4625
4626    /// Maximum number of results per page.
4627    ///
4628    /// A page_size of zero lets the server choose the number of items to return.
4629    /// A page_size which is strictly positive will return at most that many items.
4630    /// A negative page_size will cause an error.
4631    ///
4632    /// Following the first request, subsequent paginated calls are not required
4633    /// to pass a page_size. If a page_size is set in subsequent calls, it must
4634    /// match the page_size given in the first request.
4635    pub page_size: i32,
4636
4637    /// The value of `next_page_token` returned by a previous call.
4638    pub page_token: std::string::String,
4639
4640    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4641}
4642
4643impl ListTablesRequest {
4644    pub fn new() -> Self {
4645        std::default::Default::default()
4646    }
4647
4648    /// Sets the value of [parent][crate::model::ListTablesRequest::parent].
4649    ///
4650    /// # Example
4651    /// ```ignore,no_run
4652    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4653    /// let x = ListTablesRequest::new().set_parent("example");
4654    /// ```
4655    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4656        self.parent = v.into();
4657        self
4658    }
4659
4660    /// Sets the value of [view][crate::model::ListTablesRequest::view].
4661    ///
4662    /// # Example
4663    /// ```ignore,no_run
4664    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4665    /// use google_cloud_bigtable_admin_v2::model::table::View;
4666    /// let x0 = ListTablesRequest::new().set_view(View::NameOnly);
4667    /// let x1 = ListTablesRequest::new().set_view(View::SchemaView);
4668    /// let x2 = ListTablesRequest::new().set_view(View::ReplicationView);
4669    /// ```
4670    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
4671        self.view = v.into();
4672        self
4673    }
4674
4675    /// Sets the value of [page_size][crate::model::ListTablesRequest::page_size].
4676    ///
4677    /// # Example
4678    /// ```ignore,no_run
4679    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4680    /// let x = ListTablesRequest::new().set_page_size(42);
4681    /// ```
4682    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4683        self.page_size = v.into();
4684        self
4685    }
4686
4687    /// Sets the value of [page_token][crate::model::ListTablesRequest::page_token].
4688    ///
4689    /// # Example
4690    /// ```ignore,no_run
4691    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4692    /// let x = ListTablesRequest::new().set_page_token("example");
4693    /// ```
4694    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4695        self.page_token = v.into();
4696        self
4697    }
4698}
4699
4700impl wkt::message::Message for ListTablesRequest {
4701    fn typename() -> &'static str {
4702        "type.googleapis.com/google.bigtable.admin.v2.ListTablesRequest"
4703    }
4704}
4705
4706/// Response message for
4707/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
4708///
4709/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
4710#[derive(Clone, Default, PartialEq)]
4711#[non_exhaustive]
4712pub struct ListTablesResponse {
4713    /// The tables present in the requested instance.
4714    pub tables: std::vec::Vec<crate::model::Table>,
4715
4716    /// Set if not all tables could be returned in a single response.
4717    /// Pass this value to `page_token` in another request to get the next
4718    /// page of results.
4719    pub next_page_token: std::string::String,
4720
4721    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4722}
4723
4724impl ListTablesResponse {
4725    pub fn new() -> Self {
4726        std::default::Default::default()
4727    }
4728
4729    /// Sets the value of [tables][crate::model::ListTablesResponse::tables].
4730    ///
4731    /// # Example
4732    /// ```ignore,no_run
4733    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
4734    /// use google_cloud_bigtable_admin_v2::model::Table;
4735    /// let x = ListTablesResponse::new()
4736    ///     .set_tables([
4737    ///         Table::default()/* use setters */,
4738    ///         Table::default()/* use (different) setters */,
4739    ///     ]);
4740    /// ```
4741    pub fn set_tables<T, V>(mut self, v: T) -> Self
4742    where
4743        T: std::iter::IntoIterator<Item = V>,
4744        V: std::convert::Into<crate::model::Table>,
4745    {
4746        use std::iter::Iterator;
4747        self.tables = v.into_iter().map(|i| i.into()).collect();
4748        self
4749    }
4750
4751    /// Sets the value of [next_page_token][crate::model::ListTablesResponse::next_page_token].
4752    ///
4753    /// # Example
4754    /// ```ignore,no_run
4755    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
4756    /// let x = ListTablesResponse::new().set_next_page_token("example");
4757    /// ```
4758    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4759        self.next_page_token = v.into();
4760        self
4761    }
4762}
4763
4764impl wkt::message::Message for ListTablesResponse {
4765    fn typename() -> &'static str {
4766        "type.googleapis.com/google.bigtable.admin.v2.ListTablesResponse"
4767    }
4768}
4769
4770#[doc(hidden)]
4771impl gax::paginator::internal::PageableResponse for ListTablesResponse {
4772    type PageItem = crate::model::Table;
4773
4774    fn items(self) -> std::vec::Vec<Self::PageItem> {
4775        self.tables
4776    }
4777
4778    fn next_page_token(&self) -> std::string::String {
4779        use std::clone::Clone;
4780        self.next_page_token.clone()
4781    }
4782}
4783
4784/// Request message for
4785/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
4786///
4787/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable]: crate::client::BigtableTableAdmin::get_table
4788#[derive(Clone, Default, PartialEq)]
4789#[non_exhaustive]
4790pub struct GetTableRequest {
4791    /// Required. The unique name of the requested table.
4792    /// Values are of the form
4793    /// `projects/{project}/instances/{instance}/tables/{table}`.
4794    pub name: std::string::String,
4795
4796    /// The view to be applied to the returned table's fields.
4797    /// Defaults to `SCHEMA_VIEW` if unspecified.
4798    pub view: crate::model::table::View,
4799
4800    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4801}
4802
4803impl GetTableRequest {
4804    pub fn new() -> Self {
4805        std::default::Default::default()
4806    }
4807
4808    /// Sets the value of [name][crate::model::GetTableRequest::name].
4809    ///
4810    /// # Example
4811    /// ```ignore,no_run
4812    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
4813    /// let x = GetTableRequest::new().set_name("example");
4814    /// ```
4815    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4816        self.name = v.into();
4817        self
4818    }
4819
4820    /// Sets the value of [view][crate::model::GetTableRequest::view].
4821    ///
4822    /// # Example
4823    /// ```ignore,no_run
4824    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
4825    /// use google_cloud_bigtable_admin_v2::model::table::View;
4826    /// let x0 = GetTableRequest::new().set_view(View::NameOnly);
4827    /// let x1 = GetTableRequest::new().set_view(View::SchemaView);
4828    /// let x2 = GetTableRequest::new().set_view(View::ReplicationView);
4829    /// ```
4830    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
4831        self.view = v.into();
4832        self
4833    }
4834}
4835
4836impl wkt::message::Message for GetTableRequest {
4837    fn typename() -> &'static str {
4838        "type.googleapis.com/google.bigtable.admin.v2.GetTableRequest"
4839    }
4840}
4841
4842/// The request for
4843/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
4844///
4845/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
4846#[derive(Clone, Default, PartialEq)]
4847#[non_exhaustive]
4848pub struct UpdateTableRequest {
4849    /// Required. The table to update.
4850    /// The table's `name` field is used to identify the table to update.
4851    pub table: std::option::Option<crate::model::Table>,
4852
4853    /// Required. The list of fields to update.
4854    /// A mask specifying which fields (e.g. `change_stream_config`) in the `table`
4855    /// field should be updated. This mask is relative to the `table` field, not to
4856    /// the request message. The wildcard (*) path is currently not supported.
4857    /// Currently UpdateTable is only supported for the following fields:
4858    ///
4859    /// * `change_stream_config`
4860    /// * `change_stream_config.retention_period`
4861    /// * `deletion_protection`
4862    /// * `row_key_schema`
4863    ///
4864    /// If `column_families` is set in `update_mask`, it will return an
4865    /// UNIMPLEMENTED error.
4866    pub update_mask: std::option::Option<wkt::FieldMask>,
4867
4868    /// Optional. If true, ignore safety checks when updating the table.
4869    pub ignore_warnings: bool,
4870
4871    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4872}
4873
4874impl UpdateTableRequest {
4875    pub fn new() -> Self {
4876        std::default::Default::default()
4877    }
4878
4879    /// Sets the value of [table][crate::model::UpdateTableRequest::table].
4880    ///
4881    /// # Example
4882    /// ```ignore,no_run
4883    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4884    /// use google_cloud_bigtable_admin_v2::model::Table;
4885    /// let x = UpdateTableRequest::new().set_table(Table::default()/* use setters */);
4886    /// ```
4887    pub fn set_table<T>(mut self, v: T) -> Self
4888    where
4889        T: std::convert::Into<crate::model::Table>,
4890    {
4891        self.table = std::option::Option::Some(v.into());
4892        self
4893    }
4894
4895    /// Sets or clears the value of [table][crate::model::UpdateTableRequest::table].
4896    ///
4897    /// # Example
4898    /// ```ignore,no_run
4899    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4900    /// use google_cloud_bigtable_admin_v2::model::Table;
4901    /// let x = UpdateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
4902    /// let x = UpdateTableRequest::new().set_or_clear_table(None::<Table>);
4903    /// ```
4904    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4905    where
4906        T: std::convert::Into<crate::model::Table>,
4907    {
4908        self.table = v.map(|x| x.into());
4909        self
4910    }
4911
4912    /// Sets the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
4913    ///
4914    /// # Example
4915    /// ```ignore,no_run
4916    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4917    /// use wkt::FieldMask;
4918    /// let x = UpdateTableRequest::new().set_update_mask(FieldMask::default()/* use setters */);
4919    /// ```
4920    pub fn set_update_mask<T>(mut self, v: T) -> Self
4921    where
4922        T: std::convert::Into<wkt::FieldMask>,
4923    {
4924        self.update_mask = std::option::Option::Some(v.into());
4925        self
4926    }
4927
4928    /// Sets or clears the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
4929    ///
4930    /// # Example
4931    /// ```ignore,no_run
4932    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4933    /// use wkt::FieldMask;
4934    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
4935    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(None::<FieldMask>);
4936    /// ```
4937    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4938    where
4939        T: std::convert::Into<wkt::FieldMask>,
4940    {
4941        self.update_mask = v.map(|x| x.into());
4942        self
4943    }
4944
4945    /// Sets the value of [ignore_warnings][crate::model::UpdateTableRequest::ignore_warnings].
4946    ///
4947    /// # Example
4948    /// ```ignore,no_run
4949    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4950    /// let x = UpdateTableRequest::new().set_ignore_warnings(true);
4951    /// ```
4952    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4953        self.ignore_warnings = v.into();
4954        self
4955    }
4956}
4957
4958impl wkt::message::Message for UpdateTableRequest {
4959    fn typename() -> &'static str {
4960        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableRequest"
4961    }
4962}
4963
4964/// Metadata type for the operation returned by
4965/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
4966///
4967/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
4968#[derive(Clone, Default, PartialEq)]
4969#[non_exhaustive]
4970pub struct UpdateTableMetadata {
4971    /// The name of the table being updated.
4972    pub name: std::string::String,
4973
4974    /// The time at which this operation started.
4975    pub start_time: std::option::Option<wkt::Timestamp>,
4976
4977    /// If set, the time at which this operation finished or was canceled.
4978    pub end_time: std::option::Option<wkt::Timestamp>,
4979
4980    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4981}
4982
4983impl UpdateTableMetadata {
4984    pub fn new() -> Self {
4985        std::default::Default::default()
4986    }
4987
4988    /// Sets the value of [name][crate::model::UpdateTableMetadata::name].
4989    ///
4990    /// # Example
4991    /// ```ignore,no_run
4992    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
4993    /// let x = UpdateTableMetadata::new().set_name("example");
4994    /// ```
4995    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4996        self.name = v.into();
4997        self
4998    }
4999
5000    /// Sets the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5001    ///
5002    /// # Example
5003    /// ```ignore,no_run
5004    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5005    /// use wkt::Timestamp;
5006    /// let x = UpdateTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5007    /// ```
5008    pub fn set_start_time<T>(mut self, v: T) -> Self
5009    where
5010        T: std::convert::Into<wkt::Timestamp>,
5011    {
5012        self.start_time = std::option::Option::Some(v.into());
5013        self
5014    }
5015
5016    /// Sets or clears the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5017    ///
5018    /// # Example
5019    /// ```ignore,no_run
5020    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5021    /// use wkt::Timestamp;
5022    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5023    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5024    /// ```
5025    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5026    where
5027        T: std::convert::Into<wkt::Timestamp>,
5028    {
5029        self.start_time = v.map(|x| x.into());
5030        self
5031    }
5032
5033    /// Sets the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5034    ///
5035    /// # Example
5036    /// ```ignore,no_run
5037    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5038    /// use wkt::Timestamp;
5039    /// let x = UpdateTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5040    /// ```
5041    pub fn set_end_time<T>(mut self, v: T) -> Self
5042    where
5043        T: std::convert::Into<wkt::Timestamp>,
5044    {
5045        self.end_time = std::option::Option::Some(v.into());
5046        self
5047    }
5048
5049    /// Sets or clears the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5050    ///
5051    /// # Example
5052    /// ```ignore,no_run
5053    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5054    /// use wkt::Timestamp;
5055    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5056    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5057    /// ```
5058    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5059    where
5060        T: std::convert::Into<wkt::Timestamp>,
5061    {
5062        self.end_time = v.map(|x| x.into());
5063        self
5064    }
5065}
5066
5067impl wkt::message::Message for UpdateTableMetadata {
5068    fn typename() -> &'static str {
5069        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableMetadata"
5070    }
5071}
5072
5073/// Request message for
5074/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
5075///
5076/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]: crate::client::BigtableTableAdmin::delete_table
5077#[derive(Clone, Default, PartialEq)]
5078#[non_exhaustive]
5079pub struct DeleteTableRequest {
5080    /// Required. The unique name of the table to be deleted.
5081    /// Values are of the form
5082    /// `projects/{project}/instances/{instance}/tables/{table}`.
5083    pub name: std::string::String,
5084
5085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5086}
5087
5088impl DeleteTableRequest {
5089    pub fn new() -> Self {
5090        std::default::Default::default()
5091    }
5092
5093    /// Sets the value of [name][crate::model::DeleteTableRequest::name].
5094    ///
5095    /// # Example
5096    /// ```ignore,no_run
5097    /// # use google_cloud_bigtable_admin_v2::model::DeleteTableRequest;
5098    /// let x = DeleteTableRequest::new().set_name("example");
5099    /// ```
5100    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5101        self.name = v.into();
5102        self
5103    }
5104}
5105
5106impl wkt::message::Message for DeleteTableRequest {
5107    fn typename() -> &'static str {
5108        "type.googleapis.com/google.bigtable.admin.v2.DeleteTableRequest"
5109    }
5110}
5111
5112/// Request message for
5113/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
5114///
5115/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5116#[derive(Clone, Default, PartialEq)]
5117#[non_exhaustive]
5118pub struct UndeleteTableRequest {
5119    /// Required. The unique name of the table to be restored.
5120    /// Values are of the form
5121    /// `projects/{project}/instances/{instance}/tables/{table}`.
5122    pub name: std::string::String,
5123
5124    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5125}
5126
5127impl UndeleteTableRequest {
5128    pub fn new() -> Self {
5129        std::default::Default::default()
5130    }
5131
5132    /// Sets the value of [name][crate::model::UndeleteTableRequest::name].
5133    ///
5134    /// # Example
5135    /// ```ignore,no_run
5136    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableRequest;
5137    /// let x = UndeleteTableRequest::new().set_name("example");
5138    /// ```
5139    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5140        self.name = v.into();
5141        self
5142    }
5143}
5144
5145impl wkt::message::Message for UndeleteTableRequest {
5146    fn typename() -> &'static str {
5147        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableRequest"
5148    }
5149}
5150
5151/// Metadata type for the operation returned by
5152/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
5153///
5154/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5155#[derive(Clone, Default, PartialEq)]
5156#[non_exhaustive]
5157pub struct UndeleteTableMetadata {
5158    /// The name of the table being restored.
5159    pub name: std::string::String,
5160
5161    /// The time at which this operation started.
5162    pub start_time: std::option::Option<wkt::Timestamp>,
5163
5164    /// If set, the time at which this operation finished or was cancelled.
5165    pub end_time: std::option::Option<wkt::Timestamp>,
5166
5167    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5168}
5169
5170impl UndeleteTableMetadata {
5171    pub fn new() -> Self {
5172        std::default::Default::default()
5173    }
5174
5175    /// Sets the value of [name][crate::model::UndeleteTableMetadata::name].
5176    ///
5177    /// # Example
5178    /// ```ignore,no_run
5179    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5180    /// let x = UndeleteTableMetadata::new().set_name("example");
5181    /// ```
5182    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5183        self.name = v.into();
5184        self
5185    }
5186
5187    /// Sets the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5188    ///
5189    /// # Example
5190    /// ```ignore,no_run
5191    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5192    /// use wkt::Timestamp;
5193    /// let x = UndeleteTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5194    /// ```
5195    pub fn set_start_time<T>(mut self, v: T) -> Self
5196    where
5197        T: std::convert::Into<wkt::Timestamp>,
5198    {
5199        self.start_time = std::option::Option::Some(v.into());
5200        self
5201    }
5202
5203    /// Sets or clears the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5204    ///
5205    /// # Example
5206    /// ```ignore,no_run
5207    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5208    /// use wkt::Timestamp;
5209    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5210    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5211    /// ```
5212    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5213    where
5214        T: std::convert::Into<wkt::Timestamp>,
5215    {
5216        self.start_time = v.map(|x| x.into());
5217        self
5218    }
5219
5220    /// Sets the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5221    ///
5222    /// # Example
5223    /// ```ignore,no_run
5224    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5225    /// use wkt::Timestamp;
5226    /// let x = UndeleteTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5227    /// ```
5228    pub fn set_end_time<T>(mut self, v: T) -> Self
5229    where
5230        T: std::convert::Into<wkt::Timestamp>,
5231    {
5232        self.end_time = std::option::Option::Some(v.into());
5233        self
5234    }
5235
5236    /// Sets or clears the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5237    ///
5238    /// # Example
5239    /// ```ignore,no_run
5240    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5241    /// use wkt::Timestamp;
5242    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5243    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5244    /// ```
5245    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5246    where
5247        T: std::convert::Into<wkt::Timestamp>,
5248    {
5249        self.end_time = v.map(|x| x.into());
5250        self
5251    }
5252}
5253
5254impl wkt::message::Message for UndeleteTableMetadata {
5255    fn typename() -> &'static str {
5256        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableMetadata"
5257    }
5258}
5259
5260/// Request message for
5261/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
5262///
5263/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]: crate::client::BigtableTableAdmin::modify_column_families
5264#[derive(Clone, Default, PartialEq)]
5265#[non_exhaustive]
5266pub struct ModifyColumnFamiliesRequest {
5267    /// Required. The unique name of the table whose families should be modified.
5268    /// Values are of the form
5269    /// `projects/{project}/instances/{instance}/tables/{table}`.
5270    pub name: std::string::String,
5271
5272    /// Required. Modifications to be atomically applied to the specified table's
5273    /// families. Entries are applied in order, meaning that earlier modifications
5274    /// can be masked by later ones (in the case of repeated updates to the same
5275    /// family, for example).
5276    pub modifications: std::vec::Vec<crate::model::modify_column_families_request::Modification>,
5277
5278    /// Optional. If true, ignore safety checks when modifying the column families.
5279    pub ignore_warnings: bool,
5280
5281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5282}
5283
5284impl ModifyColumnFamiliesRequest {
5285    pub fn new() -> Self {
5286        std::default::Default::default()
5287    }
5288
5289    /// Sets the value of [name][crate::model::ModifyColumnFamiliesRequest::name].
5290    ///
5291    /// # Example
5292    /// ```ignore,no_run
5293    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5294    /// let x = ModifyColumnFamiliesRequest::new().set_name("example");
5295    /// ```
5296    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5297        self.name = v.into();
5298        self
5299    }
5300
5301    /// Sets the value of [modifications][crate::model::ModifyColumnFamiliesRequest::modifications].
5302    ///
5303    /// # Example
5304    /// ```ignore,no_run
5305    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5306    /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5307    /// let x = ModifyColumnFamiliesRequest::new()
5308    ///     .set_modifications([
5309    ///         Modification::default()/* use setters */,
5310    ///         Modification::default()/* use (different) setters */,
5311    ///     ]);
5312    /// ```
5313    pub fn set_modifications<T, V>(mut self, v: T) -> Self
5314    where
5315        T: std::iter::IntoIterator<Item = V>,
5316        V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
5317    {
5318        use std::iter::Iterator;
5319        self.modifications = v.into_iter().map(|i| i.into()).collect();
5320        self
5321    }
5322
5323    /// Sets the value of [ignore_warnings][crate::model::ModifyColumnFamiliesRequest::ignore_warnings].
5324    ///
5325    /// # Example
5326    /// ```ignore,no_run
5327    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5328    /// let x = ModifyColumnFamiliesRequest::new().set_ignore_warnings(true);
5329    /// ```
5330    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5331        self.ignore_warnings = v.into();
5332        self
5333    }
5334}
5335
5336impl wkt::message::Message for ModifyColumnFamiliesRequest {
5337    fn typename() -> &'static str {
5338        "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest"
5339    }
5340}
5341
5342/// Defines additional types related to [ModifyColumnFamiliesRequest].
5343pub mod modify_column_families_request {
5344    #[allow(unused_imports)]
5345    use super::*;
5346
5347    /// A create, update, or delete of a particular column family.
5348    #[derive(Clone, Default, PartialEq)]
5349    #[non_exhaustive]
5350    pub struct Modification {
5351        /// The ID of the column family to be modified.
5352        pub id: std::string::String,
5353
5354        /// Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update`
5355        /// mod should be updated, ignored for other modification types. If unset or
5356        /// empty, we treat it as updating `gc_rule` to be backward compatible.
5357        pub update_mask: std::option::Option<wkt::FieldMask>,
5358
5359        /// Column family modifications.
5360        pub r#mod:
5361            std::option::Option<crate::model::modify_column_families_request::modification::Mod>,
5362
5363        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5364    }
5365
5366    impl Modification {
5367        pub fn new() -> Self {
5368            std::default::Default::default()
5369        }
5370
5371        /// Sets the value of [id][crate::model::modify_column_families_request::Modification::id].
5372        ///
5373        /// # Example
5374        /// ```ignore,no_run
5375        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5376        /// let x = Modification::new().set_id("example");
5377        /// ```
5378        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5379            self.id = v.into();
5380            self
5381        }
5382
5383        /// Sets the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5384        ///
5385        /// # Example
5386        /// ```ignore,no_run
5387        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5388        /// use wkt::FieldMask;
5389        /// let x = Modification::new().set_update_mask(FieldMask::default()/* use setters */);
5390        /// ```
5391        pub fn set_update_mask<T>(mut self, v: T) -> Self
5392        where
5393            T: std::convert::Into<wkt::FieldMask>,
5394        {
5395            self.update_mask = std::option::Option::Some(v.into());
5396            self
5397        }
5398
5399        /// Sets or clears the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5400        ///
5401        /// # Example
5402        /// ```ignore,no_run
5403        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5404        /// use wkt::FieldMask;
5405        /// let x = Modification::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5406        /// let x = Modification::new().set_or_clear_update_mask(None::<FieldMask>);
5407        /// ```
5408        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5409        where
5410            T: std::convert::Into<wkt::FieldMask>,
5411        {
5412            self.update_mask = v.map(|x| x.into());
5413            self
5414        }
5415
5416        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::mod].
5417        ///
5418        /// Note that all the setters affecting `r#mod` are mutually
5419        /// exclusive.
5420        ///
5421        /// # Example
5422        /// ```ignore,no_run
5423        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5424        /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::modification::Mod;
5425        /// let x = Modification::new().set_mod(Some(Mod::Drop(true)));
5426        /// ```
5427        pub fn set_mod<
5428            T: std::convert::Into<
5429                    std::option::Option<
5430                        crate::model::modify_column_families_request::modification::Mod,
5431                    >,
5432                >,
5433        >(
5434            mut self,
5435            v: T,
5436        ) -> Self {
5437            self.r#mod = v.into();
5438            self
5439        }
5440
5441        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5442        /// if it holds a `Create`, `None` if the field is not set or
5443        /// holds a different branch.
5444        pub fn create(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
5445            #[allow(unreachable_patterns)]
5446            self.r#mod.as_ref().and_then(|v| match v {
5447                crate::model::modify_column_families_request::modification::Mod::Create(v) => {
5448                    std::option::Option::Some(v)
5449                }
5450                _ => std::option::Option::None,
5451            })
5452        }
5453
5454        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5455        /// to hold a `Create`.
5456        ///
5457        /// Note that all the setters affecting `r#mod` are
5458        /// mutually exclusive.
5459        ///
5460        /// # Example
5461        /// ```ignore,no_run
5462        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5463        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
5464        /// let x = Modification::new().set_create(ColumnFamily::default()/* use setters */);
5465        /// assert!(x.create().is_some());
5466        /// assert!(x.update().is_none());
5467        /// assert!(x.drop().is_none());
5468        /// ```
5469        pub fn set_create<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
5470            mut self,
5471            v: T,
5472        ) -> Self {
5473            self.r#mod = std::option::Option::Some(
5474                crate::model::modify_column_families_request::modification::Mod::Create(v.into()),
5475            );
5476            self
5477        }
5478
5479        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5480        /// if it holds a `Update`, `None` if the field is not set or
5481        /// holds a different branch.
5482        pub fn update(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
5483            #[allow(unreachable_patterns)]
5484            self.r#mod.as_ref().and_then(|v| match v {
5485                crate::model::modify_column_families_request::modification::Mod::Update(v) => {
5486                    std::option::Option::Some(v)
5487                }
5488                _ => std::option::Option::None,
5489            })
5490        }
5491
5492        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5493        /// to hold a `Update`.
5494        ///
5495        /// Note that all the setters affecting `r#mod` are
5496        /// mutually exclusive.
5497        ///
5498        /// # Example
5499        /// ```ignore,no_run
5500        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5501        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
5502        /// let x = Modification::new().set_update(ColumnFamily::default()/* use setters */);
5503        /// assert!(x.update().is_some());
5504        /// assert!(x.create().is_none());
5505        /// assert!(x.drop().is_none());
5506        /// ```
5507        pub fn set_update<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
5508            mut self,
5509            v: T,
5510        ) -> Self {
5511            self.r#mod = std::option::Option::Some(
5512                crate::model::modify_column_families_request::modification::Mod::Update(v.into()),
5513            );
5514            self
5515        }
5516
5517        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5518        /// if it holds a `Drop`, `None` if the field is not set or
5519        /// holds a different branch.
5520        pub fn drop(&self) -> std::option::Option<&bool> {
5521            #[allow(unreachable_patterns)]
5522            self.r#mod.as_ref().and_then(|v| match v {
5523                crate::model::modify_column_families_request::modification::Mod::Drop(v) => {
5524                    std::option::Option::Some(v)
5525                }
5526                _ => std::option::Option::None,
5527            })
5528        }
5529
5530        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5531        /// to hold a `Drop`.
5532        ///
5533        /// Note that all the setters affecting `r#mod` are
5534        /// mutually exclusive.
5535        ///
5536        /// # Example
5537        /// ```ignore,no_run
5538        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5539        /// let x = Modification::new().set_drop(true);
5540        /// assert!(x.drop().is_some());
5541        /// assert!(x.create().is_none());
5542        /// assert!(x.update().is_none());
5543        /// ```
5544        pub fn set_drop<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5545            self.r#mod = std::option::Option::Some(
5546                crate::model::modify_column_families_request::modification::Mod::Drop(v.into()),
5547            );
5548            self
5549        }
5550    }
5551
5552    impl wkt::message::Message for Modification {
5553        fn typename() -> &'static str {
5554            "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification"
5555        }
5556    }
5557
5558    /// Defines additional types related to [Modification].
5559    pub mod modification {
5560        #[allow(unused_imports)]
5561        use super::*;
5562
5563        /// Column family modifications.
5564        #[derive(Clone, Debug, PartialEq)]
5565        #[non_exhaustive]
5566        pub enum Mod {
5567            /// Create a new column family with the specified schema, or fail if
5568            /// one already exists with the given ID.
5569            Create(std::boxed::Box<crate::model::ColumnFamily>),
5570            /// Update an existing column family to the specified schema, or fail
5571            /// if no column family exists with the given ID.
5572            Update(std::boxed::Box<crate::model::ColumnFamily>),
5573            /// Drop (delete) the column family with the given ID, or fail if no such
5574            /// family exists.
5575            Drop(bool),
5576        }
5577    }
5578}
5579
5580/// Request message for
5581/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
5582///
5583/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
5584#[derive(Clone, Default, PartialEq)]
5585#[non_exhaustive]
5586pub struct GenerateConsistencyTokenRequest {
5587    /// Required. The unique name of the Table for which to create a consistency
5588    /// token. Values are of the form
5589    /// `projects/{project}/instances/{instance}/tables/{table}`.
5590    pub name: std::string::String,
5591
5592    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5593}
5594
5595impl GenerateConsistencyTokenRequest {
5596    pub fn new() -> Self {
5597        std::default::Default::default()
5598    }
5599
5600    /// Sets the value of [name][crate::model::GenerateConsistencyTokenRequest::name].
5601    ///
5602    /// # Example
5603    /// ```ignore,no_run
5604    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenRequest;
5605    /// let x = GenerateConsistencyTokenRequest::new().set_name("example");
5606    /// ```
5607    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5608        self.name = v.into();
5609        self
5610    }
5611}
5612
5613impl wkt::message::Message for GenerateConsistencyTokenRequest {
5614    fn typename() -> &'static str {
5615        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenRequest"
5616    }
5617}
5618
5619/// Response message for
5620/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
5621///
5622/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
5623#[derive(Clone, Default, PartialEq)]
5624#[non_exhaustive]
5625pub struct GenerateConsistencyTokenResponse {
5626    /// The generated consistency token.
5627    pub consistency_token: std::string::String,
5628
5629    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5630}
5631
5632impl GenerateConsistencyTokenResponse {
5633    pub fn new() -> Self {
5634        std::default::Default::default()
5635    }
5636
5637    /// Sets the value of [consistency_token][crate::model::GenerateConsistencyTokenResponse::consistency_token].
5638    ///
5639    /// # Example
5640    /// ```ignore,no_run
5641    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenResponse;
5642    /// let x = GenerateConsistencyTokenResponse::new().set_consistency_token("example");
5643    /// ```
5644    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
5645        mut self,
5646        v: T,
5647    ) -> Self {
5648        self.consistency_token = v.into();
5649        self
5650    }
5651}
5652
5653impl wkt::message::Message for GenerateConsistencyTokenResponse {
5654    fn typename() -> &'static str {
5655        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenResponse"
5656    }
5657}
5658
5659/// Request message for
5660/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
5661///
5662/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
5663#[derive(Clone, Default, PartialEq)]
5664#[non_exhaustive]
5665pub struct CheckConsistencyRequest {
5666    /// Required. The unique name of the Table for which to check replication
5667    /// consistency. Values are of the form
5668    /// `projects/{project}/instances/{instance}/tables/{table}`.
5669    pub name: std::string::String,
5670
5671    /// Required. The token created using GenerateConsistencyToken for the Table.
5672    pub consistency_token: std::string::String,
5673
5674    /// Which type of read needs to consistently observe which type of write?
5675    /// Default: `standard_read_remote_writes`
5676    pub mode: std::option::Option<crate::model::check_consistency_request::Mode>,
5677
5678    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5679}
5680
5681impl CheckConsistencyRequest {
5682    pub fn new() -> Self {
5683        std::default::Default::default()
5684    }
5685
5686    /// Sets the value of [name][crate::model::CheckConsistencyRequest::name].
5687    ///
5688    /// # Example
5689    /// ```ignore,no_run
5690    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5691    /// let x = CheckConsistencyRequest::new().set_name("example");
5692    /// ```
5693    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5694        self.name = v.into();
5695        self
5696    }
5697
5698    /// Sets the value of [consistency_token][crate::model::CheckConsistencyRequest::consistency_token].
5699    ///
5700    /// # Example
5701    /// ```ignore,no_run
5702    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5703    /// let x = CheckConsistencyRequest::new().set_consistency_token("example");
5704    /// ```
5705    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
5706        mut self,
5707        v: T,
5708    ) -> Self {
5709        self.consistency_token = v.into();
5710        self
5711    }
5712
5713    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode].
5714    ///
5715    /// Note that all the setters affecting `mode` are mutually
5716    /// exclusive.
5717    ///
5718    /// # Example
5719    /// ```ignore,no_run
5720    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5721    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
5722    /// let x = CheckConsistencyRequest::new().set_mode(Some(
5723    ///     google_cloud_bigtable_admin_v2::model::check_consistency_request::Mode::StandardReadRemoteWrites(StandardReadRemoteWrites::default().into())));
5724    /// ```
5725    pub fn set_mode<
5726        T: std::convert::Into<std::option::Option<crate::model::check_consistency_request::Mode>>,
5727    >(
5728        mut self,
5729        v: T,
5730    ) -> Self {
5731        self.mode = v.into();
5732        self
5733    }
5734
5735    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
5736    /// if it holds a `StandardReadRemoteWrites`, `None` if the field is not set or
5737    /// holds a different branch.
5738    pub fn standard_read_remote_writes(
5739        &self,
5740    ) -> std::option::Option<&std::boxed::Box<crate::model::StandardReadRemoteWrites>> {
5741        #[allow(unreachable_patterns)]
5742        self.mode.as_ref().and_then(|v| match v {
5743            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v) => {
5744                std::option::Option::Some(v)
5745            }
5746            _ => std::option::Option::None,
5747        })
5748    }
5749
5750    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5751    /// to hold a `StandardReadRemoteWrites`.
5752    ///
5753    /// Note that all the setters affecting `mode` are
5754    /// mutually exclusive.
5755    ///
5756    /// # Example
5757    /// ```ignore,no_run
5758    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5759    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
5760    /// let x = CheckConsistencyRequest::new().set_standard_read_remote_writes(StandardReadRemoteWrites::default()/* use setters */);
5761    /// assert!(x.standard_read_remote_writes().is_some());
5762    /// assert!(x.data_boost_read_local_writes().is_none());
5763    /// ```
5764    pub fn set_standard_read_remote_writes<
5765        T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
5766    >(
5767        mut self,
5768        v: T,
5769    ) -> Self {
5770        self.mode = std::option::Option::Some(
5771            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v.into()),
5772        );
5773        self
5774    }
5775
5776    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
5777    /// if it holds a `DataBoostReadLocalWrites`, `None` if the field is not set or
5778    /// holds a different branch.
5779    pub fn data_boost_read_local_writes(
5780        &self,
5781    ) -> std::option::Option<&std::boxed::Box<crate::model::DataBoostReadLocalWrites>> {
5782        #[allow(unreachable_patterns)]
5783        self.mode.as_ref().and_then(|v| match v {
5784            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v) => {
5785                std::option::Option::Some(v)
5786            }
5787            _ => std::option::Option::None,
5788        })
5789    }
5790
5791    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5792    /// to hold a `DataBoostReadLocalWrites`.
5793    ///
5794    /// Note that all the setters affecting `mode` are
5795    /// mutually exclusive.
5796    ///
5797    /// # Example
5798    /// ```ignore,no_run
5799    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5800    /// use google_cloud_bigtable_admin_v2::model::DataBoostReadLocalWrites;
5801    /// let x = CheckConsistencyRequest::new().set_data_boost_read_local_writes(DataBoostReadLocalWrites::default()/* use setters */);
5802    /// assert!(x.data_boost_read_local_writes().is_some());
5803    /// assert!(x.standard_read_remote_writes().is_none());
5804    /// ```
5805    pub fn set_data_boost_read_local_writes<
5806        T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
5807    >(
5808        mut self,
5809        v: T,
5810    ) -> Self {
5811        self.mode = std::option::Option::Some(
5812            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v.into()),
5813        );
5814        self
5815    }
5816}
5817
5818impl wkt::message::Message for CheckConsistencyRequest {
5819    fn typename() -> &'static str {
5820        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyRequest"
5821    }
5822}
5823
5824/// Defines additional types related to [CheckConsistencyRequest].
5825pub mod check_consistency_request {
5826    #[allow(unused_imports)]
5827    use super::*;
5828
5829    /// Which type of read needs to consistently observe which type of write?
5830    /// Default: `standard_read_remote_writes`
5831    #[derive(Clone, Debug, PartialEq)]
5832    #[non_exhaustive]
5833    pub enum Mode {
5834        /// Checks that reads using an app profile with `StandardIsolation` can
5835        /// see all writes committed before the token was created, even if the
5836        /// read and write target different clusters.
5837        StandardReadRemoteWrites(std::boxed::Box<crate::model::StandardReadRemoteWrites>),
5838        /// Checks that reads using an app profile with `DataBoostIsolationReadOnly`
5839        /// can see all writes committed before the token was created, but only if
5840        /// the read and write target the same cluster.
5841        DataBoostReadLocalWrites(std::boxed::Box<crate::model::DataBoostReadLocalWrites>),
5842    }
5843}
5844
5845/// Checks that all writes before the consistency token was generated are
5846/// replicated in every cluster and readable.
5847#[derive(Clone, Default, PartialEq)]
5848#[non_exhaustive]
5849pub struct StandardReadRemoteWrites {
5850    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5851}
5852
5853impl StandardReadRemoteWrites {
5854    pub fn new() -> Self {
5855        std::default::Default::default()
5856    }
5857}
5858
5859impl wkt::message::Message for StandardReadRemoteWrites {
5860    fn typename() -> &'static str {
5861        "type.googleapis.com/google.bigtable.admin.v2.StandardReadRemoteWrites"
5862    }
5863}
5864
5865/// Checks that all writes before the consistency token was generated in the same
5866/// cluster are readable by Databoost.
5867#[derive(Clone, Default, PartialEq)]
5868#[non_exhaustive]
5869pub struct DataBoostReadLocalWrites {
5870    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5871}
5872
5873impl DataBoostReadLocalWrites {
5874    pub fn new() -> Self {
5875        std::default::Default::default()
5876    }
5877}
5878
5879impl wkt::message::Message for DataBoostReadLocalWrites {
5880    fn typename() -> &'static str {
5881        "type.googleapis.com/google.bigtable.admin.v2.DataBoostReadLocalWrites"
5882    }
5883}
5884
5885/// Response message for
5886/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
5887///
5888/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
5889#[derive(Clone, Default, PartialEq)]
5890#[non_exhaustive]
5891pub struct CheckConsistencyResponse {
5892    /// True only if the token is consistent. A token is consistent if replication
5893    /// has caught up with the restrictions specified in the request.
5894    pub consistent: bool,
5895
5896    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5897}
5898
5899impl CheckConsistencyResponse {
5900    pub fn new() -> Self {
5901        std::default::Default::default()
5902    }
5903
5904    /// Sets the value of [consistent][crate::model::CheckConsistencyResponse::consistent].
5905    ///
5906    /// # Example
5907    /// ```ignore,no_run
5908    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyResponse;
5909    /// let x = CheckConsistencyResponse::new().set_consistent(true);
5910    /// ```
5911    pub fn set_consistent<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5912        self.consistent = v.into();
5913        self
5914    }
5915}
5916
5917impl wkt::message::Message for CheckConsistencyResponse {
5918    fn typename() -> &'static str {
5919        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyResponse"
5920    }
5921}
5922
5923/// Request message for
5924/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
5925///
5926/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
5927/// feature is not currently available to most Cloud Bigtable customers. This
5928/// feature might be changed in backward-incompatible ways and is not recommended
5929/// for production use. It is not subject to any SLA or deprecation policy.
5930///
5931/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]: crate::client::BigtableTableAdmin::snapshot_table
5932#[derive(Clone, Default, PartialEq)]
5933#[non_exhaustive]
5934pub struct SnapshotTableRequest {
5935    /// Required. The unique name of the table to have the snapshot taken.
5936    /// Values are of the form
5937    /// `projects/{project}/instances/{instance}/tables/{table}`.
5938    pub name: std::string::String,
5939
5940    /// Required. The name of the cluster where the snapshot will be created in.
5941    /// Values are of the form
5942    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
5943    pub cluster: std::string::String,
5944
5945    /// Required. The ID by which the new snapshot should be referred to within the
5946    /// parent cluster, e.g., `mysnapshot` of the form:
5947    /// `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than
5948    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
5949    pub snapshot_id: std::string::String,
5950
5951    /// The amount of time that the new snapshot can stay active after it is
5952    /// created. Once 'ttl' expires, the snapshot will get deleted. The maximum
5953    /// amount of time a snapshot can stay active is 7 days. If 'ttl' is not
5954    /// specified, the default value of 24 hours will be used.
5955    pub ttl: std::option::Option<wkt::Duration>,
5956
5957    /// Description of the snapshot.
5958    pub description: std::string::String,
5959
5960    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5961}
5962
5963impl SnapshotTableRequest {
5964    pub fn new() -> Self {
5965        std::default::Default::default()
5966    }
5967
5968    /// Sets the value of [name][crate::model::SnapshotTableRequest::name].
5969    ///
5970    /// # Example
5971    /// ```ignore,no_run
5972    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
5973    /// let x = SnapshotTableRequest::new().set_name("example");
5974    /// ```
5975    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5976        self.name = v.into();
5977        self
5978    }
5979
5980    /// Sets the value of [cluster][crate::model::SnapshotTableRequest::cluster].
5981    ///
5982    /// # Example
5983    /// ```ignore,no_run
5984    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
5985    /// let x = SnapshotTableRequest::new().set_cluster("example");
5986    /// ```
5987    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5988        self.cluster = v.into();
5989        self
5990    }
5991
5992    /// Sets the value of [snapshot_id][crate::model::SnapshotTableRequest::snapshot_id].
5993    ///
5994    /// # Example
5995    /// ```ignore,no_run
5996    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
5997    /// let x = SnapshotTableRequest::new().set_snapshot_id("example");
5998    /// ```
5999    pub fn set_snapshot_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6000        self.snapshot_id = v.into();
6001        self
6002    }
6003
6004    /// Sets the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6005    ///
6006    /// # Example
6007    /// ```ignore,no_run
6008    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6009    /// use wkt::Duration;
6010    /// let x = SnapshotTableRequest::new().set_ttl(Duration::default()/* use setters */);
6011    /// ```
6012    pub fn set_ttl<T>(mut self, v: T) -> Self
6013    where
6014        T: std::convert::Into<wkt::Duration>,
6015    {
6016        self.ttl = std::option::Option::Some(v.into());
6017        self
6018    }
6019
6020    /// Sets or clears the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6021    ///
6022    /// # Example
6023    /// ```ignore,no_run
6024    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6025    /// use wkt::Duration;
6026    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(Some(Duration::default()/* use setters */));
6027    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(None::<Duration>);
6028    /// ```
6029    pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
6030    where
6031        T: std::convert::Into<wkt::Duration>,
6032    {
6033        self.ttl = v.map(|x| x.into());
6034        self
6035    }
6036
6037    /// Sets the value of [description][crate::model::SnapshotTableRequest::description].
6038    ///
6039    /// # Example
6040    /// ```ignore,no_run
6041    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6042    /// let x = SnapshotTableRequest::new().set_description("example");
6043    /// ```
6044    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6045        self.description = v.into();
6046        self
6047    }
6048}
6049
6050impl wkt::message::Message for SnapshotTableRequest {
6051    fn typename() -> &'static str {
6052        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableRequest"
6053    }
6054}
6055
6056/// Request message for
6057/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
6058///
6059/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6060/// feature is not currently available to most Cloud Bigtable customers. This
6061/// feature might be changed in backward-incompatible ways and is not recommended
6062/// for production use. It is not subject to any SLA or deprecation policy.
6063///
6064/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]: crate::client::BigtableTableAdmin::get_snapshot
6065#[derive(Clone, Default, PartialEq)]
6066#[non_exhaustive]
6067pub struct GetSnapshotRequest {
6068    /// Required. The unique name of the requested snapshot.
6069    /// Values are of the form
6070    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6071    pub name: std::string::String,
6072
6073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6074}
6075
6076impl GetSnapshotRequest {
6077    pub fn new() -> Self {
6078        std::default::Default::default()
6079    }
6080
6081    /// Sets the value of [name][crate::model::GetSnapshotRequest::name].
6082    ///
6083    /// # Example
6084    /// ```ignore,no_run
6085    /// # use google_cloud_bigtable_admin_v2::model::GetSnapshotRequest;
6086    /// let x = GetSnapshotRequest::new().set_name("example");
6087    /// ```
6088    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6089        self.name = v.into();
6090        self
6091    }
6092}
6093
6094impl wkt::message::Message for GetSnapshotRequest {
6095    fn typename() -> &'static str {
6096        "type.googleapis.com/google.bigtable.admin.v2.GetSnapshotRequest"
6097    }
6098}
6099
6100/// Request message for
6101/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6102///
6103/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6104/// feature is not currently available to most Cloud Bigtable customers. This
6105/// feature might be changed in backward-incompatible ways and is not recommended
6106/// for production use. It is not subject to any SLA or deprecation policy.
6107///
6108/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6109#[derive(Clone, Default, PartialEq)]
6110#[non_exhaustive]
6111pub struct ListSnapshotsRequest {
6112    /// Required. The unique name of the cluster for which snapshots should be
6113    /// listed. Values are of the form
6114    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
6115    /// Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
6116    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
6117    pub parent: std::string::String,
6118
6119    /// The maximum number of snapshots to return per page.
6120    /// CURRENTLY UNIMPLEMENTED AND IGNORED.
6121    pub page_size: i32,
6122
6123    /// The value of `next_page_token` returned by a previous call.
6124    pub page_token: std::string::String,
6125
6126    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6127}
6128
6129impl ListSnapshotsRequest {
6130    pub fn new() -> Self {
6131        std::default::Default::default()
6132    }
6133
6134    /// Sets the value of [parent][crate::model::ListSnapshotsRequest::parent].
6135    ///
6136    /// # Example
6137    /// ```ignore,no_run
6138    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6139    /// let x = ListSnapshotsRequest::new().set_parent("example");
6140    /// ```
6141    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6142        self.parent = v.into();
6143        self
6144    }
6145
6146    /// Sets the value of [page_size][crate::model::ListSnapshotsRequest::page_size].
6147    ///
6148    /// # Example
6149    /// ```ignore,no_run
6150    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6151    /// let x = ListSnapshotsRequest::new().set_page_size(42);
6152    /// ```
6153    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6154        self.page_size = v.into();
6155        self
6156    }
6157
6158    /// Sets the value of [page_token][crate::model::ListSnapshotsRequest::page_token].
6159    ///
6160    /// # Example
6161    /// ```ignore,no_run
6162    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6163    /// let x = ListSnapshotsRequest::new().set_page_token("example");
6164    /// ```
6165    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6166        self.page_token = v.into();
6167        self
6168    }
6169}
6170
6171impl wkt::message::Message for ListSnapshotsRequest {
6172    fn typename() -> &'static str {
6173        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsRequest"
6174    }
6175}
6176
6177/// Response message for
6178/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6179///
6180/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6181/// feature is not currently available to most Cloud Bigtable customers. This
6182/// feature might be changed in backward-incompatible ways and is not recommended
6183/// for production use. It is not subject to any SLA or deprecation policy.
6184///
6185/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6186#[derive(Clone, Default, PartialEq)]
6187#[non_exhaustive]
6188pub struct ListSnapshotsResponse {
6189    /// The snapshots present in the requested cluster.
6190    pub snapshots: std::vec::Vec<crate::model::Snapshot>,
6191
6192    /// Set if not all snapshots could be returned in a single response.
6193    /// Pass this value to `page_token` in another request to get the next
6194    /// page of results.
6195    pub next_page_token: std::string::String,
6196
6197    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6198}
6199
6200impl ListSnapshotsResponse {
6201    pub fn new() -> Self {
6202        std::default::Default::default()
6203    }
6204
6205    /// Sets the value of [snapshots][crate::model::ListSnapshotsResponse::snapshots].
6206    ///
6207    /// # Example
6208    /// ```ignore,no_run
6209    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6210    /// use google_cloud_bigtable_admin_v2::model::Snapshot;
6211    /// let x = ListSnapshotsResponse::new()
6212    ///     .set_snapshots([
6213    ///         Snapshot::default()/* use setters */,
6214    ///         Snapshot::default()/* use (different) setters */,
6215    ///     ]);
6216    /// ```
6217    pub fn set_snapshots<T, V>(mut self, v: T) -> Self
6218    where
6219        T: std::iter::IntoIterator<Item = V>,
6220        V: std::convert::Into<crate::model::Snapshot>,
6221    {
6222        use std::iter::Iterator;
6223        self.snapshots = v.into_iter().map(|i| i.into()).collect();
6224        self
6225    }
6226
6227    /// Sets the value of [next_page_token][crate::model::ListSnapshotsResponse::next_page_token].
6228    ///
6229    /// # Example
6230    /// ```ignore,no_run
6231    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6232    /// let x = ListSnapshotsResponse::new().set_next_page_token("example");
6233    /// ```
6234    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6235        self.next_page_token = v.into();
6236        self
6237    }
6238}
6239
6240impl wkt::message::Message for ListSnapshotsResponse {
6241    fn typename() -> &'static str {
6242        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsResponse"
6243    }
6244}
6245
6246#[doc(hidden)]
6247impl gax::paginator::internal::PageableResponse for ListSnapshotsResponse {
6248    type PageItem = crate::model::Snapshot;
6249
6250    fn items(self) -> std::vec::Vec<Self::PageItem> {
6251        self.snapshots
6252    }
6253
6254    fn next_page_token(&self) -> std::string::String {
6255        use std::clone::Clone;
6256        self.next_page_token.clone()
6257    }
6258}
6259
6260/// Request message for
6261/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
6262///
6263/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6264/// feature is not currently available to most Cloud Bigtable customers. This
6265/// feature might be changed in backward-incompatible ways and is not recommended
6266/// for production use. It is not subject to any SLA or deprecation policy.
6267///
6268/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]: crate::client::BigtableTableAdmin::delete_snapshot
6269#[derive(Clone, Default, PartialEq)]
6270#[non_exhaustive]
6271pub struct DeleteSnapshotRequest {
6272    /// Required. The unique name of the snapshot to be deleted.
6273    /// Values are of the form
6274    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6275    pub name: std::string::String,
6276
6277    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6278}
6279
6280impl DeleteSnapshotRequest {
6281    pub fn new() -> Self {
6282        std::default::Default::default()
6283    }
6284
6285    /// Sets the value of [name][crate::model::DeleteSnapshotRequest::name].
6286    ///
6287    /// # Example
6288    /// ```ignore,no_run
6289    /// # use google_cloud_bigtable_admin_v2::model::DeleteSnapshotRequest;
6290    /// let x = DeleteSnapshotRequest::new().set_name("example");
6291    /// ```
6292    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6293        self.name = v.into();
6294        self
6295    }
6296}
6297
6298impl wkt::message::Message for DeleteSnapshotRequest {
6299    fn typename() -> &'static str {
6300        "type.googleapis.com/google.bigtable.admin.v2.DeleteSnapshotRequest"
6301    }
6302}
6303
6304/// The metadata for the Operation returned by SnapshotTable.
6305///
6306/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6307/// feature is not currently available to most Cloud Bigtable customers. This
6308/// feature might be changed in backward-incompatible ways and is not recommended
6309/// for production use. It is not subject to any SLA or deprecation policy.
6310#[derive(Clone, Default, PartialEq)]
6311#[non_exhaustive]
6312pub struct SnapshotTableMetadata {
6313    /// The request that prompted the initiation of this SnapshotTable operation.
6314    pub original_request: std::option::Option<crate::model::SnapshotTableRequest>,
6315
6316    /// The time at which the original request was received.
6317    pub request_time: std::option::Option<wkt::Timestamp>,
6318
6319    /// The time at which the operation failed or was completed successfully.
6320    pub finish_time: std::option::Option<wkt::Timestamp>,
6321
6322    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6323}
6324
6325impl SnapshotTableMetadata {
6326    pub fn new() -> Self {
6327        std::default::Default::default()
6328    }
6329
6330    /// Sets the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6331    ///
6332    /// # Example
6333    /// ```ignore,no_run
6334    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6335    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6336    /// let x = SnapshotTableMetadata::new().set_original_request(SnapshotTableRequest::default()/* use setters */);
6337    /// ```
6338    pub fn set_original_request<T>(mut self, v: T) -> Self
6339    where
6340        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6341    {
6342        self.original_request = std::option::Option::Some(v.into());
6343        self
6344    }
6345
6346    /// Sets or clears the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6347    ///
6348    /// # Example
6349    /// ```ignore,no_run
6350    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6351    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6352    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(Some(SnapshotTableRequest::default()/* use setters */));
6353    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(None::<SnapshotTableRequest>);
6354    /// ```
6355    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6356    where
6357        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6358    {
6359        self.original_request = v.map(|x| x.into());
6360        self
6361    }
6362
6363    /// Sets the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6364    ///
6365    /// # Example
6366    /// ```ignore,no_run
6367    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6368    /// use wkt::Timestamp;
6369    /// let x = SnapshotTableMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6370    /// ```
6371    pub fn set_request_time<T>(mut self, v: T) -> Self
6372    where
6373        T: std::convert::Into<wkt::Timestamp>,
6374    {
6375        self.request_time = std::option::Option::Some(v.into());
6376        self
6377    }
6378
6379    /// Sets or clears the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6380    ///
6381    /// # Example
6382    /// ```ignore,no_run
6383    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6384    /// use wkt::Timestamp;
6385    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
6386    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(None::<Timestamp>);
6387    /// ```
6388    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
6389    where
6390        T: std::convert::Into<wkt::Timestamp>,
6391    {
6392        self.request_time = v.map(|x| x.into());
6393        self
6394    }
6395
6396    /// Sets the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
6397    ///
6398    /// # Example
6399    /// ```ignore,no_run
6400    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6401    /// use wkt::Timestamp;
6402    /// let x = SnapshotTableMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
6403    /// ```
6404    pub fn set_finish_time<T>(mut self, v: T) -> Self
6405    where
6406        T: std::convert::Into<wkt::Timestamp>,
6407    {
6408        self.finish_time = std::option::Option::Some(v.into());
6409        self
6410    }
6411
6412    /// Sets or clears the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
6413    ///
6414    /// # Example
6415    /// ```ignore,no_run
6416    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6417    /// use wkt::Timestamp;
6418    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
6419    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
6420    /// ```
6421    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
6422    where
6423        T: std::convert::Into<wkt::Timestamp>,
6424    {
6425        self.finish_time = v.map(|x| x.into());
6426        self
6427    }
6428}
6429
6430impl wkt::message::Message for SnapshotTableMetadata {
6431    fn typename() -> &'static str {
6432        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableMetadata"
6433    }
6434}
6435
6436/// The metadata for the Operation returned by CreateTableFromSnapshot.
6437///
6438/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6439/// feature is not currently available to most Cloud Bigtable customers. This
6440/// feature might be changed in backward-incompatible ways and is not recommended
6441/// for production use. It is not subject to any SLA or deprecation policy.
6442#[derive(Clone, Default, PartialEq)]
6443#[non_exhaustive]
6444pub struct CreateTableFromSnapshotMetadata {
6445    /// The request that prompted the initiation of this CreateTableFromSnapshot
6446    /// operation.
6447    pub original_request: std::option::Option<crate::model::CreateTableFromSnapshotRequest>,
6448
6449    /// The time at which the original request was received.
6450    pub request_time: std::option::Option<wkt::Timestamp>,
6451
6452    /// The time at which the operation failed or was completed successfully.
6453    pub finish_time: std::option::Option<wkt::Timestamp>,
6454
6455    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6456}
6457
6458impl CreateTableFromSnapshotMetadata {
6459    pub fn new() -> Self {
6460        std::default::Default::default()
6461    }
6462
6463    /// Sets the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
6464    ///
6465    /// # Example
6466    /// ```ignore,no_run
6467    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6468    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
6469    /// let x = CreateTableFromSnapshotMetadata::new().set_original_request(CreateTableFromSnapshotRequest::default()/* use setters */);
6470    /// ```
6471    pub fn set_original_request<T>(mut self, v: T) -> Self
6472    where
6473        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
6474    {
6475        self.original_request = std::option::Option::Some(v.into());
6476        self
6477    }
6478
6479    /// Sets or clears the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
6480    ///
6481    /// # Example
6482    /// ```ignore,no_run
6483    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6484    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
6485    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(Some(CreateTableFromSnapshotRequest::default()/* use setters */));
6486    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(None::<CreateTableFromSnapshotRequest>);
6487    /// ```
6488    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6489    where
6490        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
6491    {
6492        self.original_request = v.map(|x| x.into());
6493        self
6494    }
6495
6496    /// Sets the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
6497    ///
6498    /// # Example
6499    /// ```ignore,no_run
6500    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6501    /// use wkt::Timestamp;
6502    /// let x = CreateTableFromSnapshotMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6503    /// ```
6504    pub fn set_request_time<T>(mut self, v: T) -> Self
6505    where
6506        T: std::convert::Into<wkt::Timestamp>,
6507    {
6508        self.request_time = std::option::Option::Some(v.into());
6509        self
6510    }
6511
6512    /// Sets or clears the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
6513    ///
6514    /// # Example
6515    /// ```ignore,no_run
6516    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6517    /// use wkt::Timestamp;
6518    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
6519    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(None::<Timestamp>);
6520    /// ```
6521    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
6522    where
6523        T: std::convert::Into<wkt::Timestamp>,
6524    {
6525        self.request_time = v.map(|x| x.into());
6526        self
6527    }
6528
6529    /// Sets the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
6530    ///
6531    /// # Example
6532    /// ```ignore,no_run
6533    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6534    /// use wkt::Timestamp;
6535    /// let x = CreateTableFromSnapshotMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
6536    /// ```
6537    pub fn set_finish_time<T>(mut self, v: T) -> Self
6538    where
6539        T: std::convert::Into<wkt::Timestamp>,
6540    {
6541        self.finish_time = std::option::Option::Some(v.into());
6542        self
6543    }
6544
6545    /// Sets or clears the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
6546    ///
6547    /// # Example
6548    /// ```ignore,no_run
6549    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6550    /// use wkt::Timestamp;
6551    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
6552    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
6553    /// ```
6554    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
6555    where
6556        T: std::convert::Into<wkt::Timestamp>,
6557    {
6558        self.finish_time = v.map(|x| x.into());
6559        self
6560    }
6561}
6562
6563impl wkt::message::Message for CreateTableFromSnapshotMetadata {
6564    fn typename() -> &'static str {
6565        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotMetadata"
6566    }
6567}
6568
6569/// The request for
6570/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
6571///
6572/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
6573#[derive(Clone, Default, PartialEq)]
6574#[non_exhaustive]
6575pub struct CreateBackupRequest {
6576    /// Required. This must be one of the clusters in the instance in which this
6577    /// table is located. The backup will be stored in this cluster. Values are
6578    /// of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
6579    pub parent: std::string::String,
6580
6581    /// Required. The id of the backup to be created. The `backup_id` along with
6582    /// the parent `parent` are combined as {parent}/backups/{backup_id} to create
6583    /// the full backup name, of the form:
6584    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
6585    /// This string must be between 1 and 50 characters in length and match the
6586    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
6587    pub backup_id: std::string::String,
6588
6589    /// Required. The backup to create.
6590    pub backup: std::option::Option<crate::model::Backup>,
6591
6592    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6593}
6594
6595impl CreateBackupRequest {
6596    pub fn new() -> Self {
6597        std::default::Default::default()
6598    }
6599
6600    /// Sets the value of [parent][crate::model::CreateBackupRequest::parent].
6601    ///
6602    /// # Example
6603    /// ```ignore,no_run
6604    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6605    /// let x = CreateBackupRequest::new().set_parent("example");
6606    /// ```
6607    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6608        self.parent = v.into();
6609        self
6610    }
6611
6612    /// Sets the value of [backup_id][crate::model::CreateBackupRequest::backup_id].
6613    ///
6614    /// # Example
6615    /// ```ignore,no_run
6616    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6617    /// let x = CreateBackupRequest::new().set_backup_id("example");
6618    /// ```
6619    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6620        self.backup_id = v.into();
6621        self
6622    }
6623
6624    /// Sets the value of [backup][crate::model::CreateBackupRequest::backup].
6625    ///
6626    /// # Example
6627    /// ```ignore,no_run
6628    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6629    /// use google_cloud_bigtable_admin_v2::model::Backup;
6630    /// let x = CreateBackupRequest::new().set_backup(Backup::default()/* use setters */);
6631    /// ```
6632    pub fn set_backup<T>(mut self, v: T) -> Self
6633    where
6634        T: std::convert::Into<crate::model::Backup>,
6635    {
6636        self.backup = std::option::Option::Some(v.into());
6637        self
6638    }
6639
6640    /// Sets or clears the value of [backup][crate::model::CreateBackupRequest::backup].
6641    ///
6642    /// # Example
6643    /// ```ignore,no_run
6644    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6645    /// use google_cloud_bigtable_admin_v2::model::Backup;
6646    /// let x = CreateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
6647    /// let x = CreateBackupRequest::new().set_or_clear_backup(None::<Backup>);
6648    /// ```
6649    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6650    where
6651        T: std::convert::Into<crate::model::Backup>,
6652    {
6653        self.backup = v.map(|x| x.into());
6654        self
6655    }
6656}
6657
6658impl wkt::message::Message for CreateBackupRequest {
6659    fn typename() -> &'static str {
6660        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupRequest"
6661    }
6662}
6663
6664/// Metadata type for the operation returned by
6665/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
6666///
6667/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
6668#[derive(Clone, Default, PartialEq)]
6669#[non_exhaustive]
6670pub struct CreateBackupMetadata {
6671    /// The name of the backup being created.
6672    pub name: std::string::String,
6673
6674    /// The name of the table the backup is created from.
6675    pub source_table: std::string::String,
6676
6677    /// The time at which this operation started.
6678    pub start_time: std::option::Option<wkt::Timestamp>,
6679
6680    /// If set, the time at which this operation finished or was cancelled.
6681    pub end_time: std::option::Option<wkt::Timestamp>,
6682
6683    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6684}
6685
6686impl CreateBackupMetadata {
6687    pub fn new() -> Self {
6688        std::default::Default::default()
6689    }
6690
6691    /// Sets the value of [name][crate::model::CreateBackupMetadata::name].
6692    ///
6693    /// # Example
6694    /// ```ignore,no_run
6695    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6696    /// let x = CreateBackupMetadata::new().set_name("example");
6697    /// ```
6698    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6699        self.name = v.into();
6700        self
6701    }
6702
6703    /// Sets the value of [source_table][crate::model::CreateBackupMetadata::source_table].
6704    ///
6705    /// # Example
6706    /// ```ignore,no_run
6707    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6708    /// let x = CreateBackupMetadata::new().set_source_table("example");
6709    /// ```
6710    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6711        self.source_table = v.into();
6712        self
6713    }
6714
6715    /// Sets the value of [start_time][crate::model::CreateBackupMetadata::start_time].
6716    ///
6717    /// # Example
6718    /// ```ignore,no_run
6719    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6720    /// use wkt::Timestamp;
6721    /// let x = CreateBackupMetadata::new().set_start_time(Timestamp::default()/* use setters */);
6722    /// ```
6723    pub fn set_start_time<T>(mut self, v: T) -> Self
6724    where
6725        T: std::convert::Into<wkt::Timestamp>,
6726    {
6727        self.start_time = std::option::Option::Some(v.into());
6728        self
6729    }
6730
6731    /// Sets or clears the value of [start_time][crate::model::CreateBackupMetadata::start_time].
6732    ///
6733    /// # Example
6734    /// ```ignore,no_run
6735    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6736    /// use wkt::Timestamp;
6737    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
6738    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(None::<Timestamp>);
6739    /// ```
6740    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6741    where
6742        T: std::convert::Into<wkt::Timestamp>,
6743    {
6744        self.start_time = v.map(|x| x.into());
6745        self
6746    }
6747
6748    /// Sets the value of [end_time][crate::model::CreateBackupMetadata::end_time].
6749    ///
6750    /// # Example
6751    /// ```ignore,no_run
6752    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6753    /// use wkt::Timestamp;
6754    /// let x = CreateBackupMetadata::new().set_end_time(Timestamp::default()/* use setters */);
6755    /// ```
6756    pub fn set_end_time<T>(mut self, v: T) -> Self
6757    where
6758        T: std::convert::Into<wkt::Timestamp>,
6759    {
6760        self.end_time = std::option::Option::Some(v.into());
6761        self
6762    }
6763
6764    /// Sets or clears the value of [end_time][crate::model::CreateBackupMetadata::end_time].
6765    ///
6766    /// # Example
6767    /// ```ignore,no_run
6768    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6769    /// use wkt::Timestamp;
6770    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
6771    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(None::<Timestamp>);
6772    /// ```
6773    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6774    where
6775        T: std::convert::Into<wkt::Timestamp>,
6776    {
6777        self.end_time = v.map(|x| x.into());
6778        self
6779    }
6780}
6781
6782impl wkt::message::Message for CreateBackupMetadata {
6783    fn typename() -> &'static str {
6784        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupMetadata"
6785    }
6786}
6787
6788/// The request for
6789/// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup].
6790///
6791/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]: crate::client::BigtableTableAdmin::update_backup
6792#[derive(Clone, Default, PartialEq)]
6793#[non_exhaustive]
6794pub struct UpdateBackupRequest {
6795    /// Required. The backup to update. `backup.name`, and the fields to be updated
6796    /// as specified by `update_mask` are required. Other fields are ignored.
6797    /// Update is only supported for the following fields:
6798    ///
6799    /// * `backup.expire_time`.
6800    pub backup: std::option::Option<crate::model::Backup>,
6801
6802    /// Required. A mask specifying which fields (e.g. `expire_time`) in the
6803    /// Backup resource should be updated. This mask is relative to the Backup
6804    /// resource, not to the request message. The field mask must always be
6805    /// specified; this prevents any future fields from being erased accidentally
6806    /// by clients that do not know about them.
6807    pub update_mask: std::option::Option<wkt::FieldMask>,
6808
6809    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6810}
6811
6812impl UpdateBackupRequest {
6813    pub fn new() -> Self {
6814        std::default::Default::default()
6815    }
6816
6817    /// Sets the value of [backup][crate::model::UpdateBackupRequest::backup].
6818    ///
6819    /// # Example
6820    /// ```ignore,no_run
6821    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6822    /// use google_cloud_bigtable_admin_v2::model::Backup;
6823    /// let x = UpdateBackupRequest::new().set_backup(Backup::default()/* use setters */);
6824    /// ```
6825    pub fn set_backup<T>(mut self, v: T) -> Self
6826    where
6827        T: std::convert::Into<crate::model::Backup>,
6828    {
6829        self.backup = std::option::Option::Some(v.into());
6830        self
6831    }
6832
6833    /// Sets or clears the value of [backup][crate::model::UpdateBackupRequest::backup].
6834    ///
6835    /// # Example
6836    /// ```ignore,no_run
6837    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6838    /// use google_cloud_bigtable_admin_v2::model::Backup;
6839    /// let x = UpdateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
6840    /// let x = UpdateBackupRequest::new().set_or_clear_backup(None::<Backup>);
6841    /// ```
6842    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6843    where
6844        T: std::convert::Into<crate::model::Backup>,
6845    {
6846        self.backup = v.map(|x| x.into());
6847        self
6848    }
6849
6850    /// Sets the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
6851    ///
6852    /// # Example
6853    /// ```ignore,no_run
6854    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6855    /// use wkt::FieldMask;
6856    /// let x = UpdateBackupRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6857    /// ```
6858    pub fn set_update_mask<T>(mut self, v: T) -> Self
6859    where
6860        T: std::convert::Into<wkt::FieldMask>,
6861    {
6862        self.update_mask = std::option::Option::Some(v.into());
6863        self
6864    }
6865
6866    /// Sets or clears the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
6867    ///
6868    /// # Example
6869    /// ```ignore,no_run
6870    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6871    /// use wkt::FieldMask;
6872    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6873    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6874    /// ```
6875    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6876    where
6877        T: std::convert::Into<wkt::FieldMask>,
6878    {
6879        self.update_mask = v.map(|x| x.into());
6880        self
6881    }
6882}
6883
6884impl wkt::message::Message for UpdateBackupRequest {
6885    fn typename() -> &'static str {
6886        "type.googleapis.com/google.bigtable.admin.v2.UpdateBackupRequest"
6887    }
6888}
6889
6890/// The request for
6891/// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup].
6892///
6893/// [google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]: crate::client::BigtableTableAdmin::get_backup
6894#[derive(Clone, Default, PartialEq)]
6895#[non_exhaustive]
6896pub struct GetBackupRequest {
6897    /// Required. Name of the backup.
6898    /// Values are of the form
6899    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
6900    pub name: std::string::String,
6901
6902    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6903}
6904
6905impl GetBackupRequest {
6906    pub fn new() -> Self {
6907        std::default::Default::default()
6908    }
6909
6910    /// Sets the value of [name][crate::model::GetBackupRequest::name].
6911    ///
6912    /// # Example
6913    /// ```ignore,no_run
6914    /// # use google_cloud_bigtable_admin_v2::model::GetBackupRequest;
6915    /// let x = GetBackupRequest::new().set_name("example");
6916    /// ```
6917    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6918        self.name = v.into();
6919        self
6920    }
6921}
6922
6923impl wkt::message::Message for GetBackupRequest {
6924    fn typename() -> &'static str {
6925        "type.googleapis.com/google.bigtable.admin.v2.GetBackupRequest"
6926    }
6927}
6928
6929/// The request for
6930/// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup].
6931///
6932/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]: crate::client::BigtableTableAdmin::delete_backup
6933#[derive(Clone, Default, PartialEq)]
6934#[non_exhaustive]
6935pub struct DeleteBackupRequest {
6936    /// Required. Name of the backup to delete.
6937    /// Values are of the form
6938    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
6939    pub name: std::string::String,
6940
6941    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6942}
6943
6944impl DeleteBackupRequest {
6945    pub fn new() -> Self {
6946        std::default::Default::default()
6947    }
6948
6949    /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
6950    ///
6951    /// # Example
6952    /// ```ignore,no_run
6953    /// # use google_cloud_bigtable_admin_v2::model::DeleteBackupRequest;
6954    /// let x = DeleteBackupRequest::new().set_name("example");
6955    /// ```
6956    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6957        self.name = v.into();
6958        self
6959    }
6960}
6961
6962impl wkt::message::Message for DeleteBackupRequest {
6963    fn typename() -> &'static str {
6964        "type.googleapis.com/google.bigtable.admin.v2.DeleteBackupRequest"
6965    }
6966}
6967
6968/// The request for
6969/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
6970///
6971/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
6972#[derive(Clone, Default, PartialEq)]
6973#[non_exhaustive]
6974pub struct ListBackupsRequest {
6975    /// Required. The cluster to list backups from.  Values are of the
6976    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
6977    /// Use `{cluster} = '-'` to list backups for all clusters in an instance,
6978    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
6979    pub parent: std::string::String,
6980
6981    /// A filter expression that filters backups listed in the response.
6982    /// The expression must specify the field name, a comparison operator,
6983    /// and the value that you want to use for filtering. The value must be a
6984    /// string, a number, or a boolean. The comparison operator must be
6985    /// <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is
6986    /// roughly synonymous with equality. Filter rules are case insensitive.
6987    ///
6988    /// The fields eligible for filtering are:
6989    ///
6990    /// * `name`
6991    /// * `source_table`
6992    /// * `state`
6993    /// * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
6994    /// * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
6995    /// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
6996    /// * `size_bytes`
6997    ///
6998    /// To filter on multiple expressions, provide each separate expression within
6999    /// parentheses. By default, each expression is an AND expression. However,
7000    /// you can include AND, OR, and NOT expressions explicitly.
7001    ///
7002    /// Some examples of using filters are:
7003    ///
7004    /// * `name:"exact"` --> The backup's name is the string "exact".
7005    /// * `name:howl` --> The backup's name contains the string "howl".
7006    /// * `source_table:prod`
7007    ///   --> The source_table's name contains the string "prod".
7008    /// * `state:CREATING` --> The backup is pending creation.
7009    /// * `state:READY` --> The backup is fully created and ready for use.
7010    /// * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")`
7011    ///   --> The backup name contains the string "howl" and start_time
7012    ///   of the backup is before 2018-03-28T14:50:00Z.
7013    /// * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
7014    pub filter: std::string::String,
7015
7016    /// An expression for specifying the sort order of the results of the request.
7017    /// The string value should specify one or more fields in
7018    /// [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at
7019    /// <https://aip.dev/132#ordering>.
7020    ///
7021    /// Fields supported are:
7022    ///
7023    /// * name
7024    /// * source_table
7025    /// * expire_time
7026    /// * start_time
7027    /// * end_time
7028    /// * size_bytes
7029    /// * state
7030    ///
7031    /// For example, "start_time". The default sorting order is ascending.
7032    /// To specify descending order for the field, a suffix " desc" should
7033    /// be appended to the field name. For example, "start_time desc".
7034    /// Redundant space characters in the syntax are insigificant.
7035    ///
7036    /// If order_by is empty, results will be sorted by `start_time` in descending
7037    /// order starting from the most recently created backup.
7038    ///
7039    /// [google.bigtable.admin.v2.Backup]: crate::model::Backup
7040    pub order_by: std::string::String,
7041
7042    /// Number of backups to be returned in the response. If 0 or
7043    /// less, defaults to the server's maximum allowed page size.
7044    pub page_size: i32,
7045
7046    /// If non-empty, `page_token` should contain a
7047    /// [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token]
7048    /// from a previous
7049    /// [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the
7050    /// same `parent` and with the same `filter`.
7051    ///
7052    /// [google.bigtable.admin.v2.ListBackupsResponse]: crate::model::ListBackupsResponse
7053    /// [google.bigtable.admin.v2.ListBackupsResponse.next_page_token]: crate::model::ListBackupsResponse::next_page_token
7054    pub page_token: std::string::String,
7055
7056    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7057}
7058
7059impl ListBackupsRequest {
7060    pub fn new() -> Self {
7061        std::default::Default::default()
7062    }
7063
7064    /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
7065    ///
7066    /// # Example
7067    /// ```ignore,no_run
7068    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7069    /// let x = ListBackupsRequest::new().set_parent("example");
7070    /// ```
7071    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7072        self.parent = v.into();
7073        self
7074    }
7075
7076    /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
7077    ///
7078    /// # Example
7079    /// ```ignore,no_run
7080    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7081    /// let x = ListBackupsRequest::new().set_filter("example");
7082    /// ```
7083    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7084        self.filter = v.into();
7085        self
7086    }
7087
7088    /// Sets the value of [order_by][crate::model::ListBackupsRequest::order_by].
7089    ///
7090    /// # Example
7091    /// ```ignore,no_run
7092    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7093    /// let x = ListBackupsRequest::new().set_order_by("example");
7094    /// ```
7095    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7096        self.order_by = v.into();
7097        self
7098    }
7099
7100    /// Sets the value of [page_size][crate::model::ListBackupsRequest::page_size].
7101    ///
7102    /// # Example
7103    /// ```ignore,no_run
7104    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7105    /// let x = ListBackupsRequest::new().set_page_size(42);
7106    /// ```
7107    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7108        self.page_size = v.into();
7109        self
7110    }
7111
7112    /// Sets the value of [page_token][crate::model::ListBackupsRequest::page_token].
7113    ///
7114    /// # Example
7115    /// ```ignore,no_run
7116    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7117    /// let x = ListBackupsRequest::new().set_page_token("example");
7118    /// ```
7119    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7120        self.page_token = v.into();
7121        self
7122    }
7123}
7124
7125impl wkt::message::Message for ListBackupsRequest {
7126    fn typename() -> &'static str {
7127        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsRequest"
7128    }
7129}
7130
7131/// The response for
7132/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
7133///
7134/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7135#[derive(Clone, Default, PartialEq)]
7136#[non_exhaustive]
7137pub struct ListBackupsResponse {
7138    /// The list of matching backups.
7139    pub backups: std::vec::Vec<crate::model::Backup>,
7140
7141    /// `next_page_token` can be sent in a subsequent
7142    /// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call
7143    /// to fetch more of the matching backups.
7144    ///
7145    /// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7146    pub next_page_token: std::string::String,
7147
7148    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7149}
7150
7151impl ListBackupsResponse {
7152    pub fn new() -> Self {
7153        std::default::Default::default()
7154    }
7155
7156    /// Sets the value of [backups][crate::model::ListBackupsResponse::backups].
7157    ///
7158    /// # Example
7159    /// ```ignore,no_run
7160    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7161    /// use google_cloud_bigtable_admin_v2::model::Backup;
7162    /// let x = ListBackupsResponse::new()
7163    ///     .set_backups([
7164    ///         Backup::default()/* use setters */,
7165    ///         Backup::default()/* use (different) setters */,
7166    ///     ]);
7167    /// ```
7168    pub fn set_backups<T, V>(mut self, v: T) -> Self
7169    where
7170        T: std::iter::IntoIterator<Item = V>,
7171        V: std::convert::Into<crate::model::Backup>,
7172    {
7173        use std::iter::Iterator;
7174        self.backups = v.into_iter().map(|i| i.into()).collect();
7175        self
7176    }
7177
7178    /// Sets the value of [next_page_token][crate::model::ListBackupsResponse::next_page_token].
7179    ///
7180    /// # Example
7181    /// ```ignore,no_run
7182    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7183    /// let x = ListBackupsResponse::new().set_next_page_token("example");
7184    /// ```
7185    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7186        self.next_page_token = v.into();
7187        self
7188    }
7189}
7190
7191impl wkt::message::Message for ListBackupsResponse {
7192    fn typename() -> &'static str {
7193        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsResponse"
7194    }
7195}
7196
7197#[doc(hidden)]
7198impl gax::paginator::internal::PageableResponse for ListBackupsResponse {
7199    type PageItem = crate::model::Backup;
7200
7201    fn items(self) -> std::vec::Vec<Self::PageItem> {
7202        self.backups
7203    }
7204
7205    fn next_page_token(&self) -> std::string::String {
7206        use std::clone::Clone;
7207        self.next_page_token.clone()
7208    }
7209}
7210
7211/// The request for
7212/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7213///
7214/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7215#[derive(Clone, Default, PartialEq)]
7216#[non_exhaustive]
7217pub struct CopyBackupRequest {
7218    /// Required. The name of the destination cluster that will contain the backup
7219    /// copy. The cluster must already exist. Values are of the form:
7220    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
7221    pub parent: std::string::String,
7222
7223    /// Required. The id of the new backup. The `backup_id` along with `parent`
7224    /// are combined as {parent}/backups/{backup_id} to create the full backup
7225    /// name, of the form:
7226    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
7227    /// This string must be between 1 and 50 characters in length and match the
7228    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
7229    pub backup_id: std::string::String,
7230
7231    /// Required. The source backup to be copied from.
7232    /// The source backup needs to be in READY state for it to be copied.
7233    /// Copying a copied backup is not allowed.
7234    /// Once CopyBackup is in progress, the source backup cannot be deleted or
7235    /// cleaned up on expiration until CopyBackup is finished.
7236    /// Values are of the form:
7237    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7238    pub source_backup: std::string::String,
7239
7240    /// Required. Required. The expiration time of the copied backup with
7241    /// microsecond granularity that must be at least 6 hours and at most 30 days
7242    /// from the time the request is received. Once the `expire_time` has
7243    /// passed, Cloud Bigtable will delete the backup and free the resources used
7244    /// by the backup.
7245    pub expire_time: std::option::Option<wkt::Timestamp>,
7246
7247    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7248}
7249
7250impl CopyBackupRequest {
7251    pub fn new() -> Self {
7252        std::default::Default::default()
7253    }
7254
7255    /// Sets the value of [parent][crate::model::CopyBackupRequest::parent].
7256    ///
7257    /// # Example
7258    /// ```ignore,no_run
7259    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7260    /// let x = CopyBackupRequest::new().set_parent("example");
7261    /// ```
7262    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7263        self.parent = v.into();
7264        self
7265    }
7266
7267    /// Sets the value of [backup_id][crate::model::CopyBackupRequest::backup_id].
7268    ///
7269    /// # Example
7270    /// ```ignore,no_run
7271    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7272    /// let x = CopyBackupRequest::new().set_backup_id("example");
7273    /// ```
7274    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7275        self.backup_id = v.into();
7276        self
7277    }
7278
7279    /// Sets the value of [source_backup][crate::model::CopyBackupRequest::source_backup].
7280    ///
7281    /// # Example
7282    /// ```ignore,no_run
7283    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7284    /// let x = CopyBackupRequest::new().set_source_backup("example");
7285    /// ```
7286    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7287        self.source_backup = v.into();
7288        self
7289    }
7290
7291    /// Sets the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7292    ///
7293    /// # Example
7294    /// ```ignore,no_run
7295    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7296    /// use wkt::Timestamp;
7297    /// let x = CopyBackupRequest::new().set_expire_time(Timestamp::default()/* use setters */);
7298    /// ```
7299    pub fn set_expire_time<T>(mut self, v: T) -> Self
7300    where
7301        T: std::convert::Into<wkt::Timestamp>,
7302    {
7303        self.expire_time = std::option::Option::Some(v.into());
7304        self
7305    }
7306
7307    /// Sets or clears the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7308    ///
7309    /// # Example
7310    /// ```ignore,no_run
7311    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7312    /// use wkt::Timestamp;
7313    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
7314    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(None::<Timestamp>);
7315    /// ```
7316    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
7317    where
7318        T: std::convert::Into<wkt::Timestamp>,
7319    {
7320        self.expire_time = v.map(|x| x.into());
7321        self
7322    }
7323}
7324
7325impl wkt::message::Message for CopyBackupRequest {
7326    fn typename() -> &'static str {
7327        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupRequest"
7328    }
7329}
7330
7331/// Metadata type for the google.longrunning.Operation returned by
7332/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7333///
7334/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7335#[derive(Clone, Default, PartialEq)]
7336#[non_exhaustive]
7337pub struct CopyBackupMetadata {
7338    /// The name of the backup being created through the copy operation.
7339    /// Values are of the form
7340    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7341    pub name: std::string::String,
7342
7343    /// Information about the source backup that is being copied from.
7344    pub source_backup_info: std::option::Option<crate::model::BackupInfo>,
7345
7346    /// The progress of the
7347    /// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]
7348    /// operation.
7349    ///
7350    /// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7351    pub progress: std::option::Option<crate::model::OperationProgress>,
7352
7353    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7354}
7355
7356impl CopyBackupMetadata {
7357    pub fn new() -> Self {
7358        std::default::Default::default()
7359    }
7360
7361    /// Sets the value of [name][crate::model::CopyBackupMetadata::name].
7362    ///
7363    /// # Example
7364    /// ```ignore,no_run
7365    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7366    /// let x = CopyBackupMetadata::new().set_name("example");
7367    /// ```
7368    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7369        self.name = v.into();
7370        self
7371    }
7372
7373    /// Sets the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
7374    ///
7375    /// # Example
7376    /// ```ignore,no_run
7377    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7378    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
7379    /// let x = CopyBackupMetadata::new().set_source_backup_info(BackupInfo::default()/* use setters */);
7380    /// ```
7381    pub fn set_source_backup_info<T>(mut self, v: T) -> Self
7382    where
7383        T: std::convert::Into<crate::model::BackupInfo>,
7384    {
7385        self.source_backup_info = std::option::Option::Some(v.into());
7386        self
7387    }
7388
7389    /// Sets or clears the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
7390    ///
7391    /// # Example
7392    /// ```ignore,no_run
7393    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7394    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
7395    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(Some(BackupInfo::default()/* use setters */));
7396    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(None::<BackupInfo>);
7397    /// ```
7398    pub fn set_or_clear_source_backup_info<T>(mut self, v: std::option::Option<T>) -> Self
7399    where
7400        T: std::convert::Into<crate::model::BackupInfo>,
7401    {
7402        self.source_backup_info = v.map(|x| x.into());
7403        self
7404    }
7405
7406    /// Sets the value of [progress][crate::model::CopyBackupMetadata::progress].
7407    ///
7408    /// # Example
7409    /// ```ignore,no_run
7410    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7411    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
7412    /// let x = CopyBackupMetadata::new().set_progress(OperationProgress::default()/* use setters */);
7413    /// ```
7414    pub fn set_progress<T>(mut self, v: T) -> Self
7415    where
7416        T: std::convert::Into<crate::model::OperationProgress>,
7417    {
7418        self.progress = std::option::Option::Some(v.into());
7419        self
7420    }
7421
7422    /// Sets or clears the value of [progress][crate::model::CopyBackupMetadata::progress].
7423    ///
7424    /// # Example
7425    /// ```ignore,no_run
7426    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7427    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
7428    /// let x = CopyBackupMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
7429    /// let x = CopyBackupMetadata::new().set_or_clear_progress(None::<OperationProgress>);
7430    /// ```
7431    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
7432    where
7433        T: std::convert::Into<crate::model::OperationProgress>,
7434    {
7435        self.progress = v.map(|x| x.into());
7436        self
7437    }
7438}
7439
7440impl wkt::message::Message for CopyBackupMetadata {
7441    fn typename() -> &'static str {
7442        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupMetadata"
7443    }
7444}
7445
7446/// The request for
7447/// [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]
7448///
7449/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]: crate::client::BigtableTableAdmin::create_authorized_view
7450#[derive(Clone, Default, PartialEq)]
7451#[non_exhaustive]
7452pub struct CreateAuthorizedViewRequest {
7453    /// Required. This is the name of the table the AuthorizedView belongs to.
7454    /// Values are of the form
7455    /// `projects/{project}/instances/{instance}/tables/{table}`.
7456    pub parent: std::string::String,
7457
7458    /// Required. The id of the AuthorizedView to create. This AuthorizedView must
7459    /// not already exist. The `authorized_view_id` appended to `parent` forms the
7460    /// full AuthorizedView name of the form
7461    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
7462    pub authorized_view_id: std::string::String,
7463
7464    /// Required. The AuthorizedView to create.
7465    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
7466
7467    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7468}
7469
7470impl CreateAuthorizedViewRequest {
7471    pub fn new() -> Self {
7472        std::default::Default::default()
7473    }
7474
7475    /// Sets the value of [parent][crate::model::CreateAuthorizedViewRequest::parent].
7476    ///
7477    /// # Example
7478    /// ```ignore,no_run
7479    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7480    /// let x = CreateAuthorizedViewRequest::new().set_parent("example");
7481    /// ```
7482    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7483        self.parent = v.into();
7484        self
7485    }
7486
7487    /// Sets the value of [authorized_view_id][crate::model::CreateAuthorizedViewRequest::authorized_view_id].
7488    ///
7489    /// # Example
7490    /// ```ignore,no_run
7491    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7492    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view_id("example");
7493    /// ```
7494    pub fn set_authorized_view_id<T: std::convert::Into<std::string::String>>(
7495        mut self,
7496        v: T,
7497    ) -> Self {
7498        self.authorized_view_id = v.into();
7499        self
7500    }
7501
7502    /// Sets the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
7503    ///
7504    /// # Example
7505    /// ```ignore,no_run
7506    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7507    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7508    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
7509    /// ```
7510    pub fn set_authorized_view<T>(mut self, v: T) -> Self
7511    where
7512        T: std::convert::Into<crate::model::AuthorizedView>,
7513    {
7514        self.authorized_view = std::option::Option::Some(v.into());
7515        self
7516    }
7517
7518    /// Sets or clears the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
7519    ///
7520    /// # Example
7521    /// ```ignore,no_run
7522    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7523    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7524    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
7525    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
7526    /// ```
7527    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
7528    where
7529        T: std::convert::Into<crate::model::AuthorizedView>,
7530    {
7531        self.authorized_view = v.map(|x| x.into());
7532        self
7533    }
7534}
7535
7536impl wkt::message::Message for CreateAuthorizedViewRequest {
7537    fn typename() -> &'static str {
7538        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewRequest"
7539    }
7540}
7541
7542/// The metadata for the Operation returned by CreateAuthorizedView.
7543#[derive(Clone, Default, PartialEq)]
7544#[non_exhaustive]
7545pub struct CreateAuthorizedViewMetadata {
7546    /// The request that prompted the initiation of this CreateAuthorizedView
7547    /// operation.
7548    pub original_request: std::option::Option<crate::model::CreateAuthorizedViewRequest>,
7549
7550    /// The time at which the original request was received.
7551    pub request_time: std::option::Option<wkt::Timestamp>,
7552
7553    /// The time at which the operation failed or was completed successfully.
7554    pub finish_time: std::option::Option<wkt::Timestamp>,
7555
7556    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7557}
7558
7559impl CreateAuthorizedViewMetadata {
7560    pub fn new() -> Self {
7561        std::default::Default::default()
7562    }
7563
7564    /// Sets the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
7565    ///
7566    /// # Example
7567    /// ```ignore,no_run
7568    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7569    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7570    /// let x = CreateAuthorizedViewMetadata::new().set_original_request(CreateAuthorizedViewRequest::default()/* use setters */);
7571    /// ```
7572    pub fn set_original_request<T>(mut self, v: T) -> Self
7573    where
7574        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
7575    {
7576        self.original_request = std::option::Option::Some(v.into());
7577        self
7578    }
7579
7580    /// Sets or clears the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
7581    ///
7582    /// # Example
7583    /// ```ignore,no_run
7584    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7585    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7586    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(CreateAuthorizedViewRequest::default()/* use setters */));
7587    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<CreateAuthorizedViewRequest>);
7588    /// ```
7589    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
7590    where
7591        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
7592    {
7593        self.original_request = v.map(|x| x.into());
7594        self
7595    }
7596
7597    /// Sets the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
7598    ///
7599    /// # Example
7600    /// ```ignore,no_run
7601    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7602    /// use wkt::Timestamp;
7603    /// let x = CreateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
7604    /// ```
7605    pub fn set_request_time<T>(mut self, v: T) -> Self
7606    where
7607        T: std::convert::Into<wkt::Timestamp>,
7608    {
7609        self.request_time = std::option::Option::Some(v.into());
7610        self
7611    }
7612
7613    /// Sets or clears the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
7614    ///
7615    /// # Example
7616    /// ```ignore,no_run
7617    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7618    /// use wkt::Timestamp;
7619    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
7620    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
7621    /// ```
7622    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
7623    where
7624        T: std::convert::Into<wkt::Timestamp>,
7625    {
7626        self.request_time = v.map(|x| x.into());
7627        self
7628    }
7629
7630    /// Sets the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
7631    ///
7632    /// # Example
7633    /// ```ignore,no_run
7634    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7635    /// use wkt::Timestamp;
7636    /// let x = CreateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
7637    /// ```
7638    pub fn set_finish_time<T>(mut self, v: T) -> Self
7639    where
7640        T: std::convert::Into<wkt::Timestamp>,
7641    {
7642        self.finish_time = std::option::Option::Some(v.into());
7643        self
7644    }
7645
7646    /// Sets or clears the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
7647    ///
7648    /// # Example
7649    /// ```ignore,no_run
7650    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7651    /// use wkt::Timestamp;
7652    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
7653    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
7654    /// ```
7655    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
7656    where
7657        T: std::convert::Into<wkt::Timestamp>,
7658    {
7659        self.finish_time = v.map(|x| x.into());
7660        self
7661    }
7662}
7663
7664impl wkt::message::Message for CreateAuthorizedViewMetadata {
7665    fn typename() -> &'static str {
7666        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewMetadata"
7667    }
7668}
7669
7670/// Request message for
7671/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
7672///
7673/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
7674#[derive(Clone, Default, PartialEq)]
7675#[non_exhaustive]
7676pub struct ListAuthorizedViewsRequest {
7677    /// Required. The unique name of the table for which AuthorizedViews should be
7678    /// listed. Values are of the form
7679    /// `projects/{project}/instances/{instance}/tables/{table}`.
7680    pub parent: std::string::String,
7681
7682    /// Optional. Maximum number of results per page.
7683    ///
7684    /// A page_size of zero lets the server choose the number of items to return.
7685    /// A page_size which is strictly positive will return at most that many items.
7686    /// A negative page_size will cause an error.
7687    ///
7688    /// Following the first request, subsequent paginated calls are not required
7689    /// to pass a page_size. If a page_size is set in subsequent calls, it must
7690    /// match the page_size given in the first request.
7691    pub page_size: i32,
7692
7693    /// Optional. The value of `next_page_token` returned by a previous call.
7694    pub page_token: std::string::String,
7695
7696    /// Optional. The resource_view to be applied to the returned AuthorizedViews'
7697    /// fields. Default to NAME_ONLY.
7698    pub view: crate::model::authorized_view::ResponseView,
7699
7700    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7701}
7702
7703impl ListAuthorizedViewsRequest {
7704    pub fn new() -> Self {
7705        std::default::Default::default()
7706    }
7707
7708    /// Sets the value of [parent][crate::model::ListAuthorizedViewsRequest::parent].
7709    ///
7710    /// # Example
7711    /// ```ignore,no_run
7712    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7713    /// let x = ListAuthorizedViewsRequest::new().set_parent("example");
7714    /// ```
7715    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7716        self.parent = v.into();
7717        self
7718    }
7719
7720    /// Sets the value of [page_size][crate::model::ListAuthorizedViewsRequest::page_size].
7721    ///
7722    /// # Example
7723    /// ```ignore,no_run
7724    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7725    /// let x = ListAuthorizedViewsRequest::new().set_page_size(42);
7726    /// ```
7727    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7728        self.page_size = v.into();
7729        self
7730    }
7731
7732    /// Sets the value of [page_token][crate::model::ListAuthorizedViewsRequest::page_token].
7733    ///
7734    /// # Example
7735    /// ```ignore,no_run
7736    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7737    /// let x = ListAuthorizedViewsRequest::new().set_page_token("example");
7738    /// ```
7739    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7740        self.page_token = v.into();
7741        self
7742    }
7743
7744    /// Sets the value of [view][crate::model::ListAuthorizedViewsRequest::view].
7745    ///
7746    /// # Example
7747    /// ```ignore,no_run
7748    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7749    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
7750    /// let x0 = ListAuthorizedViewsRequest::new().set_view(ResponseView::NameOnly);
7751    /// let x1 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Basic);
7752    /// let x2 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Full);
7753    /// ```
7754    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
7755        mut self,
7756        v: T,
7757    ) -> Self {
7758        self.view = v.into();
7759        self
7760    }
7761}
7762
7763impl wkt::message::Message for ListAuthorizedViewsRequest {
7764    fn typename() -> &'static str {
7765        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsRequest"
7766    }
7767}
7768
7769/// Response message for
7770/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
7771///
7772/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
7773#[derive(Clone, Default, PartialEq)]
7774#[non_exhaustive]
7775pub struct ListAuthorizedViewsResponse {
7776    /// The AuthorizedViews present in the requested table.
7777    pub authorized_views: std::vec::Vec<crate::model::AuthorizedView>,
7778
7779    /// Set if not all tables could be returned in a single response.
7780    /// Pass this value to `page_token` in another request to get the next
7781    /// page of results.
7782    pub next_page_token: std::string::String,
7783
7784    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7785}
7786
7787impl ListAuthorizedViewsResponse {
7788    pub fn new() -> Self {
7789        std::default::Default::default()
7790    }
7791
7792    /// Sets the value of [authorized_views][crate::model::ListAuthorizedViewsResponse::authorized_views].
7793    ///
7794    /// # Example
7795    /// ```ignore,no_run
7796    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
7797    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7798    /// let x = ListAuthorizedViewsResponse::new()
7799    ///     .set_authorized_views([
7800    ///         AuthorizedView::default()/* use setters */,
7801    ///         AuthorizedView::default()/* use (different) setters */,
7802    ///     ]);
7803    /// ```
7804    pub fn set_authorized_views<T, V>(mut self, v: T) -> Self
7805    where
7806        T: std::iter::IntoIterator<Item = V>,
7807        V: std::convert::Into<crate::model::AuthorizedView>,
7808    {
7809        use std::iter::Iterator;
7810        self.authorized_views = v.into_iter().map(|i| i.into()).collect();
7811        self
7812    }
7813
7814    /// Sets the value of [next_page_token][crate::model::ListAuthorizedViewsResponse::next_page_token].
7815    ///
7816    /// # Example
7817    /// ```ignore,no_run
7818    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
7819    /// let x = ListAuthorizedViewsResponse::new().set_next_page_token("example");
7820    /// ```
7821    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7822        self.next_page_token = v.into();
7823        self
7824    }
7825}
7826
7827impl wkt::message::Message for ListAuthorizedViewsResponse {
7828    fn typename() -> &'static str {
7829        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsResponse"
7830    }
7831}
7832
7833#[doc(hidden)]
7834impl gax::paginator::internal::PageableResponse for ListAuthorizedViewsResponse {
7835    type PageItem = crate::model::AuthorizedView;
7836
7837    fn items(self) -> std::vec::Vec<Self::PageItem> {
7838        self.authorized_views
7839    }
7840
7841    fn next_page_token(&self) -> std::string::String {
7842        use std::clone::Clone;
7843        self.next_page_token.clone()
7844    }
7845}
7846
7847/// Request message for
7848/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]
7849///
7850/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]: crate::client::BigtableTableAdmin::get_authorized_view
7851#[derive(Clone, Default, PartialEq)]
7852#[non_exhaustive]
7853pub struct GetAuthorizedViewRequest {
7854    /// Required. The unique name of the requested AuthorizedView.
7855    /// Values are of the form
7856    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
7857    pub name: std::string::String,
7858
7859    /// Optional. The resource_view to be applied to the returned AuthorizedView's
7860    /// fields. Default to BASIC.
7861    pub view: crate::model::authorized_view::ResponseView,
7862
7863    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7864}
7865
7866impl GetAuthorizedViewRequest {
7867    pub fn new() -> Self {
7868        std::default::Default::default()
7869    }
7870
7871    /// Sets the value of [name][crate::model::GetAuthorizedViewRequest::name].
7872    ///
7873    /// # Example
7874    /// ```ignore,no_run
7875    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
7876    /// let x = GetAuthorizedViewRequest::new().set_name("example");
7877    /// ```
7878    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7879        self.name = v.into();
7880        self
7881    }
7882
7883    /// Sets the value of [view][crate::model::GetAuthorizedViewRequest::view].
7884    ///
7885    /// # Example
7886    /// ```ignore,no_run
7887    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
7888    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
7889    /// let x0 = GetAuthorizedViewRequest::new().set_view(ResponseView::NameOnly);
7890    /// let x1 = GetAuthorizedViewRequest::new().set_view(ResponseView::Basic);
7891    /// let x2 = GetAuthorizedViewRequest::new().set_view(ResponseView::Full);
7892    /// ```
7893    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
7894        mut self,
7895        v: T,
7896    ) -> Self {
7897        self.view = v.into();
7898        self
7899    }
7900}
7901
7902impl wkt::message::Message for GetAuthorizedViewRequest {
7903    fn typename() -> &'static str {
7904        "type.googleapis.com/google.bigtable.admin.v2.GetAuthorizedViewRequest"
7905    }
7906}
7907
7908/// The request for
7909/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
7910///
7911/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
7912#[derive(Clone, Default, PartialEq)]
7913#[non_exhaustive]
7914pub struct UpdateAuthorizedViewRequest {
7915    /// Required. The AuthorizedView to update. The `name` in `authorized_view` is
7916    /// used to identify the AuthorizedView. AuthorizedView name must in this
7917    /// format:
7918    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
7919    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
7920
7921    /// Optional. The list of fields to update.
7922    /// A mask specifying which fields in the AuthorizedView resource should be
7923    /// updated. This mask is relative to the AuthorizedView resource, not to the
7924    /// request message. A field will be overwritten if it is in the mask. If
7925    /// empty, all fields set in the request will be overwritten. A special value
7926    /// `*` means to overwrite all fields (including fields not set in the
7927    /// request).
7928    pub update_mask: std::option::Option<wkt::FieldMask>,
7929
7930    /// Optional. If true, ignore the safety checks when updating the
7931    /// AuthorizedView.
7932    pub ignore_warnings: bool,
7933
7934    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7935}
7936
7937impl UpdateAuthorizedViewRequest {
7938    pub fn new() -> Self {
7939        std::default::Default::default()
7940    }
7941
7942    /// Sets the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
7943    ///
7944    /// # Example
7945    /// ```ignore,no_run
7946    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
7947    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7948    /// let x = UpdateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
7949    /// ```
7950    pub fn set_authorized_view<T>(mut self, v: T) -> Self
7951    where
7952        T: std::convert::Into<crate::model::AuthorizedView>,
7953    {
7954        self.authorized_view = std::option::Option::Some(v.into());
7955        self
7956    }
7957
7958    /// Sets or clears the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
7959    ///
7960    /// # Example
7961    /// ```ignore,no_run
7962    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
7963    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7964    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
7965    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
7966    /// ```
7967    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
7968    where
7969        T: std::convert::Into<crate::model::AuthorizedView>,
7970    {
7971        self.authorized_view = v.map(|x| x.into());
7972        self
7973    }
7974
7975    /// Sets the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
7976    ///
7977    /// # Example
7978    /// ```ignore,no_run
7979    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
7980    /// use wkt::FieldMask;
7981    /// let x = UpdateAuthorizedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7982    /// ```
7983    pub fn set_update_mask<T>(mut self, v: T) -> Self
7984    where
7985        T: std::convert::Into<wkt::FieldMask>,
7986    {
7987        self.update_mask = std::option::Option::Some(v.into());
7988        self
7989    }
7990
7991    /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
7992    ///
7993    /// # Example
7994    /// ```ignore,no_run
7995    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
7996    /// use wkt::FieldMask;
7997    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7998    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7999    /// ```
8000    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8001    where
8002        T: std::convert::Into<wkt::FieldMask>,
8003    {
8004        self.update_mask = v.map(|x| x.into());
8005        self
8006    }
8007
8008    /// Sets the value of [ignore_warnings][crate::model::UpdateAuthorizedViewRequest::ignore_warnings].
8009    ///
8010    /// # Example
8011    /// ```ignore,no_run
8012    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8013    /// let x = UpdateAuthorizedViewRequest::new().set_ignore_warnings(true);
8014    /// ```
8015    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8016        self.ignore_warnings = v.into();
8017        self
8018    }
8019}
8020
8021impl wkt::message::Message for UpdateAuthorizedViewRequest {
8022    fn typename() -> &'static str {
8023        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewRequest"
8024    }
8025}
8026
8027/// Metadata for the google.longrunning.Operation returned by
8028/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
8029///
8030/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
8031#[derive(Clone, Default, PartialEq)]
8032#[non_exhaustive]
8033pub struct UpdateAuthorizedViewMetadata {
8034    /// The request that prompted the initiation of this UpdateAuthorizedView
8035    /// operation.
8036    pub original_request: std::option::Option<crate::model::UpdateAuthorizedViewRequest>,
8037
8038    /// The time at which the original request was received.
8039    pub request_time: std::option::Option<wkt::Timestamp>,
8040
8041    /// The time at which the operation failed or was completed successfully.
8042    pub finish_time: std::option::Option<wkt::Timestamp>,
8043
8044    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8045}
8046
8047impl UpdateAuthorizedViewMetadata {
8048    pub fn new() -> Self {
8049        std::default::Default::default()
8050    }
8051
8052    /// Sets the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8053    ///
8054    /// # Example
8055    /// ```ignore,no_run
8056    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8057    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8058    /// let x = UpdateAuthorizedViewMetadata::new().set_original_request(UpdateAuthorizedViewRequest::default()/* use setters */);
8059    /// ```
8060    pub fn set_original_request<T>(mut self, v: T) -> Self
8061    where
8062        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8063    {
8064        self.original_request = std::option::Option::Some(v.into());
8065        self
8066    }
8067
8068    /// Sets or clears the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8069    ///
8070    /// # Example
8071    /// ```ignore,no_run
8072    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8073    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8074    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(UpdateAuthorizedViewRequest::default()/* use setters */));
8075    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<UpdateAuthorizedViewRequest>);
8076    /// ```
8077    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
8078    where
8079        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8080    {
8081        self.original_request = v.map(|x| x.into());
8082        self
8083    }
8084
8085    /// Sets the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8086    ///
8087    /// # Example
8088    /// ```ignore,no_run
8089    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8090    /// use wkt::Timestamp;
8091    /// let x = UpdateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
8092    /// ```
8093    pub fn set_request_time<T>(mut self, v: T) -> Self
8094    where
8095        T: std::convert::Into<wkt::Timestamp>,
8096    {
8097        self.request_time = std::option::Option::Some(v.into());
8098        self
8099    }
8100
8101    /// Sets or clears the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8102    ///
8103    /// # Example
8104    /// ```ignore,no_run
8105    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8106    /// use wkt::Timestamp;
8107    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
8108    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
8109    /// ```
8110    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
8111    where
8112        T: std::convert::Into<wkt::Timestamp>,
8113    {
8114        self.request_time = v.map(|x| x.into());
8115        self
8116    }
8117
8118    /// Sets the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8119    ///
8120    /// # Example
8121    /// ```ignore,no_run
8122    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8123    /// use wkt::Timestamp;
8124    /// let x = UpdateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
8125    /// ```
8126    pub fn set_finish_time<T>(mut self, v: T) -> Self
8127    where
8128        T: std::convert::Into<wkt::Timestamp>,
8129    {
8130        self.finish_time = std::option::Option::Some(v.into());
8131        self
8132    }
8133
8134    /// Sets or clears the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8135    ///
8136    /// # Example
8137    /// ```ignore,no_run
8138    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8139    /// use wkt::Timestamp;
8140    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
8141    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
8142    /// ```
8143    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
8144    where
8145        T: std::convert::Into<wkt::Timestamp>,
8146    {
8147        self.finish_time = v.map(|x| x.into());
8148        self
8149    }
8150}
8151
8152impl wkt::message::Message for UpdateAuthorizedViewMetadata {
8153    fn typename() -> &'static str {
8154        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewMetadata"
8155    }
8156}
8157
8158/// Request message for
8159/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]
8160///
8161/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]: crate::client::BigtableTableAdmin::delete_authorized_view
8162#[derive(Clone, Default, PartialEq)]
8163#[non_exhaustive]
8164pub struct DeleteAuthorizedViewRequest {
8165    /// Required. The unique name of the AuthorizedView to be deleted.
8166    /// Values are of the form
8167    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8168    pub name: std::string::String,
8169
8170    /// Optional. The current etag of the AuthorizedView.
8171    /// If an etag is provided and does not match the current etag of the
8172    /// AuthorizedView, deletion will be blocked and an ABORTED error will be
8173    /// returned.
8174    pub etag: std::string::String,
8175
8176    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8177}
8178
8179impl DeleteAuthorizedViewRequest {
8180    pub fn new() -> Self {
8181        std::default::Default::default()
8182    }
8183
8184    /// Sets the value of [name][crate::model::DeleteAuthorizedViewRequest::name].
8185    ///
8186    /// # Example
8187    /// ```ignore,no_run
8188    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8189    /// let x = DeleteAuthorizedViewRequest::new().set_name("example");
8190    /// ```
8191    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8192        self.name = v.into();
8193        self
8194    }
8195
8196    /// Sets the value of [etag][crate::model::DeleteAuthorizedViewRequest::etag].
8197    ///
8198    /// # Example
8199    /// ```ignore,no_run
8200    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8201    /// let x = DeleteAuthorizedViewRequest::new().set_etag("example");
8202    /// ```
8203    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8204        self.etag = v.into();
8205        self
8206    }
8207}
8208
8209impl wkt::message::Message for DeleteAuthorizedViewRequest {
8210    fn typename() -> &'static str {
8211        "type.googleapis.com/google.bigtable.admin.v2.DeleteAuthorizedViewRequest"
8212    }
8213}
8214
8215/// The request for
8216/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8217///
8218/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8219#[derive(Clone, Default, PartialEq)]
8220#[non_exhaustive]
8221pub struct CreateSchemaBundleRequest {
8222    /// Required. The parent resource where this schema bundle will be created.
8223    /// Values are of the form
8224    /// `projects/{project}/instances/{instance}/tables/{table}`.
8225    pub parent: std::string::String,
8226
8227    /// Required. The unique ID to use for the schema bundle, which will become the
8228    /// final component of the schema bundle's resource name.
8229    pub schema_bundle_id: std::string::String,
8230
8231    /// Required. The schema bundle to create.
8232    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8233
8234    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8235}
8236
8237impl CreateSchemaBundleRequest {
8238    pub fn new() -> Self {
8239        std::default::Default::default()
8240    }
8241
8242    /// Sets the value of [parent][crate::model::CreateSchemaBundleRequest::parent].
8243    ///
8244    /// # Example
8245    /// ```ignore,no_run
8246    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8247    /// let x = CreateSchemaBundleRequest::new().set_parent("example");
8248    /// ```
8249    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8250        self.parent = v.into();
8251        self
8252    }
8253
8254    /// Sets the value of [schema_bundle_id][crate::model::CreateSchemaBundleRequest::schema_bundle_id].
8255    ///
8256    /// # Example
8257    /// ```ignore,no_run
8258    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8259    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle_id("example");
8260    /// ```
8261    pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
8262        mut self,
8263        v: T,
8264    ) -> Self {
8265        self.schema_bundle_id = v.into();
8266        self
8267    }
8268
8269    /// Sets the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8270    ///
8271    /// # Example
8272    /// ```ignore,no_run
8273    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8274    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8275    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8276    /// ```
8277    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8278    where
8279        T: std::convert::Into<crate::model::SchemaBundle>,
8280    {
8281        self.schema_bundle = std::option::Option::Some(v.into());
8282        self
8283    }
8284
8285    /// Sets or clears the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8286    ///
8287    /// # Example
8288    /// ```ignore,no_run
8289    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8290    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8291    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8292    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8293    /// ```
8294    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8295    where
8296        T: std::convert::Into<crate::model::SchemaBundle>,
8297    {
8298        self.schema_bundle = v.map(|x| x.into());
8299        self
8300    }
8301}
8302
8303impl wkt::message::Message for CreateSchemaBundleRequest {
8304    fn typename() -> &'static str {
8305        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleRequest"
8306    }
8307}
8308
8309/// The metadata for the Operation returned by
8310/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8311///
8312/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8313#[derive(Clone, Default, PartialEq)]
8314#[non_exhaustive]
8315pub struct CreateSchemaBundleMetadata {
8316    /// The unique name identifying this schema bundle.
8317    /// Values are of the form
8318    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8319    pub name: std::string::String,
8320
8321    /// The time at which this operation started.
8322    pub start_time: std::option::Option<wkt::Timestamp>,
8323
8324    /// If set, the time at which this operation finished or was canceled.
8325    pub end_time: std::option::Option<wkt::Timestamp>,
8326
8327    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8328}
8329
8330impl CreateSchemaBundleMetadata {
8331    pub fn new() -> Self {
8332        std::default::Default::default()
8333    }
8334
8335    /// Sets the value of [name][crate::model::CreateSchemaBundleMetadata::name].
8336    ///
8337    /// # Example
8338    /// ```ignore,no_run
8339    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8340    /// let x = CreateSchemaBundleMetadata::new().set_name("example");
8341    /// ```
8342    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8343        self.name = v.into();
8344        self
8345    }
8346
8347    /// Sets the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
8348    ///
8349    /// # Example
8350    /// ```ignore,no_run
8351    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8352    /// use wkt::Timestamp;
8353    /// let x = CreateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
8354    /// ```
8355    pub fn set_start_time<T>(mut self, v: T) -> Self
8356    where
8357        T: std::convert::Into<wkt::Timestamp>,
8358    {
8359        self.start_time = std::option::Option::Some(v.into());
8360        self
8361    }
8362
8363    /// Sets or clears the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
8364    ///
8365    /// # Example
8366    /// ```ignore,no_run
8367    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8368    /// use wkt::Timestamp;
8369    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8370    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
8371    /// ```
8372    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8373    where
8374        T: std::convert::Into<wkt::Timestamp>,
8375    {
8376        self.start_time = v.map(|x| x.into());
8377        self
8378    }
8379
8380    /// Sets the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
8381    ///
8382    /// # Example
8383    /// ```ignore,no_run
8384    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8385    /// use wkt::Timestamp;
8386    /// let x = CreateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8387    /// ```
8388    pub fn set_end_time<T>(mut self, v: T) -> Self
8389    where
8390        T: std::convert::Into<wkt::Timestamp>,
8391    {
8392        self.end_time = std::option::Option::Some(v.into());
8393        self
8394    }
8395
8396    /// Sets or clears the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
8397    ///
8398    /// # Example
8399    /// ```ignore,no_run
8400    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8401    /// use wkt::Timestamp;
8402    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8403    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8404    /// ```
8405    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8406    where
8407        T: std::convert::Into<wkt::Timestamp>,
8408    {
8409        self.end_time = v.map(|x| x.into());
8410        self
8411    }
8412}
8413
8414impl wkt::message::Message for CreateSchemaBundleMetadata {
8415    fn typename() -> &'static str {
8416        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleMetadata"
8417    }
8418}
8419
8420/// The request for
8421/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
8422///
8423/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
8424#[derive(Clone, Default, PartialEq)]
8425#[non_exhaustive]
8426pub struct UpdateSchemaBundleRequest {
8427    /// Required. The schema bundle to update.
8428    ///
8429    /// The schema bundle's `name` field is used to identify the schema bundle to
8430    /// update. Values are of the form
8431    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8432    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8433
8434    /// Optional. The list of fields to update.
8435    pub update_mask: std::option::Option<wkt::FieldMask>,
8436
8437    /// Optional. If set, ignore the safety checks when updating the Schema Bundle.
8438    /// The safety checks are:
8439    ///
8440    /// - The new Schema Bundle is backwards compatible with the existing Schema
8441    ///   Bundle.
8442    pub ignore_warnings: bool,
8443
8444    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8445}
8446
8447impl UpdateSchemaBundleRequest {
8448    pub fn new() -> Self {
8449        std::default::Default::default()
8450    }
8451
8452    /// Sets the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
8453    ///
8454    /// # Example
8455    /// ```ignore,no_run
8456    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8457    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8458    /// let x = UpdateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8459    /// ```
8460    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8461    where
8462        T: std::convert::Into<crate::model::SchemaBundle>,
8463    {
8464        self.schema_bundle = std::option::Option::Some(v.into());
8465        self
8466    }
8467
8468    /// Sets or clears the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
8469    ///
8470    /// # Example
8471    /// ```ignore,no_run
8472    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8473    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8474    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8475    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8476    /// ```
8477    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8478    where
8479        T: std::convert::Into<crate::model::SchemaBundle>,
8480    {
8481        self.schema_bundle = v.map(|x| x.into());
8482        self
8483    }
8484
8485    /// Sets the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
8486    ///
8487    /// # Example
8488    /// ```ignore,no_run
8489    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8490    /// use wkt::FieldMask;
8491    /// let x = UpdateSchemaBundleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8492    /// ```
8493    pub fn set_update_mask<T>(mut self, v: T) -> Self
8494    where
8495        T: std::convert::Into<wkt::FieldMask>,
8496    {
8497        self.update_mask = std::option::Option::Some(v.into());
8498        self
8499    }
8500
8501    /// Sets or clears the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
8502    ///
8503    /// # Example
8504    /// ```ignore,no_run
8505    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8506    /// use wkt::FieldMask;
8507    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8508    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8509    /// ```
8510    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8511    where
8512        T: std::convert::Into<wkt::FieldMask>,
8513    {
8514        self.update_mask = v.map(|x| x.into());
8515        self
8516    }
8517
8518    /// Sets the value of [ignore_warnings][crate::model::UpdateSchemaBundleRequest::ignore_warnings].
8519    ///
8520    /// # Example
8521    /// ```ignore,no_run
8522    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8523    /// let x = UpdateSchemaBundleRequest::new().set_ignore_warnings(true);
8524    /// ```
8525    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8526        self.ignore_warnings = v.into();
8527        self
8528    }
8529}
8530
8531impl wkt::message::Message for UpdateSchemaBundleRequest {
8532    fn typename() -> &'static str {
8533        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleRequest"
8534    }
8535}
8536
8537/// The metadata for the Operation returned by
8538/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
8539///
8540/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
8541#[derive(Clone, Default, PartialEq)]
8542#[non_exhaustive]
8543pub struct UpdateSchemaBundleMetadata {
8544    /// The unique name identifying this schema bundle.
8545    /// Values are of the form
8546    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8547    pub name: std::string::String,
8548
8549    /// The time at which this operation started.
8550    pub start_time: std::option::Option<wkt::Timestamp>,
8551
8552    /// If set, the time at which this operation finished or was canceled.
8553    pub end_time: std::option::Option<wkt::Timestamp>,
8554
8555    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8556}
8557
8558impl UpdateSchemaBundleMetadata {
8559    pub fn new() -> Self {
8560        std::default::Default::default()
8561    }
8562
8563    /// Sets the value of [name][crate::model::UpdateSchemaBundleMetadata::name].
8564    ///
8565    /// # Example
8566    /// ```ignore,no_run
8567    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8568    /// let x = UpdateSchemaBundleMetadata::new().set_name("example");
8569    /// ```
8570    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8571        self.name = v.into();
8572        self
8573    }
8574
8575    /// Sets the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
8576    ///
8577    /// # Example
8578    /// ```ignore,no_run
8579    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8580    /// use wkt::Timestamp;
8581    /// let x = UpdateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
8582    /// ```
8583    pub fn set_start_time<T>(mut self, v: T) -> Self
8584    where
8585        T: std::convert::Into<wkt::Timestamp>,
8586    {
8587        self.start_time = std::option::Option::Some(v.into());
8588        self
8589    }
8590
8591    /// Sets or clears the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
8592    ///
8593    /// # Example
8594    /// ```ignore,no_run
8595    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8596    /// use wkt::Timestamp;
8597    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8598    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
8599    /// ```
8600    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8601    where
8602        T: std::convert::Into<wkt::Timestamp>,
8603    {
8604        self.start_time = v.map(|x| x.into());
8605        self
8606    }
8607
8608    /// Sets the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
8609    ///
8610    /// # Example
8611    /// ```ignore,no_run
8612    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8613    /// use wkt::Timestamp;
8614    /// let x = UpdateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8615    /// ```
8616    pub fn set_end_time<T>(mut self, v: T) -> Self
8617    where
8618        T: std::convert::Into<wkt::Timestamp>,
8619    {
8620        self.end_time = std::option::Option::Some(v.into());
8621        self
8622    }
8623
8624    /// Sets or clears the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
8625    ///
8626    /// # Example
8627    /// ```ignore,no_run
8628    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8629    /// use wkt::Timestamp;
8630    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8631    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8632    /// ```
8633    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8634    where
8635        T: std::convert::Into<wkt::Timestamp>,
8636    {
8637        self.end_time = v.map(|x| x.into());
8638        self
8639    }
8640}
8641
8642impl wkt::message::Message for UpdateSchemaBundleMetadata {
8643    fn typename() -> &'static str {
8644        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleMetadata"
8645    }
8646}
8647
8648/// The request for
8649/// [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle].
8650///
8651/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle]: crate::client::BigtableTableAdmin::get_schema_bundle
8652#[derive(Clone, Default, PartialEq)]
8653#[non_exhaustive]
8654pub struct GetSchemaBundleRequest {
8655    /// Required. The unique name of the schema bundle to retrieve.
8656    /// Values are of the form
8657    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8658    pub name: std::string::String,
8659
8660    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8661}
8662
8663impl GetSchemaBundleRequest {
8664    pub fn new() -> Self {
8665        std::default::Default::default()
8666    }
8667
8668    /// Sets the value of [name][crate::model::GetSchemaBundleRequest::name].
8669    ///
8670    /// # Example
8671    /// ```ignore,no_run
8672    /// # use google_cloud_bigtable_admin_v2::model::GetSchemaBundleRequest;
8673    /// let x = GetSchemaBundleRequest::new().set_name("example");
8674    /// ```
8675    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8676        self.name = v.into();
8677        self
8678    }
8679}
8680
8681impl wkt::message::Message for GetSchemaBundleRequest {
8682    fn typename() -> &'static str {
8683        "type.googleapis.com/google.bigtable.admin.v2.GetSchemaBundleRequest"
8684    }
8685}
8686
8687/// The request for
8688/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
8689///
8690/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
8691#[derive(Clone, Default, PartialEq)]
8692#[non_exhaustive]
8693pub struct ListSchemaBundlesRequest {
8694    /// Required. The parent, which owns this collection of schema bundles.
8695    /// Values are of the form
8696    /// `projects/{project}/instances/{instance}/tables/{table}`.
8697    pub parent: std::string::String,
8698
8699    /// The maximum number of schema bundles to return. If the value is positive,
8700    /// the server may return at most this value. If unspecified, the server will
8701    /// return the maximum allowed page size.
8702    pub page_size: i32,
8703
8704    /// A page token, received from a previous `ListSchemaBundles` call.
8705    /// Provide this to retrieve the subsequent page.
8706    ///
8707    /// When paginating, all other parameters provided to `ListSchemaBundles` must
8708    /// match the call that provided the page token.
8709    pub page_token: std::string::String,
8710
8711    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8712}
8713
8714impl ListSchemaBundlesRequest {
8715    pub fn new() -> Self {
8716        std::default::Default::default()
8717    }
8718
8719    /// Sets the value of [parent][crate::model::ListSchemaBundlesRequest::parent].
8720    ///
8721    /// # Example
8722    /// ```ignore,no_run
8723    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8724    /// let x = ListSchemaBundlesRequest::new().set_parent("example");
8725    /// ```
8726    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8727        self.parent = v.into();
8728        self
8729    }
8730
8731    /// Sets the value of [page_size][crate::model::ListSchemaBundlesRequest::page_size].
8732    ///
8733    /// # Example
8734    /// ```ignore,no_run
8735    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8736    /// let x = ListSchemaBundlesRequest::new().set_page_size(42);
8737    /// ```
8738    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8739        self.page_size = v.into();
8740        self
8741    }
8742
8743    /// Sets the value of [page_token][crate::model::ListSchemaBundlesRequest::page_token].
8744    ///
8745    /// # Example
8746    /// ```ignore,no_run
8747    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8748    /// let x = ListSchemaBundlesRequest::new().set_page_token("example");
8749    /// ```
8750    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8751        self.page_token = v.into();
8752        self
8753    }
8754}
8755
8756impl wkt::message::Message for ListSchemaBundlesRequest {
8757    fn typename() -> &'static str {
8758        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesRequest"
8759    }
8760}
8761
8762/// The response for
8763/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
8764///
8765/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
8766#[derive(Clone, Default, PartialEq)]
8767#[non_exhaustive]
8768pub struct ListSchemaBundlesResponse {
8769    /// The schema bundles from the specified table.
8770    pub schema_bundles: std::vec::Vec<crate::model::SchemaBundle>,
8771
8772    /// A token, which can be sent as `page_token` to retrieve the next page.
8773    /// If this field is omitted, there are no subsequent pages.
8774    pub next_page_token: std::string::String,
8775
8776    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8777}
8778
8779impl ListSchemaBundlesResponse {
8780    pub fn new() -> Self {
8781        std::default::Default::default()
8782    }
8783
8784    /// Sets the value of [schema_bundles][crate::model::ListSchemaBundlesResponse::schema_bundles].
8785    ///
8786    /// # Example
8787    /// ```ignore,no_run
8788    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
8789    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8790    /// let x = ListSchemaBundlesResponse::new()
8791    ///     .set_schema_bundles([
8792    ///         SchemaBundle::default()/* use setters */,
8793    ///         SchemaBundle::default()/* use (different) setters */,
8794    ///     ]);
8795    /// ```
8796    pub fn set_schema_bundles<T, V>(mut self, v: T) -> Self
8797    where
8798        T: std::iter::IntoIterator<Item = V>,
8799        V: std::convert::Into<crate::model::SchemaBundle>,
8800    {
8801        use std::iter::Iterator;
8802        self.schema_bundles = v.into_iter().map(|i| i.into()).collect();
8803        self
8804    }
8805
8806    /// Sets the value of [next_page_token][crate::model::ListSchemaBundlesResponse::next_page_token].
8807    ///
8808    /// # Example
8809    /// ```ignore,no_run
8810    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
8811    /// let x = ListSchemaBundlesResponse::new().set_next_page_token("example");
8812    /// ```
8813    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8814        self.next_page_token = v.into();
8815        self
8816    }
8817}
8818
8819impl wkt::message::Message for ListSchemaBundlesResponse {
8820    fn typename() -> &'static str {
8821        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesResponse"
8822    }
8823}
8824
8825#[doc(hidden)]
8826impl gax::paginator::internal::PageableResponse for ListSchemaBundlesResponse {
8827    type PageItem = crate::model::SchemaBundle;
8828
8829    fn items(self) -> std::vec::Vec<Self::PageItem> {
8830        self.schema_bundles
8831    }
8832
8833    fn next_page_token(&self) -> std::string::String {
8834        use std::clone::Clone;
8835        self.next_page_token.clone()
8836    }
8837}
8838
8839/// The request for
8840/// [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle].
8841///
8842/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle]: crate::client::BigtableTableAdmin::delete_schema_bundle
8843#[derive(Clone, Default, PartialEq)]
8844#[non_exhaustive]
8845pub struct DeleteSchemaBundleRequest {
8846    /// Required. The unique name of the schema bundle to delete.
8847    /// Values are of the form
8848    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8849    pub name: std::string::String,
8850
8851    /// Optional. The etag of the schema bundle.
8852    /// If this is provided, it must match the server's etag. The server
8853    /// returns an ABORTED error on a mismatched etag.
8854    pub etag: std::string::String,
8855
8856    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8857}
8858
8859impl DeleteSchemaBundleRequest {
8860    pub fn new() -> Self {
8861        std::default::Default::default()
8862    }
8863
8864    /// Sets the value of [name][crate::model::DeleteSchemaBundleRequest::name].
8865    ///
8866    /// # Example
8867    /// ```ignore,no_run
8868    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
8869    /// let x = DeleteSchemaBundleRequest::new().set_name("example");
8870    /// ```
8871    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8872        self.name = v.into();
8873        self
8874    }
8875
8876    /// Sets the value of [etag][crate::model::DeleteSchemaBundleRequest::etag].
8877    ///
8878    /// # Example
8879    /// ```ignore,no_run
8880    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
8881    /// let x = DeleteSchemaBundleRequest::new().set_etag("example");
8882    /// ```
8883    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8884        self.etag = v.into();
8885        self
8886    }
8887}
8888
8889impl wkt::message::Message for DeleteSchemaBundleRequest {
8890    fn typename() -> &'static str {
8891        "type.googleapis.com/google.bigtable.admin.v2.DeleteSchemaBundleRequest"
8892    }
8893}
8894
8895/// Encapsulates progress related information for a Cloud Bigtable long
8896/// running operation.
8897#[derive(Clone, Default, PartialEq)]
8898#[non_exhaustive]
8899pub struct OperationProgress {
8900    /// Percent completion of the operation.
8901    /// Values are between 0 and 100 inclusive.
8902    pub progress_percent: i32,
8903
8904    /// Time the request was received.
8905    pub start_time: std::option::Option<wkt::Timestamp>,
8906
8907    /// If set, the time at which this operation failed or was completed
8908    /// successfully.
8909    pub end_time: std::option::Option<wkt::Timestamp>,
8910
8911    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8912}
8913
8914impl OperationProgress {
8915    pub fn new() -> Self {
8916        std::default::Default::default()
8917    }
8918
8919    /// Sets the value of [progress_percent][crate::model::OperationProgress::progress_percent].
8920    ///
8921    /// # Example
8922    /// ```ignore,no_run
8923    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
8924    /// let x = OperationProgress::new().set_progress_percent(42);
8925    /// ```
8926    pub fn set_progress_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8927        self.progress_percent = v.into();
8928        self
8929    }
8930
8931    /// Sets the value of [start_time][crate::model::OperationProgress::start_time].
8932    ///
8933    /// # Example
8934    /// ```ignore,no_run
8935    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
8936    /// use wkt::Timestamp;
8937    /// let x = OperationProgress::new().set_start_time(Timestamp::default()/* use setters */);
8938    /// ```
8939    pub fn set_start_time<T>(mut self, v: T) -> Self
8940    where
8941        T: std::convert::Into<wkt::Timestamp>,
8942    {
8943        self.start_time = std::option::Option::Some(v.into());
8944        self
8945    }
8946
8947    /// Sets or clears the value of [start_time][crate::model::OperationProgress::start_time].
8948    ///
8949    /// # Example
8950    /// ```ignore,no_run
8951    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
8952    /// use wkt::Timestamp;
8953    /// let x = OperationProgress::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8954    /// let x = OperationProgress::new().set_or_clear_start_time(None::<Timestamp>);
8955    /// ```
8956    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8957    where
8958        T: std::convert::Into<wkt::Timestamp>,
8959    {
8960        self.start_time = v.map(|x| x.into());
8961        self
8962    }
8963
8964    /// Sets the value of [end_time][crate::model::OperationProgress::end_time].
8965    ///
8966    /// # Example
8967    /// ```ignore,no_run
8968    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
8969    /// use wkt::Timestamp;
8970    /// let x = OperationProgress::new().set_end_time(Timestamp::default()/* use setters */);
8971    /// ```
8972    pub fn set_end_time<T>(mut self, v: T) -> Self
8973    where
8974        T: std::convert::Into<wkt::Timestamp>,
8975    {
8976        self.end_time = std::option::Option::Some(v.into());
8977        self
8978    }
8979
8980    /// Sets or clears the value of [end_time][crate::model::OperationProgress::end_time].
8981    ///
8982    /// # Example
8983    /// ```ignore,no_run
8984    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
8985    /// use wkt::Timestamp;
8986    /// let x = OperationProgress::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8987    /// let x = OperationProgress::new().set_or_clear_end_time(None::<Timestamp>);
8988    /// ```
8989    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8990    where
8991        T: std::convert::Into<wkt::Timestamp>,
8992    {
8993        self.end_time = v.map(|x| x.into());
8994        self
8995    }
8996}
8997
8998impl wkt::message::Message for OperationProgress {
8999    fn typename() -> &'static str {
9000        "type.googleapis.com/google.bigtable.admin.v2.OperationProgress"
9001    }
9002}
9003
9004/// A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and
9005/// the resources that serve them.
9006/// All tables in an instance are served from all
9007/// [Clusters][google.bigtable.admin.v2.Cluster] in the instance.
9008///
9009/// [google.bigtable.admin.v2.Cluster]: crate::model::Cluster
9010/// [google.bigtable.admin.v2.Table]: crate::model::Table
9011#[derive(Clone, Default, PartialEq)]
9012#[non_exhaustive]
9013pub struct Instance {
9014    /// The unique name of the instance. Values are of the form
9015    /// `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
9016    pub name: std::string::String,
9017
9018    /// Required. The descriptive name for this instance as it appears in UIs.
9019    /// Can be changed at any time, but should be kept globally unique
9020    /// to avoid confusion.
9021    pub display_name: std::string::String,
9022
9023    /// Output only. The current state of the instance.
9024    pub state: crate::model::instance::State,
9025
9026    /// The type of the instance. Defaults to `PRODUCTION`.
9027    pub r#type: crate::model::instance::Type,
9028
9029    /// Labels are a flexible and lightweight mechanism for organizing cloud
9030    /// resources into groups that reflect a customer's organizational needs and
9031    /// deployment strategies. They can be used to filter resources and aggregate
9032    /// metrics.
9033    ///
9034    /// * Label keys must be between 1 and 63 characters long and must conform to
9035    ///   the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
9036    /// * Label values must be between 0 and 63 characters long and must conform to
9037    ///   the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
9038    /// * No more than 64 labels can be associated with a given resource.
9039    /// * Keys and values must both be under 128 bytes.
9040    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9041
9042    /// Output only. A commit timestamp representing when this Instance was
9043    /// created. For instances created before this field was added (August 2021),
9044    /// this value is `seconds: 0, nanos: 1`.
9045    pub create_time: std::option::Option<wkt::Timestamp>,
9046
9047    /// Output only. Reserved for future use.
9048    pub satisfies_pzs: std::option::Option<bool>,
9049
9050    /// Output only. Reserved for future use.
9051    pub satisfies_pzi: std::option::Option<bool>,
9052
9053    /// Optional. Input only. Immutable. Tag keys/values directly bound to this
9054    /// resource. For example:
9055    ///
9056    /// - "123/environment": "production",
9057    /// - "123/costCenter": "marketing"
9058    ///
9059    /// Tags and Labels (above) are both used to bind metadata to resources, with
9060    /// different use-cases. See
9061    /// <https://cloud.google.com/resource-manager/docs/tags/tags-overview> for an
9062    /// in-depth overview on the difference between tags and labels.
9063    pub tags: std::collections::HashMap<std::string::String, std::string::String>,
9064
9065    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9066}
9067
9068impl Instance {
9069    pub fn new() -> Self {
9070        std::default::Default::default()
9071    }
9072
9073    /// Sets the value of [name][crate::model::Instance::name].
9074    ///
9075    /// # Example
9076    /// ```ignore,no_run
9077    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9078    /// let x = Instance::new().set_name("example");
9079    /// ```
9080    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9081        self.name = v.into();
9082        self
9083    }
9084
9085    /// Sets the value of [display_name][crate::model::Instance::display_name].
9086    ///
9087    /// # Example
9088    /// ```ignore,no_run
9089    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9090    /// let x = Instance::new().set_display_name("example");
9091    /// ```
9092    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9093        self.display_name = v.into();
9094        self
9095    }
9096
9097    /// Sets the value of [state][crate::model::Instance::state].
9098    ///
9099    /// # Example
9100    /// ```ignore,no_run
9101    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9102    /// use google_cloud_bigtable_admin_v2::model::instance::State;
9103    /// let x0 = Instance::new().set_state(State::Ready);
9104    /// let x1 = Instance::new().set_state(State::Creating);
9105    /// ```
9106    pub fn set_state<T: std::convert::Into<crate::model::instance::State>>(mut self, v: T) -> Self {
9107        self.state = v.into();
9108        self
9109    }
9110
9111    /// Sets the value of [r#type][crate::model::Instance::type].
9112    ///
9113    /// # Example
9114    /// ```ignore,no_run
9115    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9116    /// use google_cloud_bigtable_admin_v2::model::instance::Type;
9117    /// let x0 = Instance::new().set_type(Type::Production);
9118    /// let x1 = Instance::new().set_type(Type::Development);
9119    /// ```
9120    pub fn set_type<T: std::convert::Into<crate::model::instance::Type>>(mut self, v: T) -> Self {
9121        self.r#type = v.into();
9122        self
9123    }
9124
9125    /// Sets the value of [labels][crate::model::Instance::labels].
9126    ///
9127    /// # Example
9128    /// ```ignore,no_run
9129    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9130    /// let x = Instance::new().set_labels([
9131    ///     ("key0", "abc"),
9132    ///     ("key1", "xyz"),
9133    /// ]);
9134    /// ```
9135    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9136    where
9137        T: std::iter::IntoIterator<Item = (K, V)>,
9138        K: std::convert::Into<std::string::String>,
9139        V: std::convert::Into<std::string::String>,
9140    {
9141        use std::iter::Iterator;
9142        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9143        self
9144    }
9145
9146    /// Sets the value of [create_time][crate::model::Instance::create_time].
9147    ///
9148    /// # Example
9149    /// ```ignore,no_run
9150    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9151    /// use wkt::Timestamp;
9152    /// let x = Instance::new().set_create_time(Timestamp::default()/* use setters */);
9153    /// ```
9154    pub fn set_create_time<T>(mut self, v: T) -> Self
9155    where
9156        T: std::convert::Into<wkt::Timestamp>,
9157    {
9158        self.create_time = std::option::Option::Some(v.into());
9159        self
9160    }
9161
9162    /// Sets or clears the value of [create_time][crate::model::Instance::create_time].
9163    ///
9164    /// # Example
9165    /// ```ignore,no_run
9166    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9167    /// use wkt::Timestamp;
9168    /// let x = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9169    /// let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);
9170    /// ```
9171    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9172    where
9173        T: std::convert::Into<wkt::Timestamp>,
9174    {
9175        self.create_time = v.map(|x| x.into());
9176        self
9177    }
9178
9179    /// Sets the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9180    ///
9181    /// # Example
9182    /// ```ignore,no_run
9183    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9184    /// let x = Instance::new().set_satisfies_pzs(true);
9185    /// ```
9186    pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
9187    where
9188        T: std::convert::Into<bool>,
9189    {
9190        self.satisfies_pzs = std::option::Option::Some(v.into());
9191        self
9192    }
9193
9194    /// Sets or clears the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9195    ///
9196    /// # Example
9197    /// ```ignore,no_run
9198    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9199    /// let x = Instance::new().set_or_clear_satisfies_pzs(Some(false));
9200    /// let x = Instance::new().set_or_clear_satisfies_pzs(None::<bool>);
9201    /// ```
9202    pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
9203    where
9204        T: std::convert::Into<bool>,
9205    {
9206        self.satisfies_pzs = v.map(|x| x.into());
9207        self
9208    }
9209
9210    /// Sets the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9211    ///
9212    /// # Example
9213    /// ```ignore,no_run
9214    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9215    /// let x = Instance::new().set_satisfies_pzi(true);
9216    /// ```
9217    pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
9218    where
9219        T: std::convert::Into<bool>,
9220    {
9221        self.satisfies_pzi = std::option::Option::Some(v.into());
9222        self
9223    }
9224
9225    /// Sets or clears the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9226    ///
9227    /// # Example
9228    /// ```ignore,no_run
9229    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9230    /// let x = Instance::new().set_or_clear_satisfies_pzi(Some(false));
9231    /// let x = Instance::new().set_or_clear_satisfies_pzi(None::<bool>);
9232    /// ```
9233    pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
9234    where
9235        T: std::convert::Into<bool>,
9236    {
9237        self.satisfies_pzi = v.map(|x| x.into());
9238        self
9239    }
9240
9241    /// Sets the value of [tags][crate::model::Instance::tags].
9242    ///
9243    /// # Example
9244    /// ```ignore,no_run
9245    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9246    /// let x = Instance::new().set_tags([
9247    ///     ("key0", "abc"),
9248    ///     ("key1", "xyz"),
9249    /// ]);
9250    /// ```
9251    pub fn set_tags<T, K, V>(mut self, v: T) -> Self
9252    where
9253        T: std::iter::IntoIterator<Item = (K, V)>,
9254        K: std::convert::Into<std::string::String>,
9255        V: std::convert::Into<std::string::String>,
9256    {
9257        use std::iter::Iterator;
9258        self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9259        self
9260    }
9261}
9262
9263impl wkt::message::Message for Instance {
9264    fn typename() -> &'static str {
9265        "type.googleapis.com/google.bigtable.admin.v2.Instance"
9266    }
9267}
9268
9269/// Defines additional types related to [Instance].
9270pub mod instance {
9271    #[allow(unused_imports)]
9272    use super::*;
9273
9274    /// Possible states of an instance.
9275    ///
9276    /// # Working with unknown values
9277    ///
9278    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9279    /// additional enum variants at any time. Adding new variants is not considered
9280    /// a breaking change. Applications should write their code in anticipation of:
9281    ///
9282    /// - New values appearing in future releases of the client library, **and**
9283    /// - New values received dynamically, without application changes.
9284    ///
9285    /// Please consult the [Working with enums] section in the user guide for some
9286    /// guidelines.
9287    ///
9288    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9289    #[derive(Clone, Debug, PartialEq)]
9290    #[non_exhaustive]
9291    pub enum State {
9292        /// The state of the instance could not be determined.
9293        NotKnown,
9294        /// The instance has been successfully created and can serve requests
9295        /// to its tables.
9296        Ready,
9297        /// The instance is currently being created, and may be destroyed
9298        /// if the creation process encounters an error.
9299        Creating,
9300        /// If set, the enum was initialized with an unknown value.
9301        ///
9302        /// Applications can examine the value using [State::value] or
9303        /// [State::name].
9304        UnknownValue(state::UnknownValue),
9305    }
9306
9307    #[doc(hidden)]
9308    pub mod state {
9309        #[allow(unused_imports)]
9310        use super::*;
9311        #[derive(Clone, Debug, PartialEq)]
9312        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9313    }
9314
9315    impl State {
9316        /// Gets the enum value.
9317        ///
9318        /// Returns `None` if the enum contains an unknown value deserialized from
9319        /// the string representation of enums.
9320        pub fn value(&self) -> std::option::Option<i32> {
9321            match self {
9322                Self::NotKnown => std::option::Option::Some(0),
9323                Self::Ready => std::option::Option::Some(1),
9324                Self::Creating => std::option::Option::Some(2),
9325                Self::UnknownValue(u) => u.0.value(),
9326            }
9327        }
9328
9329        /// Gets the enum value as a string.
9330        ///
9331        /// Returns `None` if the enum contains an unknown value deserialized from
9332        /// the integer representation of enums.
9333        pub fn name(&self) -> std::option::Option<&str> {
9334            match self {
9335                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
9336                Self::Ready => std::option::Option::Some("READY"),
9337                Self::Creating => std::option::Option::Some("CREATING"),
9338                Self::UnknownValue(u) => u.0.name(),
9339            }
9340        }
9341    }
9342
9343    impl std::default::Default for State {
9344        fn default() -> Self {
9345            use std::convert::From;
9346            Self::from(0)
9347        }
9348    }
9349
9350    impl std::fmt::Display for State {
9351        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9352            wkt::internal::display_enum(f, self.name(), self.value())
9353        }
9354    }
9355
9356    impl std::convert::From<i32> for State {
9357        fn from(value: i32) -> Self {
9358            match value {
9359                0 => Self::NotKnown,
9360                1 => Self::Ready,
9361                2 => Self::Creating,
9362                _ => Self::UnknownValue(state::UnknownValue(
9363                    wkt::internal::UnknownEnumValue::Integer(value),
9364                )),
9365            }
9366        }
9367    }
9368
9369    impl std::convert::From<&str> for State {
9370        fn from(value: &str) -> Self {
9371            use std::string::ToString;
9372            match value {
9373                "STATE_NOT_KNOWN" => Self::NotKnown,
9374                "READY" => Self::Ready,
9375                "CREATING" => Self::Creating,
9376                _ => Self::UnknownValue(state::UnknownValue(
9377                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9378                )),
9379            }
9380        }
9381    }
9382
9383    impl serde::ser::Serialize for State {
9384        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9385        where
9386            S: serde::Serializer,
9387        {
9388            match self {
9389                Self::NotKnown => serializer.serialize_i32(0),
9390                Self::Ready => serializer.serialize_i32(1),
9391                Self::Creating => serializer.serialize_i32(2),
9392                Self::UnknownValue(u) => u.0.serialize(serializer),
9393            }
9394        }
9395    }
9396
9397    impl<'de> serde::de::Deserialize<'de> for State {
9398        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9399        where
9400            D: serde::Deserializer<'de>,
9401        {
9402            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9403                ".google.bigtable.admin.v2.Instance.State",
9404            ))
9405        }
9406    }
9407
9408    /// The type of the instance.
9409    ///
9410    /// # Working with unknown values
9411    ///
9412    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9413    /// additional enum variants at any time. Adding new variants is not considered
9414    /// a breaking change. Applications should write their code in anticipation of:
9415    ///
9416    /// - New values appearing in future releases of the client library, **and**
9417    /// - New values received dynamically, without application changes.
9418    ///
9419    /// Please consult the [Working with enums] section in the user guide for some
9420    /// guidelines.
9421    ///
9422    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9423    #[derive(Clone, Debug, PartialEq)]
9424    #[non_exhaustive]
9425    pub enum Type {
9426        /// The type of the instance is unspecified. If set when creating an
9427        /// instance, a `PRODUCTION` instance will be created. If set when updating
9428        /// an instance, the type will be left unchanged.
9429        Unspecified,
9430        /// An instance meant for production use. `serve_nodes` must be set
9431        /// on the cluster.
9432        Production,
9433        /// DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces
9434        /// a higher minimum node count than DEVELOPMENT.
9435        Development,
9436        /// If set, the enum was initialized with an unknown value.
9437        ///
9438        /// Applications can examine the value using [Type::value] or
9439        /// [Type::name].
9440        UnknownValue(r#type::UnknownValue),
9441    }
9442
9443    #[doc(hidden)]
9444    pub mod r#type {
9445        #[allow(unused_imports)]
9446        use super::*;
9447        #[derive(Clone, Debug, PartialEq)]
9448        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9449    }
9450
9451    impl Type {
9452        /// Gets the enum value.
9453        ///
9454        /// Returns `None` if the enum contains an unknown value deserialized from
9455        /// the string representation of enums.
9456        pub fn value(&self) -> std::option::Option<i32> {
9457            match self {
9458                Self::Unspecified => std::option::Option::Some(0),
9459                Self::Production => std::option::Option::Some(1),
9460                Self::Development => std::option::Option::Some(2),
9461                Self::UnknownValue(u) => u.0.value(),
9462            }
9463        }
9464
9465        /// Gets the enum value as a string.
9466        ///
9467        /// Returns `None` if the enum contains an unknown value deserialized from
9468        /// the integer representation of enums.
9469        pub fn name(&self) -> std::option::Option<&str> {
9470            match self {
9471                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
9472                Self::Production => std::option::Option::Some("PRODUCTION"),
9473                Self::Development => std::option::Option::Some("DEVELOPMENT"),
9474                Self::UnknownValue(u) => u.0.name(),
9475            }
9476        }
9477    }
9478
9479    impl std::default::Default for Type {
9480        fn default() -> Self {
9481            use std::convert::From;
9482            Self::from(0)
9483        }
9484    }
9485
9486    impl std::fmt::Display for Type {
9487        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9488            wkt::internal::display_enum(f, self.name(), self.value())
9489        }
9490    }
9491
9492    impl std::convert::From<i32> for Type {
9493        fn from(value: i32) -> Self {
9494            match value {
9495                0 => Self::Unspecified,
9496                1 => Self::Production,
9497                2 => Self::Development,
9498                _ => Self::UnknownValue(r#type::UnknownValue(
9499                    wkt::internal::UnknownEnumValue::Integer(value),
9500                )),
9501            }
9502        }
9503    }
9504
9505    impl std::convert::From<&str> for Type {
9506        fn from(value: &str) -> Self {
9507            use std::string::ToString;
9508            match value {
9509                "TYPE_UNSPECIFIED" => Self::Unspecified,
9510                "PRODUCTION" => Self::Production,
9511                "DEVELOPMENT" => Self::Development,
9512                _ => Self::UnknownValue(r#type::UnknownValue(
9513                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9514                )),
9515            }
9516        }
9517    }
9518
9519    impl serde::ser::Serialize for Type {
9520        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9521        where
9522            S: serde::Serializer,
9523        {
9524            match self {
9525                Self::Unspecified => serializer.serialize_i32(0),
9526                Self::Production => serializer.serialize_i32(1),
9527                Self::Development => serializer.serialize_i32(2),
9528                Self::UnknownValue(u) => u.0.serialize(serializer),
9529            }
9530        }
9531    }
9532
9533    impl<'de> serde::de::Deserialize<'de> for Type {
9534        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9535        where
9536            D: serde::Deserializer<'de>,
9537        {
9538            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
9539                ".google.bigtable.admin.v2.Instance.Type",
9540            ))
9541        }
9542    }
9543}
9544
9545/// The Autoscaling targets for a Cluster. These determine the recommended nodes.
9546#[derive(Clone, Default, PartialEq)]
9547#[non_exhaustive]
9548pub struct AutoscalingTargets {
9549    /// The cpu utilization that the Autoscaler should be trying to achieve.
9550    /// This number is on a scale from 0 (no utilization) to
9551    /// 100 (total utilization), and is limited between 10 and 80, otherwise it
9552    /// will return INVALID_ARGUMENT error.
9553    pub cpu_utilization_percent: i32,
9554
9555    /// The storage utilization that the Autoscaler should be trying to achieve.
9556    /// This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
9557    /// cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster,
9558    /// otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
9559    /// it will be treated as if it were set to the default value: 2560 for SSD,
9560    /// 8192 for HDD.
9561    pub storage_utilization_gib_per_node: i32,
9562
9563    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9564}
9565
9566impl AutoscalingTargets {
9567    pub fn new() -> Self {
9568        std::default::Default::default()
9569    }
9570
9571    /// Sets the value of [cpu_utilization_percent][crate::model::AutoscalingTargets::cpu_utilization_percent].
9572    ///
9573    /// # Example
9574    /// ```ignore,no_run
9575    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9576    /// let x = AutoscalingTargets::new().set_cpu_utilization_percent(42);
9577    /// ```
9578    pub fn set_cpu_utilization_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9579        self.cpu_utilization_percent = v.into();
9580        self
9581    }
9582
9583    /// Sets the value of [storage_utilization_gib_per_node][crate::model::AutoscalingTargets::storage_utilization_gib_per_node].
9584    ///
9585    /// # Example
9586    /// ```ignore,no_run
9587    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9588    /// let x = AutoscalingTargets::new().set_storage_utilization_gib_per_node(42);
9589    /// ```
9590    pub fn set_storage_utilization_gib_per_node<T: std::convert::Into<i32>>(
9591        mut self,
9592        v: T,
9593    ) -> Self {
9594        self.storage_utilization_gib_per_node = v.into();
9595        self
9596    }
9597}
9598
9599impl wkt::message::Message for AutoscalingTargets {
9600    fn typename() -> &'static str {
9601        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingTargets"
9602    }
9603}
9604
9605/// Limits for the number of nodes a Cluster can autoscale up/down to.
9606#[derive(Clone, Default, PartialEq)]
9607#[non_exhaustive]
9608pub struct AutoscalingLimits {
9609    /// Required. Minimum number of nodes to scale down to.
9610    pub min_serve_nodes: i32,
9611
9612    /// Required. Maximum number of nodes to scale up to.
9613    pub max_serve_nodes: i32,
9614
9615    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9616}
9617
9618impl AutoscalingLimits {
9619    pub fn new() -> Self {
9620        std::default::Default::default()
9621    }
9622
9623    /// Sets the value of [min_serve_nodes][crate::model::AutoscalingLimits::min_serve_nodes].
9624    ///
9625    /// # Example
9626    /// ```ignore,no_run
9627    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
9628    /// let x = AutoscalingLimits::new().set_min_serve_nodes(42);
9629    /// ```
9630    pub fn set_min_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9631        self.min_serve_nodes = v.into();
9632        self
9633    }
9634
9635    /// Sets the value of [max_serve_nodes][crate::model::AutoscalingLimits::max_serve_nodes].
9636    ///
9637    /// # Example
9638    /// ```ignore,no_run
9639    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
9640    /// let x = AutoscalingLimits::new().set_max_serve_nodes(42);
9641    /// ```
9642    pub fn set_max_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9643        self.max_serve_nodes = v.into();
9644        self
9645    }
9646}
9647
9648impl wkt::message::Message for AutoscalingLimits {
9649    fn typename() -> &'static str {
9650        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingLimits"
9651    }
9652}
9653
9654/// A resizable group of nodes in a particular cloud location, capable
9655/// of serving all [Tables][google.bigtable.admin.v2.Table] in the parent
9656/// [Instance][google.bigtable.admin.v2.Instance].
9657///
9658/// [google.bigtable.admin.v2.Instance]: crate::model::Instance
9659/// [google.bigtable.admin.v2.Table]: crate::model::Table
9660#[derive(Clone, Default, PartialEq)]
9661#[non_exhaustive]
9662pub struct Cluster {
9663    /// The unique name of the cluster. Values are of the form
9664    /// `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
9665    pub name: std::string::String,
9666
9667    /// Immutable. The location where this cluster's nodes and storage reside. For
9668    /// best performance, clients should be located as close as possible to this
9669    /// cluster. Currently only zones are supported, so values should be of the
9670    /// form `projects/{project}/locations/{zone}`.
9671    pub location: std::string::String,
9672
9673    /// Output only. The current state of the cluster.
9674    pub state: crate::model::cluster::State,
9675
9676    /// The number of nodes in the cluster. If no value is set,
9677    /// Cloud Bigtable automatically allocates nodes based on your data footprint
9678    /// and optimized for 50% storage utilization.
9679    pub serve_nodes: i32,
9680
9681    /// Immutable. The node scaling factor of this cluster.
9682    pub node_scaling_factor: crate::model::cluster::NodeScalingFactor,
9683
9684    /// Immutable. The type of storage used by this cluster to serve its
9685    /// parent instance's tables, unless explicitly overridden.
9686    pub default_storage_type: crate::model::StorageType,
9687
9688    /// Immutable. The encryption configuration for CMEK-protected clusters.
9689    pub encryption_config: std::option::Option<crate::model::cluster::EncryptionConfig>,
9690
9691    pub config: std::option::Option<crate::model::cluster::Config>,
9692
9693    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9694}
9695
9696impl Cluster {
9697    pub fn new() -> Self {
9698        std::default::Default::default()
9699    }
9700
9701    /// Sets the value of [name][crate::model::Cluster::name].
9702    ///
9703    /// # Example
9704    /// ```ignore,no_run
9705    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9706    /// let x = Cluster::new().set_name("example");
9707    /// ```
9708    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9709        self.name = v.into();
9710        self
9711    }
9712
9713    /// Sets the value of [location][crate::model::Cluster::location].
9714    ///
9715    /// # Example
9716    /// ```ignore,no_run
9717    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9718    /// let x = Cluster::new().set_location("example");
9719    /// ```
9720    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9721        self.location = v.into();
9722        self
9723    }
9724
9725    /// Sets the value of [state][crate::model::Cluster::state].
9726    ///
9727    /// # Example
9728    /// ```ignore,no_run
9729    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9730    /// use google_cloud_bigtable_admin_v2::model::cluster::State;
9731    /// let x0 = Cluster::new().set_state(State::Ready);
9732    /// let x1 = Cluster::new().set_state(State::Creating);
9733    /// let x2 = Cluster::new().set_state(State::Resizing);
9734    /// ```
9735    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
9736        self.state = v.into();
9737        self
9738    }
9739
9740    /// Sets the value of [serve_nodes][crate::model::Cluster::serve_nodes].
9741    ///
9742    /// # Example
9743    /// ```ignore,no_run
9744    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9745    /// let x = Cluster::new().set_serve_nodes(42);
9746    /// ```
9747    pub fn set_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9748        self.serve_nodes = v.into();
9749        self
9750    }
9751
9752    /// Sets the value of [node_scaling_factor][crate::model::Cluster::node_scaling_factor].
9753    ///
9754    /// # Example
9755    /// ```ignore,no_run
9756    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9757    /// use google_cloud_bigtable_admin_v2::model::cluster::NodeScalingFactor;
9758    /// let x0 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor1X);
9759    /// let x1 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor2X);
9760    /// ```
9761    pub fn set_node_scaling_factor<
9762        T: std::convert::Into<crate::model::cluster::NodeScalingFactor>,
9763    >(
9764        mut self,
9765        v: T,
9766    ) -> Self {
9767        self.node_scaling_factor = v.into();
9768        self
9769    }
9770
9771    /// Sets the value of [default_storage_type][crate::model::Cluster::default_storage_type].
9772    ///
9773    /// # Example
9774    /// ```ignore,no_run
9775    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9776    /// use google_cloud_bigtable_admin_v2::model::StorageType;
9777    /// let x0 = Cluster::new().set_default_storage_type(StorageType::Ssd);
9778    /// let x1 = Cluster::new().set_default_storage_type(StorageType::Hdd);
9779    /// ```
9780    pub fn set_default_storage_type<T: std::convert::Into<crate::model::StorageType>>(
9781        mut self,
9782        v: T,
9783    ) -> Self {
9784        self.default_storage_type = v.into();
9785        self
9786    }
9787
9788    /// Sets the value of [encryption_config][crate::model::Cluster::encryption_config].
9789    ///
9790    /// # Example
9791    /// ```ignore,no_run
9792    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9793    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
9794    /// let x = Cluster::new().set_encryption_config(EncryptionConfig::default()/* use setters */);
9795    /// ```
9796    pub fn set_encryption_config<T>(mut self, v: T) -> Self
9797    where
9798        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
9799    {
9800        self.encryption_config = std::option::Option::Some(v.into());
9801        self
9802    }
9803
9804    /// Sets or clears the value of [encryption_config][crate::model::Cluster::encryption_config].
9805    ///
9806    /// # Example
9807    /// ```ignore,no_run
9808    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9809    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
9810    /// let x = Cluster::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
9811    /// let x = Cluster::new().set_or_clear_encryption_config(None::<EncryptionConfig>);
9812    /// ```
9813    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
9814    where
9815        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
9816    {
9817        self.encryption_config = v.map(|x| x.into());
9818        self
9819    }
9820
9821    /// Sets the value of [config][crate::model::Cluster::config].
9822    ///
9823    /// Note that all the setters affecting `config` are mutually
9824    /// exclusive.
9825    ///
9826    /// # Example
9827    /// ```ignore,no_run
9828    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9829    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
9830    /// let x = Cluster::new().set_config(Some(
9831    ///     google_cloud_bigtable_admin_v2::model::cluster::Config::ClusterConfig(ClusterConfig::default().into())));
9832    /// ```
9833    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::cluster::Config>>>(
9834        mut self,
9835        v: T,
9836    ) -> Self {
9837        self.config = v.into();
9838        self
9839    }
9840
9841    /// The value of [config][crate::model::Cluster::config]
9842    /// if it holds a `ClusterConfig`, `None` if the field is not set or
9843    /// holds a different branch.
9844    pub fn cluster_config(
9845        &self,
9846    ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::ClusterConfig>> {
9847        #[allow(unreachable_patterns)]
9848        self.config.as_ref().and_then(|v| match v {
9849            crate::model::cluster::Config::ClusterConfig(v) => std::option::Option::Some(v),
9850            _ => std::option::Option::None,
9851        })
9852    }
9853
9854    /// Sets the value of [config][crate::model::Cluster::config]
9855    /// to hold a `ClusterConfig`.
9856    ///
9857    /// Note that all the setters affecting `config` are
9858    /// mutually exclusive.
9859    ///
9860    /// # Example
9861    /// ```ignore,no_run
9862    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9863    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
9864    /// let x = Cluster::new().set_cluster_config(ClusterConfig::default()/* use setters */);
9865    /// assert!(x.cluster_config().is_some());
9866    /// ```
9867    pub fn set_cluster_config<
9868        T: std::convert::Into<std::boxed::Box<crate::model::cluster::ClusterConfig>>,
9869    >(
9870        mut self,
9871        v: T,
9872    ) -> Self {
9873        self.config =
9874            std::option::Option::Some(crate::model::cluster::Config::ClusterConfig(v.into()));
9875        self
9876    }
9877}
9878
9879impl wkt::message::Message for Cluster {
9880    fn typename() -> &'static str {
9881        "type.googleapis.com/google.bigtable.admin.v2.Cluster"
9882    }
9883}
9884
9885/// Defines additional types related to [Cluster].
9886pub mod cluster {
9887    #[allow(unused_imports)]
9888    use super::*;
9889
9890    /// Autoscaling config for a cluster.
9891    #[derive(Clone, Default, PartialEq)]
9892    #[non_exhaustive]
9893    pub struct ClusterAutoscalingConfig {
9894        /// Required. Autoscaling limits for this cluster.
9895        pub autoscaling_limits: std::option::Option<crate::model::AutoscalingLimits>,
9896
9897        /// Required. Autoscaling targets for this cluster.
9898        pub autoscaling_targets: std::option::Option<crate::model::AutoscalingTargets>,
9899
9900        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9901    }
9902
9903    impl ClusterAutoscalingConfig {
9904        pub fn new() -> Self {
9905            std::default::Default::default()
9906        }
9907
9908        /// Sets the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
9909        ///
9910        /// # Example
9911        /// ```ignore,no_run
9912        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
9913        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
9914        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_limits(AutoscalingLimits::default()/* use setters */);
9915        /// ```
9916        pub fn set_autoscaling_limits<T>(mut self, v: T) -> Self
9917        where
9918            T: std::convert::Into<crate::model::AutoscalingLimits>,
9919        {
9920            self.autoscaling_limits = std::option::Option::Some(v.into());
9921            self
9922        }
9923
9924        /// Sets or clears the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
9925        ///
9926        /// # Example
9927        /// ```ignore,no_run
9928        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
9929        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
9930        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(Some(AutoscalingLimits::default()/* use setters */));
9931        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(None::<AutoscalingLimits>);
9932        /// ```
9933        pub fn set_or_clear_autoscaling_limits<T>(mut self, v: std::option::Option<T>) -> Self
9934        where
9935            T: std::convert::Into<crate::model::AutoscalingLimits>,
9936        {
9937            self.autoscaling_limits = v.map(|x| x.into());
9938            self
9939        }
9940
9941        /// Sets the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
9942        ///
9943        /// # Example
9944        /// ```ignore,no_run
9945        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
9946        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9947        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_targets(AutoscalingTargets::default()/* use setters */);
9948        /// ```
9949        pub fn set_autoscaling_targets<T>(mut self, v: T) -> Self
9950        where
9951            T: std::convert::Into<crate::model::AutoscalingTargets>,
9952        {
9953            self.autoscaling_targets = std::option::Option::Some(v.into());
9954            self
9955        }
9956
9957        /// Sets or clears the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
9958        ///
9959        /// # Example
9960        /// ```ignore,no_run
9961        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
9962        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9963        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(Some(AutoscalingTargets::default()/* use setters */));
9964        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(None::<AutoscalingTargets>);
9965        /// ```
9966        pub fn set_or_clear_autoscaling_targets<T>(mut self, v: std::option::Option<T>) -> Self
9967        where
9968            T: std::convert::Into<crate::model::AutoscalingTargets>,
9969        {
9970            self.autoscaling_targets = v.map(|x| x.into());
9971            self
9972        }
9973    }
9974
9975    impl wkt::message::Message for ClusterAutoscalingConfig {
9976        fn typename() -> &'static str {
9977            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig"
9978        }
9979    }
9980
9981    /// Configuration for a cluster.
9982    #[derive(Clone, Default, PartialEq)]
9983    #[non_exhaustive]
9984    pub struct ClusterConfig {
9985        /// Autoscaling configuration for this cluster.
9986        pub cluster_autoscaling_config:
9987            std::option::Option<crate::model::cluster::ClusterAutoscalingConfig>,
9988
9989        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9990    }
9991
9992    impl ClusterConfig {
9993        pub fn new() -> Self {
9994            std::default::Default::default()
9995        }
9996
9997        /// Sets the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
9998        ///
9999        /// # Example
10000        /// ```ignore,no_run
10001        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10002        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10003        /// let x = ClusterConfig::new().set_cluster_autoscaling_config(ClusterAutoscalingConfig::default()/* use setters */);
10004        /// ```
10005        pub fn set_cluster_autoscaling_config<T>(mut self, v: T) -> Self
10006        where
10007            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10008        {
10009            self.cluster_autoscaling_config = std::option::Option::Some(v.into());
10010            self
10011        }
10012
10013        /// Sets or clears the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
10014        ///
10015        /// # Example
10016        /// ```ignore,no_run
10017        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10018        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10019        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(Some(ClusterAutoscalingConfig::default()/* use setters */));
10020        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(None::<ClusterAutoscalingConfig>);
10021        /// ```
10022        pub fn set_or_clear_cluster_autoscaling_config<T>(
10023            mut self,
10024            v: std::option::Option<T>,
10025        ) -> Self
10026        where
10027            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10028        {
10029            self.cluster_autoscaling_config = v.map(|x| x.into());
10030            self
10031        }
10032    }
10033
10034    impl wkt::message::Message for ClusterConfig {
10035        fn typename() -> &'static str {
10036            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterConfig"
10037        }
10038    }
10039
10040    /// Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected
10041    /// cluster.
10042    #[derive(Clone, Default, PartialEq)]
10043    #[non_exhaustive]
10044    pub struct EncryptionConfig {
10045        /// Describes the Cloud KMS encryption key that will be used to protect the
10046        /// destination Bigtable cluster. The requirements for this key are:
10047        ///
10048        /// 1. The Cloud Bigtable service account associated with the project that
10049        ///    contains this cluster must be granted the
10050        ///    `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
10051        /// 1. Only regional keys can be used and the region of the CMEK key must
10052        ///    match the region of the cluster.
10053        ///    Values are of the form
10054        ///    `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
10055        pub kms_key_name: std::string::String,
10056
10057        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10058    }
10059
10060    impl EncryptionConfig {
10061        pub fn new() -> Self {
10062            std::default::Default::default()
10063        }
10064
10065        /// Sets the value of [kms_key_name][crate::model::cluster::EncryptionConfig::kms_key_name].
10066        ///
10067        /// # Example
10068        /// ```ignore,no_run
10069        /// # use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10070        /// let x = EncryptionConfig::new().set_kms_key_name("example");
10071        /// ```
10072        pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(
10073            mut self,
10074            v: T,
10075        ) -> Self {
10076            self.kms_key_name = v.into();
10077            self
10078        }
10079    }
10080
10081    impl wkt::message::Message for EncryptionConfig {
10082        fn typename() -> &'static str {
10083            "type.googleapis.com/google.bigtable.admin.v2.Cluster.EncryptionConfig"
10084        }
10085    }
10086
10087    /// Possible states of a cluster.
10088    ///
10089    /// # Working with unknown values
10090    ///
10091    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10092    /// additional enum variants at any time. Adding new variants is not considered
10093    /// a breaking change. Applications should write their code in anticipation of:
10094    ///
10095    /// - New values appearing in future releases of the client library, **and**
10096    /// - New values received dynamically, without application changes.
10097    ///
10098    /// Please consult the [Working with enums] section in the user guide for some
10099    /// guidelines.
10100    ///
10101    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10102    #[derive(Clone, Debug, PartialEq)]
10103    #[non_exhaustive]
10104    pub enum State {
10105        /// The state of the cluster could not be determined.
10106        NotKnown,
10107        /// The cluster has been successfully created and is ready to serve requests.
10108        Ready,
10109        /// The cluster is currently being created, and may be destroyed
10110        /// if the creation process encounters an error.
10111        /// A cluster may not be able to serve requests while being created.
10112        Creating,
10113        /// The cluster is currently being resized, and may revert to its previous
10114        /// node count if the process encounters an error.
10115        /// A cluster is still capable of serving requests while being resized,
10116        /// but may exhibit performance as if its number of allocated nodes is
10117        /// between the starting and requested states.
10118        Resizing,
10119        /// The cluster has no backing nodes. The data (tables) still
10120        /// exist, but no operations can be performed on the cluster.
10121        Disabled,
10122        /// If set, the enum was initialized with an unknown value.
10123        ///
10124        /// Applications can examine the value using [State::value] or
10125        /// [State::name].
10126        UnknownValue(state::UnknownValue),
10127    }
10128
10129    #[doc(hidden)]
10130    pub mod state {
10131        #[allow(unused_imports)]
10132        use super::*;
10133        #[derive(Clone, Debug, PartialEq)]
10134        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10135    }
10136
10137    impl State {
10138        /// Gets the enum value.
10139        ///
10140        /// Returns `None` if the enum contains an unknown value deserialized from
10141        /// the string representation of enums.
10142        pub fn value(&self) -> std::option::Option<i32> {
10143            match self {
10144                Self::NotKnown => std::option::Option::Some(0),
10145                Self::Ready => std::option::Option::Some(1),
10146                Self::Creating => std::option::Option::Some(2),
10147                Self::Resizing => std::option::Option::Some(3),
10148                Self::Disabled => std::option::Option::Some(4),
10149                Self::UnknownValue(u) => u.0.value(),
10150            }
10151        }
10152
10153        /// Gets the enum value as a string.
10154        ///
10155        /// Returns `None` if the enum contains an unknown value deserialized from
10156        /// the integer representation of enums.
10157        pub fn name(&self) -> std::option::Option<&str> {
10158            match self {
10159                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
10160                Self::Ready => std::option::Option::Some("READY"),
10161                Self::Creating => std::option::Option::Some("CREATING"),
10162                Self::Resizing => std::option::Option::Some("RESIZING"),
10163                Self::Disabled => std::option::Option::Some("DISABLED"),
10164                Self::UnknownValue(u) => u.0.name(),
10165            }
10166        }
10167    }
10168
10169    impl std::default::Default for State {
10170        fn default() -> Self {
10171            use std::convert::From;
10172            Self::from(0)
10173        }
10174    }
10175
10176    impl std::fmt::Display for State {
10177        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10178            wkt::internal::display_enum(f, self.name(), self.value())
10179        }
10180    }
10181
10182    impl std::convert::From<i32> for State {
10183        fn from(value: i32) -> Self {
10184            match value {
10185                0 => Self::NotKnown,
10186                1 => Self::Ready,
10187                2 => Self::Creating,
10188                3 => Self::Resizing,
10189                4 => Self::Disabled,
10190                _ => Self::UnknownValue(state::UnknownValue(
10191                    wkt::internal::UnknownEnumValue::Integer(value),
10192                )),
10193            }
10194        }
10195    }
10196
10197    impl std::convert::From<&str> for State {
10198        fn from(value: &str) -> Self {
10199            use std::string::ToString;
10200            match value {
10201                "STATE_NOT_KNOWN" => Self::NotKnown,
10202                "READY" => Self::Ready,
10203                "CREATING" => Self::Creating,
10204                "RESIZING" => Self::Resizing,
10205                "DISABLED" => Self::Disabled,
10206                _ => Self::UnknownValue(state::UnknownValue(
10207                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10208                )),
10209            }
10210        }
10211    }
10212
10213    impl serde::ser::Serialize for State {
10214        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10215        where
10216            S: serde::Serializer,
10217        {
10218            match self {
10219                Self::NotKnown => serializer.serialize_i32(0),
10220                Self::Ready => serializer.serialize_i32(1),
10221                Self::Creating => serializer.serialize_i32(2),
10222                Self::Resizing => serializer.serialize_i32(3),
10223                Self::Disabled => serializer.serialize_i32(4),
10224                Self::UnknownValue(u) => u.0.serialize(serializer),
10225            }
10226        }
10227    }
10228
10229    impl<'de> serde::de::Deserialize<'de> for State {
10230        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10231        where
10232            D: serde::Deserializer<'de>,
10233        {
10234            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10235                ".google.bigtable.admin.v2.Cluster.State",
10236            ))
10237        }
10238    }
10239
10240    /// Possible node scaling factors of the clusters. Node scaling delivers better
10241    /// latency and more throughput by removing node boundaries.
10242    ///
10243    /// # Working with unknown values
10244    ///
10245    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10246    /// additional enum variants at any time. Adding new variants is not considered
10247    /// a breaking change. Applications should write their code in anticipation of:
10248    ///
10249    /// - New values appearing in future releases of the client library, **and**
10250    /// - New values received dynamically, without application changes.
10251    ///
10252    /// Please consult the [Working with enums] section in the user guide for some
10253    /// guidelines.
10254    ///
10255    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10256    #[derive(Clone, Debug, PartialEq)]
10257    #[non_exhaustive]
10258    pub enum NodeScalingFactor {
10259        /// No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X.
10260        Unspecified,
10261        /// The cluster is running with a scaling factor of 1.
10262        NodeScalingFactor1X,
10263        /// The cluster is running with a scaling factor of 2.
10264        /// All node count values must be in increments of 2 with this scaling factor
10265        /// enabled, otherwise an INVALID_ARGUMENT error will be returned.
10266        NodeScalingFactor2X,
10267        /// If set, the enum was initialized with an unknown value.
10268        ///
10269        /// Applications can examine the value using [NodeScalingFactor::value] or
10270        /// [NodeScalingFactor::name].
10271        UnknownValue(node_scaling_factor::UnknownValue),
10272    }
10273
10274    #[doc(hidden)]
10275    pub mod node_scaling_factor {
10276        #[allow(unused_imports)]
10277        use super::*;
10278        #[derive(Clone, Debug, PartialEq)]
10279        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10280    }
10281
10282    impl NodeScalingFactor {
10283        /// Gets the enum value.
10284        ///
10285        /// Returns `None` if the enum contains an unknown value deserialized from
10286        /// the string representation of enums.
10287        pub fn value(&self) -> std::option::Option<i32> {
10288            match self {
10289                Self::Unspecified => std::option::Option::Some(0),
10290                Self::NodeScalingFactor1X => std::option::Option::Some(1),
10291                Self::NodeScalingFactor2X => std::option::Option::Some(2),
10292                Self::UnknownValue(u) => u.0.value(),
10293            }
10294        }
10295
10296        /// Gets the enum value as a string.
10297        ///
10298        /// Returns `None` if the enum contains an unknown value deserialized from
10299        /// the integer representation of enums.
10300        pub fn name(&self) -> std::option::Option<&str> {
10301            match self {
10302                Self::Unspecified => std::option::Option::Some("NODE_SCALING_FACTOR_UNSPECIFIED"),
10303                Self::NodeScalingFactor1X => std::option::Option::Some("NODE_SCALING_FACTOR_1X"),
10304                Self::NodeScalingFactor2X => std::option::Option::Some("NODE_SCALING_FACTOR_2X"),
10305                Self::UnknownValue(u) => u.0.name(),
10306            }
10307        }
10308    }
10309
10310    impl std::default::Default for NodeScalingFactor {
10311        fn default() -> Self {
10312            use std::convert::From;
10313            Self::from(0)
10314        }
10315    }
10316
10317    impl std::fmt::Display for NodeScalingFactor {
10318        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10319            wkt::internal::display_enum(f, self.name(), self.value())
10320        }
10321    }
10322
10323    impl std::convert::From<i32> for NodeScalingFactor {
10324        fn from(value: i32) -> Self {
10325            match value {
10326                0 => Self::Unspecified,
10327                1 => Self::NodeScalingFactor1X,
10328                2 => Self::NodeScalingFactor2X,
10329                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
10330                    wkt::internal::UnknownEnumValue::Integer(value),
10331                )),
10332            }
10333        }
10334    }
10335
10336    impl std::convert::From<&str> for NodeScalingFactor {
10337        fn from(value: &str) -> Self {
10338            use std::string::ToString;
10339            match value {
10340                "NODE_SCALING_FACTOR_UNSPECIFIED" => Self::Unspecified,
10341                "NODE_SCALING_FACTOR_1X" => Self::NodeScalingFactor1X,
10342                "NODE_SCALING_FACTOR_2X" => Self::NodeScalingFactor2X,
10343                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
10344                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10345                )),
10346            }
10347        }
10348    }
10349
10350    impl serde::ser::Serialize for NodeScalingFactor {
10351        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10352        where
10353            S: serde::Serializer,
10354        {
10355            match self {
10356                Self::Unspecified => serializer.serialize_i32(0),
10357                Self::NodeScalingFactor1X => serializer.serialize_i32(1),
10358                Self::NodeScalingFactor2X => serializer.serialize_i32(2),
10359                Self::UnknownValue(u) => u.0.serialize(serializer),
10360            }
10361        }
10362    }
10363
10364    impl<'de> serde::de::Deserialize<'de> for NodeScalingFactor {
10365        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10366        where
10367            D: serde::Deserializer<'de>,
10368        {
10369            deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeScalingFactor>::new(
10370                ".google.bigtable.admin.v2.Cluster.NodeScalingFactor",
10371            ))
10372        }
10373    }
10374
10375    #[derive(Clone, Debug, PartialEq)]
10376    #[non_exhaustive]
10377    pub enum Config {
10378        /// Configuration for this cluster.
10379        ClusterConfig(std::boxed::Box<crate::model::cluster::ClusterConfig>),
10380    }
10381}
10382
10383/// A configuration object describing how Cloud Bigtable should treat traffic
10384/// from a particular end user application.
10385#[derive(Clone, Default, PartialEq)]
10386#[non_exhaustive]
10387pub struct AppProfile {
10388    /// The unique name of the app profile. Values are of the form
10389    /// `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
10390    pub name: std::string::String,
10391
10392    /// Strongly validated etag for optimistic concurrency control. Preserve the
10393    /// value returned from `GetAppProfile` when calling `UpdateAppProfile` to
10394    /// fail the request if there has been a modification in the mean time. The
10395    /// `update_mask` of the request need not include `etag` for this protection
10396    /// to apply.
10397    /// See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
10398    /// [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
10399    /// details.
10400    pub etag: std::string::String,
10401
10402    /// Long form description of the use case for this AppProfile.
10403    pub description: std::string::String,
10404
10405    /// The routing policy for all read/write requests that use this app profile.
10406    /// A value must be explicitly set.
10407    pub routing_policy: std::option::Option<crate::model::app_profile::RoutingPolicy>,
10408
10409    /// Options for isolating this app profile's traffic from other use cases.
10410    pub isolation: std::option::Option<crate::model::app_profile::Isolation>,
10411
10412    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10413}
10414
10415impl AppProfile {
10416    pub fn new() -> Self {
10417        std::default::Default::default()
10418    }
10419
10420    /// Sets the value of [name][crate::model::AppProfile::name].
10421    ///
10422    /// # Example
10423    /// ```ignore,no_run
10424    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10425    /// let x = AppProfile::new().set_name("example");
10426    /// ```
10427    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10428        self.name = v.into();
10429        self
10430    }
10431
10432    /// Sets the value of [etag][crate::model::AppProfile::etag].
10433    ///
10434    /// # Example
10435    /// ```ignore,no_run
10436    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10437    /// let x = AppProfile::new().set_etag("example");
10438    /// ```
10439    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10440        self.etag = v.into();
10441        self
10442    }
10443
10444    /// Sets the value of [description][crate::model::AppProfile::description].
10445    ///
10446    /// # Example
10447    /// ```ignore,no_run
10448    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10449    /// let x = AppProfile::new().set_description("example");
10450    /// ```
10451    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10452        self.description = v.into();
10453        self
10454    }
10455
10456    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy].
10457    ///
10458    /// Note that all the setters affecting `routing_policy` are mutually
10459    /// exclusive.
10460    ///
10461    /// # Example
10462    /// ```ignore,no_run
10463    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10464    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10465    /// let x = AppProfile::new().set_routing_policy(Some(
10466    ///     google_cloud_bigtable_admin_v2::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(MultiClusterRoutingUseAny::default().into())));
10467    /// ```
10468    pub fn set_routing_policy<
10469        T: std::convert::Into<std::option::Option<crate::model::app_profile::RoutingPolicy>>,
10470    >(
10471        mut self,
10472        v: T,
10473    ) -> Self {
10474        self.routing_policy = v.into();
10475        self
10476    }
10477
10478    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
10479    /// if it holds a `MultiClusterRoutingUseAny`, `None` if the field is not set or
10480    /// holds a different branch.
10481    pub fn multi_cluster_routing_use_any(
10482        &self,
10483    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>
10484    {
10485        #[allow(unreachable_patterns)]
10486        self.routing_policy.as_ref().and_then(|v| match v {
10487            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v) => {
10488                std::option::Option::Some(v)
10489            }
10490            _ => std::option::Option::None,
10491        })
10492    }
10493
10494    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
10495    /// to hold a `MultiClusterRoutingUseAny`.
10496    ///
10497    /// Note that all the setters affecting `routing_policy` are
10498    /// mutually exclusive.
10499    ///
10500    /// # Example
10501    /// ```ignore,no_run
10502    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10503    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10504    /// let x = AppProfile::new().set_multi_cluster_routing_use_any(MultiClusterRoutingUseAny::default()/* use setters */);
10505    /// assert!(x.multi_cluster_routing_use_any().is_some());
10506    /// assert!(x.single_cluster_routing().is_none());
10507    /// ```
10508    pub fn set_multi_cluster_routing_use_any<
10509        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>,
10510    >(
10511        mut self,
10512        v: T,
10513    ) -> Self {
10514        self.routing_policy = std::option::Option::Some(
10515            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v.into()),
10516        );
10517        self
10518    }
10519
10520    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
10521    /// if it holds a `SingleClusterRouting`, `None` if the field is not set or
10522    /// holds a different branch.
10523    pub fn single_cluster_routing(
10524        &self,
10525    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>
10526    {
10527        #[allow(unreachable_patterns)]
10528        self.routing_policy.as_ref().and_then(|v| match v {
10529            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v) => {
10530                std::option::Option::Some(v)
10531            }
10532            _ => std::option::Option::None,
10533        })
10534    }
10535
10536    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
10537    /// to hold a `SingleClusterRouting`.
10538    ///
10539    /// Note that all the setters affecting `routing_policy` are
10540    /// mutually exclusive.
10541    ///
10542    /// # Example
10543    /// ```ignore,no_run
10544    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10545    /// use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
10546    /// let x = AppProfile::new().set_single_cluster_routing(SingleClusterRouting::default()/* use setters */);
10547    /// assert!(x.single_cluster_routing().is_some());
10548    /// assert!(x.multi_cluster_routing_use_any().is_none());
10549    /// ```
10550    pub fn set_single_cluster_routing<
10551        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>,
10552    >(
10553        mut self,
10554        v: T,
10555    ) -> Self {
10556        self.routing_policy = std::option::Option::Some(
10557            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v.into()),
10558        );
10559        self
10560    }
10561
10562    /// Sets the value of [isolation][crate::model::AppProfile::isolation].
10563    ///
10564    /// Note that all the setters affecting `isolation` are mutually
10565    /// exclusive.
10566    ///
10567    /// # Example
10568    /// ```ignore,no_run
10569    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10570    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
10571    /// let x = AppProfile::new().set_isolation(Some(
10572    ///     google_cloud_bigtable_admin_v2::model::app_profile::Isolation::StandardIsolation(StandardIsolation::default().into())));
10573    /// ```
10574    pub fn set_isolation<
10575        T: std::convert::Into<std::option::Option<crate::model::app_profile::Isolation>>,
10576    >(
10577        mut self,
10578        v: T,
10579    ) -> Self {
10580        self.isolation = v.into();
10581        self
10582    }
10583
10584    /// The value of [isolation][crate::model::AppProfile::isolation]
10585    /// if it holds a `Priority`, `None` if the field is not set or
10586    /// holds a different branch.
10587    #[deprecated]
10588    pub fn priority(&self) -> std::option::Option<&crate::model::app_profile::Priority> {
10589        #[allow(unreachable_patterns)]
10590        self.isolation.as_ref().and_then(|v| match v {
10591            crate::model::app_profile::Isolation::Priority(v) => std::option::Option::Some(v),
10592            _ => std::option::Option::None,
10593        })
10594    }
10595
10596    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
10597    /// to hold a `Priority`.
10598    ///
10599    /// Note that all the setters affecting `isolation` are
10600    /// mutually exclusive.
10601    ///
10602    /// # Example
10603    /// ```ignore,no_run
10604    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10605    /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
10606    /// let x0 = AppProfile::new().set_priority(Priority::Low);
10607    /// let x1 = AppProfile::new().set_priority(Priority::Medium);
10608    /// let x2 = AppProfile::new().set_priority(Priority::High);
10609    /// assert!(x0.priority().is_some());
10610    /// assert!(x0.standard_isolation().is_none());
10611    /// assert!(x0.data_boost_isolation_read_only().is_none());
10612    /// assert!(x1.priority().is_some());
10613    /// assert!(x1.standard_isolation().is_none());
10614    /// assert!(x1.data_boost_isolation_read_only().is_none());
10615    /// assert!(x2.priority().is_some());
10616    /// assert!(x2.standard_isolation().is_none());
10617    /// assert!(x2.data_boost_isolation_read_only().is_none());
10618    /// ```
10619    #[deprecated]
10620    pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
10621        mut self,
10622        v: T,
10623    ) -> Self {
10624        self.isolation =
10625            std::option::Option::Some(crate::model::app_profile::Isolation::Priority(v.into()));
10626        self
10627    }
10628
10629    /// The value of [isolation][crate::model::AppProfile::isolation]
10630    /// if it holds a `StandardIsolation`, `None` if the field is not set or
10631    /// holds a different branch.
10632    pub fn standard_isolation(
10633        &self,
10634    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::StandardIsolation>> {
10635        #[allow(unreachable_patterns)]
10636        self.isolation.as_ref().and_then(|v| match v {
10637            crate::model::app_profile::Isolation::StandardIsolation(v) => {
10638                std::option::Option::Some(v)
10639            }
10640            _ => std::option::Option::None,
10641        })
10642    }
10643
10644    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
10645    /// to hold a `StandardIsolation`.
10646    ///
10647    /// Note that all the setters affecting `isolation` are
10648    /// mutually exclusive.
10649    ///
10650    /// # Example
10651    /// ```ignore,no_run
10652    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10653    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
10654    /// let x = AppProfile::new().set_standard_isolation(StandardIsolation::default()/* use setters */);
10655    /// assert!(x.standard_isolation().is_some());
10656    /// assert!(x.priority().is_none());
10657    /// assert!(x.data_boost_isolation_read_only().is_none());
10658    /// ```
10659    pub fn set_standard_isolation<
10660        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::StandardIsolation>>,
10661    >(
10662        mut self,
10663        v: T,
10664    ) -> Self {
10665        self.isolation = std::option::Option::Some(
10666            crate::model::app_profile::Isolation::StandardIsolation(v.into()),
10667        );
10668        self
10669    }
10670
10671    /// The value of [isolation][crate::model::AppProfile::isolation]
10672    /// if it holds a `DataBoostIsolationReadOnly`, `None` if the field is not set or
10673    /// holds a different branch.
10674    pub fn data_boost_isolation_read_only(
10675        &self,
10676    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>
10677    {
10678        #[allow(unreachable_patterns)]
10679        self.isolation.as_ref().and_then(|v| match v {
10680            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v) => {
10681                std::option::Option::Some(v)
10682            }
10683            _ => std::option::Option::None,
10684        })
10685    }
10686
10687    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
10688    /// to hold a `DataBoostIsolationReadOnly`.
10689    ///
10690    /// Note that all the setters affecting `isolation` are
10691    /// mutually exclusive.
10692    ///
10693    /// # Example
10694    /// ```ignore,no_run
10695    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10696    /// use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
10697    /// let x = AppProfile::new().set_data_boost_isolation_read_only(DataBoostIsolationReadOnly::default()/* use setters */);
10698    /// assert!(x.data_boost_isolation_read_only().is_some());
10699    /// assert!(x.priority().is_none());
10700    /// assert!(x.standard_isolation().is_none());
10701    /// ```
10702    pub fn set_data_boost_isolation_read_only<
10703        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>,
10704    >(
10705        mut self,
10706        v: T,
10707    ) -> Self {
10708        self.isolation = std::option::Option::Some(
10709            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v.into()),
10710        );
10711        self
10712    }
10713}
10714
10715impl wkt::message::Message for AppProfile {
10716    fn typename() -> &'static str {
10717        "type.googleapis.com/google.bigtable.admin.v2.AppProfile"
10718    }
10719}
10720
10721/// Defines additional types related to [AppProfile].
10722pub mod app_profile {
10723    #[allow(unused_imports)]
10724    use super::*;
10725
10726    /// Read/write requests are routed to the nearest cluster in the instance, and
10727    /// will fail over to the nearest cluster that is available in the event of
10728    /// transient errors or delays. Clusters in a region are considered
10729    /// equidistant. Choosing this option sacrifices read-your-writes consistency
10730    /// to improve availability.
10731    #[derive(Clone, Default, PartialEq)]
10732    #[non_exhaustive]
10733    pub struct MultiClusterRoutingUseAny {
10734        /// The set of clusters to route to. The order is ignored; clusters will be
10735        /// tried in order of distance. If left empty, all clusters are eligible.
10736        pub cluster_ids: std::vec::Vec<std::string::String>,
10737
10738        /// Possible algorithms for routing affinity. If enabled, Bigtable will
10739        /// route between equidistant clusters in a deterministic order rather than
10740        /// choosing randomly.
10741        ///
10742        /// This mechanism gives read-your-writes consistency for *most* requests
10743        /// under *most* circumstances, without sacrificing availability. Consistency
10744        /// is *not* guaranteed, as requests might still fail over between clusters
10745        /// in the event of errors or latency.
10746        pub affinity:
10747            std::option::Option<crate::model::app_profile::multi_cluster_routing_use_any::Affinity>,
10748
10749        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10750    }
10751
10752    impl MultiClusterRoutingUseAny {
10753        pub fn new() -> Self {
10754            std::default::Default::default()
10755        }
10756
10757        /// Sets the value of [cluster_ids][crate::model::app_profile::MultiClusterRoutingUseAny::cluster_ids].
10758        ///
10759        /// # Example
10760        /// ```ignore,no_run
10761        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10762        /// let x = MultiClusterRoutingUseAny::new().set_cluster_ids(["a", "b", "c"]);
10763        /// ```
10764        pub fn set_cluster_ids<T, V>(mut self, v: T) -> Self
10765        where
10766            T: std::iter::IntoIterator<Item = V>,
10767            V: std::convert::Into<std::string::String>,
10768        {
10769            use std::iter::Iterator;
10770            self.cluster_ids = v.into_iter().map(|i| i.into()).collect();
10771            self
10772        }
10773
10774        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity].
10775        ///
10776        /// Note that all the setters affecting `affinity` are mutually
10777        /// exclusive.
10778        ///
10779        /// # Example
10780        /// ```ignore,no_run
10781        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10782        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
10783        /// let x = MultiClusterRoutingUseAny::new().set_affinity(Some(
10784        ///     google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(RowAffinity::default().into())));
10785        /// ```
10786        pub fn set_affinity<
10787            T: std::convert::Into<
10788                    std::option::Option<
10789                        crate::model::app_profile::multi_cluster_routing_use_any::Affinity,
10790                    >,
10791                >,
10792        >(
10793            mut self,
10794            v: T,
10795        ) -> Self {
10796            self.affinity = v.into();
10797            self
10798        }
10799
10800        /// The value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
10801        /// if it holds a `RowAffinity`, `None` if the field is not set or
10802        /// holds a different branch.
10803        pub fn row_affinity(
10804            &self,
10805        ) -> std::option::Option<
10806            &std::boxed::Box<crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity>,
10807        > {
10808            #[allow(unreachable_patterns)]
10809            self.affinity.as_ref().and_then(|v| match v {
10810                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
10811                    v,
10812                ) => std::option::Option::Some(v),
10813                _ => std::option::Option::None,
10814            })
10815        }
10816
10817        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
10818        /// to hold a `RowAffinity`.
10819        ///
10820        /// Note that all the setters affecting `affinity` are
10821        /// mutually exclusive.
10822        ///
10823        /// # Example
10824        /// ```ignore,no_run
10825        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10826        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
10827        /// let x = MultiClusterRoutingUseAny::new().set_row_affinity(RowAffinity::default()/* use setters */);
10828        /// assert!(x.row_affinity().is_some());
10829        /// ```
10830        pub fn set_row_affinity<
10831            T: std::convert::Into<
10832                    std::boxed::Box<
10833                        crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
10834                    >,
10835                >,
10836        >(
10837            mut self,
10838            v: T,
10839        ) -> Self {
10840            self.affinity = std::option::Option::Some(
10841                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
10842                    v.into(),
10843                ),
10844            );
10845            self
10846        }
10847    }
10848
10849    impl wkt::message::Message for MultiClusterRoutingUseAny {
10850        fn typename() -> &'static str {
10851            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny"
10852        }
10853    }
10854
10855    /// Defines additional types related to [MultiClusterRoutingUseAny].
10856    pub mod multi_cluster_routing_use_any {
10857        #[allow(unused_imports)]
10858        use super::*;
10859
10860        /// If enabled, Bigtable will route the request based on the row key of the
10861        /// request, rather than randomly. Instead, each row key will be assigned
10862        /// to a cluster, and will stick to that cluster. If clusters are added or
10863        /// removed, then this may affect which row keys stick to which clusters.
10864        /// To avoid this, users can use a cluster group to specify which clusters
10865        /// are to be used. In this case, new clusters that are not a part of the
10866        /// cluster group will not be routed to, and routing will be unaffected by
10867        /// the new cluster. Moreover, clusters specified in the cluster group cannot
10868        /// be deleted unless removed from the cluster group.
10869        #[derive(Clone, Default, PartialEq)]
10870        #[non_exhaustive]
10871        pub struct RowAffinity {
10872            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10873        }
10874
10875        impl RowAffinity {
10876            pub fn new() -> Self {
10877                std::default::Default::default()
10878            }
10879        }
10880
10881        impl wkt::message::Message for RowAffinity {
10882            fn typename() -> &'static str {
10883                "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity"
10884            }
10885        }
10886
10887        /// Possible algorithms for routing affinity. If enabled, Bigtable will
10888        /// route between equidistant clusters in a deterministic order rather than
10889        /// choosing randomly.
10890        ///
10891        /// This mechanism gives read-your-writes consistency for *most* requests
10892        /// under *most* circumstances, without sacrificing availability. Consistency
10893        /// is *not* guaranteed, as requests might still fail over between clusters
10894        /// in the event of errors or latency.
10895        #[derive(Clone, Debug, PartialEq)]
10896        #[non_exhaustive]
10897        pub enum Affinity {
10898            /// Row affinity sticky routing based on the row key of the request.
10899            /// Requests that span multiple rows are routed non-deterministically.
10900            RowAffinity(
10901                std::boxed::Box<
10902                    crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
10903                >,
10904            ),
10905        }
10906    }
10907
10908    /// Unconditionally routes all read/write requests to a specific cluster.
10909    /// This option preserves read-your-writes consistency but does not improve
10910    /// availability.
10911    #[derive(Clone, Default, PartialEq)]
10912    #[non_exhaustive]
10913    pub struct SingleClusterRouting {
10914        /// The cluster to which read/write requests should be routed.
10915        pub cluster_id: std::string::String,
10916
10917        /// Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
10918        /// allowed by this app profile. It is unsafe to send these requests to
10919        /// the same table/row/column in multiple clusters.
10920        pub allow_transactional_writes: bool,
10921
10922        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10923    }
10924
10925    impl SingleClusterRouting {
10926        pub fn new() -> Self {
10927            std::default::Default::default()
10928        }
10929
10930        /// Sets the value of [cluster_id][crate::model::app_profile::SingleClusterRouting::cluster_id].
10931        ///
10932        /// # Example
10933        /// ```ignore,no_run
10934        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
10935        /// let x = SingleClusterRouting::new().set_cluster_id("example");
10936        /// ```
10937        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10938            self.cluster_id = v.into();
10939            self
10940        }
10941
10942        /// Sets the value of [allow_transactional_writes][crate::model::app_profile::SingleClusterRouting::allow_transactional_writes].
10943        ///
10944        /// # Example
10945        /// ```ignore,no_run
10946        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
10947        /// let x = SingleClusterRouting::new().set_allow_transactional_writes(true);
10948        /// ```
10949        pub fn set_allow_transactional_writes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10950            self.allow_transactional_writes = v.into();
10951            self
10952        }
10953    }
10954
10955    impl wkt::message::Message for SingleClusterRouting {
10956        fn typename() -> &'static str {
10957            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.SingleClusterRouting"
10958        }
10959    }
10960
10961    /// Standard options for isolating this app profile's traffic from other use
10962    /// cases.
10963    #[derive(Clone, Default, PartialEq)]
10964    #[non_exhaustive]
10965    pub struct StandardIsolation {
10966        /// The priority of requests sent using this app profile.
10967        pub priority: crate::model::app_profile::Priority,
10968
10969        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10970    }
10971
10972    impl StandardIsolation {
10973        pub fn new() -> Self {
10974            std::default::Default::default()
10975        }
10976
10977        /// Sets the value of [priority][crate::model::app_profile::StandardIsolation::priority].
10978        ///
10979        /// # Example
10980        /// ```ignore,no_run
10981        /// # use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
10982        /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
10983        /// let x0 = StandardIsolation::new().set_priority(Priority::Low);
10984        /// let x1 = StandardIsolation::new().set_priority(Priority::Medium);
10985        /// let x2 = StandardIsolation::new().set_priority(Priority::High);
10986        /// ```
10987        pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
10988            mut self,
10989            v: T,
10990        ) -> Self {
10991            self.priority = v.into();
10992            self
10993        }
10994    }
10995
10996    impl wkt::message::Message for StandardIsolation {
10997        fn typename() -> &'static str {
10998            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.StandardIsolation"
10999        }
11000    }
11001
11002    /// Data Boost is a serverless compute capability that lets you run
11003    /// high-throughput read jobs and queries on your Bigtable data, without
11004    /// impacting the performance of the clusters that handle your application
11005    /// traffic. Data Boost supports read-only use cases with single-cluster
11006    /// routing.
11007    #[derive(Clone, Default, PartialEq)]
11008    #[non_exhaustive]
11009    pub struct DataBoostIsolationReadOnly {
11010        /// The Compute Billing Owner for this Data Boost App Profile.
11011        pub compute_billing_owner: std::option::Option<
11012            crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11013        >,
11014
11015        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11016    }
11017
11018    impl DataBoostIsolationReadOnly {
11019        pub fn new() -> Self {
11020            std::default::Default::default()
11021        }
11022
11023        /// Sets the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
11024        ///
11025        /// # Example
11026        /// ```ignore,no_run
11027        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11028        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
11029        /// let x0 = DataBoostIsolationReadOnly::new().set_compute_billing_owner(ComputeBillingOwner::HostPays);
11030        /// ```
11031        pub fn set_compute_billing_owner<T>(mut self, v: T) -> Self
11032        where
11033            T: std::convert::Into<
11034                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11035                >,
11036        {
11037            self.compute_billing_owner = std::option::Option::Some(v.into());
11038            self
11039        }
11040
11041        /// Sets or clears the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
11042        ///
11043        /// # Example
11044        /// ```ignore,no_run
11045        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11046        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
11047        /// let x0 = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(Some(ComputeBillingOwner::HostPays));
11048        /// let x_none = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(None::<ComputeBillingOwner>);
11049        /// ```
11050        pub fn set_or_clear_compute_billing_owner<T>(mut self, v: std::option::Option<T>) -> Self
11051        where
11052            T: std::convert::Into<
11053                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11054                >,
11055        {
11056            self.compute_billing_owner = v.map(|x| x.into());
11057            self
11058        }
11059    }
11060
11061    impl wkt::message::Message for DataBoostIsolationReadOnly {
11062        fn typename() -> &'static str {
11063            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly"
11064        }
11065    }
11066
11067    /// Defines additional types related to [DataBoostIsolationReadOnly].
11068    pub mod data_boost_isolation_read_only {
11069        #[allow(unused_imports)]
11070        use super::*;
11071
11072        /// Compute Billing Owner specifies how usage should be accounted when using
11073        /// Data Boost. Compute Billing Owner also configures which Cloud Project is
11074        /// charged for relevant quota.
11075        ///
11076        /// # Working with unknown values
11077        ///
11078        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11079        /// additional enum variants at any time. Adding new variants is not considered
11080        /// a breaking change. Applications should write their code in anticipation of:
11081        ///
11082        /// - New values appearing in future releases of the client library, **and**
11083        /// - New values received dynamically, without application changes.
11084        ///
11085        /// Please consult the [Working with enums] section in the user guide for some
11086        /// guidelines.
11087        ///
11088        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11089        #[derive(Clone, Debug, PartialEq)]
11090        #[non_exhaustive]
11091        pub enum ComputeBillingOwner {
11092            /// Unspecified value.
11093            Unspecified,
11094            /// The host Cloud Project containing the targeted Bigtable Instance /
11095            /// Table pays for compute.
11096            HostPays,
11097            /// If set, the enum was initialized with an unknown value.
11098            ///
11099            /// Applications can examine the value using [ComputeBillingOwner::value] or
11100            /// [ComputeBillingOwner::name].
11101            UnknownValue(compute_billing_owner::UnknownValue),
11102        }
11103
11104        #[doc(hidden)]
11105        pub mod compute_billing_owner {
11106            #[allow(unused_imports)]
11107            use super::*;
11108            #[derive(Clone, Debug, PartialEq)]
11109            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11110        }
11111
11112        impl ComputeBillingOwner {
11113            /// Gets the enum value.
11114            ///
11115            /// Returns `None` if the enum contains an unknown value deserialized from
11116            /// the string representation of enums.
11117            pub fn value(&self) -> std::option::Option<i32> {
11118                match self {
11119                    Self::Unspecified => std::option::Option::Some(0),
11120                    Self::HostPays => std::option::Option::Some(1),
11121                    Self::UnknownValue(u) => u.0.value(),
11122                }
11123            }
11124
11125            /// Gets the enum value as a string.
11126            ///
11127            /// Returns `None` if the enum contains an unknown value deserialized from
11128            /// the integer representation of enums.
11129            pub fn name(&self) -> std::option::Option<&str> {
11130                match self {
11131                    Self::Unspecified => {
11132                        std::option::Option::Some("COMPUTE_BILLING_OWNER_UNSPECIFIED")
11133                    }
11134                    Self::HostPays => std::option::Option::Some("HOST_PAYS"),
11135                    Self::UnknownValue(u) => u.0.name(),
11136                }
11137            }
11138        }
11139
11140        impl std::default::Default for ComputeBillingOwner {
11141            fn default() -> Self {
11142                use std::convert::From;
11143                Self::from(0)
11144            }
11145        }
11146
11147        impl std::fmt::Display for ComputeBillingOwner {
11148            fn fmt(
11149                &self,
11150                f: &mut std::fmt::Formatter<'_>,
11151            ) -> std::result::Result<(), std::fmt::Error> {
11152                wkt::internal::display_enum(f, self.name(), self.value())
11153            }
11154        }
11155
11156        impl std::convert::From<i32> for ComputeBillingOwner {
11157            fn from(value: i32) -> Self {
11158                match value {
11159                    0 => Self::Unspecified,
11160                    1 => Self::HostPays,
11161                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
11162                        wkt::internal::UnknownEnumValue::Integer(value),
11163                    )),
11164                }
11165            }
11166        }
11167
11168        impl std::convert::From<&str> for ComputeBillingOwner {
11169            fn from(value: &str) -> Self {
11170                use std::string::ToString;
11171                match value {
11172                    "COMPUTE_BILLING_OWNER_UNSPECIFIED" => Self::Unspecified,
11173                    "HOST_PAYS" => Self::HostPays,
11174                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
11175                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11176                    )),
11177                }
11178            }
11179        }
11180
11181        impl serde::ser::Serialize for ComputeBillingOwner {
11182            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11183            where
11184                S: serde::Serializer,
11185            {
11186                match self {
11187                    Self::Unspecified => serializer.serialize_i32(0),
11188                    Self::HostPays => serializer.serialize_i32(1),
11189                    Self::UnknownValue(u) => u.0.serialize(serializer),
11190                }
11191            }
11192        }
11193
11194        impl<'de> serde::de::Deserialize<'de> for ComputeBillingOwner {
11195            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11196            where
11197                D: serde::Deserializer<'de>,
11198            {
11199                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComputeBillingOwner>::new(
11200                    ".google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner"))
11201            }
11202        }
11203    }
11204
11205    /// Possible priorities for an app profile. Note that higher priority writes
11206    /// can sometimes queue behind lower priority writes to the same tablet, as
11207    /// writes must be strictly sequenced in the durability log.
11208    ///
11209    /// # Working with unknown values
11210    ///
11211    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11212    /// additional enum variants at any time. Adding new variants is not considered
11213    /// a breaking change. Applications should write their code in anticipation of:
11214    ///
11215    /// - New values appearing in future releases of the client library, **and**
11216    /// - New values received dynamically, without application changes.
11217    ///
11218    /// Please consult the [Working with enums] section in the user guide for some
11219    /// guidelines.
11220    ///
11221    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11222    #[derive(Clone, Debug, PartialEq)]
11223    #[non_exhaustive]
11224    pub enum Priority {
11225        /// Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation.
11226        Unspecified,
11227        Low,
11228        Medium,
11229        High,
11230        /// If set, the enum was initialized with an unknown value.
11231        ///
11232        /// Applications can examine the value using [Priority::value] or
11233        /// [Priority::name].
11234        UnknownValue(priority::UnknownValue),
11235    }
11236
11237    #[doc(hidden)]
11238    pub mod priority {
11239        #[allow(unused_imports)]
11240        use super::*;
11241        #[derive(Clone, Debug, PartialEq)]
11242        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11243    }
11244
11245    impl Priority {
11246        /// Gets the enum value.
11247        ///
11248        /// Returns `None` if the enum contains an unknown value deserialized from
11249        /// the string representation of enums.
11250        pub fn value(&self) -> std::option::Option<i32> {
11251            match self {
11252                Self::Unspecified => std::option::Option::Some(0),
11253                Self::Low => std::option::Option::Some(1),
11254                Self::Medium => std::option::Option::Some(2),
11255                Self::High => std::option::Option::Some(3),
11256                Self::UnknownValue(u) => u.0.value(),
11257            }
11258        }
11259
11260        /// Gets the enum value as a string.
11261        ///
11262        /// Returns `None` if the enum contains an unknown value deserialized from
11263        /// the integer representation of enums.
11264        pub fn name(&self) -> std::option::Option<&str> {
11265            match self {
11266                Self::Unspecified => std::option::Option::Some("PRIORITY_UNSPECIFIED"),
11267                Self::Low => std::option::Option::Some("PRIORITY_LOW"),
11268                Self::Medium => std::option::Option::Some("PRIORITY_MEDIUM"),
11269                Self::High => std::option::Option::Some("PRIORITY_HIGH"),
11270                Self::UnknownValue(u) => u.0.name(),
11271            }
11272        }
11273    }
11274
11275    impl std::default::Default for Priority {
11276        fn default() -> Self {
11277            use std::convert::From;
11278            Self::from(0)
11279        }
11280    }
11281
11282    impl std::fmt::Display for Priority {
11283        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11284            wkt::internal::display_enum(f, self.name(), self.value())
11285        }
11286    }
11287
11288    impl std::convert::From<i32> for Priority {
11289        fn from(value: i32) -> Self {
11290            match value {
11291                0 => Self::Unspecified,
11292                1 => Self::Low,
11293                2 => Self::Medium,
11294                3 => Self::High,
11295                _ => Self::UnknownValue(priority::UnknownValue(
11296                    wkt::internal::UnknownEnumValue::Integer(value),
11297                )),
11298            }
11299        }
11300    }
11301
11302    impl std::convert::From<&str> for Priority {
11303        fn from(value: &str) -> Self {
11304            use std::string::ToString;
11305            match value {
11306                "PRIORITY_UNSPECIFIED" => Self::Unspecified,
11307                "PRIORITY_LOW" => Self::Low,
11308                "PRIORITY_MEDIUM" => Self::Medium,
11309                "PRIORITY_HIGH" => Self::High,
11310                _ => Self::UnknownValue(priority::UnknownValue(
11311                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11312                )),
11313            }
11314        }
11315    }
11316
11317    impl serde::ser::Serialize for Priority {
11318        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11319        where
11320            S: serde::Serializer,
11321        {
11322            match self {
11323                Self::Unspecified => serializer.serialize_i32(0),
11324                Self::Low => serializer.serialize_i32(1),
11325                Self::Medium => serializer.serialize_i32(2),
11326                Self::High => serializer.serialize_i32(3),
11327                Self::UnknownValue(u) => u.0.serialize(serializer),
11328            }
11329        }
11330    }
11331
11332    impl<'de> serde::de::Deserialize<'de> for Priority {
11333        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11334        where
11335            D: serde::Deserializer<'de>,
11336        {
11337            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Priority>::new(
11338                ".google.bigtable.admin.v2.AppProfile.Priority",
11339            ))
11340        }
11341    }
11342
11343    /// The routing policy for all read/write requests that use this app profile.
11344    /// A value must be explicitly set.
11345    #[derive(Clone, Debug, PartialEq)]
11346    #[non_exhaustive]
11347    pub enum RoutingPolicy {
11348        /// Use a multi-cluster routing policy.
11349        MultiClusterRoutingUseAny(
11350            std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>,
11351        ),
11352        /// Use a single-cluster routing policy.
11353        SingleClusterRouting(std::boxed::Box<crate::model::app_profile::SingleClusterRouting>),
11354    }
11355
11356    /// Options for isolating this app profile's traffic from other use cases.
11357    #[derive(Clone, Debug, PartialEq)]
11358    #[non_exhaustive]
11359    pub enum Isolation {
11360        /// This field has been deprecated in favor of `standard_isolation.priority`.
11361        /// If you set this field, `standard_isolation.priority` will be set instead.
11362        ///
11363        /// The priority of requests sent using this app profile.
11364        #[deprecated]
11365        Priority(crate::model::app_profile::Priority),
11366        /// The standard options used for isolating this app profile's traffic from
11367        /// other use cases.
11368        StandardIsolation(std::boxed::Box<crate::model::app_profile::StandardIsolation>),
11369        /// Specifies that this app profile is intended for read-only usage via the
11370        /// Data Boost feature.
11371        DataBoostIsolationReadOnly(
11372            std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>,
11373        ),
11374    }
11375}
11376
11377/// A tablet is a defined by a start and end key and is explained in
11378/// <https://cloud.google.com/bigtable/docs/overview#architecture> and
11379/// <https://cloud.google.com/bigtable/docs/performance#optimization>.
11380/// A Hot tablet is a tablet that exhibits high average cpu usage during the time
11381/// interval from start time to end time.
11382#[derive(Clone, Default, PartialEq)]
11383#[non_exhaustive]
11384pub struct HotTablet {
11385    /// The unique name of the hot tablet. Values are of the form
11386    /// `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`.
11387    pub name: std::string::String,
11388
11389    /// Name of the table that contains the tablet. Values are of the form
11390    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
11391    pub table_name: std::string::String,
11392
11393    /// Output only. The start time of the hot tablet.
11394    pub start_time: std::option::Option<wkt::Timestamp>,
11395
11396    /// Output only. The end time of the hot tablet.
11397    pub end_time: std::option::Option<wkt::Timestamp>,
11398
11399    /// Tablet Start Key (inclusive).
11400    pub start_key: std::string::String,
11401
11402    /// Tablet End Key (inclusive).
11403    pub end_key: std::string::String,
11404
11405    /// Output only. The average CPU usage spent by a node on this tablet over the
11406    /// start_time to end_time time range. The percentage is the amount of CPU used
11407    /// by the node to serve the tablet, from 0% (tablet was not interacted with)
11408    /// to 100% (the node spent all cycles serving the hot tablet).
11409    pub node_cpu_usage_percent: f32,
11410
11411    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11412}
11413
11414impl HotTablet {
11415    pub fn new() -> Self {
11416        std::default::Default::default()
11417    }
11418
11419    /// Sets the value of [name][crate::model::HotTablet::name].
11420    ///
11421    /// # Example
11422    /// ```ignore,no_run
11423    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11424    /// let x = HotTablet::new().set_name("example");
11425    /// ```
11426    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11427        self.name = v.into();
11428        self
11429    }
11430
11431    /// Sets the value of [table_name][crate::model::HotTablet::table_name].
11432    ///
11433    /// # Example
11434    /// ```ignore,no_run
11435    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11436    /// let x = HotTablet::new().set_table_name("example");
11437    /// ```
11438    pub fn set_table_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11439        self.table_name = v.into();
11440        self
11441    }
11442
11443    /// Sets the value of [start_time][crate::model::HotTablet::start_time].
11444    ///
11445    /// # Example
11446    /// ```ignore,no_run
11447    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11448    /// use wkt::Timestamp;
11449    /// let x = HotTablet::new().set_start_time(Timestamp::default()/* use setters */);
11450    /// ```
11451    pub fn set_start_time<T>(mut self, v: T) -> Self
11452    where
11453        T: std::convert::Into<wkt::Timestamp>,
11454    {
11455        self.start_time = std::option::Option::Some(v.into());
11456        self
11457    }
11458
11459    /// Sets or clears the value of [start_time][crate::model::HotTablet::start_time].
11460    ///
11461    /// # Example
11462    /// ```ignore,no_run
11463    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11464    /// use wkt::Timestamp;
11465    /// let x = HotTablet::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
11466    /// let x = HotTablet::new().set_or_clear_start_time(None::<Timestamp>);
11467    /// ```
11468    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
11469    where
11470        T: std::convert::Into<wkt::Timestamp>,
11471    {
11472        self.start_time = v.map(|x| x.into());
11473        self
11474    }
11475
11476    /// Sets the value of [end_time][crate::model::HotTablet::end_time].
11477    ///
11478    /// # Example
11479    /// ```ignore,no_run
11480    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11481    /// use wkt::Timestamp;
11482    /// let x = HotTablet::new().set_end_time(Timestamp::default()/* use setters */);
11483    /// ```
11484    pub fn set_end_time<T>(mut self, v: T) -> Self
11485    where
11486        T: std::convert::Into<wkt::Timestamp>,
11487    {
11488        self.end_time = std::option::Option::Some(v.into());
11489        self
11490    }
11491
11492    /// Sets or clears the value of [end_time][crate::model::HotTablet::end_time].
11493    ///
11494    /// # Example
11495    /// ```ignore,no_run
11496    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11497    /// use wkt::Timestamp;
11498    /// let x = HotTablet::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
11499    /// let x = HotTablet::new().set_or_clear_end_time(None::<Timestamp>);
11500    /// ```
11501    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
11502    where
11503        T: std::convert::Into<wkt::Timestamp>,
11504    {
11505        self.end_time = v.map(|x| x.into());
11506        self
11507    }
11508
11509    /// Sets the value of [start_key][crate::model::HotTablet::start_key].
11510    ///
11511    /// # Example
11512    /// ```ignore,no_run
11513    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11514    /// let x = HotTablet::new().set_start_key("example");
11515    /// ```
11516    pub fn set_start_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11517        self.start_key = v.into();
11518        self
11519    }
11520
11521    /// Sets the value of [end_key][crate::model::HotTablet::end_key].
11522    ///
11523    /// # Example
11524    /// ```ignore,no_run
11525    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11526    /// let x = HotTablet::new().set_end_key("example");
11527    /// ```
11528    pub fn set_end_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11529        self.end_key = v.into();
11530        self
11531    }
11532
11533    /// Sets the value of [node_cpu_usage_percent][crate::model::HotTablet::node_cpu_usage_percent].
11534    ///
11535    /// # Example
11536    /// ```ignore,no_run
11537    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11538    /// let x = HotTablet::new().set_node_cpu_usage_percent(42.0);
11539    /// ```
11540    pub fn set_node_cpu_usage_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
11541        self.node_cpu_usage_percent = v.into();
11542        self
11543    }
11544}
11545
11546impl wkt::message::Message for HotTablet {
11547    fn typename() -> &'static str {
11548        "type.googleapis.com/google.bigtable.admin.v2.HotTablet"
11549    }
11550}
11551
11552/// A SQL logical view object that can be referenced in SQL queries.
11553#[derive(Clone, Default, PartialEq)]
11554#[non_exhaustive]
11555pub struct LogicalView {
11556    /// Identifier. The unique name of the logical view.
11557    /// Format:
11558    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
11559    pub name: std::string::String,
11560
11561    /// Required. The logical view's select query.
11562    pub query: std::string::String,
11563
11564    /// Optional. The etag for this logical view.
11565    /// This may be sent on update requests to ensure that the client has an
11566    /// up-to-date value before proceeding. The server returns an ABORTED error on
11567    /// a mismatched etag.
11568    pub etag: std::string::String,
11569
11570    /// Optional. Set to true to make the LogicalView protected against deletion.
11571    pub deletion_protection: bool,
11572
11573    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11574}
11575
11576impl LogicalView {
11577    pub fn new() -> Self {
11578        std::default::Default::default()
11579    }
11580
11581    /// Sets the value of [name][crate::model::LogicalView::name].
11582    ///
11583    /// # Example
11584    /// ```ignore,no_run
11585    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11586    /// let x = LogicalView::new().set_name("example");
11587    /// ```
11588    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11589        self.name = v.into();
11590        self
11591    }
11592
11593    /// Sets the value of [query][crate::model::LogicalView::query].
11594    ///
11595    /// # Example
11596    /// ```ignore,no_run
11597    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11598    /// let x = LogicalView::new().set_query("example");
11599    /// ```
11600    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11601        self.query = v.into();
11602        self
11603    }
11604
11605    /// Sets the value of [etag][crate::model::LogicalView::etag].
11606    ///
11607    /// # Example
11608    /// ```ignore,no_run
11609    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11610    /// let x = LogicalView::new().set_etag("example");
11611    /// ```
11612    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11613        self.etag = v.into();
11614        self
11615    }
11616
11617    /// Sets the value of [deletion_protection][crate::model::LogicalView::deletion_protection].
11618    ///
11619    /// # Example
11620    /// ```ignore,no_run
11621    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11622    /// let x = LogicalView::new().set_deletion_protection(true);
11623    /// ```
11624    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11625        self.deletion_protection = v.into();
11626        self
11627    }
11628}
11629
11630impl wkt::message::Message for LogicalView {
11631    fn typename() -> &'static str {
11632        "type.googleapis.com/google.bigtable.admin.v2.LogicalView"
11633    }
11634}
11635
11636/// A materialized view object that can be referenced in SQL queries.
11637#[derive(Clone, Default, PartialEq)]
11638#[non_exhaustive]
11639pub struct MaterializedView {
11640    /// Identifier. The unique name of the materialized view.
11641    /// Format:
11642    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
11643    pub name: std::string::String,
11644
11645    /// Required. Immutable. The materialized view's select query.
11646    pub query: std::string::String,
11647
11648    /// Optional. The etag for this materialized view.
11649    /// This may be sent on update requests to ensure that the client has an
11650    /// up-to-date value before proceeding. The server returns an ABORTED error on
11651    /// a mismatched etag.
11652    pub etag: std::string::String,
11653
11654    /// Set to true to make the MaterializedView protected against deletion.
11655    pub deletion_protection: bool,
11656
11657    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11658}
11659
11660impl MaterializedView {
11661    pub fn new() -> Self {
11662        std::default::Default::default()
11663    }
11664
11665    /// Sets the value of [name][crate::model::MaterializedView::name].
11666    ///
11667    /// # Example
11668    /// ```ignore,no_run
11669    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11670    /// let x = MaterializedView::new().set_name("example");
11671    /// ```
11672    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11673        self.name = v.into();
11674        self
11675    }
11676
11677    /// Sets the value of [query][crate::model::MaterializedView::query].
11678    ///
11679    /// # Example
11680    /// ```ignore,no_run
11681    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11682    /// let x = MaterializedView::new().set_query("example");
11683    /// ```
11684    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11685        self.query = v.into();
11686        self
11687    }
11688
11689    /// Sets the value of [etag][crate::model::MaterializedView::etag].
11690    ///
11691    /// # Example
11692    /// ```ignore,no_run
11693    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11694    /// let x = MaterializedView::new().set_etag("example");
11695    /// ```
11696    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11697        self.etag = v.into();
11698        self
11699    }
11700
11701    /// Sets the value of [deletion_protection][crate::model::MaterializedView::deletion_protection].
11702    ///
11703    /// # Example
11704    /// ```ignore,no_run
11705    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11706    /// let x = MaterializedView::new().set_deletion_protection(true);
11707    /// ```
11708    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11709        self.deletion_protection = v.into();
11710        self
11711    }
11712}
11713
11714impl wkt::message::Message for MaterializedView {
11715    fn typename() -> &'static str {
11716        "type.googleapis.com/google.bigtable.admin.v2.MaterializedView"
11717    }
11718}
11719
11720/// Information about a table restore.
11721#[derive(Clone, Default, PartialEq)]
11722#[non_exhaustive]
11723pub struct RestoreInfo {
11724    /// The type of the restore source.
11725    pub source_type: crate::model::RestoreSourceType,
11726
11727    /// Information about the source used to restore the table.
11728    pub source_info: std::option::Option<crate::model::restore_info::SourceInfo>,
11729
11730    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11731}
11732
11733impl RestoreInfo {
11734    pub fn new() -> Self {
11735        std::default::Default::default()
11736    }
11737
11738    /// Sets the value of [source_type][crate::model::RestoreInfo::source_type].
11739    ///
11740    /// # Example
11741    /// ```ignore,no_run
11742    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
11743    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
11744    /// let x0 = RestoreInfo::new().set_source_type(RestoreSourceType::Backup);
11745    /// ```
11746    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
11747        mut self,
11748        v: T,
11749    ) -> Self {
11750        self.source_type = v.into();
11751        self
11752    }
11753
11754    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info].
11755    ///
11756    /// Note that all the setters affecting `source_info` are mutually
11757    /// exclusive.
11758    ///
11759    /// # Example
11760    /// ```ignore,no_run
11761    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
11762    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
11763    /// let x = RestoreInfo::new().set_source_info(Some(
11764    ///     google_cloud_bigtable_admin_v2::model::restore_info::SourceInfo::BackupInfo(BackupInfo::default().into())));
11765    /// ```
11766    pub fn set_source_info<
11767        T: std::convert::Into<std::option::Option<crate::model::restore_info::SourceInfo>>,
11768    >(
11769        mut self,
11770        v: T,
11771    ) -> Self {
11772        self.source_info = v.into();
11773        self
11774    }
11775
11776    /// The value of [source_info][crate::model::RestoreInfo::source_info]
11777    /// if it holds a `BackupInfo`, `None` if the field is not set or
11778    /// holds a different branch.
11779    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
11780        #[allow(unreachable_patterns)]
11781        self.source_info.as_ref().and_then(|v| match v {
11782            crate::model::restore_info::SourceInfo::BackupInfo(v) => std::option::Option::Some(v),
11783            _ => std::option::Option::None,
11784        })
11785    }
11786
11787    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info]
11788    /// to hold a `BackupInfo`.
11789    ///
11790    /// Note that all the setters affecting `source_info` are
11791    /// mutually exclusive.
11792    ///
11793    /// # Example
11794    /// ```ignore,no_run
11795    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
11796    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
11797    /// let x = RestoreInfo::new().set_backup_info(BackupInfo::default()/* use setters */);
11798    /// assert!(x.backup_info().is_some());
11799    /// ```
11800    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
11801        mut self,
11802        v: T,
11803    ) -> Self {
11804        self.source_info =
11805            std::option::Option::Some(crate::model::restore_info::SourceInfo::BackupInfo(v.into()));
11806        self
11807    }
11808}
11809
11810impl wkt::message::Message for RestoreInfo {
11811    fn typename() -> &'static str {
11812        "type.googleapis.com/google.bigtable.admin.v2.RestoreInfo"
11813    }
11814}
11815
11816/// Defines additional types related to [RestoreInfo].
11817pub mod restore_info {
11818    #[allow(unused_imports)]
11819    use super::*;
11820
11821    /// Information about the source used to restore the table.
11822    #[derive(Clone, Debug, PartialEq)]
11823    #[non_exhaustive]
11824    pub enum SourceInfo {
11825        /// Information about the backup used to restore the table. The backup
11826        /// may no longer exist.
11827        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
11828    }
11829}
11830
11831/// Change stream configuration.
11832#[derive(Clone, Default, PartialEq)]
11833#[non_exhaustive]
11834pub struct ChangeStreamConfig {
11835    /// How long the change stream should be retained. Change stream data older
11836    /// than the retention period will not be returned when reading the change
11837    /// stream from the table.
11838    /// Values must be at least 1 day and at most 7 days, and will be truncated to
11839    /// microsecond granularity.
11840    pub retention_period: std::option::Option<wkt::Duration>,
11841
11842    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11843}
11844
11845impl ChangeStreamConfig {
11846    pub fn new() -> Self {
11847        std::default::Default::default()
11848    }
11849
11850    /// Sets the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
11851    ///
11852    /// # Example
11853    /// ```ignore,no_run
11854    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
11855    /// use wkt::Duration;
11856    /// let x = ChangeStreamConfig::new().set_retention_period(Duration::default()/* use setters */);
11857    /// ```
11858    pub fn set_retention_period<T>(mut self, v: T) -> Self
11859    where
11860        T: std::convert::Into<wkt::Duration>,
11861    {
11862        self.retention_period = std::option::Option::Some(v.into());
11863        self
11864    }
11865
11866    /// Sets or clears the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
11867    ///
11868    /// # Example
11869    /// ```ignore,no_run
11870    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
11871    /// use wkt::Duration;
11872    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
11873    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(None::<Duration>);
11874    /// ```
11875    pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
11876    where
11877        T: std::convert::Into<wkt::Duration>,
11878    {
11879        self.retention_period = v.map(|x| x.into());
11880        self
11881    }
11882}
11883
11884impl wkt::message::Message for ChangeStreamConfig {
11885    fn typename() -> &'static str {
11886        "type.googleapis.com/google.bigtable.admin.v2.ChangeStreamConfig"
11887    }
11888}
11889
11890/// A collection of user data indexed by row, column, and timestamp.
11891/// Each table is served using the resources of its parent cluster.
11892#[derive(Clone, Default, PartialEq)]
11893#[non_exhaustive]
11894pub struct Table {
11895    /// The unique name of the table. Values are of the form
11896    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
11897    /// Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
11898    pub name: std::string::String,
11899
11900    /// Output only. Map from cluster ID to per-cluster table state.
11901    /// If it could not be determined whether or not the table has data in a
11902    /// particular cluster (for example, if its zone is unavailable), then
11903    /// there will be an entry for the cluster with UNKNOWN `replication_status`.
11904    /// Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
11905    pub cluster_states:
11906        std::collections::HashMap<std::string::String, crate::model::table::ClusterState>,
11907
11908    /// The column families configured for this table, mapped by column family ID.
11909    /// Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
11910    pub column_families: std::collections::HashMap<std::string::String, crate::model::ColumnFamily>,
11911
11912    /// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
11913    /// in this table. Timestamps not matching the granularity will be rejected. If
11914    /// unspecified at creation time, the value will be set to `MILLIS`. Views:
11915    /// `SCHEMA_VIEW`, `FULL`.
11916    pub granularity: crate::model::table::TimestampGranularity,
11917
11918    /// Output only. If this table was restored from another data source (e.g. a
11919    /// backup), this field will be populated with information about the restore.
11920    pub restore_info: std::option::Option<crate::model::RestoreInfo>,
11921
11922    /// If specified, enable the change stream on this table.
11923    /// Otherwise, the change stream is disabled and the change stream is not
11924    /// retained.
11925    pub change_stream_config: std::option::Option<crate::model::ChangeStreamConfig>,
11926
11927    /// Set to true to make the table protected against data loss. i.e. deleting
11928    /// the following resources through Admin APIs are prohibited:
11929    ///
11930    /// * The table.
11931    /// * The column families in the table.
11932    /// * The instance containing the table.
11933    ///
11934    /// Note one can still delete the data stored in the table through Data APIs.
11935    pub deletion_protection: bool,
11936
11937    /// The row key schema for this table. The schema is used to decode the raw row
11938    /// key bytes into a structured format. The order of field declarations in this
11939    /// schema is important, as it reflects how the raw row key bytes are
11940    /// structured. Currently, this only affects how the key is read via a
11941    /// GoogleSQL query from the ExecuteQuery API.
11942    ///
11943    /// For a SQL query, the _key column is still read as raw bytes. But queries
11944    /// can reference the key fields by name, which will be decoded from _key using
11945    /// provided type and encoding. Queries that reference key fields will fail if
11946    /// they encounter an invalid row key.
11947    ///
11948    /// For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
11949    /// following schema:
11950    /// {
11951    /// fields {
11952    /// field_name: "id"
11953    /// type { string { encoding: utf8_bytes {} } }
11954    /// }
11955    /// fields {
11956    /// field_name: "date"
11957    /// type { string { encoding: utf8_bytes {} } }
11958    /// }
11959    /// fields {
11960    /// field_name: "product_code"
11961    /// type { int64 { encoding: big_endian_bytes {} } }
11962    /// }
11963    /// encoding { delimited_bytes { delimiter: "#" } }
11964    /// }
11965    ///
11966    /// The decoded key parts would be:
11967    /// id = "some_id", date = "2024-04-30", product_code = 1245427
11968    /// The query "SELECT _key, product_code FROM table" will return two columns:
11969    /// /------------------------------------------------------\
11970    /// |              _key                     | product_code |
11971    /// | --------------------------------------|--------------|
11972    /// | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
11973    /// \------------------------------------------------------/
11974    ///
11975    /// The schema has the following invariants:
11976    /// (1) The decoded field values are order-preserved. For read, the field
11977    /// values will be decoded in sorted mode from the raw bytes.
11978    /// (2) Every field in the schema must specify a non-empty name.
11979    /// (3) Every field must specify a type with an associated encoding. The type
11980    /// is limited to scalar types only: Array, Map, Aggregate, and Struct are not
11981    /// allowed.
11982    /// (4) The field names must not collide with existing column family
11983    /// names and reserved keywords "_key" and "_timestamp".
11984    ///
11985    /// The following update operations are allowed for row_key_schema:
11986    ///
11987    /// - Update from an empty schema to a new schema.
11988    /// - Remove the existing schema. This operation requires setting the
11989    ///   `ignore_warnings` flag to `true`, since it might be a backward
11990    ///   incompatible change. Without the flag, the update request will fail with
11991    ///   an INVALID_ARGUMENT error.
11992    ///   Any other row key schema update operation (e.g. update existing schema
11993    ///   columns names or types) is currently unsupported.
11994    pub row_key_schema: std::option::Option<crate::model::r#type::Struct>,
11995
11996    pub automated_backup_config: std::option::Option<crate::model::table::AutomatedBackupConfig>,
11997
11998    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11999}
12000
12001impl Table {
12002    pub fn new() -> Self {
12003        std::default::Default::default()
12004    }
12005
12006    /// Sets the value of [name][crate::model::Table::name].
12007    ///
12008    /// # Example
12009    /// ```ignore,no_run
12010    /// # use google_cloud_bigtable_admin_v2::model::Table;
12011    /// let x = Table::new().set_name("example");
12012    /// ```
12013    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12014        self.name = v.into();
12015        self
12016    }
12017
12018    /// Sets the value of [cluster_states][crate::model::Table::cluster_states].
12019    ///
12020    /// # Example
12021    /// ```ignore,no_run
12022    /// # use google_cloud_bigtable_admin_v2::model::Table;
12023    /// use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12024    /// let x = Table::new().set_cluster_states([
12025    ///     ("key0", ClusterState::default()/* use setters */),
12026    ///     ("key1", ClusterState::default()/* use (different) setters */),
12027    /// ]);
12028    /// ```
12029    pub fn set_cluster_states<T, K, V>(mut self, v: T) -> Self
12030    where
12031        T: std::iter::IntoIterator<Item = (K, V)>,
12032        K: std::convert::Into<std::string::String>,
12033        V: std::convert::Into<crate::model::table::ClusterState>,
12034    {
12035        use std::iter::Iterator;
12036        self.cluster_states = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12037        self
12038    }
12039
12040    /// Sets the value of [column_families][crate::model::Table::column_families].
12041    ///
12042    /// # Example
12043    /// ```ignore,no_run
12044    /// # use google_cloud_bigtable_admin_v2::model::Table;
12045    /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
12046    /// let x = Table::new().set_column_families([
12047    ///     ("key0", ColumnFamily::default()/* use setters */),
12048    ///     ("key1", ColumnFamily::default()/* use (different) setters */),
12049    /// ]);
12050    /// ```
12051    pub fn set_column_families<T, K, V>(mut self, v: T) -> Self
12052    where
12053        T: std::iter::IntoIterator<Item = (K, V)>,
12054        K: std::convert::Into<std::string::String>,
12055        V: std::convert::Into<crate::model::ColumnFamily>,
12056    {
12057        use std::iter::Iterator;
12058        self.column_families = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12059        self
12060    }
12061
12062    /// Sets the value of [granularity][crate::model::Table::granularity].
12063    ///
12064    /// # Example
12065    /// ```ignore,no_run
12066    /// # use google_cloud_bigtable_admin_v2::model::Table;
12067    /// use google_cloud_bigtable_admin_v2::model::table::TimestampGranularity;
12068    /// let x0 = Table::new().set_granularity(TimestampGranularity::Millis);
12069    /// ```
12070    pub fn set_granularity<T: std::convert::Into<crate::model::table::TimestampGranularity>>(
12071        mut self,
12072        v: T,
12073    ) -> Self {
12074        self.granularity = v.into();
12075        self
12076    }
12077
12078    /// Sets the value of [restore_info][crate::model::Table::restore_info].
12079    ///
12080    /// # Example
12081    /// ```ignore,no_run
12082    /// # use google_cloud_bigtable_admin_v2::model::Table;
12083    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12084    /// let x = Table::new().set_restore_info(RestoreInfo::default()/* use setters */);
12085    /// ```
12086    pub fn set_restore_info<T>(mut self, v: T) -> Self
12087    where
12088        T: std::convert::Into<crate::model::RestoreInfo>,
12089    {
12090        self.restore_info = std::option::Option::Some(v.into());
12091        self
12092    }
12093
12094    /// Sets or clears the value of [restore_info][crate::model::Table::restore_info].
12095    ///
12096    /// # Example
12097    /// ```ignore,no_run
12098    /// # use google_cloud_bigtable_admin_v2::model::Table;
12099    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12100    /// let x = Table::new().set_or_clear_restore_info(Some(RestoreInfo::default()/* use setters */));
12101    /// let x = Table::new().set_or_clear_restore_info(None::<RestoreInfo>);
12102    /// ```
12103    pub fn set_or_clear_restore_info<T>(mut self, v: std::option::Option<T>) -> Self
12104    where
12105        T: std::convert::Into<crate::model::RestoreInfo>,
12106    {
12107        self.restore_info = v.map(|x| x.into());
12108        self
12109    }
12110
12111    /// Sets the value of [change_stream_config][crate::model::Table::change_stream_config].
12112    ///
12113    /// # Example
12114    /// ```ignore,no_run
12115    /// # use google_cloud_bigtable_admin_v2::model::Table;
12116    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12117    /// let x = Table::new().set_change_stream_config(ChangeStreamConfig::default()/* use setters */);
12118    /// ```
12119    pub fn set_change_stream_config<T>(mut self, v: T) -> Self
12120    where
12121        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12122    {
12123        self.change_stream_config = std::option::Option::Some(v.into());
12124        self
12125    }
12126
12127    /// Sets or clears the value of [change_stream_config][crate::model::Table::change_stream_config].
12128    ///
12129    /// # Example
12130    /// ```ignore,no_run
12131    /// # use google_cloud_bigtable_admin_v2::model::Table;
12132    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12133    /// let x = Table::new().set_or_clear_change_stream_config(Some(ChangeStreamConfig::default()/* use setters */));
12134    /// let x = Table::new().set_or_clear_change_stream_config(None::<ChangeStreamConfig>);
12135    /// ```
12136    pub fn set_or_clear_change_stream_config<T>(mut self, v: std::option::Option<T>) -> Self
12137    where
12138        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12139    {
12140        self.change_stream_config = v.map(|x| x.into());
12141        self
12142    }
12143
12144    /// Sets the value of [deletion_protection][crate::model::Table::deletion_protection].
12145    ///
12146    /// # Example
12147    /// ```ignore,no_run
12148    /// # use google_cloud_bigtable_admin_v2::model::Table;
12149    /// let x = Table::new().set_deletion_protection(true);
12150    /// ```
12151    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12152        self.deletion_protection = v.into();
12153        self
12154    }
12155
12156    /// Sets the value of [row_key_schema][crate::model::Table::row_key_schema].
12157    ///
12158    /// # Example
12159    /// ```ignore,no_run
12160    /// # use google_cloud_bigtable_admin_v2::model::Table;
12161    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12162    /// let x = Table::new().set_row_key_schema(Struct::default()/* use setters */);
12163    /// ```
12164    pub fn set_row_key_schema<T>(mut self, v: T) -> Self
12165    where
12166        T: std::convert::Into<crate::model::r#type::Struct>,
12167    {
12168        self.row_key_schema = std::option::Option::Some(v.into());
12169        self
12170    }
12171
12172    /// Sets or clears the value of [row_key_schema][crate::model::Table::row_key_schema].
12173    ///
12174    /// # Example
12175    /// ```ignore,no_run
12176    /// # use google_cloud_bigtable_admin_v2::model::Table;
12177    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12178    /// let x = Table::new().set_or_clear_row_key_schema(Some(Struct::default()/* use setters */));
12179    /// let x = Table::new().set_or_clear_row_key_schema(None::<Struct>);
12180    /// ```
12181    pub fn set_or_clear_row_key_schema<T>(mut self, v: std::option::Option<T>) -> Self
12182    where
12183        T: std::convert::Into<crate::model::r#type::Struct>,
12184    {
12185        self.row_key_schema = v.map(|x| x.into());
12186        self
12187    }
12188
12189    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config].
12190    ///
12191    /// Note that all the setters affecting `automated_backup_config` are mutually
12192    /// exclusive.
12193    ///
12194    /// # Example
12195    /// ```ignore,no_run
12196    /// # use google_cloud_bigtable_admin_v2::model::Table;
12197    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12198    /// let x = Table::new().set_automated_backup_config(Some(
12199    ///     google_cloud_bigtable_admin_v2::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(AutomatedBackupPolicy::default().into())));
12200    /// ```
12201    pub fn set_automated_backup_config<
12202        T: std::convert::Into<std::option::Option<crate::model::table::AutomatedBackupConfig>>,
12203    >(
12204        mut self,
12205        v: T,
12206    ) -> Self {
12207        self.automated_backup_config = v.into();
12208        self
12209    }
12210
12211    /// The value of [automated_backup_config][crate::model::Table::automated_backup_config]
12212    /// if it holds a `AutomatedBackupPolicy`, `None` if the field is not set or
12213    /// holds a different branch.
12214    pub fn automated_backup_policy(
12215        &self,
12216    ) -> std::option::Option<&std::boxed::Box<crate::model::table::AutomatedBackupPolicy>> {
12217        #[allow(unreachable_patterns)]
12218        self.automated_backup_config.as_ref().and_then(|v| match v {
12219            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v) => {
12220                std::option::Option::Some(v)
12221            }
12222            _ => std::option::Option::None,
12223        })
12224    }
12225
12226    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config]
12227    /// to hold a `AutomatedBackupPolicy`.
12228    ///
12229    /// Note that all the setters affecting `automated_backup_config` are
12230    /// mutually exclusive.
12231    ///
12232    /// # Example
12233    /// ```ignore,no_run
12234    /// # use google_cloud_bigtable_admin_v2::model::Table;
12235    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12236    /// let x = Table::new().set_automated_backup_policy(AutomatedBackupPolicy::default()/* use setters */);
12237    /// assert!(x.automated_backup_policy().is_some());
12238    /// ```
12239    pub fn set_automated_backup_policy<
12240        T: std::convert::Into<std::boxed::Box<crate::model::table::AutomatedBackupPolicy>>,
12241    >(
12242        mut self,
12243        v: T,
12244    ) -> Self {
12245        self.automated_backup_config = std::option::Option::Some(
12246            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v.into()),
12247        );
12248        self
12249    }
12250}
12251
12252impl wkt::message::Message for Table {
12253    fn typename() -> &'static str {
12254        "type.googleapis.com/google.bigtable.admin.v2.Table"
12255    }
12256}
12257
12258/// Defines additional types related to [Table].
12259pub mod table {
12260    #[allow(unused_imports)]
12261    use super::*;
12262
12263    /// The state of a table's data in a particular cluster.
12264    #[derive(Clone, Default, PartialEq)]
12265    #[non_exhaustive]
12266    pub struct ClusterState {
12267        /// Output only. The state of replication for the table in this cluster.
12268        pub replication_state: crate::model::table::cluster_state::ReplicationState,
12269
12270        /// Output only. The encryption information for the table in this cluster.
12271        /// If the encryption key protecting this resource is customer managed, then
12272        /// its version can be rotated in Cloud Key Management Service (Cloud KMS).
12273        /// The primary version of the key and its status will be reflected here when
12274        /// changes propagate from Cloud KMS.
12275        pub encryption_info: std::vec::Vec<crate::model::EncryptionInfo>,
12276
12277        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12278    }
12279
12280    impl ClusterState {
12281        pub fn new() -> Self {
12282            std::default::Default::default()
12283        }
12284
12285        /// Sets the value of [replication_state][crate::model::table::ClusterState::replication_state].
12286        ///
12287        /// # Example
12288        /// ```ignore,no_run
12289        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12290        /// use google_cloud_bigtable_admin_v2::model::table::cluster_state::ReplicationState;
12291        /// let x0 = ClusterState::new().set_replication_state(ReplicationState::Initializing);
12292        /// let x1 = ClusterState::new().set_replication_state(ReplicationState::PlannedMaintenance);
12293        /// let x2 = ClusterState::new().set_replication_state(ReplicationState::UnplannedMaintenance);
12294        /// ```
12295        pub fn set_replication_state<
12296            T: std::convert::Into<crate::model::table::cluster_state::ReplicationState>,
12297        >(
12298            mut self,
12299            v: T,
12300        ) -> Self {
12301            self.replication_state = v.into();
12302            self
12303        }
12304
12305        /// Sets the value of [encryption_info][crate::model::table::ClusterState::encryption_info].
12306        ///
12307        /// # Example
12308        /// ```ignore,no_run
12309        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12310        /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
12311        /// let x = ClusterState::new()
12312        ///     .set_encryption_info([
12313        ///         EncryptionInfo::default()/* use setters */,
12314        ///         EncryptionInfo::default()/* use (different) setters */,
12315        ///     ]);
12316        /// ```
12317        pub fn set_encryption_info<T, V>(mut self, v: T) -> Self
12318        where
12319            T: std::iter::IntoIterator<Item = V>,
12320            V: std::convert::Into<crate::model::EncryptionInfo>,
12321        {
12322            use std::iter::Iterator;
12323            self.encryption_info = v.into_iter().map(|i| i.into()).collect();
12324            self
12325        }
12326    }
12327
12328    impl wkt::message::Message for ClusterState {
12329        fn typename() -> &'static str {
12330            "type.googleapis.com/google.bigtable.admin.v2.Table.ClusterState"
12331        }
12332    }
12333
12334    /// Defines additional types related to [ClusterState].
12335    pub mod cluster_state {
12336        #[allow(unused_imports)]
12337        use super::*;
12338
12339        /// Table replication states.
12340        ///
12341        /// # Working with unknown values
12342        ///
12343        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12344        /// additional enum variants at any time. Adding new variants is not considered
12345        /// a breaking change. Applications should write their code in anticipation of:
12346        ///
12347        /// - New values appearing in future releases of the client library, **and**
12348        /// - New values received dynamically, without application changes.
12349        ///
12350        /// Please consult the [Working with enums] section in the user guide for some
12351        /// guidelines.
12352        ///
12353        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12354        #[derive(Clone, Debug, PartialEq)]
12355        #[non_exhaustive]
12356        pub enum ReplicationState {
12357            /// The replication state of the table is unknown in this cluster.
12358            StateNotKnown,
12359            /// The cluster was recently created, and the table must finish copying
12360            /// over pre-existing data from other clusters before it can begin
12361            /// receiving live replication updates and serving Data API requests.
12362            Initializing,
12363            /// The table is temporarily unable to serve Data API requests from this
12364            /// cluster due to planned internal maintenance.
12365            PlannedMaintenance,
12366            /// The table is temporarily unable to serve Data API requests from this
12367            /// cluster due to unplanned or emergency maintenance.
12368            UnplannedMaintenance,
12369            /// The table can serve Data API requests from this cluster. Depending on
12370            /// replication delay, reads may not immediately reflect the state of the
12371            /// table in other clusters.
12372            Ready,
12373            /// The table is fully created and ready for use after a restore, and is
12374            /// being optimized for performance. When optimizations are complete, the
12375            /// table will transition to `READY` state.
12376            ReadyOptimizing,
12377            /// If set, the enum was initialized with an unknown value.
12378            ///
12379            /// Applications can examine the value using [ReplicationState::value] or
12380            /// [ReplicationState::name].
12381            UnknownValue(replication_state::UnknownValue),
12382        }
12383
12384        #[doc(hidden)]
12385        pub mod replication_state {
12386            #[allow(unused_imports)]
12387            use super::*;
12388            #[derive(Clone, Debug, PartialEq)]
12389            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12390        }
12391
12392        impl ReplicationState {
12393            /// Gets the enum value.
12394            ///
12395            /// Returns `None` if the enum contains an unknown value deserialized from
12396            /// the string representation of enums.
12397            pub fn value(&self) -> std::option::Option<i32> {
12398                match self {
12399                    Self::StateNotKnown => std::option::Option::Some(0),
12400                    Self::Initializing => std::option::Option::Some(1),
12401                    Self::PlannedMaintenance => std::option::Option::Some(2),
12402                    Self::UnplannedMaintenance => std::option::Option::Some(3),
12403                    Self::Ready => std::option::Option::Some(4),
12404                    Self::ReadyOptimizing => std::option::Option::Some(5),
12405                    Self::UnknownValue(u) => u.0.value(),
12406                }
12407            }
12408
12409            /// Gets the enum value as a string.
12410            ///
12411            /// Returns `None` if the enum contains an unknown value deserialized from
12412            /// the integer representation of enums.
12413            pub fn name(&self) -> std::option::Option<&str> {
12414                match self {
12415                    Self::StateNotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
12416                    Self::Initializing => std::option::Option::Some("INITIALIZING"),
12417                    Self::PlannedMaintenance => std::option::Option::Some("PLANNED_MAINTENANCE"),
12418                    Self::UnplannedMaintenance => {
12419                        std::option::Option::Some("UNPLANNED_MAINTENANCE")
12420                    }
12421                    Self::Ready => std::option::Option::Some("READY"),
12422                    Self::ReadyOptimizing => std::option::Option::Some("READY_OPTIMIZING"),
12423                    Self::UnknownValue(u) => u.0.name(),
12424                }
12425            }
12426        }
12427
12428        impl std::default::Default for ReplicationState {
12429            fn default() -> Self {
12430                use std::convert::From;
12431                Self::from(0)
12432            }
12433        }
12434
12435        impl std::fmt::Display for ReplicationState {
12436            fn fmt(
12437                &self,
12438                f: &mut std::fmt::Formatter<'_>,
12439            ) -> std::result::Result<(), std::fmt::Error> {
12440                wkt::internal::display_enum(f, self.name(), self.value())
12441            }
12442        }
12443
12444        impl std::convert::From<i32> for ReplicationState {
12445            fn from(value: i32) -> Self {
12446                match value {
12447                    0 => Self::StateNotKnown,
12448                    1 => Self::Initializing,
12449                    2 => Self::PlannedMaintenance,
12450                    3 => Self::UnplannedMaintenance,
12451                    4 => Self::Ready,
12452                    5 => Self::ReadyOptimizing,
12453                    _ => Self::UnknownValue(replication_state::UnknownValue(
12454                        wkt::internal::UnknownEnumValue::Integer(value),
12455                    )),
12456                }
12457            }
12458        }
12459
12460        impl std::convert::From<&str> for ReplicationState {
12461            fn from(value: &str) -> Self {
12462                use std::string::ToString;
12463                match value {
12464                    "STATE_NOT_KNOWN" => Self::StateNotKnown,
12465                    "INITIALIZING" => Self::Initializing,
12466                    "PLANNED_MAINTENANCE" => Self::PlannedMaintenance,
12467                    "UNPLANNED_MAINTENANCE" => Self::UnplannedMaintenance,
12468                    "READY" => Self::Ready,
12469                    "READY_OPTIMIZING" => Self::ReadyOptimizing,
12470                    _ => Self::UnknownValue(replication_state::UnknownValue(
12471                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12472                    )),
12473                }
12474            }
12475        }
12476
12477        impl serde::ser::Serialize for ReplicationState {
12478            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12479            where
12480                S: serde::Serializer,
12481            {
12482                match self {
12483                    Self::StateNotKnown => serializer.serialize_i32(0),
12484                    Self::Initializing => serializer.serialize_i32(1),
12485                    Self::PlannedMaintenance => serializer.serialize_i32(2),
12486                    Self::UnplannedMaintenance => serializer.serialize_i32(3),
12487                    Self::Ready => serializer.serialize_i32(4),
12488                    Self::ReadyOptimizing => serializer.serialize_i32(5),
12489                    Self::UnknownValue(u) => u.0.serialize(serializer),
12490                }
12491            }
12492        }
12493
12494        impl<'de> serde::de::Deserialize<'de> for ReplicationState {
12495            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12496            where
12497                D: serde::Deserializer<'de>,
12498            {
12499                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReplicationState>::new(
12500                    ".google.bigtable.admin.v2.Table.ClusterState.ReplicationState",
12501                ))
12502            }
12503        }
12504    }
12505
12506    /// Defines an automated backup policy for a table
12507    #[derive(Clone, Default, PartialEq)]
12508    #[non_exhaustive]
12509    pub struct AutomatedBackupPolicy {
12510        /// Required. How long the automated backups should be retained. The only
12511        /// supported value at this time is 3 days.
12512        pub retention_period: std::option::Option<wkt::Duration>,
12513
12514        /// Required. How frequently automated backups should occur. The only
12515        /// supported value at this time is 24 hours.
12516        pub frequency: std::option::Option<wkt::Duration>,
12517
12518        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12519    }
12520
12521    impl AutomatedBackupPolicy {
12522        pub fn new() -> Self {
12523            std::default::Default::default()
12524        }
12525
12526        /// Sets the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
12527        ///
12528        /// # Example
12529        /// ```ignore,no_run
12530        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12531        /// use wkt::Duration;
12532        /// let x = AutomatedBackupPolicy::new().set_retention_period(Duration::default()/* use setters */);
12533        /// ```
12534        pub fn set_retention_period<T>(mut self, v: T) -> Self
12535        where
12536            T: std::convert::Into<wkt::Duration>,
12537        {
12538            self.retention_period = std::option::Option::Some(v.into());
12539            self
12540        }
12541
12542        /// Sets or clears the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
12543        ///
12544        /// # Example
12545        /// ```ignore,no_run
12546        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12547        /// use wkt::Duration;
12548        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
12549        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(None::<Duration>);
12550        /// ```
12551        pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
12552        where
12553            T: std::convert::Into<wkt::Duration>,
12554        {
12555            self.retention_period = v.map(|x| x.into());
12556            self
12557        }
12558
12559        /// Sets the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
12560        ///
12561        /// # Example
12562        /// ```ignore,no_run
12563        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12564        /// use wkt::Duration;
12565        /// let x = AutomatedBackupPolicy::new().set_frequency(Duration::default()/* use setters */);
12566        /// ```
12567        pub fn set_frequency<T>(mut self, v: T) -> Self
12568        where
12569            T: std::convert::Into<wkt::Duration>,
12570        {
12571            self.frequency = std::option::Option::Some(v.into());
12572            self
12573        }
12574
12575        /// Sets or clears the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
12576        ///
12577        /// # Example
12578        /// ```ignore,no_run
12579        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12580        /// use wkt::Duration;
12581        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(Some(Duration::default()/* use setters */));
12582        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(None::<Duration>);
12583        /// ```
12584        pub fn set_or_clear_frequency<T>(mut self, v: std::option::Option<T>) -> Self
12585        where
12586            T: std::convert::Into<wkt::Duration>,
12587        {
12588            self.frequency = v.map(|x| x.into());
12589            self
12590        }
12591    }
12592
12593    impl wkt::message::Message for AutomatedBackupPolicy {
12594        fn typename() -> &'static str {
12595            "type.googleapis.com/google.bigtable.admin.v2.Table.AutomatedBackupPolicy"
12596        }
12597    }
12598
12599    /// Possible timestamp granularities to use when keeping multiple versions
12600    /// of data in a table.
12601    ///
12602    /// # Working with unknown values
12603    ///
12604    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12605    /// additional enum variants at any time. Adding new variants is not considered
12606    /// a breaking change. Applications should write their code in anticipation of:
12607    ///
12608    /// - New values appearing in future releases of the client library, **and**
12609    /// - New values received dynamically, without application changes.
12610    ///
12611    /// Please consult the [Working with enums] section in the user guide for some
12612    /// guidelines.
12613    ///
12614    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12615    #[derive(Clone, Debug, PartialEq)]
12616    #[non_exhaustive]
12617    pub enum TimestampGranularity {
12618        /// The user did not specify a granularity. Should not be returned.
12619        /// When specified during table creation, MILLIS will be used.
12620        Unspecified,
12621        /// The table keeps data versioned at a granularity of 1ms.
12622        Millis,
12623        /// If set, the enum was initialized with an unknown value.
12624        ///
12625        /// Applications can examine the value using [TimestampGranularity::value] or
12626        /// [TimestampGranularity::name].
12627        UnknownValue(timestamp_granularity::UnknownValue),
12628    }
12629
12630    #[doc(hidden)]
12631    pub mod timestamp_granularity {
12632        #[allow(unused_imports)]
12633        use super::*;
12634        #[derive(Clone, Debug, PartialEq)]
12635        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12636    }
12637
12638    impl TimestampGranularity {
12639        /// Gets the enum value.
12640        ///
12641        /// Returns `None` if the enum contains an unknown value deserialized from
12642        /// the string representation of enums.
12643        pub fn value(&self) -> std::option::Option<i32> {
12644            match self {
12645                Self::Unspecified => std::option::Option::Some(0),
12646                Self::Millis => std::option::Option::Some(1),
12647                Self::UnknownValue(u) => u.0.value(),
12648            }
12649        }
12650
12651        /// Gets the enum value as a string.
12652        ///
12653        /// Returns `None` if the enum contains an unknown value deserialized from
12654        /// the integer representation of enums.
12655        pub fn name(&self) -> std::option::Option<&str> {
12656            match self {
12657                Self::Unspecified => std::option::Option::Some("TIMESTAMP_GRANULARITY_UNSPECIFIED"),
12658                Self::Millis => std::option::Option::Some("MILLIS"),
12659                Self::UnknownValue(u) => u.0.name(),
12660            }
12661        }
12662    }
12663
12664    impl std::default::Default for TimestampGranularity {
12665        fn default() -> Self {
12666            use std::convert::From;
12667            Self::from(0)
12668        }
12669    }
12670
12671    impl std::fmt::Display for TimestampGranularity {
12672        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12673            wkt::internal::display_enum(f, self.name(), self.value())
12674        }
12675    }
12676
12677    impl std::convert::From<i32> for TimestampGranularity {
12678        fn from(value: i32) -> Self {
12679            match value {
12680                0 => Self::Unspecified,
12681                1 => Self::Millis,
12682                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
12683                    wkt::internal::UnknownEnumValue::Integer(value),
12684                )),
12685            }
12686        }
12687    }
12688
12689    impl std::convert::From<&str> for TimestampGranularity {
12690        fn from(value: &str) -> Self {
12691            use std::string::ToString;
12692            match value {
12693                "TIMESTAMP_GRANULARITY_UNSPECIFIED" => Self::Unspecified,
12694                "MILLIS" => Self::Millis,
12695                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
12696                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12697                )),
12698            }
12699        }
12700    }
12701
12702    impl serde::ser::Serialize for TimestampGranularity {
12703        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12704        where
12705            S: serde::Serializer,
12706        {
12707            match self {
12708                Self::Unspecified => serializer.serialize_i32(0),
12709                Self::Millis => serializer.serialize_i32(1),
12710                Self::UnknownValue(u) => u.0.serialize(serializer),
12711            }
12712        }
12713    }
12714
12715    impl<'de> serde::de::Deserialize<'de> for TimestampGranularity {
12716        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12717        where
12718            D: serde::Deserializer<'de>,
12719        {
12720            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TimestampGranularity>::new(
12721                ".google.bigtable.admin.v2.Table.TimestampGranularity",
12722            ))
12723        }
12724    }
12725
12726    /// Defines a view over a table's fields.
12727    ///
12728    /// # Working with unknown values
12729    ///
12730    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12731    /// additional enum variants at any time. Adding new variants is not considered
12732    /// a breaking change. Applications should write their code in anticipation of:
12733    ///
12734    /// - New values appearing in future releases of the client library, **and**
12735    /// - New values received dynamically, without application changes.
12736    ///
12737    /// Please consult the [Working with enums] section in the user guide for some
12738    /// guidelines.
12739    ///
12740    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12741    #[derive(Clone, Debug, PartialEq)]
12742    #[non_exhaustive]
12743    pub enum View {
12744        /// Uses the default view for each method as documented in its request.
12745        Unspecified,
12746        /// Only populates `name`.
12747        NameOnly,
12748        /// Only populates `name` and fields related to the table's schema.
12749        SchemaView,
12750        /// Only populates `name` and fields related to the table's replication
12751        /// state.
12752        ReplicationView,
12753        /// Only populates `name` and fields related to the table's encryption state.
12754        EncryptionView,
12755        /// Populates all fields.
12756        Full,
12757        /// If set, the enum was initialized with an unknown value.
12758        ///
12759        /// Applications can examine the value using [View::value] or
12760        /// [View::name].
12761        UnknownValue(view::UnknownValue),
12762    }
12763
12764    #[doc(hidden)]
12765    pub mod view {
12766        #[allow(unused_imports)]
12767        use super::*;
12768        #[derive(Clone, Debug, PartialEq)]
12769        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12770    }
12771
12772    impl View {
12773        /// Gets the enum value.
12774        ///
12775        /// Returns `None` if the enum contains an unknown value deserialized from
12776        /// the string representation of enums.
12777        pub fn value(&self) -> std::option::Option<i32> {
12778            match self {
12779                Self::Unspecified => std::option::Option::Some(0),
12780                Self::NameOnly => std::option::Option::Some(1),
12781                Self::SchemaView => std::option::Option::Some(2),
12782                Self::ReplicationView => std::option::Option::Some(3),
12783                Self::EncryptionView => std::option::Option::Some(5),
12784                Self::Full => std::option::Option::Some(4),
12785                Self::UnknownValue(u) => u.0.value(),
12786            }
12787        }
12788
12789        /// Gets the enum value as a string.
12790        ///
12791        /// Returns `None` if the enum contains an unknown value deserialized from
12792        /// the integer representation of enums.
12793        pub fn name(&self) -> std::option::Option<&str> {
12794            match self {
12795                Self::Unspecified => std::option::Option::Some("VIEW_UNSPECIFIED"),
12796                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
12797                Self::SchemaView => std::option::Option::Some("SCHEMA_VIEW"),
12798                Self::ReplicationView => std::option::Option::Some("REPLICATION_VIEW"),
12799                Self::EncryptionView => std::option::Option::Some("ENCRYPTION_VIEW"),
12800                Self::Full => std::option::Option::Some("FULL"),
12801                Self::UnknownValue(u) => u.0.name(),
12802            }
12803        }
12804    }
12805
12806    impl std::default::Default for View {
12807        fn default() -> Self {
12808            use std::convert::From;
12809            Self::from(0)
12810        }
12811    }
12812
12813    impl std::fmt::Display for View {
12814        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12815            wkt::internal::display_enum(f, self.name(), self.value())
12816        }
12817    }
12818
12819    impl std::convert::From<i32> for View {
12820        fn from(value: i32) -> Self {
12821            match value {
12822                0 => Self::Unspecified,
12823                1 => Self::NameOnly,
12824                2 => Self::SchemaView,
12825                3 => Self::ReplicationView,
12826                4 => Self::Full,
12827                5 => Self::EncryptionView,
12828                _ => Self::UnknownValue(view::UnknownValue(
12829                    wkt::internal::UnknownEnumValue::Integer(value),
12830                )),
12831            }
12832        }
12833    }
12834
12835    impl std::convert::From<&str> for View {
12836        fn from(value: &str) -> Self {
12837            use std::string::ToString;
12838            match value {
12839                "VIEW_UNSPECIFIED" => Self::Unspecified,
12840                "NAME_ONLY" => Self::NameOnly,
12841                "SCHEMA_VIEW" => Self::SchemaView,
12842                "REPLICATION_VIEW" => Self::ReplicationView,
12843                "ENCRYPTION_VIEW" => Self::EncryptionView,
12844                "FULL" => Self::Full,
12845                _ => Self::UnknownValue(view::UnknownValue(
12846                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12847                )),
12848            }
12849        }
12850    }
12851
12852    impl serde::ser::Serialize for View {
12853        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12854        where
12855            S: serde::Serializer,
12856        {
12857            match self {
12858                Self::Unspecified => serializer.serialize_i32(0),
12859                Self::NameOnly => serializer.serialize_i32(1),
12860                Self::SchemaView => serializer.serialize_i32(2),
12861                Self::ReplicationView => serializer.serialize_i32(3),
12862                Self::EncryptionView => serializer.serialize_i32(5),
12863                Self::Full => serializer.serialize_i32(4),
12864                Self::UnknownValue(u) => u.0.serialize(serializer),
12865            }
12866        }
12867    }
12868
12869    impl<'de> serde::de::Deserialize<'de> for View {
12870        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12871        where
12872            D: serde::Deserializer<'de>,
12873        {
12874            deserializer.deserialize_any(wkt::internal::EnumVisitor::<View>::new(
12875                ".google.bigtable.admin.v2.Table.View",
12876            ))
12877        }
12878    }
12879
12880    #[derive(Clone, Debug, PartialEq)]
12881    #[non_exhaustive]
12882    pub enum AutomatedBackupConfig {
12883        /// If specified, automated backups are enabled for this table.
12884        /// Otherwise, automated backups are disabled.
12885        AutomatedBackupPolicy(std::boxed::Box<crate::model::table::AutomatedBackupPolicy>),
12886    }
12887}
12888
12889/// AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users
12890/// can configure access to each Authorized View independently from the table and
12891/// use the existing Data APIs to access the subset of data.
12892#[derive(Clone, Default, PartialEq)]
12893#[non_exhaustive]
12894pub struct AuthorizedView {
12895    /// Identifier. The name of this AuthorizedView.
12896    /// Values are of the form
12897    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`
12898    pub name: std::string::String,
12899
12900    /// The etag for this AuthorizedView.
12901    /// If this is provided on update, it must match the server's etag. The server
12902    /// returns ABORTED error on a mismatched etag.
12903    pub etag: std::string::String,
12904
12905    /// Set to true to make the AuthorizedView protected against deletion.
12906    /// The parent Table and containing Instance cannot be deleted if an
12907    /// AuthorizedView has this bit set.
12908    pub deletion_protection: bool,
12909
12910    /// The type of this AuthorizedView.
12911    pub authorized_view: std::option::Option<crate::model::authorized_view::AuthorizedView>,
12912
12913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12914}
12915
12916impl AuthorizedView {
12917    pub fn new() -> Self {
12918        std::default::Default::default()
12919    }
12920
12921    /// Sets the value of [name][crate::model::AuthorizedView::name].
12922    ///
12923    /// # Example
12924    /// ```ignore,no_run
12925    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
12926    /// let x = AuthorizedView::new().set_name("example");
12927    /// ```
12928    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12929        self.name = v.into();
12930        self
12931    }
12932
12933    /// Sets the value of [etag][crate::model::AuthorizedView::etag].
12934    ///
12935    /// # Example
12936    /// ```ignore,no_run
12937    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
12938    /// let x = AuthorizedView::new().set_etag("example");
12939    /// ```
12940    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12941        self.etag = v.into();
12942        self
12943    }
12944
12945    /// Sets the value of [deletion_protection][crate::model::AuthorizedView::deletion_protection].
12946    ///
12947    /// # Example
12948    /// ```ignore,no_run
12949    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
12950    /// let x = AuthorizedView::new().set_deletion_protection(true);
12951    /// ```
12952    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12953        self.deletion_protection = v.into();
12954        self
12955    }
12956
12957    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view].
12958    ///
12959    /// Note that all the setters affecting `authorized_view` are mutually
12960    /// exclusive.
12961    ///
12962    /// # Example
12963    /// ```ignore,no_run
12964    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
12965    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
12966    /// let x = AuthorizedView::new().set_authorized_view(Some(
12967    ///     google_cloud_bigtable_admin_v2::model::authorized_view::AuthorizedView::SubsetView(SubsetView::default().into())));
12968    /// ```
12969    pub fn set_authorized_view<
12970        T: std::convert::Into<std::option::Option<crate::model::authorized_view::AuthorizedView>>,
12971    >(
12972        mut self,
12973        v: T,
12974    ) -> Self {
12975        self.authorized_view = v.into();
12976        self
12977    }
12978
12979    /// The value of [authorized_view][crate::model::AuthorizedView::authorized_view]
12980    /// if it holds a `SubsetView`, `None` if the field is not set or
12981    /// holds a different branch.
12982    pub fn subset_view(
12983        &self,
12984    ) -> std::option::Option<&std::boxed::Box<crate::model::authorized_view::SubsetView>> {
12985        #[allow(unreachable_patterns)]
12986        self.authorized_view.as_ref().and_then(|v| match v {
12987            crate::model::authorized_view::AuthorizedView::SubsetView(v) => {
12988                std::option::Option::Some(v)
12989            }
12990            _ => std::option::Option::None,
12991        })
12992    }
12993
12994    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view]
12995    /// to hold a `SubsetView`.
12996    ///
12997    /// Note that all the setters affecting `authorized_view` are
12998    /// mutually exclusive.
12999    ///
13000    /// # Example
13001    /// ```ignore,no_run
13002    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13003    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13004    /// let x = AuthorizedView::new().set_subset_view(SubsetView::default()/* use setters */);
13005    /// assert!(x.subset_view().is_some());
13006    /// ```
13007    pub fn set_subset_view<
13008        T: std::convert::Into<std::boxed::Box<crate::model::authorized_view::SubsetView>>,
13009    >(
13010        mut self,
13011        v: T,
13012    ) -> Self {
13013        self.authorized_view = std::option::Option::Some(
13014            crate::model::authorized_view::AuthorizedView::SubsetView(v.into()),
13015        );
13016        self
13017    }
13018}
13019
13020impl wkt::message::Message for AuthorizedView {
13021    fn typename() -> &'static str {
13022        "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView"
13023    }
13024}
13025
13026/// Defines additional types related to [AuthorizedView].
13027pub mod authorized_view {
13028    #[allow(unused_imports)]
13029    use super::*;
13030
13031    /// Subsets of a column family that are included in this AuthorizedView.
13032    #[derive(Clone, Default, PartialEq)]
13033    #[non_exhaustive]
13034    pub struct FamilySubsets {
13035        /// Individual exact column qualifiers to be included in the AuthorizedView.
13036        pub qualifiers: std::vec::Vec<::bytes::Bytes>,
13037
13038        /// Prefixes for qualifiers to be included in the AuthorizedView. Every
13039        /// qualifier starting with one of these prefixes is included in the
13040        /// AuthorizedView. To provide access to all qualifiers, include the empty
13041        /// string as a prefix
13042        /// ("").
13043        pub qualifier_prefixes: std::vec::Vec<::bytes::Bytes>,
13044
13045        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13046    }
13047
13048    impl FamilySubsets {
13049        pub fn new() -> Self {
13050            std::default::Default::default()
13051        }
13052
13053        /// Sets the value of [qualifiers][crate::model::authorized_view::FamilySubsets::qualifiers].
13054        ///
13055        /// # Example
13056        /// ```ignore,no_run
13057        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13058        /// let b1 = bytes::Bytes::from_static(b"abc");
13059        /// let b2 = bytes::Bytes::from_static(b"xyz");
13060        /// let x = FamilySubsets::new().set_qualifiers([b1, b2]);
13061        /// ```
13062        pub fn set_qualifiers<T, V>(mut self, v: T) -> Self
13063        where
13064            T: std::iter::IntoIterator<Item = V>,
13065            V: std::convert::Into<::bytes::Bytes>,
13066        {
13067            use std::iter::Iterator;
13068            self.qualifiers = v.into_iter().map(|i| i.into()).collect();
13069            self
13070        }
13071
13072        /// Sets the value of [qualifier_prefixes][crate::model::authorized_view::FamilySubsets::qualifier_prefixes].
13073        ///
13074        /// # Example
13075        /// ```ignore,no_run
13076        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13077        /// let b1 = bytes::Bytes::from_static(b"abc");
13078        /// let b2 = bytes::Bytes::from_static(b"xyz");
13079        /// let x = FamilySubsets::new().set_qualifier_prefixes([b1, b2]);
13080        /// ```
13081        pub fn set_qualifier_prefixes<T, V>(mut self, v: T) -> Self
13082        where
13083            T: std::iter::IntoIterator<Item = V>,
13084            V: std::convert::Into<::bytes::Bytes>,
13085        {
13086            use std::iter::Iterator;
13087            self.qualifier_prefixes = v.into_iter().map(|i| i.into()).collect();
13088            self
13089        }
13090    }
13091
13092    impl wkt::message::Message for FamilySubsets {
13093        fn typename() -> &'static str {
13094            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.FamilySubsets"
13095        }
13096    }
13097
13098    /// Defines a simple AuthorizedView that is a subset of the underlying Table.
13099    #[derive(Clone, Default, PartialEq)]
13100    #[non_exhaustive]
13101    pub struct SubsetView {
13102        /// Row prefixes to be included in the AuthorizedView.
13103        /// To provide access to all rows, include the empty string as a prefix ("").
13104        pub row_prefixes: std::vec::Vec<::bytes::Bytes>,
13105
13106        /// Map from column family name to the columns in this family to be included
13107        /// in the AuthorizedView.
13108        pub family_subsets: std::collections::HashMap<
13109            std::string::String,
13110            crate::model::authorized_view::FamilySubsets,
13111        >,
13112
13113        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13114    }
13115
13116    impl SubsetView {
13117        pub fn new() -> Self {
13118            std::default::Default::default()
13119        }
13120
13121        /// Sets the value of [row_prefixes][crate::model::authorized_view::SubsetView::row_prefixes].
13122        ///
13123        /// # Example
13124        /// ```ignore,no_run
13125        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13126        /// let b1 = bytes::Bytes::from_static(b"abc");
13127        /// let b2 = bytes::Bytes::from_static(b"xyz");
13128        /// let x = SubsetView::new().set_row_prefixes([b1, b2]);
13129        /// ```
13130        pub fn set_row_prefixes<T, V>(mut self, v: T) -> Self
13131        where
13132            T: std::iter::IntoIterator<Item = V>,
13133            V: std::convert::Into<::bytes::Bytes>,
13134        {
13135            use std::iter::Iterator;
13136            self.row_prefixes = v.into_iter().map(|i| i.into()).collect();
13137            self
13138        }
13139
13140        /// Sets the value of [family_subsets][crate::model::authorized_view::SubsetView::family_subsets].
13141        ///
13142        /// # Example
13143        /// ```ignore,no_run
13144        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13145        /// use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13146        /// let x = SubsetView::new().set_family_subsets([
13147        ///     ("key0", FamilySubsets::default()/* use setters */),
13148        ///     ("key1", FamilySubsets::default()/* use (different) setters */),
13149        /// ]);
13150        /// ```
13151        pub fn set_family_subsets<T, K, V>(mut self, v: T) -> Self
13152        where
13153            T: std::iter::IntoIterator<Item = (K, V)>,
13154            K: std::convert::Into<std::string::String>,
13155            V: std::convert::Into<crate::model::authorized_view::FamilySubsets>,
13156        {
13157            use std::iter::Iterator;
13158            self.family_subsets = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13159            self
13160        }
13161    }
13162
13163    impl wkt::message::Message for SubsetView {
13164        fn typename() -> &'static str {
13165            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.SubsetView"
13166        }
13167    }
13168
13169    /// Defines a subset of an AuthorizedView's fields.
13170    ///
13171    /// # Working with unknown values
13172    ///
13173    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13174    /// additional enum variants at any time. Adding new variants is not considered
13175    /// a breaking change. Applications should write their code in anticipation of:
13176    ///
13177    /// - New values appearing in future releases of the client library, **and**
13178    /// - New values received dynamically, without application changes.
13179    ///
13180    /// Please consult the [Working with enums] section in the user guide for some
13181    /// guidelines.
13182    ///
13183    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13184    #[derive(Clone, Debug, PartialEq)]
13185    #[non_exhaustive]
13186    pub enum ResponseView {
13187        /// Uses the default view for each method as documented in the request.
13188        Unspecified,
13189        /// Only populates `name`.
13190        NameOnly,
13191        /// Only populates the AuthorizedView's basic metadata. This includes:
13192        /// name, deletion_protection, etag.
13193        Basic,
13194        /// Populates every fields.
13195        Full,
13196        /// If set, the enum was initialized with an unknown value.
13197        ///
13198        /// Applications can examine the value using [ResponseView::value] or
13199        /// [ResponseView::name].
13200        UnknownValue(response_view::UnknownValue),
13201    }
13202
13203    #[doc(hidden)]
13204    pub mod response_view {
13205        #[allow(unused_imports)]
13206        use super::*;
13207        #[derive(Clone, Debug, PartialEq)]
13208        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13209    }
13210
13211    impl ResponseView {
13212        /// Gets the enum value.
13213        ///
13214        /// Returns `None` if the enum contains an unknown value deserialized from
13215        /// the string representation of enums.
13216        pub fn value(&self) -> std::option::Option<i32> {
13217            match self {
13218                Self::Unspecified => std::option::Option::Some(0),
13219                Self::NameOnly => std::option::Option::Some(1),
13220                Self::Basic => std::option::Option::Some(2),
13221                Self::Full => std::option::Option::Some(3),
13222                Self::UnknownValue(u) => u.0.value(),
13223            }
13224        }
13225
13226        /// Gets the enum value as a string.
13227        ///
13228        /// Returns `None` if the enum contains an unknown value deserialized from
13229        /// the integer representation of enums.
13230        pub fn name(&self) -> std::option::Option<&str> {
13231            match self {
13232                Self::Unspecified => std::option::Option::Some("RESPONSE_VIEW_UNSPECIFIED"),
13233                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
13234                Self::Basic => std::option::Option::Some("BASIC"),
13235                Self::Full => std::option::Option::Some("FULL"),
13236                Self::UnknownValue(u) => u.0.name(),
13237            }
13238        }
13239    }
13240
13241    impl std::default::Default for ResponseView {
13242        fn default() -> Self {
13243            use std::convert::From;
13244            Self::from(0)
13245        }
13246    }
13247
13248    impl std::fmt::Display for ResponseView {
13249        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13250            wkt::internal::display_enum(f, self.name(), self.value())
13251        }
13252    }
13253
13254    impl std::convert::From<i32> for ResponseView {
13255        fn from(value: i32) -> Self {
13256            match value {
13257                0 => Self::Unspecified,
13258                1 => Self::NameOnly,
13259                2 => Self::Basic,
13260                3 => Self::Full,
13261                _ => Self::UnknownValue(response_view::UnknownValue(
13262                    wkt::internal::UnknownEnumValue::Integer(value),
13263                )),
13264            }
13265        }
13266    }
13267
13268    impl std::convert::From<&str> for ResponseView {
13269        fn from(value: &str) -> Self {
13270            use std::string::ToString;
13271            match value {
13272                "RESPONSE_VIEW_UNSPECIFIED" => Self::Unspecified,
13273                "NAME_ONLY" => Self::NameOnly,
13274                "BASIC" => Self::Basic,
13275                "FULL" => Self::Full,
13276                _ => Self::UnknownValue(response_view::UnknownValue(
13277                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13278                )),
13279            }
13280        }
13281    }
13282
13283    impl serde::ser::Serialize for ResponseView {
13284        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13285        where
13286            S: serde::Serializer,
13287        {
13288            match self {
13289                Self::Unspecified => serializer.serialize_i32(0),
13290                Self::NameOnly => serializer.serialize_i32(1),
13291                Self::Basic => serializer.serialize_i32(2),
13292                Self::Full => serializer.serialize_i32(3),
13293                Self::UnknownValue(u) => u.0.serialize(serializer),
13294            }
13295        }
13296    }
13297
13298    impl<'de> serde::de::Deserialize<'de> for ResponseView {
13299        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13300        where
13301            D: serde::Deserializer<'de>,
13302        {
13303            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResponseView>::new(
13304                ".google.bigtable.admin.v2.AuthorizedView.ResponseView",
13305            ))
13306        }
13307    }
13308
13309    /// The type of this AuthorizedView.
13310    #[derive(Clone, Debug, PartialEq)]
13311    #[non_exhaustive]
13312    pub enum AuthorizedView {
13313        /// An AuthorizedView permitting access to an explicit subset of a Table.
13314        SubsetView(std::boxed::Box<crate::model::authorized_view::SubsetView>),
13315    }
13316}
13317
13318/// A set of columns within a table which share a common configuration.
13319#[derive(Clone, Default, PartialEq)]
13320#[non_exhaustive]
13321pub struct ColumnFamily {
13322    /// Garbage collection rule specified as a protobuf.
13323    /// Must serialize to at most 500 bytes.
13324    ///
13325    /// NOTE: Garbage collection executes opportunistically in the background, and
13326    /// so it's possible for reads to return a cell even if it matches the active
13327    /// GC expression for its family.
13328    pub gc_rule: std::option::Option<crate::model::GcRule>,
13329
13330    /// The type of data stored in each of this family's cell values, including its
13331    /// full encoding. If omitted, the family only serves raw untyped bytes.
13332    ///
13333    /// For now, only the `Aggregate` type is supported.
13334    ///
13335    /// `Aggregate` can only be set at family creation and is immutable afterwards.
13336    ///
13337    /// If `value_type` is `Aggregate`, written data must be compatible with:
13338    ///
13339    /// * `value_type.input_type` for `AddInput` mutations
13340    pub value_type: std::option::Option<crate::model::Type>,
13341
13342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13343}
13344
13345impl ColumnFamily {
13346    pub fn new() -> Self {
13347        std::default::Default::default()
13348    }
13349
13350    /// Sets the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13351    ///
13352    /// # Example
13353    /// ```ignore,no_run
13354    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13355    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13356    /// let x = ColumnFamily::new().set_gc_rule(GcRule::default()/* use setters */);
13357    /// ```
13358    pub fn set_gc_rule<T>(mut self, v: T) -> Self
13359    where
13360        T: std::convert::Into<crate::model::GcRule>,
13361    {
13362        self.gc_rule = std::option::Option::Some(v.into());
13363        self
13364    }
13365
13366    /// Sets or clears the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13367    ///
13368    /// # Example
13369    /// ```ignore,no_run
13370    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13371    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13372    /// let x = ColumnFamily::new().set_or_clear_gc_rule(Some(GcRule::default()/* use setters */));
13373    /// let x = ColumnFamily::new().set_or_clear_gc_rule(None::<GcRule>);
13374    /// ```
13375    pub fn set_or_clear_gc_rule<T>(mut self, v: std::option::Option<T>) -> Self
13376    where
13377        T: std::convert::Into<crate::model::GcRule>,
13378    {
13379        self.gc_rule = v.map(|x| x.into());
13380        self
13381    }
13382
13383    /// Sets the value of [value_type][crate::model::ColumnFamily::value_type].
13384    ///
13385    /// # Example
13386    /// ```ignore,no_run
13387    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13388    /// use google_cloud_bigtable_admin_v2::model::Type;
13389    /// let x = ColumnFamily::new().set_value_type(Type::default()/* use setters */);
13390    /// ```
13391    pub fn set_value_type<T>(mut self, v: T) -> Self
13392    where
13393        T: std::convert::Into<crate::model::Type>,
13394    {
13395        self.value_type = std::option::Option::Some(v.into());
13396        self
13397    }
13398
13399    /// Sets or clears the value of [value_type][crate::model::ColumnFamily::value_type].
13400    ///
13401    /// # Example
13402    /// ```ignore,no_run
13403    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13404    /// use google_cloud_bigtable_admin_v2::model::Type;
13405    /// let x = ColumnFamily::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
13406    /// let x = ColumnFamily::new().set_or_clear_value_type(None::<Type>);
13407    /// ```
13408    pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
13409    where
13410        T: std::convert::Into<crate::model::Type>,
13411    {
13412        self.value_type = v.map(|x| x.into());
13413        self
13414    }
13415}
13416
13417impl wkt::message::Message for ColumnFamily {
13418    fn typename() -> &'static str {
13419        "type.googleapis.com/google.bigtable.admin.v2.ColumnFamily"
13420    }
13421}
13422
13423/// Rule for determining which cells to delete during garbage collection.
13424#[derive(Clone, Default, PartialEq)]
13425#[non_exhaustive]
13426pub struct GcRule {
13427    /// Garbage collection rules.
13428    pub rule: std::option::Option<crate::model::gc_rule::Rule>,
13429
13430    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13431}
13432
13433impl GcRule {
13434    pub fn new() -> Self {
13435        std::default::Default::default()
13436    }
13437
13438    /// Sets the value of [rule][crate::model::GcRule::rule].
13439    ///
13440    /// Note that all the setters affecting `rule` are mutually
13441    /// exclusive.
13442    ///
13443    /// # Example
13444    /// ```ignore,no_run
13445    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13446    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Rule;
13447    /// let x = GcRule::new().set_rule(Some(Rule::MaxNumVersions(42)));
13448    /// ```
13449    pub fn set_rule<T: std::convert::Into<std::option::Option<crate::model::gc_rule::Rule>>>(
13450        mut self,
13451        v: T,
13452    ) -> Self {
13453        self.rule = v.into();
13454        self
13455    }
13456
13457    /// The value of [rule][crate::model::GcRule::rule]
13458    /// if it holds a `MaxNumVersions`, `None` if the field is not set or
13459    /// holds a different branch.
13460    pub fn max_num_versions(&self) -> std::option::Option<&i32> {
13461        #[allow(unreachable_patterns)]
13462        self.rule.as_ref().and_then(|v| match v {
13463            crate::model::gc_rule::Rule::MaxNumVersions(v) => std::option::Option::Some(v),
13464            _ => std::option::Option::None,
13465        })
13466    }
13467
13468    /// Sets the value of [rule][crate::model::GcRule::rule]
13469    /// to hold a `MaxNumVersions`.
13470    ///
13471    /// Note that all the setters affecting `rule` are
13472    /// mutually exclusive.
13473    ///
13474    /// # Example
13475    /// ```ignore,no_run
13476    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13477    /// let x = GcRule::new().set_max_num_versions(42);
13478    /// assert!(x.max_num_versions().is_some());
13479    /// assert!(x.max_age().is_none());
13480    /// assert!(x.intersection().is_none());
13481    /// assert!(x.union().is_none());
13482    /// ```
13483    pub fn set_max_num_versions<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13484        self.rule =
13485            std::option::Option::Some(crate::model::gc_rule::Rule::MaxNumVersions(v.into()));
13486        self
13487    }
13488
13489    /// The value of [rule][crate::model::GcRule::rule]
13490    /// if it holds a `MaxAge`, `None` if the field is not set or
13491    /// holds a different branch.
13492    pub fn max_age(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
13493        #[allow(unreachable_patterns)]
13494        self.rule.as_ref().and_then(|v| match v {
13495            crate::model::gc_rule::Rule::MaxAge(v) => std::option::Option::Some(v),
13496            _ => std::option::Option::None,
13497        })
13498    }
13499
13500    /// Sets the value of [rule][crate::model::GcRule::rule]
13501    /// to hold a `MaxAge`.
13502    ///
13503    /// Note that all the setters affecting `rule` are
13504    /// mutually exclusive.
13505    ///
13506    /// # Example
13507    /// ```ignore,no_run
13508    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13509    /// use wkt::Duration;
13510    /// let x = GcRule::new().set_max_age(Duration::default()/* use setters */);
13511    /// assert!(x.max_age().is_some());
13512    /// assert!(x.max_num_versions().is_none());
13513    /// assert!(x.intersection().is_none());
13514    /// assert!(x.union().is_none());
13515    /// ```
13516    pub fn set_max_age<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
13517        mut self,
13518        v: T,
13519    ) -> Self {
13520        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::MaxAge(v.into()));
13521        self
13522    }
13523
13524    /// The value of [rule][crate::model::GcRule::rule]
13525    /// if it holds a `Intersection`, `None` if the field is not set or
13526    /// holds a different branch.
13527    pub fn intersection(
13528        &self,
13529    ) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Intersection>> {
13530        #[allow(unreachable_patterns)]
13531        self.rule.as_ref().and_then(|v| match v {
13532            crate::model::gc_rule::Rule::Intersection(v) => std::option::Option::Some(v),
13533            _ => std::option::Option::None,
13534        })
13535    }
13536
13537    /// Sets the value of [rule][crate::model::GcRule::rule]
13538    /// to hold a `Intersection`.
13539    ///
13540    /// Note that all the setters affecting `rule` are
13541    /// mutually exclusive.
13542    ///
13543    /// # Example
13544    /// ```ignore,no_run
13545    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13546    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
13547    /// let x = GcRule::new().set_intersection(Intersection::default()/* use setters */);
13548    /// assert!(x.intersection().is_some());
13549    /// assert!(x.max_num_versions().is_none());
13550    /// assert!(x.max_age().is_none());
13551    /// assert!(x.union().is_none());
13552    /// ```
13553    pub fn set_intersection<
13554        T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Intersection>>,
13555    >(
13556        mut self,
13557        v: T,
13558    ) -> Self {
13559        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Intersection(v.into()));
13560        self
13561    }
13562
13563    /// The value of [rule][crate::model::GcRule::rule]
13564    /// if it holds a `Union`, `None` if the field is not set or
13565    /// holds a different branch.
13566    pub fn union(&self) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Union>> {
13567        #[allow(unreachable_patterns)]
13568        self.rule.as_ref().and_then(|v| match v {
13569            crate::model::gc_rule::Rule::Union(v) => std::option::Option::Some(v),
13570            _ => std::option::Option::None,
13571        })
13572    }
13573
13574    /// Sets the value of [rule][crate::model::GcRule::rule]
13575    /// to hold a `Union`.
13576    ///
13577    /// Note that all the setters affecting `rule` are
13578    /// mutually exclusive.
13579    ///
13580    /// # Example
13581    /// ```ignore,no_run
13582    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13583    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
13584    /// let x = GcRule::new().set_union(Union::default()/* use setters */);
13585    /// assert!(x.union().is_some());
13586    /// assert!(x.max_num_versions().is_none());
13587    /// assert!(x.max_age().is_none());
13588    /// assert!(x.intersection().is_none());
13589    /// ```
13590    pub fn set_union<T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Union>>>(
13591        mut self,
13592        v: T,
13593    ) -> Self {
13594        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Union(v.into()));
13595        self
13596    }
13597}
13598
13599impl wkt::message::Message for GcRule {
13600    fn typename() -> &'static str {
13601        "type.googleapis.com/google.bigtable.admin.v2.GcRule"
13602    }
13603}
13604
13605/// Defines additional types related to [GcRule].
13606pub mod gc_rule {
13607    #[allow(unused_imports)]
13608    use super::*;
13609
13610    /// A GcRule which deletes cells matching all of the given rules.
13611    #[derive(Clone, Default, PartialEq)]
13612    #[non_exhaustive]
13613    pub struct Intersection {
13614        /// Only delete cells which would be deleted by every element of `rules`.
13615        pub rules: std::vec::Vec<crate::model::GcRule>,
13616
13617        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13618    }
13619
13620    impl Intersection {
13621        pub fn new() -> Self {
13622            std::default::Default::default()
13623        }
13624
13625        /// Sets the value of [rules][crate::model::gc_rule::Intersection::rules].
13626        ///
13627        /// # Example
13628        /// ```ignore,no_run
13629        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
13630        /// use google_cloud_bigtable_admin_v2::model::GcRule;
13631        /// let x = Intersection::new()
13632        ///     .set_rules([
13633        ///         GcRule::default()/* use setters */,
13634        ///         GcRule::default()/* use (different) setters */,
13635        ///     ]);
13636        /// ```
13637        pub fn set_rules<T, V>(mut self, v: T) -> Self
13638        where
13639            T: std::iter::IntoIterator<Item = V>,
13640            V: std::convert::Into<crate::model::GcRule>,
13641        {
13642            use std::iter::Iterator;
13643            self.rules = v.into_iter().map(|i| i.into()).collect();
13644            self
13645        }
13646    }
13647
13648    impl wkt::message::Message for Intersection {
13649        fn typename() -> &'static str {
13650            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Intersection"
13651        }
13652    }
13653
13654    /// A GcRule which deletes cells matching any of the given rules.
13655    #[derive(Clone, Default, PartialEq)]
13656    #[non_exhaustive]
13657    pub struct Union {
13658        /// Delete cells which would be deleted by any element of `rules`.
13659        pub rules: std::vec::Vec<crate::model::GcRule>,
13660
13661        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13662    }
13663
13664    impl Union {
13665        pub fn new() -> Self {
13666            std::default::Default::default()
13667        }
13668
13669        /// Sets the value of [rules][crate::model::gc_rule::Union::rules].
13670        ///
13671        /// # Example
13672        /// ```ignore,no_run
13673        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
13674        /// use google_cloud_bigtable_admin_v2::model::GcRule;
13675        /// let x = Union::new()
13676        ///     .set_rules([
13677        ///         GcRule::default()/* use setters */,
13678        ///         GcRule::default()/* use (different) setters */,
13679        ///     ]);
13680        /// ```
13681        pub fn set_rules<T, V>(mut self, v: T) -> Self
13682        where
13683            T: std::iter::IntoIterator<Item = V>,
13684            V: std::convert::Into<crate::model::GcRule>,
13685        {
13686            use std::iter::Iterator;
13687            self.rules = v.into_iter().map(|i| i.into()).collect();
13688            self
13689        }
13690    }
13691
13692    impl wkt::message::Message for Union {
13693        fn typename() -> &'static str {
13694            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Union"
13695        }
13696    }
13697
13698    /// Garbage collection rules.
13699    #[derive(Clone, Debug, PartialEq)]
13700    #[non_exhaustive]
13701    pub enum Rule {
13702        /// Delete all cells in a column except the most recent N.
13703        MaxNumVersions(i32),
13704        /// Delete cells in a column older than the given age.
13705        /// Values must be at least one millisecond, and will be truncated to
13706        /// microsecond granularity.
13707        MaxAge(std::boxed::Box<wkt::Duration>),
13708        /// Delete cells that would be deleted by every nested rule.
13709        Intersection(std::boxed::Box<crate::model::gc_rule::Intersection>),
13710        /// Delete cells that would be deleted by any nested rule.
13711        Union(std::boxed::Box<crate::model::gc_rule::Union>),
13712    }
13713}
13714
13715/// Encryption information for a given resource.
13716/// If this resource is protected with customer managed encryption, the in-use
13717/// Cloud Key Management Service (Cloud KMS) key version is specified along with
13718/// its status.
13719#[derive(Clone, Default, PartialEq)]
13720#[non_exhaustive]
13721pub struct EncryptionInfo {
13722    /// Output only. The type of encryption used to protect this resource.
13723    pub encryption_type: crate::model::encryption_info::EncryptionType,
13724
13725    /// Output only. The status of encrypt/decrypt calls on underlying data for
13726    /// this resource. Regardless of status, the existing data is always encrypted
13727    /// at rest.
13728    pub encryption_status: std::option::Option<rpc::model::Status>,
13729
13730    /// Output only. The version of the Cloud KMS key specified in the parent
13731    /// cluster that is in use for the data underlying this table.
13732    pub kms_key_version: std::string::String,
13733
13734    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13735}
13736
13737impl EncryptionInfo {
13738    pub fn new() -> Self {
13739        std::default::Default::default()
13740    }
13741
13742    /// Sets the value of [encryption_type][crate::model::EncryptionInfo::encryption_type].
13743    ///
13744    /// # Example
13745    /// ```ignore,no_run
13746    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
13747    /// use google_cloud_bigtable_admin_v2::model::encryption_info::EncryptionType;
13748    /// let x0 = EncryptionInfo::new().set_encryption_type(EncryptionType::GoogleDefaultEncryption);
13749    /// let x1 = EncryptionInfo::new().set_encryption_type(EncryptionType::CustomerManagedEncryption);
13750    /// ```
13751    pub fn set_encryption_type<
13752        T: std::convert::Into<crate::model::encryption_info::EncryptionType>,
13753    >(
13754        mut self,
13755        v: T,
13756    ) -> Self {
13757        self.encryption_type = v.into();
13758        self
13759    }
13760
13761    /// Sets the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
13762    ///
13763    /// # Example
13764    /// ```ignore,no_run
13765    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
13766    /// use rpc::model::Status;
13767    /// let x = EncryptionInfo::new().set_encryption_status(Status::default()/* use setters */);
13768    /// ```
13769    pub fn set_encryption_status<T>(mut self, v: T) -> Self
13770    where
13771        T: std::convert::Into<rpc::model::Status>,
13772    {
13773        self.encryption_status = std::option::Option::Some(v.into());
13774        self
13775    }
13776
13777    /// Sets or clears the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
13778    ///
13779    /// # Example
13780    /// ```ignore,no_run
13781    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
13782    /// use rpc::model::Status;
13783    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(Some(Status::default()/* use setters */));
13784    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(None::<Status>);
13785    /// ```
13786    pub fn set_or_clear_encryption_status<T>(mut self, v: std::option::Option<T>) -> Self
13787    where
13788        T: std::convert::Into<rpc::model::Status>,
13789    {
13790        self.encryption_status = v.map(|x| x.into());
13791        self
13792    }
13793
13794    /// Sets the value of [kms_key_version][crate::model::EncryptionInfo::kms_key_version].
13795    ///
13796    /// # Example
13797    /// ```ignore,no_run
13798    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
13799    /// let x = EncryptionInfo::new().set_kms_key_version("example");
13800    /// ```
13801    pub fn set_kms_key_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13802        self.kms_key_version = v.into();
13803        self
13804    }
13805}
13806
13807impl wkt::message::Message for EncryptionInfo {
13808    fn typename() -> &'static str {
13809        "type.googleapis.com/google.bigtable.admin.v2.EncryptionInfo"
13810    }
13811}
13812
13813/// Defines additional types related to [EncryptionInfo].
13814pub mod encryption_info {
13815    #[allow(unused_imports)]
13816    use super::*;
13817
13818    /// Possible encryption types for a resource.
13819    ///
13820    /// # Working with unknown values
13821    ///
13822    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13823    /// additional enum variants at any time. Adding new variants is not considered
13824    /// a breaking change. Applications should write their code in anticipation of:
13825    ///
13826    /// - New values appearing in future releases of the client library, **and**
13827    /// - New values received dynamically, without application changes.
13828    ///
13829    /// Please consult the [Working with enums] section in the user guide for some
13830    /// guidelines.
13831    ///
13832    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13833    #[derive(Clone, Debug, PartialEq)]
13834    #[non_exhaustive]
13835    pub enum EncryptionType {
13836        /// Encryption type was not specified, though data at rest remains encrypted.
13837        Unspecified,
13838        /// The data backing this resource is encrypted at rest with a key that is
13839        /// fully managed by Google. No key version or status will be populated.
13840        /// This is the default state.
13841        GoogleDefaultEncryption,
13842        /// The data backing this resource is encrypted at rest with a key that is
13843        /// managed by the customer.
13844        /// The in-use version of the key and its status are populated for
13845        /// CMEK-protected tables.
13846        /// CMEK-protected backups are pinned to the key version that was in use at
13847        /// the time the backup was taken. This key version is populated but its
13848        /// status is not tracked and is reported as `UNKNOWN`.
13849        CustomerManagedEncryption,
13850        /// If set, the enum was initialized with an unknown value.
13851        ///
13852        /// Applications can examine the value using [EncryptionType::value] or
13853        /// [EncryptionType::name].
13854        UnknownValue(encryption_type::UnknownValue),
13855    }
13856
13857    #[doc(hidden)]
13858    pub mod encryption_type {
13859        #[allow(unused_imports)]
13860        use super::*;
13861        #[derive(Clone, Debug, PartialEq)]
13862        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13863    }
13864
13865    impl EncryptionType {
13866        /// Gets the enum value.
13867        ///
13868        /// Returns `None` if the enum contains an unknown value deserialized from
13869        /// the string representation of enums.
13870        pub fn value(&self) -> std::option::Option<i32> {
13871            match self {
13872                Self::Unspecified => std::option::Option::Some(0),
13873                Self::GoogleDefaultEncryption => std::option::Option::Some(1),
13874                Self::CustomerManagedEncryption => std::option::Option::Some(2),
13875                Self::UnknownValue(u) => u.0.value(),
13876            }
13877        }
13878
13879        /// Gets the enum value as a string.
13880        ///
13881        /// Returns `None` if the enum contains an unknown value deserialized from
13882        /// the integer representation of enums.
13883        pub fn name(&self) -> std::option::Option<&str> {
13884            match self {
13885                Self::Unspecified => std::option::Option::Some("ENCRYPTION_TYPE_UNSPECIFIED"),
13886                Self::GoogleDefaultEncryption => {
13887                    std::option::Option::Some("GOOGLE_DEFAULT_ENCRYPTION")
13888                }
13889                Self::CustomerManagedEncryption => {
13890                    std::option::Option::Some("CUSTOMER_MANAGED_ENCRYPTION")
13891                }
13892                Self::UnknownValue(u) => u.0.name(),
13893            }
13894        }
13895    }
13896
13897    impl std::default::Default for EncryptionType {
13898        fn default() -> Self {
13899            use std::convert::From;
13900            Self::from(0)
13901        }
13902    }
13903
13904    impl std::fmt::Display for EncryptionType {
13905        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13906            wkt::internal::display_enum(f, self.name(), self.value())
13907        }
13908    }
13909
13910    impl std::convert::From<i32> for EncryptionType {
13911        fn from(value: i32) -> Self {
13912            match value {
13913                0 => Self::Unspecified,
13914                1 => Self::GoogleDefaultEncryption,
13915                2 => Self::CustomerManagedEncryption,
13916                _ => Self::UnknownValue(encryption_type::UnknownValue(
13917                    wkt::internal::UnknownEnumValue::Integer(value),
13918                )),
13919            }
13920        }
13921    }
13922
13923    impl std::convert::From<&str> for EncryptionType {
13924        fn from(value: &str) -> Self {
13925            use std::string::ToString;
13926            match value {
13927                "ENCRYPTION_TYPE_UNSPECIFIED" => Self::Unspecified,
13928                "GOOGLE_DEFAULT_ENCRYPTION" => Self::GoogleDefaultEncryption,
13929                "CUSTOMER_MANAGED_ENCRYPTION" => Self::CustomerManagedEncryption,
13930                _ => Self::UnknownValue(encryption_type::UnknownValue(
13931                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13932                )),
13933            }
13934        }
13935    }
13936
13937    impl serde::ser::Serialize for EncryptionType {
13938        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13939        where
13940            S: serde::Serializer,
13941        {
13942            match self {
13943                Self::Unspecified => serializer.serialize_i32(0),
13944                Self::GoogleDefaultEncryption => serializer.serialize_i32(1),
13945                Self::CustomerManagedEncryption => serializer.serialize_i32(2),
13946                Self::UnknownValue(u) => u.0.serialize(serializer),
13947            }
13948        }
13949    }
13950
13951    impl<'de> serde::de::Deserialize<'de> for EncryptionType {
13952        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13953        where
13954            D: serde::Deserializer<'de>,
13955        {
13956            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionType>::new(
13957                ".google.bigtable.admin.v2.EncryptionInfo.EncryptionType",
13958            ))
13959        }
13960    }
13961}
13962
13963/// A snapshot of a table at a particular time. A snapshot can be used as a
13964/// checkpoint for data restoration or a data source for a new table.
13965///
13966/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
13967/// feature is not currently available to most Cloud Bigtable customers. This
13968/// feature might be changed in backward-incompatible ways and is not recommended
13969/// for production use. It is not subject to any SLA or deprecation policy.
13970#[derive(Clone, Default, PartialEq)]
13971#[non_exhaustive]
13972pub struct Snapshot {
13973    /// The unique name of the snapshot.
13974    /// Values are of the form
13975    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
13976    pub name: std::string::String,
13977
13978    /// Output only. The source table at the time the snapshot was taken.
13979    pub source_table: std::option::Option<crate::model::Table>,
13980
13981    /// Output only. The size of the data in the source table at the time the
13982    /// snapshot was taken. In some cases, this value may be computed
13983    /// asynchronously via a background process and a placeholder of 0 will be used
13984    /// in the meantime.
13985    pub data_size_bytes: i64,
13986
13987    /// Output only. The time when the snapshot is created.
13988    pub create_time: std::option::Option<wkt::Timestamp>,
13989
13990    /// The time when the snapshot will be deleted. The maximum amount of time a
13991    /// snapshot can stay active is 365 days. If 'ttl' is not specified,
13992    /// the default maximum of 365 days will be used.
13993    pub delete_time: std::option::Option<wkt::Timestamp>,
13994
13995    /// Output only. The current state of the snapshot.
13996    pub state: crate::model::snapshot::State,
13997
13998    /// Description of the snapshot.
13999    pub description: std::string::String,
14000
14001    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14002}
14003
14004impl Snapshot {
14005    pub fn new() -> Self {
14006        std::default::Default::default()
14007    }
14008
14009    /// Sets the value of [name][crate::model::Snapshot::name].
14010    ///
14011    /// # Example
14012    /// ```ignore,no_run
14013    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14014    /// let x = Snapshot::new().set_name("example");
14015    /// ```
14016    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14017        self.name = v.into();
14018        self
14019    }
14020
14021    /// Sets the value of [source_table][crate::model::Snapshot::source_table].
14022    ///
14023    /// # Example
14024    /// ```ignore,no_run
14025    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14026    /// use google_cloud_bigtable_admin_v2::model::Table;
14027    /// let x = Snapshot::new().set_source_table(Table::default()/* use setters */);
14028    /// ```
14029    pub fn set_source_table<T>(mut self, v: T) -> Self
14030    where
14031        T: std::convert::Into<crate::model::Table>,
14032    {
14033        self.source_table = std::option::Option::Some(v.into());
14034        self
14035    }
14036
14037    /// Sets or clears the value of [source_table][crate::model::Snapshot::source_table].
14038    ///
14039    /// # Example
14040    /// ```ignore,no_run
14041    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14042    /// use google_cloud_bigtable_admin_v2::model::Table;
14043    /// let x = Snapshot::new().set_or_clear_source_table(Some(Table::default()/* use setters */));
14044    /// let x = Snapshot::new().set_or_clear_source_table(None::<Table>);
14045    /// ```
14046    pub fn set_or_clear_source_table<T>(mut self, v: std::option::Option<T>) -> Self
14047    where
14048        T: std::convert::Into<crate::model::Table>,
14049    {
14050        self.source_table = v.map(|x| x.into());
14051        self
14052    }
14053
14054    /// Sets the value of [data_size_bytes][crate::model::Snapshot::data_size_bytes].
14055    ///
14056    /// # Example
14057    /// ```ignore,no_run
14058    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14059    /// let x = Snapshot::new().set_data_size_bytes(42);
14060    /// ```
14061    pub fn set_data_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14062        self.data_size_bytes = v.into();
14063        self
14064    }
14065
14066    /// Sets the value of [create_time][crate::model::Snapshot::create_time].
14067    ///
14068    /// # Example
14069    /// ```ignore,no_run
14070    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14071    /// use wkt::Timestamp;
14072    /// let x = Snapshot::new().set_create_time(Timestamp::default()/* use setters */);
14073    /// ```
14074    pub fn set_create_time<T>(mut self, v: T) -> Self
14075    where
14076        T: std::convert::Into<wkt::Timestamp>,
14077    {
14078        self.create_time = std::option::Option::Some(v.into());
14079        self
14080    }
14081
14082    /// Sets or clears the value of [create_time][crate::model::Snapshot::create_time].
14083    ///
14084    /// # Example
14085    /// ```ignore,no_run
14086    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14087    /// use wkt::Timestamp;
14088    /// let x = Snapshot::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14089    /// let x = Snapshot::new().set_or_clear_create_time(None::<Timestamp>);
14090    /// ```
14091    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14092    where
14093        T: std::convert::Into<wkt::Timestamp>,
14094    {
14095        self.create_time = v.map(|x| x.into());
14096        self
14097    }
14098
14099    /// Sets the value of [delete_time][crate::model::Snapshot::delete_time].
14100    ///
14101    /// # Example
14102    /// ```ignore,no_run
14103    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14104    /// use wkt::Timestamp;
14105    /// let x = Snapshot::new().set_delete_time(Timestamp::default()/* use setters */);
14106    /// ```
14107    pub fn set_delete_time<T>(mut self, v: T) -> Self
14108    where
14109        T: std::convert::Into<wkt::Timestamp>,
14110    {
14111        self.delete_time = std::option::Option::Some(v.into());
14112        self
14113    }
14114
14115    /// Sets or clears the value of [delete_time][crate::model::Snapshot::delete_time].
14116    ///
14117    /// # Example
14118    /// ```ignore,no_run
14119    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14120    /// use wkt::Timestamp;
14121    /// let x = Snapshot::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
14122    /// let x = Snapshot::new().set_or_clear_delete_time(None::<Timestamp>);
14123    /// ```
14124    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
14125    where
14126        T: std::convert::Into<wkt::Timestamp>,
14127    {
14128        self.delete_time = v.map(|x| x.into());
14129        self
14130    }
14131
14132    /// Sets the value of [state][crate::model::Snapshot::state].
14133    ///
14134    /// # Example
14135    /// ```ignore,no_run
14136    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14137    /// use google_cloud_bigtable_admin_v2::model::snapshot::State;
14138    /// let x0 = Snapshot::new().set_state(State::Ready);
14139    /// let x1 = Snapshot::new().set_state(State::Creating);
14140    /// ```
14141    pub fn set_state<T: std::convert::Into<crate::model::snapshot::State>>(mut self, v: T) -> Self {
14142        self.state = v.into();
14143        self
14144    }
14145
14146    /// Sets the value of [description][crate::model::Snapshot::description].
14147    ///
14148    /// # Example
14149    /// ```ignore,no_run
14150    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14151    /// let x = Snapshot::new().set_description("example");
14152    /// ```
14153    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14154        self.description = v.into();
14155        self
14156    }
14157}
14158
14159impl wkt::message::Message for Snapshot {
14160    fn typename() -> &'static str {
14161        "type.googleapis.com/google.bigtable.admin.v2.Snapshot"
14162    }
14163}
14164
14165/// Defines additional types related to [Snapshot].
14166pub mod snapshot {
14167    #[allow(unused_imports)]
14168    use super::*;
14169
14170    /// Possible states of a snapshot.
14171    ///
14172    /// # Working with unknown values
14173    ///
14174    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14175    /// additional enum variants at any time. Adding new variants is not considered
14176    /// a breaking change. Applications should write their code in anticipation of:
14177    ///
14178    /// - New values appearing in future releases of the client library, **and**
14179    /// - New values received dynamically, without application changes.
14180    ///
14181    /// Please consult the [Working with enums] section in the user guide for some
14182    /// guidelines.
14183    ///
14184    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14185    #[derive(Clone, Debug, PartialEq)]
14186    #[non_exhaustive]
14187    pub enum State {
14188        /// The state of the snapshot could not be determined.
14189        NotKnown,
14190        /// The snapshot has been successfully created and can serve all requests.
14191        Ready,
14192        /// The snapshot is currently being created, and may be destroyed if the
14193        /// creation process encounters an error. A snapshot may not be restored to a
14194        /// table while it is being created.
14195        Creating,
14196        /// If set, the enum was initialized with an unknown value.
14197        ///
14198        /// Applications can examine the value using [State::value] or
14199        /// [State::name].
14200        UnknownValue(state::UnknownValue),
14201    }
14202
14203    #[doc(hidden)]
14204    pub mod state {
14205        #[allow(unused_imports)]
14206        use super::*;
14207        #[derive(Clone, Debug, PartialEq)]
14208        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14209    }
14210
14211    impl State {
14212        /// Gets the enum value.
14213        ///
14214        /// Returns `None` if the enum contains an unknown value deserialized from
14215        /// the string representation of enums.
14216        pub fn value(&self) -> std::option::Option<i32> {
14217            match self {
14218                Self::NotKnown => std::option::Option::Some(0),
14219                Self::Ready => std::option::Option::Some(1),
14220                Self::Creating => std::option::Option::Some(2),
14221                Self::UnknownValue(u) => u.0.value(),
14222            }
14223        }
14224
14225        /// Gets the enum value as a string.
14226        ///
14227        /// Returns `None` if the enum contains an unknown value deserialized from
14228        /// the integer representation of enums.
14229        pub fn name(&self) -> std::option::Option<&str> {
14230            match self {
14231                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
14232                Self::Ready => std::option::Option::Some("READY"),
14233                Self::Creating => std::option::Option::Some("CREATING"),
14234                Self::UnknownValue(u) => u.0.name(),
14235            }
14236        }
14237    }
14238
14239    impl std::default::Default for State {
14240        fn default() -> Self {
14241            use std::convert::From;
14242            Self::from(0)
14243        }
14244    }
14245
14246    impl std::fmt::Display for State {
14247        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14248            wkt::internal::display_enum(f, self.name(), self.value())
14249        }
14250    }
14251
14252    impl std::convert::From<i32> for State {
14253        fn from(value: i32) -> Self {
14254            match value {
14255                0 => Self::NotKnown,
14256                1 => Self::Ready,
14257                2 => Self::Creating,
14258                _ => Self::UnknownValue(state::UnknownValue(
14259                    wkt::internal::UnknownEnumValue::Integer(value),
14260                )),
14261            }
14262        }
14263    }
14264
14265    impl std::convert::From<&str> for State {
14266        fn from(value: &str) -> Self {
14267            use std::string::ToString;
14268            match value {
14269                "STATE_NOT_KNOWN" => Self::NotKnown,
14270                "READY" => Self::Ready,
14271                "CREATING" => Self::Creating,
14272                _ => Self::UnknownValue(state::UnknownValue(
14273                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14274                )),
14275            }
14276        }
14277    }
14278
14279    impl serde::ser::Serialize for State {
14280        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14281        where
14282            S: serde::Serializer,
14283        {
14284            match self {
14285                Self::NotKnown => serializer.serialize_i32(0),
14286                Self::Ready => serializer.serialize_i32(1),
14287                Self::Creating => serializer.serialize_i32(2),
14288                Self::UnknownValue(u) => u.0.serialize(serializer),
14289            }
14290        }
14291    }
14292
14293    impl<'de> serde::de::Deserialize<'de> for State {
14294        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14295        where
14296            D: serde::Deserializer<'de>,
14297        {
14298            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14299                ".google.bigtable.admin.v2.Snapshot.State",
14300            ))
14301        }
14302    }
14303}
14304
14305/// A backup of a Cloud Bigtable table.
14306#[derive(Clone, Default, PartialEq)]
14307#[non_exhaustive]
14308pub struct Backup {
14309    /// A globally unique identifier for the backup which cannot be
14310    /// changed. Values are of the form
14311    /// `projects/{project}/instances/{instance}/clusters/{cluster}/
14312    /// backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
14313    /// The final segment of the name must be between 1 and 50 characters
14314    /// in length.
14315    ///
14316    /// The backup is stored in the cluster identified by the prefix of the backup
14317    /// name of the form
14318    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
14319    pub name: std::string::String,
14320
14321    /// Required. Immutable. Name of the table from which this backup was created.
14322    /// This needs to be in the same instance as the backup. Values are of the form
14323    /// `projects/{project}/instances/{instance}/tables/{source_table}`.
14324    pub source_table: std::string::String,
14325
14326    /// Output only. Name of the backup from which this backup was copied. If a
14327    /// backup is not created by copying a backup, this field will be empty. Values
14328    /// are of the form:
14329    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
14330    pub source_backup: std::string::String,
14331
14332    /// Required. The expiration time of the backup.
14333    /// When creating a backup or updating its `expire_time`, the value must be
14334    /// greater than the backup creation time by:
14335    ///
14336    /// - At least 6 hours
14337    /// - At most 90 days
14338    ///
14339    /// Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
14340    pub expire_time: std::option::Option<wkt::Timestamp>,
14341
14342    /// Output only. `start_time` is the time that the backup was started
14343    /// (i.e. approximately the time the
14344    /// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]
14345    /// request is received).  The row data in this backup will be no older than
14346    /// this timestamp.
14347    ///
14348    /// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
14349    pub start_time: std::option::Option<wkt::Timestamp>,
14350
14351    /// Output only. `end_time` is the time that the backup was finished. The row
14352    /// data in the backup will be no newer than this timestamp.
14353    pub end_time: std::option::Option<wkt::Timestamp>,
14354
14355    /// Output only. Size of the backup in bytes.
14356    pub size_bytes: i64,
14357
14358    /// Output only. The current state of the backup.
14359    pub state: crate::model::backup::State,
14360
14361    /// Output only. The encryption information for the backup.
14362    pub encryption_info: std::option::Option<crate::model::EncryptionInfo>,
14363
14364    /// Indicates the backup type of the backup.
14365    pub backup_type: crate::model::backup::BackupType,
14366
14367    /// The time at which the hot backup will be converted to a standard backup.
14368    /// Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
14369    /// hot backup to a standard backup. This value must be greater than the backup
14370    /// creation time by:
14371    ///
14372    /// - At least 24 hours
14373    ///
14374    /// This field only applies for hot backups. When creating or updating a
14375    /// standard backup, attempting to set this field will fail the request.
14376    pub hot_to_standard_time: std::option::Option<wkt::Timestamp>,
14377
14378    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14379}
14380
14381impl Backup {
14382    pub fn new() -> Self {
14383        std::default::Default::default()
14384    }
14385
14386    /// Sets the value of [name][crate::model::Backup::name].
14387    ///
14388    /// # Example
14389    /// ```ignore,no_run
14390    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14391    /// let x = Backup::new().set_name("example");
14392    /// ```
14393    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14394        self.name = v.into();
14395        self
14396    }
14397
14398    /// Sets the value of [source_table][crate::model::Backup::source_table].
14399    ///
14400    /// # Example
14401    /// ```ignore,no_run
14402    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14403    /// let x = Backup::new().set_source_table("example");
14404    /// ```
14405    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14406        self.source_table = v.into();
14407        self
14408    }
14409
14410    /// Sets the value of [source_backup][crate::model::Backup::source_backup].
14411    ///
14412    /// # Example
14413    /// ```ignore,no_run
14414    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14415    /// let x = Backup::new().set_source_backup("example");
14416    /// ```
14417    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14418        self.source_backup = v.into();
14419        self
14420    }
14421
14422    /// Sets the value of [expire_time][crate::model::Backup::expire_time].
14423    ///
14424    /// # Example
14425    /// ```ignore,no_run
14426    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14427    /// use wkt::Timestamp;
14428    /// let x = Backup::new().set_expire_time(Timestamp::default()/* use setters */);
14429    /// ```
14430    pub fn set_expire_time<T>(mut self, v: T) -> Self
14431    where
14432        T: std::convert::Into<wkt::Timestamp>,
14433    {
14434        self.expire_time = std::option::Option::Some(v.into());
14435        self
14436    }
14437
14438    /// Sets or clears the value of [expire_time][crate::model::Backup::expire_time].
14439    ///
14440    /// # Example
14441    /// ```ignore,no_run
14442    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14443    /// use wkt::Timestamp;
14444    /// let x = Backup::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
14445    /// let x = Backup::new().set_or_clear_expire_time(None::<Timestamp>);
14446    /// ```
14447    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
14448    where
14449        T: std::convert::Into<wkt::Timestamp>,
14450    {
14451        self.expire_time = v.map(|x| x.into());
14452        self
14453    }
14454
14455    /// Sets the value of [start_time][crate::model::Backup::start_time].
14456    ///
14457    /// # Example
14458    /// ```ignore,no_run
14459    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14460    /// use wkt::Timestamp;
14461    /// let x = Backup::new().set_start_time(Timestamp::default()/* use setters */);
14462    /// ```
14463    pub fn set_start_time<T>(mut self, v: T) -> Self
14464    where
14465        T: std::convert::Into<wkt::Timestamp>,
14466    {
14467        self.start_time = std::option::Option::Some(v.into());
14468        self
14469    }
14470
14471    /// Sets or clears the value of [start_time][crate::model::Backup::start_time].
14472    ///
14473    /// # Example
14474    /// ```ignore,no_run
14475    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14476    /// use wkt::Timestamp;
14477    /// let x = Backup::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
14478    /// let x = Backup::new().set_or_clear_start_time(None::<Timestamp>);
14479    /// ```
14480    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
14481    where
14482        T: std::convert::Into<wkt::Timestamp>,
14483    {
14484        self.start_time = v.map(|x| x.into());
14485        self
14486    }
14487
14488    /// Sets the value of [end_time][crate::model::Backup::end_time].
14489    ///
14490    /// # Example
14491    /// ```ignore,no_run
14492    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14493    /// use wkt::Timestamp;
14494    /// let x = Backup::new().set_end_time(Timestamp::default()/* use setters */);
14495    /// ```
14496    pub fn set_end_time<T>(mut self, v: T) -> Self
14497    where
14498        T: std::convert::Into<wkt::Timestamp>,
14499    {
14500        self.end_time = std::option::Option::Some(v.into());
14501        self
14502    }
14503
14504    /// Sets or clears the value of [end_time][crate::model::Backup::end_time].
14505    ///
14506    /// # Example
14507    /// ```ignore,no_run
14508    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14509    /// use wkt::Timestamp;
14510    /// let x = Backup::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
14511    /// let x = Backup::new().set_or_clear_end_time(None::<Timestamp>);
14512    /// ```
14513    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
14514    where
14515        T: std::convert::Into<wkt::Timestamp>,
14516    {
14517        self.end_time = v.map(|x| x.into());
14518        self
14519    }
14520
14521    /// Sets the value of [size_bytes][crate::model::Backup::size_bytes].
14522    ///
14523    /// # Example
14524    /// ```ignore,no_run
14525    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14526    /// let x = Backup::new().set_size_bytes(42);
14527    /// ```
14528    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14529        self.size_bytes = v.into();
14530        self
14531    }
14532
14533    /// Sets the value of [state][crate::model::Backup::state].
14534    ///
14535    /// # Example
14536    /// ```ignore,no_run
14537    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14538    /// use google_cloud_bigtable_admin_v2::model::backup::State;
14539    /// let x0 = Backup::new().set_state(State::Creating);
14540    /// let x1 = Backup::new().set_state(State::Ready);
14541    /// ```
14542    pub fn set_state<T: std::convert::Into<crate::model::backup::State>>(mut self, v: T) -> Self {
14543        self.state = v.into();
14544        self
14545    }
14546
14547    /// Sets the value of [encryption_info][crate::model::Backup::encryption_info].
14548    ///
14549    /// # Example
14550    /// ```ignore,no_run
14551    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14552    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14553    /// let x = Backup::new().set_encryption_info(EncryptionInfo::default()/* use setters */);
14554    /// ```
14555    pub fn set_encryption_info<T>(mut self, v: T) -> Self
14556    where
14557        T: std::convert::Into<crate::model::EncryptionInfo>,
14558    {
14559        self.encryption_info = std::option::Option::Some(v.into());
14560        self
14561    }
14562
14563    /// Sets or clears the value of [encryption_info][crate::model::Backup::encryption_info].
14564    ///
14565    /// # Example
14566    /// ```ignore,no_run
14567    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14568    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14569    /// let x = Backup::new().set_or_clear_encryption_info(Some(EncryptionInfo::default()/* use setters */));
14570    /// let x = Backup::new().set_or_clear_encryption_info(None::<EncryptionInfo>);
14571    /// ```
14572    pub fn set_or_clear_encryption_info<T>(mut self, v: std::option::Option<T>) -> Self
14573    where
14574        T: std::convert::Into<crate::model::EncryptionInfo>,
14575    {
14576        self.encryption_info = v.map(|x| x.into());
14577        self
14578    }
14579
14580    /// Sets the value of [backup_type][crate::model::Backup::backup_type].
14581    ///
14582    /// # Example
14583    /// ```ignore,no_run
14584    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14585    /// use google_cloud_bigtable_admin_v2::model::backup::BackupType;
14586    /// let x0 = Backup::new().set_backup_type(BackupType::Standard);
14587    /// let x1 = Backup::new().set_backup_type(BackupType::Hot);
14588    /// ```
14589    pub fn set_backup_type<T: std::convert::Into<crate::model::backup::BackupType>>(
14590        mut self,
14591        v: T,
14592    ) -> Self {
14593        self.backup_type = v.into();
14594        self
14595    }
14596
14597    /// Sets the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
14598    ///
14599    /// # Example
14600    /// ```ignore,no_run
14601    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14602    /// use wkt::Timestamp;
14603    /// let x = Backup::new().set_hot_to_standard_time(Timestamp::default()/* use setters */);
14604    /// ```
14605    pub fn set_hot_to_standard_time<T>(mut self, v: T) -> Self
14606    where
14607        T: std::convert::Into<wkt::Timestamp>,
14608    {
14609        self.hot_to_standard_time = std::option::Option::Some(v.into());
14610        self
14611    }
14612
14613    /// Sets or clears the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
14614    ///
14615    /// # Example
14616    /// ```ignore,no_run
14617    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14618    /// use wkt::Timestamp;
14619    /// let x = Backup::new().set_or_clear_hot_to_standard_time(Some(Timestamp::default()/* use setters */));
14620    /// let x = Backup::new().set_or_clear_hot_to_standard_time(None::<Timestamp>);
14621    /// ```
14622    pub fn set_or_clear_hot_to_standard_time<T>(mut self, v: std::option::Option<T>) -> Self
14623    where
14624        T: std::convert::Into<wkt::Timestamp>,
14625    {
14626        self.hot_to_standard_time = v.map(|x| x.into());
14627        self
14628    }
14629}
14630
14631impl wkt::message::Message for Backup {
14632    fn typename() -> &'static str {
14633        "type.googleapis.com/google.bigtable.admin.v2.Backup"
14634    }
14635}
14636
14637/// Defines additional types related to [Backup].
14638pub mod backup {
14639    #[allow(unused_imports)]
14640    use super::*;
14641
14642    /// Indicates the current state of the backup.
14643    ///
14644    /// # Working with unknown values
14645    ///
14646    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14647    /// additional enum variants at any time. Adding new variants is not considered
14648    /// a breaking change. Applications should write their code in anticipation of:
14649    ///
14650    /// - New values appearing in future releases of the client library, **and**
14651    /// - New values received dynamically, without application changes.
14652    ///
14653    /// Please consult the [Working with enums] section in the user guide for some
14654    /// guidelines.
14655    ///
14656    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14657    #[derive(Clone, Debug, PartialEq)]
14658    #[non_exhaustive]
14659    pub enum State {
14660        /// Not specified.
14661        Unspecified,
14662        /// The pending backup is still being created. Operations on the
14663        /// backup may fail with `FAILED_PRECONDITION` in this state.
14664        Creating,
14665        /// The backup is complete and ready for use.
14666        Ready,
14667        /// If set, the enum was initialized with an unknown value.
14668        ///
14669        /// Applications can examine the value using [State::value] or
14670        /// [State::name].
14671        UnknownValue(state::UnknownValue),
14672    }
14673
14674    #[doc(hidden)]
14675    pub mod state {
14676        #[allow(unused_imports)]
14677        use super::*;
14678        #[derive(Clone, Debug, PartialEq)]
14679        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14680    }
14681
14682    impl State {
14683        /// Gets the enum value.
14684        ///
14685        /// Returns `None` if the enum contains an unknown value deserialized from
14686        /// the string representation of enums.
14687        pub fn value(&self) -> std::option::Option<i32> {
14688            match self {
14689                Self::Unspecified => std::option::Option::Some(0),
14690                Self::Creating => std::option::Option::Some(1),
14691                Self::Ready => std::option::Option::Some(2),
14692                Self::UnknownValue(u) => u.0.value(),
14693            }
14694        }
14695
14696        /// Gets the enum value as a string.
14697        ///
14698        /// Returns `None` if the enum contains an unknown value deserialized from
14699        /// the integer representation of enums.
14700        pub fn name(&self) -> std::option::Option<&str> {
14701            match self {
14702                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
14703                Self::Creating => std::option::Option::Some("CREATING"),
14704                Self::Ready => std::option::Option::Some("READY"),
14705                Self::UnknownValue(u) => u.0.name(),
14706            }
14707        }
14708    }
14709
14710    impl std::default::Default for State {
14711        fn default() -> Self {
14712            use std::convert::From;
14713            Self::from(0)
14714        }
14715    }
14716
14717    impl std::fmt::Display for State {
14718        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14719            wkt::internal::display_enum(f, self.name(), self.value())
14720        }
14721    }
14722
14723    impl std::convert::From<i32> for State {
14724        fn from(value: i32) -> Self {
14725            match value {
14726                0 => Self::Unspecified,
14727                1 => Self::Creating,
14728                2 => Self::Ready,
14729                _ => Self::UnknownValue(state::UnknownValue(
14730                    wkt::internal::UnknownEnumValue::Integer(value),
14731                )),
14732            }
14733        }
14734    }
14735
14736    impl std::convert::From<&str> for State {
14737        fn from(value: &str) -> Self {
14738            use std::string::ToString;
14739            match value {
14740                "STATE_UNSPECIFIED" => Self::Unspecified,
14741                "CREATING" => Self::Creating,
14742                "READY" => Self::Ready,
14743                _ => Self::UnknownValue(state::UnknownValue(
14744                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14745                )),
14746            }
14747        }
14748    }
14749
14750    impl serde::ser::Serialize for State {
14751        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14752        where
14753            S: serde::Serializer,
14754        {
14755            match self {
14756                Self::Unspecified => serializer.serialize_i32(0),
14757                Self::Creating => serializer.serialize_i32(1),
14758                Self::Ready => serializer.serialize_i32(2),
14759                Self::UnknownValue(u) => u.0.serialize(serializer),
14760            }
14761        }
14762    }
14763
14764    impl<'de> serde::de::Deserialize<'de> for State {
14765        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14766        where
14767            D: serde::Deserializer<'de>,
14768        {
14769            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14770                ".google.bigtable.admin.v2.Backup.State",
14771            ))
14772        }
14773    }
14774
14775    /// The type of the backup.
14776    ///
14777    /// # Working with unknown values
14778    ///
14779    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14780    /// additional enum variants at any time. Adding new variants is not considered
14781    /// a breaking change. Applications should write their code in anticipation of:
14782    ///
14783    /// - New values appearing in future releases of the client library, **and**
14784    /// - New values received dynamically, without application changes.
14785    ///
14786    /// Please consult the [Working with enums] section in the user guide for some
14787    /// guidelines.
14788    ///
14789    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14790    #[derive(Clone, Debug, PartialEq)]
14791    #[non_exhaustive]
14792    pub enum BackupType {
14793        /// Not specified.
14794        Unspecified,
14795        /// The default type for Cloud Bigtable managed backups. Supported for
14796        /// backups created in both HDD and SSD instances. Requires optimization when
14797        /// restored to a table in an SSD instance.
14798        Standard,
14799        /// A backup type with faster restore to SSD performance. Only supported for
14800        /// backups created in SSD instances. A new SSD table restored from a hot
14801        /// backup reaches production performance more quickly than a standard
14802        /// backup.
14803        Hot,
14804        /// If set, the enum was initialized with an unknown value.
14805        ///
14806        /// Applications can examine the value using [BackupType::value] or
14807        /// [BackupType::name].
14808        UnknownValue(backup_type::UnknownValue),
14809    }
14810
14811    #[doc(hidden)]
14812    pub mod backup_type {
14813        #[allow(unused_imports)]
14814        use super::*;
14815        #[derive(Clone, Debug, PartialEq)]
14816        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14817    }
14818
14819    impl BackupType {
14820        /// Gets the enum value.
14821        ///
14822        /// Returns `None` if the enum contains an unknown value deserialized from
14823        /// the string representation of enums.
14824        pub fn value(&self) -> std::option::Option<i32> {
14825            match self {
14826                Self::Unspecified => std::option::Option::Some(0),
14827                Self::Standard => std::option::Option::Some(1),
14828                Self::Hot => std::option::Option::Some(2),
14829                Self::UnknownValue(u) => u.0.value(),
14830            }
14831        }
14832
14833        /// Gets the enum value as a string.
14834        ///
14835        /// Returns `None` if the enum contains an unknown value deserialized from
14836        /// the integer representation of enums.
14837        pub fn name(&self) -> std::option::Option<&str> {
14838            match self {
14839                Self::Unspecified => std::option::Option::Some("BACKUP_TYPE_UNSPECIFIED"),
14840                Self::Standard => std::option::Option::Some("STANDARD"),
14841                Self::Hot => std::option::Option::Some("HOT"),
14842                Self::UnknownValue(u) => u.0.name(),
14843            }
14844        }
14845    }
14846
14847    impl std::default::Default for BackupType {
14848        fn default() -> Self {
14849            use std::convert::From;
14850            Self::from(0)
14851        }
14852    }
14853
14854    impl std::fmt::Display for BackupType {
14855        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14856            wkt::internal::display_enum(f, self.name(), self.value())
14857        }
14858    }
14859
14860    impl std::convert::From<i32> for BackupType {
14861        fn from(value: i32) -> Self {
14862            match value {
14863                0 => Self::Unspecified,
14864                1 => Self::Standard,
14865                2 => Self::Hot,
14866                _ => Self::UnknownValue(backup_type::UnknownValue(
14867                    wkt::internal::UnknownEnumValue::Integer(value),
14868                )),
14869            }
14870        }
14871    }
14872
14873    impl std::convert::From<&str> for BackupType {
14874        fn from(value: &str) -> Self {
14875            use std::string::ToString;
14876            match value {
14877                "BACKUP_TYPE_UNSPECIFIED" => Self::Unspecified,
14878                "STANDARD" => Self::Standard,
14879                "HOT" => Self::Hot,
14880                _ => Self::UnknownValue(backup_type::UnknownValue(
14881                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14882                )),
14883            }
14884        }
14885    }
14886
14887    impl serde::ser::Serialize for BackupType {
14888        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14889        where
14890            S: serde::Serializer,
14891        {
14892            match self {
14893                Self::Unspecified => serializer.serialize_i32(0),
14894                Self::Standard => serializer.serialize_i32(1),
14895                Self::Hot => serializer.serialize_i32(2),
14896                Self::UnknownValue(u) => u.0.serialize(serializer),
14897            }
14898        }
14899    }
14900
14901    impl<'de> serde::de::Deserialize<'de> for BackupType {
14902        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14903        where
14904            D: serde::Deserializer<'de>,
14905        {
14906            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupType>::new(
14907                ".google.bigtable.admin.v2.Backup.BackupType",
14908            ))
14909        }
14910    }
14911}
14912
14913/// Information about a backup.
14914#[derive(Clone, Default, PartialEq)]
14915#[non_exhaustive]
14916pub struct BackupInfo {
14917    /// Output only. Name of the backup.
14918    pub backup: std::string::String,
14919
14920    /// Output only. The time that the backup was started. Row data in the backup
14921    /// will be no older than this timestamp.
14922    pub start_time: std::option::Option<wkt::Timestamp>,
14923
14924    /// Output only. This time that the backup was finished. Row data in the
14925    /// backup will be no newer than this timestamp.
14926    pub end_time: std::option::Option<wkt::Timestamp>,
14927
14928    /// Output only. Name of the table the backup was created from.
14929    pub source_table: std::string::String,
14930
14931    /// Output only. Name of the backup from which this backup was copied. If a
14932    /// backup is not created by copying a backup, this field will be empty. Values
14933    /// are of the form:
14934    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
14935    pub source_backup: std::string::String,
14936
14937    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14938}
14939
14940impl BackupInfo {
14941    pub fn new() -> Self {
14942        std::default::Default::default()
14943    }
14944
14945    /// Sets the value of [backup][crate::model::BackupInfo::backup].
14946    ///
14947    /// # Example
14948    /// ```ignore,no_run
14949    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
14950    /// let x = BackupInfo::new().set_backup("example");
14951    /// ```
14952    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14953        self.backup = v.into();
14954        self
14955    }
14956
14957    /// Sets the value of [start_time][crate::model::BackupInfo::start_time].
14958    ///
14959    /// # Example
14960    /// ```ignore,no_run
14961    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
14962    /// use wkt::Timestamp;
14963    /// let x = BackupInfo::new().set_start_time(Timestamp::default()/* use setters */);
14964    /// ```
14965    pub fn set_start_time<T>(mut self, v: T) -> Self
14966    where
14967        T: std::convert::Into<wkt::Timestamp>,
14968    {
14969        self.start_time = std::option::Option::Some(v.into());
14970        self
14971    }
14972
14973    /// Sets or clears the value of [start_time][crate::model::BackupInfo::start_time].
14974    ///
14975    /// # Example
14976    /// ```ignore,no_run
14977    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
14978    /// use wkt::Timestamp;
14979    /// let x = BackupInfo::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
14980    /// let x = BackupInfo::new().set_or_clear_start_time(None::<Timestamp>);
14981    /// ```
14982    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
14983    where
14984        T: std::convert::Into<wkt::Timestamp>,
14985    {
14986        self.start_time = v.map(|x| x.into());
14987        self
14988    }
14989
14990    /// Sets the value of [end_time][crate::model::BackupInfo::end_time].
14991    ///
14992    /// # Example
14993    /// ```ignore,no_run
14994    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
14995    /// use wkt::Timestamp;
14996    /// let x = BackupInfo::new().set_end_time(Timestamp::default()/* use setters */);
14997    /// ```
14998    pub fn set_end_time<T>(mut self, v: T) -> Self
14999    where
15000        T: std::convert::Into<wkt::Timestamp>,
15001    {
15002        self.end_time = std::option::Option::Some(v.into());
15003        self
15004    }
15005
15006    /// Sets or clears the value of [end_time][crate::model::BackupInfo::end_time].
15007    ///
15008    /// # Example
15009    /// ```ignore,no_run
15010    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15011    /// use wkt::Timestamp;
15012    /// let x = BackupInfo::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15013    /// let x = BackupInfo::new().set_or_clear_end_time(None::<Timestamp>);
15014    /// ```
15015    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15016    where
15017        T: std::convert::Into<wkt::Timestamp>,
15018    {
15019        self.end_time = v.map(|x| x.into());
15020        self
15021    }
15022
15023    /// Sets the value of [source_table][crate::model::BackupInfo::source_table].
15024    ///
15025    /// # Example
15026    /// ```ignore,no_run
15027    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15028    /// let x = BackupInfo::new().set_source_table("example");
15029    /// ```
15030    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15031        self.source_table = v.into();
15032        self
15033    }
15034
15035    /// Sets the value of [source_backup][crate::model::BackupInfo::source_backup].
15036    ///
15037    /// # Example
15038    /// ```ignore,no_run
15039    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15040    /// let x = BackupInfo::new().set_source_backup("example");
15041    /// ```
15042    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15043        self.source_backup = v.into();
15044        self
15045    }
15046}
15047
15048impl wkt::message::Message for BackupInfo {
15049    fn typename() -> &'static str {
15050        "type.googleapis.com/google.bigtable.admin.v2.BackupInfo"
15051    }
15052}
15053
15054/// Represents a protobuf schema.
15055#[derive(Clone, Default, PartialEq)]
15056#[non_exhaustive]
15057pub struct ProtoSchema {
15058    /// Required. Contains a protobuf-serialized
15059    /// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
15060    /// which could include multiple proto files.
15061    /// To generate it, [install](https://grpc.io/docs/protoc-installation/) and
15062    /// run `protoc` with
15063    /// `--include_imports` and `--descriptor_set_out`. For example, to generate
15064    /// for moon/shot/app.proto, run
15065    ///
15066    /// ```norust
15067    /// $protoc  --proto_path=/app_path --proto_path=/lib_path \
15068    ///          --include_imports \
15069    ///          --descriptor_set_out=descriptors.pb \
15070    ///          moon/shot/app.proto
15071    /// ```
15072    ///
15073    /// For more details, see protobuffer [self
15074    /// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
15075    pub proto_descriptors: ::bytes::Bytes,
15076
15077    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15078}
15079
15080impl ProtoSchema {
15081    pub fn new() -> Self {
15082        std::default::Default::default()
15083    }
15084
15085    /// Sets the value of [proto_descriptors][crate::model::ProtoSchema::proto_descriptors].
15086    ///
15087    /// # Example
15088    /// ```ignore,no_run
15089    /// # use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15090    /// let x = ProtoSchema::new().set_proto_descriptors(bytes::Bytes::from_static(b"example"));
15091    /// ```
15092    pub fn set_proto_descriptors<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
15093        self.proto_descriptors = v.into();
15094        self
15095    }
15096}
15097
15098impl wkt::message::Message for ProtoSchema {
15099    fn typename() -> &'static str {
15100        "type.googleapis.com/google.bigtable.admin.v2.ProtoSchema"
15101    }
15102}
15103
15104/// A named collection of related schemas.
15105#[derive(Clone, Default, PartialEq)]
15106#[non_exhaustive]
15107pub struct SchemaBundle {
15108    /// Identifier. The unique name identifying this schema bundle.
15109    /// Values are of the form
15110    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
15111    pub name: std::string::String,
15112
15113    /// Optional. The etag for this schema bundle.
15114    /// This may be sent on update and delete requests to ensure the
15115    /// client has an up-to-date value before proceeding. The server
15116    /// returns an ABORTED error on a mismatched etag.
15117    pub etag: std::string::String,
15118
15119    /// The type of this schema bundle. The oneof case cannot change after
15120    /// creation.
15121    pub r#type: std::option::Option<crate::model::schema_bundle::Type>,
15122
15123    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15124}
15125
15126impl SchemaBundle {
15127    pub fn new() -> Self {
15128        std::default::Default::default()
15129    }
15130
15131    /// Sets the value of [name][crate::model::SchemaBundle::name].
15132    ///
15133    /// # Example
15134    /// ```ignore,no_run
15135    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15136    /// let x = SchemaBundle::new().set_name("example");
15137    /// ```
15138    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15139        self.name = v.into();
15140        self
15141    }
15142
15143    /// Sets the value of [etag][crate::model::SchemaBundle::etag].
15144    ///
15145    /// # Example
15146    /// ```ignore,no_run
15147    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15148    /// let x = SchemaBundle::new().set_etag("example");
15149    /// ```
15150    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15151        self.etag = v.into();
15152        self
15153    }
15154
15155    /// Sets the value of [r#type][crate::model::SchemaBundle::type].
15156    ///
15157    /// Note that all the setters affecting `r#type` are mutually
15158    /// exclusive.
15159    ///
15160    /// # Example
15161    /// ```ignore,no_run
15162    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15163    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15164    /// let x = SchemaBundle::new().set_type(Some(
15165    ///     google_cloud_bigtable_admin_v2::model::schema_bundle::Type::ProtoSchema(ProtoSchema::default().into())));
15166    /// ```
15167    pub fn set_type<
15168        T: std::convert::Into<std::option::Option<crate::model::schema_bundle::Type>>,
15169    >(
15170        mut self,
15171        v: T,
15172    ) -> Self {
15173        self.r#type = v.into();
15174        self
15175    }
15176
15177    /// The value of [r#type][crate::model::SchemaBundle::r#type]
15178    /// if it holds a `ProtoSchema`, `None` if the field is not set or
15179    /// holds a different branch.
15180    pub fn proto_schema(&self) -> std::option::Option<&std::boxed::Box<crate::model::ProtoSchema>> {
15181        #[allow(unreachable_patterns)]
15182        self.r#type.as_ref().and_then(|v| match v {
15183            crate::model::schema_bundle::Type::ProtoSchema(v) => std::option::Option::Some(v),
15184            _ => std::option::Option::None,
15185        })
15186    }
15187
15188    /// Sets the value of [r#type][crate::model::SchemaBundle::r#type]
15189    /// to hold a `ProtoSchema`.
15190    ///
15191    /// Note that all the setters affecting `r#type` are
15192    /// mutually exclusive.
15193    ///
15194    /// # Example
15195    /// ```ignore,no_run
15196    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15197    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15198    /// let x = SchemaBundle::new().set_proto_schema(ProtoSchema::default()/* use setters */);
15199    /// assert!(x.proto_schema().is_some());
15200    /// ```
15201    pub fn set_proto_schema<T: std::convert::Into<std::boxed::Box<crate::model::ProtoSchema>>>(
15202        mut self,
15203        v: T,
15204    ) -> Self {
15205        self.r#type =
15206            std::option::Option::Some(crate::model::schema_bundle::Type::ProtoSchema(v.into()));
15207        self
15208    }
15209}
15210
15211impl wkt::message::Message for SchemaBundle {
15212    fn typename() -> &'static str {
15213        "type.googleapis.com/google.bigtable.admin.v2.SchemaBundle"
15214    }
15215}
15216
15217/// Defines additional types related to [SchemaBundle].
15218pub mod schema_bundle {
15219    #[allow(unused_imports)]
15220    use super::*;
15221
15222    /// The type of this schema bundle. The oneof case cannot change after
15223    /// creation.
15224    #[derive(Clone, Debug, PartialEq)]
15225    #[non_exhaustive]
15226    pub enum Type {
15227        /// Schema for Protobufs.
15228        ProtoSchema(std::boxed::Box<crate::model::ProtoSchema>),
15229    }
15230}
15231
15232/// `Type` represents the type of data that is written to, read from, or stored
15233/// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
15234/// familiarity and consistency across products and features.
15235///
15236/// For compatibility with Bigtable's existing untyped APIs, each `Type` includes
15237/// an `Encoding` which describes how to convert to or from the underlying data.
15238///
15239/// Each encoding can operate in one of two modes:
15240///
15241/// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)`
15242///   if and only if `X <= Y`. This is useful anywhere sort order is important,
15243///   for example when encoding keys.
15244/// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then
15245///   `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For
15246///   example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}"
15247///   are valid encodings of the same JSON value.
15248///
15249/// The API clearly documents which mode is used wherever an encoding can be
15250/// configured. Each encoding also documents which values are supported in which
15251/// modes. For example, when encoding INT64 as a numeric STRING, negative numbers
15252/// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but
15253/// `STRING("-00001") > STRING("00001")`.
15254#[derive(Clone, Default, PartialEq)]
15255#[non_exhaustive]
15256pub struct Type {
15257    /// The kind of type that this represents.
15258    pub kind: std::option::Option<crate::model::r#type::Kind>,
15259
15260    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15261}
15262
15263impl Type {
15264    pub fn new() -> Self {
15265        std::default::Default::default()
15266    }
15267
15268    /// Sets the value of [kind][crate::model::Type::kind].
15269    ///
15270    /// Note that all the setters affecting `kind` are mutually
15271    /// exclusive.
15272    ///
15273    /// # Example
15274    /// ```ignore,no_run
15275    /// # use google_cloud_bigtable_admin_v2::model::Type;
15276    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
15277    /// let x = Type::new().set_kind(Some(
15278    ///     google_cloud_bigtable_admin_v2::model::r#type::Kind::BytesType(Bytes::default().into())));
15279    /// ```
15280    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::r#type::Kind>>>(
15281        mut self,
15282        v: T,
15283    ) -> Self {
15284        self.kind = v.into();
15285        self
15286    }
15287
15288    /// The value of [kind][crate::model::Type::kind]
15289    /// if it holds a `BytesType`, `None` if the field is not set or
15290    /// holds a different branch.
15291    pub fn bytes_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bytes>> {
15292        #[allow(unreachable_patterns)]
15293        self.kind.as_ref().and_then(|v| match v {
15294            crate::model::r#type::Kind::BytesType(v) => std::option::Option::Some(v),
15295            _ => std::option::Option::None,
15296        })
15297    }
15298
15299    /// Sets the value of [kind][crate::model::Type::kind]
15300    /// to hold a `BytesType`.
15301    ///
15302    /// Note that all the setters affecting `kind` are
15303    /// mutually exclusive.
15304    ///
15305    /// # Example
15306    /// ```ignore,no_run
15307    /// # use google_cloud_bigtable_admin_v2::model::Type;
15308    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
15309    /// let x = Type::new().set_bytes_type(Bytes::default()/* use setters */);
15310    /// assert!(x.bytes_type().is_some());
15311    /// assert!(x.string_type().is_none());
15312    /// assert!(x.int64_type().is_none());
15313    /// assert!(x.float32_type().is_none());
15314    /// assert!(x.float64_type().is_none());
15315    /// assert!(x.bool_type().is_none());
15316    /// assert!(x.timestamp_type().is_none());
15317    /// assert!(x.date_type().is_none());
15318    /// assert!(x.aggregate_type().is_none());
15319    /// assert!(x.struct_type().is_none());
15320    /// assert!(x.array_type().is_none());
15321    /// assert!(x.map_type().is_none());
15322    /// assert!(x.proto_type().is_none());
15323    /// assert!(x.enum_type().is_none());
15324    /// ```
15325    pub fn set_bytes_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bytes>>>(
15326        mut self,
15327        v: T,
15328    ) -> Self {
15329        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BytesType(v.into()));
15330        self
15331    }
15332
15333    /// The value of [kind][crate::model::Type::kind]
15334    /// if it holds a `StringType`, `None` if the field is not set or
15335    /// holds a different branch.
15336    pub fn string_type(
15337        &self,
15338    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::String>> {
15339        #[allow(unreachable_patterns)]
15340        self.kind.as_ref().and_then(|v| match v {
15341            crate::model::r#type::Kind::StringType(v) => std::option::Option::Some(v),
15342            _ => std::option::Option::None,
15343        })
15344    }
15345
15346    /// Sets the value of [kind][crate::model::Type::kind]
15347    /// to hold a `StringType`.
15348    ///
15349    /// Note that all the setters affecting `kind` are
15350    /// mutually exclusive.
15351    ///
15352    /// # Example
15353    /// ```ignore,no_run
15354    /// # use google_cloud_bigtable_admin_v2::model::Type;
15355    /// use google_cloud_bigtable_admin_v2::model::r#type::String;
15356    /// let x = Type::new().set_string_type(String::default()/* use setters */);
15357    /// assert!(x.string_type().is_some());
15358    /// assert!(x.bytes_type().is_none());
15359    /// assert!(x.int64_type().is_none());
15360    /// assert!(x.float32_type().is_none());
15361    /// assert!(x.float64_type().is_none());
15362    /// assert!(x.bool_type().is_none());
15363    /// assert!(x.timestamp_type().is_none());
15364    /// assert!(x.date_type().is_none());
15365    /// assert!(x.aggregate_type().is_none());
15366    /// assert!(x.struct_type().is_none());
15367    /// assert!(x.array_type().is_none());
15368    /// assert!(x.map_type().is_none());
15369    /// assert!(x.proto_type().is_none());
15370    /// assert!(x.enum_type().is_none());
15371    /// ```
15372    pub fn set_string_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::String>>>(
15373        mut self,
15374        v: T,
15375    ) -> Self {
15376        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StringType(v.into()));
15377        self
15378    }
15379
15380    /// The value of [kind][crate::model::Type::kind]
15381    /// if it holds a `Int64Type`, `None` if the field is not set or
15382    /// holds a different branch.
15383    pub fn int64_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Int64>> {
15384        #[allow(unreachable_patterns)]
15385        self.kind.as_ref().and_then(|v| match v {
15386            crate::model::r#type::Kind::Int64Type(v) => std::option::Option::Some(v),
15387            _ => std::option::Option::None,
15388        })
15389    }
15390
15391    /// Sets the value of [kind][crate::model::Type::kind]
15392    /// to hold a `Int64Type`.
15393    ///
15394    /// Note that all the setters affecting `kind` are
15395    /// mutually exclusive.
15396    ///
15397    /// # Example
15398    /// ```ignore,no_run
15399    /// # use google_cloud_bigtable_admin_v2::model::Type;
15400    /// use google_cloud_bigtable_admin_v2::model::r#type::Int64;
15401    /// let x = Type::new().set_int64_type(Int64::default()/* use setters */);
15402    /// assert!(x.int64_type().is_some());
15403    /// assert!(x.bytes_type().is_none());
15404    /// assert!(x.string_type().is_none());
15405    /// assert!(x.float32_type().is_none());
15406    /// assert!(x.float64_type().is_none());
15407    /// assert!(x.bool_type().is_none());
15408    /// assert!(x.timestamp_type().is_none());
15409    /// assert!(x.date_type().is_none());
15410    /// assert!(x.aggregate_type().is_none());
15411    /// assert!(x.struct_type().is_none());
15412    /// assert!(x.array_type().is_none());
15413    /// assert!(x.map_type().is_none());
15414    /// assert!(x.proto_type().is_none());
15415    /// assert!(x.enum_type().is_none());
15416    /// ```
15417    pub fn set_int64_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Int64>>>(
15418        mut self,
15419        v: T,
15420    ) -> Self {
15421        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Int64Type(v.into()));
15422        self
15423    }
15424
15425    /// The value of [kind][crate::model::Type::kind]
15426    /// if it holds a `Float32Type`, `None` if the field is not set or
15427    /// holds a different branch.
15428    pub fn float32_type(
15429        &self,
15430    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float32>> {
15431        #[allow(unreachable_patterns)]
15432        self.kind.as_ref().and_then(|v| match v {
15433            crate::model::r#type::Kind::Float32Type(v) => std::option::Option::Some(v),
15434            _ => std::option::Option::None,
15435        })
15436    }
15437
15438    /// Sets the value of [kind][crate::model::Type::kind]
15439    /// to hold a `Float32Type`.
15440    ///
15441    /// Note that all the setters affecting `kind` are
15442    /// mutually exclusive.
15443    ///
15444    /// # Example
15445    /// ```ignore,no_run
15446    /// # use google_cloud_bigtable_admin_v2::model::Type;
15447    /// use google_cloud_bigtable_admin_v2::model::r#type::Float32;
15448    /// let x = Type::new().set_float32_type(Float32::default()/* use setters */);
15449    /// assert!(x.float32_type().is_some());
15450    /// assert!(x.bytes_type().is_none());
15451    /// assert!(x.string_type().is_none());
15452    /// assert!(x.int64_type().is_none());
15453    /// assert!(x.float64_type().is_none());
15454    /// assert!(x.bool_type().is_none());
15455    /// assert!(x.timestamp_type().is_none());
15456    /// assert!(x.date_type().is_none());
15457    /// assert!(x.aggregate_type().is_none());
15458    /// assert!(x.struct_type().is_none());
15459    /// assert!(x.array_type().is_none());
15460    /// assert!(x.map_type().is_none());
15461    /// assert!(x.proto_type().is_none());
15462    /// assert!(x.enum_type().is_none());
15463    /// ```
15464    pub fn set_float32_type<
15465        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float32>>,
15466    >(
15467        mut self,
15468        v: T,
15469    ) -> Self {
15470        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float32Type(v.into()));
15471        self
15472    }
15473
15474    /// The value of [kind][crate::model::Type::kind]
15475    /// if it holds a `Float64Type`, `None` if the field is not set or
15476    /// holds a different branch.
15477    pub fn float64_type(
15478        &self,
15479    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float64>> {
15480        #[allow(unreachable_patterns)]
15481        self.kind.as_ref().and_then(|v| match v {
15482            crate::model::r#type::Kind::Float64Type(v) => std::option::Option::Some(v),
15483            _ => std::option::Option::None,
15484        })
15485    }
15486
15487    /// Sets the value of [kind][crate::model::Type::kind]
15488    /// to hold a `Float64Type`.
15489    ///
15490    /// Note that all the setters affecting `kind` are
15491    /// mutually exclusive.
15492    ///
15493    /// # Example
15494    /// ```ignore,no_run
15495    /// # use google_cloud_bigtable_admin_v2::model::Type;
15496    /// use google_cloud_bigtable_admin_v2::model::r#type::Float64;
15497    /// let x = Type::new().set_float64_type(Float64::default()/* use setters */);
15498    /// assert!(x.float64_type().is_some());
15499    /// assert!(x.bytes_type().is_none());
15500    /// assert!(x.string_type().is_none());
15501    /// assert!(x.int64_type().is_none());
15502    /// assert!(x.float32_type().is_none());
15503    /// assert!(x.bool_type().is_none());
15504    /// assert!(x.timestamp_type().is_none());
15505    /// assert!(x.date_type().is_none());
15506    /// assert!(x.aggregate_type().is_none());
15507    /// assert!(x.struct_type().is_none());
15508    /// assert!(x.array_type().is_none());
15509    /// assert!(x.map_type().is_none());
15510    /// assert!(x.proto_type().is_none());
15511    /// assert!(x.enum_type().is_none());
15512    /// ```
15513    pub fn set_float64_type<
15514        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float64>>,
15515    >(
15516        mut self,
15517        v: T,
15518    ) -> Self {
15519        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float64Type(v.into()));
15520        self
15521    }
15522
15523    /// The value of [kind][crate::model::Type::kind]
15524    /// if it holds a `BoolType`, `None` if the field is not set or
15525    /// holds a different branch.
15526    pub fn bool_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bool>> {
15527        #[allow(unreachable_patterns)]
15528        self.kind.as_ref().and_then(|v| match v {
15529            crate::model::r#type::Kind::BoolType(v) => std::option::Option::Some(v),
15530            _ => std::option::Option::None,
15531        })
15532    }
15533
15534    /// Sets the value of [kind][crate::model::Type::kind]
15535    /// to hold a `BoolType`.
15536    ///
15537    /// Note that all the setters affecting `kind` are
15538    /// mutually exclusive.
15539    ///
15540    /// # Example
15541    /// ```ignore,no_run
15542    /// # use google_cloud_bigtable_admin_v2::model::Type;
15543    /// use google_cloud_bigtable_admin_v2::model::r#type::Bool;
15544    /// let x = Type::new().set_bool_type(Bool::default()/* use setters */);
15545    /// assert!(x.bool_type().is_some());
15546    /// assert!(x.bytes_type().is_none());
15547    /// assert!(x.string_type().is_none());
15548    /// assert!(x.int64_type().is_none());
15549    /// assert!(x.float32_type().is_none());
15550    /// assert!(x.float64_type().is_none());
15551    /// assert!(x.timestamp_type().is_none());
15552    /// assert!(x.date_type().is_none());
15553    /// assert!(x.aggregate_type().is_none());
15554    /// assert!(x.struct_type().is_none());
15555    /// assert!(x.array_type().is_none());
15556    /// assert!(x.map_type().is_none());
15557    /// assert!(x.proto_type().is_none());
15558    /// assert!(x.enum_type().is_none());
15559    /// ```
15560    pub fn set_bool_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bool>>>(
15561        mut self,
15562        v: T,
15563    ) -> Self {
15564        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BoolType(v.into()));
15565        self
15566    }
15567
15568    /// The value of [kind][crate::model::Type::kind]
15569    /// if it holds a `TimestampType`, `None` if the field is not set or
15570    /// holds a different branch.
15571    pub fn timestamp_type(
15572        &self,
15573    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Timestamp>> {
15574        #[allow(unreachable_patterns)]
15575        self.kind.as_ref().and_then(|v| match v {
15576            crate::model::r#type::Kind::TimestampType(v) => std::option::Option::Some(v),
15577            _ => std::option::Option::None,
15578        })
15579    }
15580
15581    /// Sets the value of [kind][crate::model::Type::kind]
15582    /// to hold a `TimestampType`.
15583    ///
15584    /// Note that all the setters affecting `kind` are
15585    /// mutually exclusive.
15586    ///
15587    /// # Example
15588    /// ```ignore,no_run
15589    /// # use google_cloud_bigtable_admin_v2::model::Type;
15590    /// use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
15591    /// let x = Type::new().set_timestamp_type(Timestamp::default()/* use setters */);
15592    /// assert!(x.timestamp_type().is_some());
15593    /// assert!(x.bytes_type().is_none());
15594    /// assert!(x.string_type().is_none());
15595    /// assert!(x.int64_type().is_none());
15596    /// assert!(x.float32_type().is_none());
15597    /// assert!(x.float64_type().is_none());
15598    /// assert!(x.bool_type().is_none());
15599    /// assert!(x.date_type().is_none());
15600    /// assert!(x.aggregate_type().is_none());
15601    /// assert!(x.struct_type().is_none());
15602    /// assert!(x.array_type().is_none());
15603    /// assert!(x.map_type().is_none());
15604    /// assert!(x.proto_type().is_none());
15605    /// assert!(x.enum_type().is_none());
15606    /// ```
15607    pub fn set_timestamp_type<
15608        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Timestamp>>,
15609    >(
15610        mut self,
15611        v: T,
15612    ) -> Self {
15613        self.kind = std::option::Option::Some(crate::model::r#type::Kind::TimestampType(v.into()));
15614        self
15615    }
15616
15617    /// The value of [kind][crate::model::Type::kind]
15618    /// if it holds a `DateType`, `None` if the field is not set or
15619    /// holds a different branch.
15620    pub fn date_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Date>> {
15621        #[allow(unreachable_patterns)]
15622        self.kind.as_ref().and_then(|v| match v {
15623            crate::model::r#type::Kind::DateType(v) => std::option::Option::Some(v),
15624            _ => std::option::Option::None,
15625        })
15626    }
15627
15628    /// Sets the value of [kind][crate::model::Type::kind]
15629    /// to hold a `DateType`.
15630    ///
15631    /// Note that all the setters affecting `kind` are
15632    /// mutually exclusive.
15633    ///
15634    /// # Example
15635    /// ```ignore,no_run
15636    /// # use google_cloud_bigtable_admin_v2::model::Type;
15637    /// use google_cloud_bigtable_admin_v2::model::r#type::Date;
15638    /// let x = Type::new().set_date_type(Date::default()/* use setters */);
15639    /// assert!(x.date_type().is_some());
15640    /// assert!(x.bytes_type().is_none());
15641    /// assert!(x.string_type().is_none());
15642    /// assert!(x.int64_type().is_none());
15643    /// assert!(x.float32_type().is_none());
15644    /// assert!(x.float64_type().is_none());
15645    /// assert!(x.bool_type().is_none());
15646    /// assert!(x.timestamp_type().is_none());
15647    /// assert!(x.aggregate_type().is_none());
15648    /// assert!(x.struct_type().is_none());
15649    /// assert!(x.array_type().is_none());
15650    /// assert!(x.map_type().is_none());
15651    /// assert!(x.proto_type().is_none());
15652    /// assert!(x.enum_type().is_none());
15653    /// ```
15654    pub fn set_date_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Date>>>(
15655        mut self,
15656        v: T,
15657    ) -> Self {
15658        self.kind = std::option::Option::Some(crate::model::r#type::Kind::DateType(v.into()));
15659        self
15660    }
15661
15662    /// The value of [kind][crate::model::Type::kind]
15663    /// if it holds a `AggregateType`, `None` if the field is not set or
15664    /// holds a different branch.
15665    pub fn aggregate_type(
15666        &self,
15667    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Aggregate>> {
15668        #[allow(unreachable_patterns)]
15669        self.kind.as_ref().and_then(|v| match v {
15670            crate::model::r#type::Kind::AggregateType(v) => std::option::Option::Some(v),
15671            _ => std::option::Option::None,
15672        })
15673    }
15674
15675    /// Sets the value of [kind][crate::model::Type::kind]
15676    /// to hold a `AggregateType`.
15677    ///
15678    /// Note that all the setters affecting `kind` are
15679    /// mutually exclusive.
15680    ///
15681    /// # Example
15682    /// ```ignore,no_run
15683    /// # use google_cloud_bigtable_admin_v2::model::Type;
15684    /// use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
15685    /// let x = Type::new().set_aggregate_type(Aggregate::default()/* use setters */);
15686    /// assert!(x.aggregate_type().is_some());
15687    /// assert!(x.bytes_type().is_none());
15688    /// assert!(x.string_type().is_none());
15689    /// assert!(x.int64_type().is_none());
15690    /// assert!(x.float32_type().is_none());
15691    /// assert!(x.float64_type().is_none());
15692    /// assert!(x.bool_type().is_none());
15693    /// assert!(x.timestamp_type().is_none());
15694    /// assert!(x.date_type().is_none());
15695    /// assert!(x.struct_type().is_none());
15696    /// assert!(x.array_type().is_none());
15697    /// assert!(x.map_type().is_none());
15698    /// assert!(x.proto_type().is_none());
15699    /// assert!(x.enum_type().is_none());
15700    /// ```
15701    pub fn set_aggregate_type<
15702        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Aggregate>>,
15703    >(
15704        mut self,
15705        v: T,
15706    ) -> Self {
15707        self.kind = std::option::Option::Some(crate::model::r#type::Kind::AggregateType(v.into()));
15708        self
15709    }
15710
15711    /// The value of [kind][crate::model::Type::kind]
15712    /// if it holds a `StructType`, `None` if the field is not set or
15713    /// holds a different branch.
15714    pub fn struct_type(
15715        &self,
15716    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Struct>> {
15717        #[allow(unreachable_patterns)]
15718        self.kind.as_ref().and_then(|v| match v {
15719            crate::model::r#type::Kind::StructType(v) => std::option::Option::Some(v),
15720            _ => std::option::Option::None,
15721        })
15722    }
15723
15724    /// Sets the value of [kind][crate::model::Type::kind]
15725    /// to hold a `StructType`.
15726    ///
15727    /// Note that all the setters affecting `kind` are
15728    /// mutually exclusive.
15729    ///
15730    /// # Example
15731    /// ```ignore,no_run
15732    /// # use google_cloud_bigtable_admin_v2::model::Type;
15733    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
15734    /// let x = Type::new().set_struct_type(Struct::default()/* use setters */);
15735    /// assert!(x.struct_type().is_some());
15736    /// assert!(x.bytes_type().is_none());
15737    /// assert!(x.string_type().is_none());
15738    /// assert!(x.int64_type().is_none());
15739    /// assert!(x.float32_type().is_none());
15740    /// assert!(x.float64_type().is_none());
15741    /// assert!(x.bool_type().is_none());
15742    /// assert!(x.timestamp_type().is_none());
15743    /// assert!(x.date_type().is_none());
15744    /// assert!(x.aggregate_type().is_none());
15745    /// assert!(x.array_type().is_none());
15746    /// assert!(x.map_type().is_none());
15747    /// assert!(x.proto_type().is_none());
15748    /// assert!(x.enum_type().is_none());
15749    /// ```
15750    pub fn set_struct_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Struct>>>(
15751        mut self,
15752        v: T,
15753    ) -> Self {
15754        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StructType(v.into()));
15755        self
15756    }
15757
15758    /// The value of [kind][crate::model::Type::kind]
15759    /// if it holds a `ArrayType`, `None` if the field is not set or
15760    /// holds a different branch.
15761    pub fn array_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Array>> {
15762        #[allow(unreachable_patterns)]
15763        self.kind.as_ref().and_then(|v| match v {
15764            crate::model::r#type::Kind::ArrayType(v) => std::option::Option::Some(v),
15765            _ => std::option::Option::None,
15766        })
15767    }
15768
15769    /// Sets the value of [kind][crate::model::Type::kind]
15770    /// to hold a `ArrayType`.
15771    ///
15772    /// Note that all the setters affecting `kind` are
15773    /// mutually exclusive.
15774    ///
15775    /// # Example
15776    /// ```ignore,no_run
15777    /// # use google_cloud_bigtable_admin_v2::model::Type;
15778    /// use google_cloud_bigtable_admin_v2::model::r#type::Array;
15779    /// let x = Type::new().set_array_type(Array::default()/* use setters */);
15780    /// assert!(x.array_type().is_some());
15781    /// assert!(x.bytes_type().is_none());
15782    /// assert!(x.string_type().is_none());
15783    /// assert!(x.int64_type().is_none());
15784    /// assert!(x.float32_type().is_none());
15785    /// assert!(x.float64_type().is_none());
15786    /// assert!(x.bool_type().is_none());
15787    /// assert!(x.timestamp_type().is_none());
15788    /// assert!(x.date_type().is_none());
15789    /// assert!(x.aggregate_type().is_none());
15790    /// assert!(x.struct_type().is_none());
15791    /// assert!(x.map_type().is_none());
15792    /// assert!(x.proto_type().is_none());
15793    /// assert!(x.enum_type().is_none());
15794    /// ```
15795    pub fn set_array_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Array>>>(
15796        mut self,
15797        v: T,
15798    ) -> Self {
15799        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ArrayType(v.into()));
15800        self
15801    }
15802
15803    /// The value of [kind][crate::model::Type::kind]
15804    /// if it holds a `MapType`, `None` if the field is not set or
15805    /// holds a different branch.
15806    pub fn map_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Map>> {
15807        #[allow(unreachable_patterns)]
15808        self.kind.as_ref().and_then(|v| match v {
15809            crate::model::r#type::Kind::MapType(v) => std::option::Option::Some(v),
15810            _ => std::option::Option::None,
15811        })
15812    }
15813
15814    /// Sets the value of [kind][crate::model::Type::kind]
15815    /// to hold a `MapType`.
15816    ///
15817    /// Note that all the setters affecting `kind` are
15818    /// mutually exclusive.
15819    ///
15820    /// # Example
15821    /// ```ignore,no_run
15822    /// # use google_cloud_bigtable_admin_v2::model::Type;
15823    /// use google_cloud_bigtable_admin_v2::model::r#type::Map;
15824    /// let x = Type::new().set_map_type(Map::default()/* use setters */);
15825    /// assert!(x.map_type().is_some());
15826    /// assert!(x.bytes_type().is_none());
15827    /// assert!(x.string_type().is_none());
15828    /// assert!(x.int64_type().is_none());
15829    /// assert!(x.float32_type().is_none());
15830    /// assert!(x.float64_type().is_none());
15831    /// assert!(x.bool_type().is_none());
15832    /// assert!(x.timestamp_type().is_none());
15833    /// assert!(x.date_type().is_none());
15834    /// assert!(x.aggregate_type().is_none());
15835    /// assert!(x.struct_type().is_none());
15836    /// assert!(x.array_type().is_none());
15837    /// assert!(x.proto_type().is_none());
15838    /// assert!(x.enum_type().is_none());
15839    /// ```
15840    pub fn set_map_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Map>>>(
15841        mut self,
15842        v: T,
15843    ) -> Self {
15844        self.kind = std::option::Option::Some(crate::model::r#type::Kind::MapType(v.into()));
15845        self
15846    }
15847
15848    /// The value of [kind][crate::model::Type::kind]
15849    /// if it holds a `ProtoType`, `None` if the field is not set or
15850    /// holds a different branch.
15851    pub fn proto_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Proto>> {
15852        #[allow(unreachable_patterns)]
15853        self.kind.as_ref().and_then(|v| match v {
15854            crate::model::r#type::Kind::ProtoType(v) => std::option::Option::Some(v),
15855            _ => std::option::Option::None,
15856        })
15857    }
15858
15859    /// Sets the value of [kind][crate::model::Type::kind]
15860    /// to hold a `ProtoType`.
15861    ///
15862    /// Note that all the setters affecting `kind` are
15863    /// mutually exclusive.
15864    ///
15865    /// # Example
15866    /// ```ignore,no_run
15867    /// # use google_cloud_bigtable_admin_v2::model::Type;
15868    /// use google_cloud_bigtable_admin_v2::model::r#type::Proto;
15869    /// let x = Type::new().set_proto_type(Proto::default()/* use setters */);
15870    /// assert!(x.proto_type().is_some());
15871    /// assert!(x.bytes_type().is_none());
15872    /// assert!(x.string_type().is_none());
15873    /// assert!(x.int64_type().is_none());
15874    /// assert!(x.float32_type().is_none());
15875    /// assert!(x.float64_type().is_none());
15876    /// assert!(x.bool_type().is_none());
15877    /// assert!(x.timestamp_type().is_none());
15878    /// assert!(x.date_type().is_none());
15879    /// assert!(x.aggregate_type().is_none());
15880    /// assert!(x.struct_type().is_none());
15881    /// assert!(x.array_type().is_none());
15882    /// assert!(x.map_type().is_none());
15883    /// assert!(x.enum_type().is_none());
15884    /// ```
15885    pub fn set_proto_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Proto>>>(
15886        mut self,
15887        v: T,
15888    ) -> Self {
15889        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ProtoType(v.into()));
15890        self
15891    }
15892
15893    /// The value of [kind][crate::model::Type::kind]
15894    /// if it holds a `EnumType`, `None` if the field is not set or
15895    /// holds a different branch.
15896    pub fn enum_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Enum>> {
15897        #[allow(unreachable_patterns)]
15898        self.kind.as_ref().and_then(|v| match v {
15899            crate::model::r#type::Kind::EnumType(v) => std::option::Option::Some(v),
15900            _ => std::option::Option::None,
15901        })
15902    }
15903
15904    /// Sets the value of [kind][crate::model::Type::kind]
15905    /// to hold a `EnumType`.
15906    ///
15907    /// Note that all the setters affecting `kind` are
15908    /// mutually exclusive.
15909    ///
15910    /// # Example
15911    /// ```ignore,no_run
15912    /// # use google_cloud_bigtable_admin_v2::model::Type;
15913    /// use google_cloud_bigtable_admin_v2::model::r#type::Enum;
15914    /// let x = Type::new().set_enum_type(Enum::default()/* use setters */);
15915    /// assert!(x.enum_type().is_some());
15916    /// assert!(x.bytes_type().is_none());
15917    /// assert!(x.string_type().is_none());
15918    /// assert!(x.int64_type().is_none());
15919    /// assert!(x.float32_type().is_none());
15920    /// assert!(x.float64_type().is_none());
15921    /// assert!(x.bool_type().is_none());
15922    /// assert!(x.timestamp_type().is_none());
15923    /// assert!(x.date_type().is_none());
15924    /// assert!(x.aggregate_type().is_none());
15925    /// assert!(x.struct_type().is_none());
15926    /// assert!(x.array_type().is_none());
15927    /// assert!(x.map_type().is_none());
15928    /// assert!(x.proto_type().is_none());
15929    /// ```
15930    pub fn set_enum_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Enum>>>(
15931        mut self,
15932        v: T,
15933    ) -> Self {
15934        self.kind = std::option::Option::Some(crate::model::r#type::Kind::EnumType(v.into()));
15935        self
15936    }
15937}
15938
15939impl wkt::message::Message for Type {
15940    fn typename() -> &'static str {
15941        "type.googleapis.com/google.bigtable.admin.v2.Type"
15942    }
15943}
15944
15945/// Defines additional types related to [Type].
15946pub mod r#type {
15947    #[allow(unused_imports)]
15948    use super::*;
15949
15950    /// Bytes
15951    /// Values of type `Bytes` are stored in `Value.bytes_value`.
15952    #[derive(Clone, Default, PartialEq)]
15953    #[non_exhaustive]
15954    pub struct Bytes {
15955        /// The encoding to use when converting to or from lower level types.
15956        pub encoding: std::option::Option<crate::model::r#type::bytes::Encoding>,
15957
15958        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15959    }
15960
15961    impl Bytes {
15962        pub fn new() -> Self {
15963            std::default::Default::default()
15964        }
15965
15966        /// Sets the value of [encoding][crate::model::r#type::Bytes::encoding].
15967        ///
15968        /// # Example
15969        /// ```ignore,no_run
15970        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
15971        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
15972        /// let x = Bytes::new().set_encoding(Encoding::default()/* use setters */);
15973        /// ```
15974        pub fn set_encoding<T>(mut self, v: T) -> Self
15975        where
15976            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
15977        {
15978            self.encoding = std::option::Option::Some(v.into());
15979            self
15980        }
15981
15982        /// Sets or clears the value of [encoding][crate::model::r#type::Bytes::encoding].
15983        ///
15984        /// # Example
15985        /// ```ignore,no_run
15986        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
15987        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
15988        /// let x = Bytes::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
15989        /// let x = Bytes::new().set_or_clear_encoding(None::<Encoding>);
15990        /// ```
15991        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
15992        where
15993            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
15994        {
15995            self.encoding = v.map(|x| x.into());
15996            self
15997        }
15998    }
15999
16000    impl wkt::message::Message for Bytes {
16001        fn typename() -> &'static str {
16002            "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes"
16003        }
16004    }
16005
16006    /// Defines additional types related to [Bytes].
16007    pub mod bytes {
16008        #[allow(unused_imports)]
16009        use super::*;
16010
16011        /// Rules used to convert to or from lower level types.
16012        #[derive(Clone, Default, PartialEq)]
16013        #[non_exhaustive]
16014        pub struct Encoding {
16015            /// Which encoding to use.
16016            pub encoding: std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16017
16018            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16019        }
16020
16021        impl Encoding {
16022            pub fn new() -> Self {
16023                std::default::Default::default()
16024            }
16025
16026            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding].
16027            ///
16028            /// Note that all the setters affecting `encoding` are mutually
16029            /// exclusive.
16030            ///
16031            /// # Example
16032            /// ```ignore,no_run
16033            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16034            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16035            /// let x = Encoding::new().set_encoding(Some(
16036            ///     google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Encoding::Raw(Raw::default().into())));
16037            /// ```
16038            pub fn set_encoding<
16039                T: std::convert::Into<
16040                        std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16041                    >,
16042            >(
16043                mut self,
16044                v: T,
16045            ) -> Self {
16046                self.encoding = v.into();
16047                self
16048            }
16049
16050            /// The value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16051            /// if it holds a `Raw`, `None` if the field is not set or
16052            /// holds a different branch.
16053            pub fn raw(
16054                &self,
16055            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>
16056            {
16057                #[allow(unreachable_patterns)]
16058                self.encoding.as_ref().and_then(|v| match v {
16059                    crate::model::r#type::bytes::encoding::Encoding::Raw(v) => {
16060                        std::option::Option::Some(v)
16061                    }
16062                    _ => std::option::Option::None,
16063                })
16064            }
16065
16066            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16067            /// to hold a `Raw`.
16068            ///
16069            /// Note that all the setters affecting `encoding` are
16070            /// mutually exclusive.
16071            ///
16072            /// # Example
16073            /// ```ignore,no_run
16074            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16075            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16076            /// let x = Encoding::new().set_raw(Raw::default()/* use setters */);
16077            /// assert!(x.raw().is_some());
16078            /// ```
16079            pub fn set_raw<
16080                T: std::convert::Into<std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>,
16081            >(
16082                mut self,
16083                v: T,
16084            ) -> Self {
16085                self.encoding = std::option::Option::Some(
16086                    crate::model::r#type::bytes::encoding::Encoding::Raw(v.into()),
16087                );
16088                self
16089            }
16090        }
16091
16092        impl wkt::message::Message for Encoding {
16093            fn typename() -> &'static str {
16094                "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding"
16095            }
16096        }
16097
16098        /// Defines additional types related to [Encoding].
16099        pub mod encoding {
16100            #[allow(unused_imports)]
16101            use super::*;
16102
16103            /// Leaves the value as-is.
16104            ///
16105            /// Sorted mode: all values are supported.
16106            ///
16107            /// Distinct mode: all values are supported.
16108            #[derive(Clone, Default, PartialEq)]
16109            #[non_exhaustive]
16110            pub struct Raw {
16111                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16112            }
16113
16114            impl Raw {
16115                pub fn new() -> Self {
16116                    std::default::Default::default()
16117                }
16118            }
16119
16120            impl wkt::message::Message for Raw {
16121                fn typename() -> &'static str {
16122                    "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding.Raw"
16123                }
16124            }
16125
16126            /// Which encoding to use.
16127            #[derive(Clone, Debug, PartialEq)]
16128            #[non_exhaustive]
16129            pub enum Encoding {
16130                /// Use `Raw` encoding.
16131                Raw(std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>),
16132            }
16133        }
16134    }
16135
16136    /// String
16137    /// Values of type `String` are stored in `Value.string_value`.
16138    #[derive(Clone, Default, PartialEq)]
16139    #[non_exhaustive]
16140    pub struct String {
16141        /// The encoding to use when converting to or from lower level types.
16142        pub encoding: std::option::Option<crate::model::r#type::string::Encoding>,
16143
16144        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16145    }
16146
16147    impl String {
16148        pub fn new() -> Self {
16149            std::default::Default::default()
16150        }
16151
16152        /// Sets the value of [encoding][crate::model::r#type::String::encoding].
16153        ///
16154        /// # Example
16155        /// ```ignore,no_run
16156        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16157        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16158        /// let x = String::new().set_encoding(Encoding::default()/* use setters */);
16159        /// ```
16160        pub fn set_encoding<T>(mut self, v: T) -> Self
16161        where
16162            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16163        {
16164            self.encoding = std::option::Option::Some(v.into());
16165            self
16166        }
16167
16168        /// Sets or clears the value of [encoding][crate::model::r#type::String::encoding].
16169        ///
16170        /// # Example
16171        /// ```ignore,no_run
16172        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16173        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16174        /// let x = String::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16175        /// let x = String::new().set_or_clear_encoding(None::<Encoding>);
16176        /// ```
16177        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16178        where
16179            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16180        {
16181            self.encoding = v.map(|x| x.into());
16182            self
16183        }
16184    }
16185
16186    impl wkt::message::Message for String {
16187        fn typename() -> &'static str {
16188            "type.googleapis.com/google.bigtable.admin.v2.Type.String"
16189        }
16190    }
16191
16192    /// Defines additional types related to [String].
16193    pub mod string {
16194        #[allow(unused_imports)]
16195        use super::*;
16196
16197        /// Rules used to convert to or from lower level types.
16198        #[derive(Clone, Default, PartialEq)]
16199        #[non_exhaustive]
16200        pub struct Encoding {
16201            /// Which encoding to use.
16202            pub encoding: std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16203
16204            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16205        }
16206
16207        impl Encoding {
16208            pub fn new() -> Self {
16209                std::default::Default::default()
16210            }
16211
16212            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding].
16213            ///
16214            /// Note that all the setters affecting `encoding` are mutually
16215            /// exclusive.
16216            ///
16217            /// # Example
16218            /// ```ignore,no_run
16219            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16220            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
16221            /// let x = Encoding::new().set_encoding(Some(
16222            ///     google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Encoding::Utf8Bytes(Utf8Bytes::default().into())));
16223            /// ```
16224            pub fn set_encoding<
16225                T: std::convert::Into<
16226                        std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16227                    >,
16228            >(
16229                mut self,
16230                v: T,
16231            ) -> Self {
16232                self.encoding = v.into();
16233                self
16234            }
16235
16236            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
16237            /// if it holds a `Utf8Raw`, `None` if the field is not set or
16238            /// holds a different branch.
16239            #[deprecated]
16240            pub fn utf8_raw(
16241                &self,
16242            ) -> std::option::Option<
16243                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
16244            > {
16245                #[allow(unreachable_patterns)]
16246                self.encoding.as_ref().and_then(|v| match v {
16247                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v) => {
16248                        std::option::Option::Some(v)
16249                    }
16250                    _ => std::option::Option::None,
16251                })
16252            }
16253
16254            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
16255            /// to hold a `Utf8Raw`.
16256            ///
16257            /// Note that all the setters affecting `encoding` are
16258            /// mutually exclusive.
16259            ///
16260            /// # Example
16261            /// ```ignore,no_run
16262            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16263            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Raw;
16264            /// let x = Encoding::new().set_utf8_raw(Utf8Raw::default()/* use setters */);
16265            /// assert!(x.utf8_raw().is_some());
16266            /// assert!(x.utf8_bytes().is_none());
16267            /// ```
16268            #[deprecated]
16269            pub fn set_utf8_raw<
16270                T: std::convert::Into<
16271                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
16272                    >,
16273            >(
16274                mut self,
16275                v: T,
16276            ) -> Self {
16277                self.encoding = std::option::Option::Some(
16278                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v.into()),
16279                );
16280                self
16281            }
16282
16283            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
16284            /// if it holds a `Utf8Bytes`, `None` if the field is not set or
16285            /// holds a different branch.
16286            pub fn utf8_bytes(
16287                &self,
16288            ) -> std::option::Option<
16289                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
16290            > {
16291                #[allow(unreachable_patterns)]
16292                self.encoding.as_ref().and_then(|v| match v {
16293                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v) => {
16294                        std::option::Option::Some(v)
16295                    }
16296                    _ => std::option::Option::None,
16297                })
16298            }
16299
16300            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
16301            /// to hold a `Utf8Bytes`.
16302            ///
16303            /// Note that all the setters affecting `encoding` are
16304            /// mutually exclusive.
16305            ///
16306            /// # Example
16307            /// ```ignore,no_run
16308            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16309            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
16310            /// let x = Encoding::new().set_utf8_bytes(Utf8Bytes::default()/* use setters */);
16311            /// assert!(x.utf8_bytes().is_some());
16312            /// assert!(x.utf8_raw().is_none());
16313            /// ```
16314            pub fn set_utf8_bytes<
16315                T: std::convert::Into<
16316                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
16317                    >,
16318            >(
16319                mut self,
16320                v: T,
16321            ) -> Self {
16322                self.encoding = std::option::Option::Some(
16323                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v.into()),
16324                );
16325                self
16326            }
16327        }
16328
16329        impl wkt::message::Message for Encoding {
16330            fn typename() -> &'static str {
16331                "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding"
16332            }
16333        }
16334
16335        /// Defines additional types related to [Encoding].
16336        pub mod encoding {
16337            #[allow(unused_imports)]
16338            use super::*;
16339
16340            /// Deprecated: prefer the equivalent `Utf8Bytes`.
16341            #[derive(Clone, Default, PartialEq)]
16342            #[non_exhaustive]
16343            #[deprecated]
16344            pub struct Utf8Raw {
16345                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16346            }
16347
16348            impl Utf8Raw {
16349                pub fn new() -> Self {
16350                    std::default::Default::default()
16351                }
16352            }
16353
16354            impl wkt::message::Message for Utf8Raw {
16355                fn typename() -> &'static str {
16356                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw"
16357                }
16358            }
16359
16360            /// UTF-8 encoding.
16361            ///
16362            /// Sorted mode:
16363            ///
16364            /// - All values are supported.
16365            /// - Code point order is preserved.
16366            ///
16367            /// Distinct mode: all values are supported.
16368            ///
16369            /// Compatible with:
16370            ///
16371            /// - BigQuery `TEXT` encoding
16372            /// - HBase `Bytes.toBytes`
16373            /// - Java `String#getBytes(StandardCharsets.UTF_8)`
16374            #[derive(Clone, Default, PartialEq)]
16375            #[non_exhaustive]
16376            pub struct Utf8Bytes {
16377                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16378            }
16379
16380            impl Utf8Bytes {
16381                pub fn new() -> Self {
16382                    std::default::Default::default()
16383                }
16384            }
16385
16386            impl wkt::message::Message for Utf8Bytes {
16387                fn typename() -> &'static str {
16388                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes"
16389                }
16390            }
16391
16392            /// Which encoding to use.
16393            #[derive(Clone, Debug, PartialEq)]
16394            #[non_exhaustive]
16395            pub enum Encoding {
16396                /// Deprecated: if set, converts to an empty `utf8_bytes`.
16397                #[deprecated]
16398                Utf8Raw(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>),
16399                /// Use `Utf8Bytes` encoding.
16400                Utf8Bytes(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>),
16401            }
16402        }
16403    }
16404
16405    /// Int64
16406    /// Values of type `Int64` are stored in `Value.int_value`.
16407    #[derive(Clone, Default, PartialEq)]
16408    #[non_exhaustive]
16409    pub struct Int64 {
16410        /// The encoding to use when converting to or from lower level types.
16411        pub encoding: std::option::Option<crate::model::r#type::int_64::Encoding>,
16412
16413        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16414    }
16415
16416    impl Int64 {
16417        pub fn new() -> Self {
16418            std::default::Default::default()
16419        }
16420
16421        /// Sets the value of [encoding][crate::model::r#type::Int64::encoding].
16422        ///
16423        /// # Example
16424        /// ```ignore,no_run
16425        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
16426        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16427        /// let x = Int64::new().set_encoding(Encoding::default()/* use setters */);
16428        /// ```
16429        pub fn set_encoding<T>(mut self, v: T) -> Self
16430        where
16431            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
16432        {
16433            self.encoding = std::option::Option::Some(v.into());
16434            self
16435        }
16436
16437        /// Sets or clears the value of [encoding][crate::model::r#type::Int64::encoding].
16438        ///
16439        /// # Example
16440        /// ```ignore,no_run
16441        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
16442        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16443        /// let x = Int64::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16444        /// let x = Int64::new().set_or_clear_encoding(None::<Encoding>);
16445        /// ```
16446        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16447        where
16448            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
16449        {
16450            self.encoding = v.map(|x| x.into());
16451            self
16452        }
16453    }
16454
16455    impl wkt::message::Message for Int64 {
16456        fn typename() -> &'static str {
16457            "type.googleapis.com/google.bigtable.admin.v2.Type.Int64"
16458        }
16459    }
16460
16461    /// Defines additional types related to [Int64].
16462    pub mod int_64 {
16463        #[allow(unused_imports)]
16464        use super::*;
16465
16466        /// Rules used to convert to or from lower level types.
16467        #[derive(Clone, Default, PartialEq)]
16468        #[non_exhaustive]
16469        pub struct Encoding {
16470            /// Which encoding to use.
16471            pub encoding: std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
16472
16473            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16474        }
16475
16476        impl Encoding {
16477            pub fn new() -> Self {
16478                std::default::Default::default()
16479            }
16480
16481            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding].
16482            ///
16483            /// Note that all the setters affecting `encoding` are mutually
16484            /// exclusive.
16485            ///
16486            /// # Example
16487            /// ```ignore,no_run
16488            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16489            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
16490            /// let x = Encoding::new().set_encoding(Some(
16491            ///     google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::Encoding::BigEndianBytes(BigEndianBytes::default().into())));
16492            /// ```
16493            pub fn set_encoding<
16494                T: std::convert::Into<
16495                        std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
16496                    >,
16497            >(
16498                mut self,
16499                v: T,
16500            ) -> Self {
16501                self.encoding = v.into();
16502                self
16503            }
16504
16505            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
16506            /// if it holds a `BigEndianBytes`, `None` if the field is not set or
16507            /// holds a different branch.
16508            pub fn big_endian_bytes(
16509                &self,
16510            ) -> std::option::Option<
16511                &std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
16512            > {
16513                #[allow(unreachable_patterns)]
16514                self.encoding.as_ref().and_then(|v| match v {
16515                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v) => {
16516                        std::option::Option::Some(v)
16517                    }
16518                    _ => std::option::Option::None,
16519                })
16520            }
16521
16522            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
16523            /// to hold a `BigEndianBytes`.
16524            ///
16525            /// Note that all the setters affecting `encoding` are
16526            /// mutually exclusive.
16527            ///
16528            /// # Example
16529            /// ```ignore,no_run
16530            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16531            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
16532            /// let x = Encoding::new().set_big_endian_bytes(BigEndianBytes::default()/* use setters */);
16533            /// assert!(x.big_endian_bytes().is_some());
16534            /// assert!(x.ordered_code_bytes().is_none());
16535            /// ```
16536            pub fn set_big_endian_bytes<
16537                T: std::convert::Into<
16538                        std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
16539                    >,
16540            >(
16541                mut self,
16542                v: T,
16543            ) -> Self {
16544                self.encoding = std::option::Option::Some(
16545                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v.into()),
16546                );
16547                self
16548            }
16549
16550            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
16551            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
16552            /// holds a different branch.
16553            pub fn ordered_code_bytes(
16554                &self,
16555            ) -> std::option::Option<
16556                &std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
16557            > {
16558                #[allow(unreachable_patterns)]
16559                self.encoding.as_ref().and_then(|v| match v {
16560                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v) => {
16561                        std::option::Option::Some(v)
16562                    }
16563                    _ => std::option::Option::None,
16564                })
16565            }
16566
16567            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
16568            /// to hold a `OrderedCodeBytes`.
16569            ///
16570            /// Note that all the setters affecting `encoding` are
16571            /// mutually exclusive.
16572            ///
16573            /// # Example
16574            /// ```ignore,no_run
16575            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16576            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::OrderedCodeBytes;
16577            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
16578            /// assert!(x.ordered_code_bytes().is_some());
16579            /// assert!(x.big_endian_bytes().is_none());
16580            /// ```
16581            pub fn set_ordered_code_bytes<
16582                T: std::convert::Into<
16583                        std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
16584                    >,
16585            >(
16586                mut self,
16587                v: T,
16588            ) -> Self {
16589                self.encoding = std::option::Option::Some(
16590                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v.into()),
16591                );
16592                self
16593            }
16594        }
16595
16596        impl wkt::message::Message for Encoding {
16597            fn typename() -> &'static str {
16598                "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding"
16599            }
16600        }
16601
16602        /// Defines additional types related to [Encoding].
16603        pub mod encoding {
16604            #[allow(unused_imports)]
16605            use super::*;
16606
16607            /// Encodes the value as an 8-byte big-endian two's complement value.
16608            ///
16609            /// Sorted mode: non-negative values are supported.
16610            ///
16611            /// Distinct mode: all values are supported.
16612            ///
16613            /// Compatible with:
16614            ///
16615            /// - BigQuery `BINARY` encoding
16616            /// - HBase `Bytes.toBytes`
16617            /// - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
16618            #[derive(Clone, Default, PartialEq)]
16619            #[non_exhaustive]
16620            pub struct BigEndianBytes {
16621                /// Deprecated: ignored if set.
16622                #[deprecated]
16623                pub bytes_type: std::option::Option<crate::model::r#type::Bytes>,
16624
16625                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16626            }
16627
16628            impl BigEndianBytes {
16629                pub fn new() -> Self {
16630                    std::default::Default::default()
16631                }
16632
16633                /// Sets the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
16634                ///
16635                /// # Example
16636                /// ```ignore,no_run
16637                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
16638                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16639                /// let x = BigEndianBytes::new().set_bytes_type(Bytes::default()/* use setters */);
16640                /// ```
16641                #[deprecated]
16642                pub fn set_bytes_type<T>(mut self, v: T) -> Self
16643                where
16644                    T: std::convert::Into<crate::model::r#type::Bytes>,
16645                {
16646                    self.bytes_type = std::option::Option::Some(v.into());
16647                    self
16648                }
16649
16650                /// Sets or clears the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
16651                ///
16652                /// # Example
16653                /// ```ignore,no_run
16654                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
16655                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16656                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(Some(Bytes::default()/* use setters */));
16657                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(None::<Bytes>);
16658                /// ```
16659                #[deprecated]
16660                pub fn set_or_clear_bytes_type<T>(mut self, v: std::option::Option<T>) -> Self
16661                where
16662                    T: std::convert::Into<crate::model::r#type::Bytes>,
16663                {
16664                    self.bytes_type = v.map(|x| x.into());
16665                    self
16666                }
16667            }
16668
16669            impl wkt::message::Message for BigEndianBytes {
16670                fn typename() -> &'static str {
16671                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes"
16672                }
16673            }
16674
16675            /// Encodes the value in a variable length binary format of up to 10 bytes.
16676            /// Values that are closer to zero use fewer bytes.
16677            ///
16678            /// Sorted mode: all values are supported.
16679            ///
16680            /// Distinct mode: all values are supported.
16681            #[derive(Clone, Default, PartialEq)]
16682            #[non_exhaustive]
16683            pub struct OrderedCodeBytes {
16684                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16685            }
16686
16687            impl OrderedCodeBytes {
16688                pub fn new() -> Self {
16689                    std::default::Default::default()
16690                }
16691            }
16692
16693            impl wkt::message::Message for OrderedCodeBytes {
16694                fn typename() -> &'static str {
16695                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes"
16696                }
16697            }
16698
16699            /// Which encoding to use.
16700            #[derive(Clone, Debug, PartialEq)]
16701            #[non_exhaustive]
16702            pub enum Encoding {
16703                /// Use `BigEndianBytes` encoding.
16704                BigEndianBytes(
16705                    std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
16706                ),
16707                /// Use `OrderedCodeBytes` encoding.
16708                OrderedCodeBytes(
16709                    std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
16710                ),
16711            }
16712        }
16713    }
16714
16715    /// bool
16716    /// Values of type `Bool` are stored in `Value.bool_value`.
16717    #[derive(Clone, Default, PartialEq)]
16718    #[non_exhaustive]
16719    pub struct Bool {
16720        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16721    }
16722
16723    impl Bool {
16724        pub fn new() -> Self {
16725            std::default::Default::default()
16726        }
16727    }
16728
16729    impl wkt::message::Message for Bool {
16730        fn typename() -> &'static str {
16731            "type.googleapis.com/google.bigtable.admin.v2.Type.Bool"
16732        }
16733    }
16734
16735    /// Float32
16736    /// Values of type `Float32` are stored in `Value.float_value`.
16737    #[derive(Clone, Default, PartialEq)]
16738    #[non_exhaustive]
16739    pub struct Float32 {
16740        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16741    }
16742
16743    impl Float32 {
16744        pub fn new() -> Self {
16745            std::default::Default::default()
16746        }
16747    }
16748
16749    impl wkt::message::Message for Float32 {
16750        fn typename() -> &'static str {
16751            "type.googleapis.com/google.bigtable.admin.v2.Type.Float32"
16752        }
16753    }
16754
16755    /// Float64
16756    /// Values of type `Float64` are stored in `Value.float_value`.
16757    #[derive(Clone, Default, PartialEq)]
16758    #[non_exhaustive]
16759    pub struct Float64 {
16760        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16761    }
16762
16763    impl Float64 {
16764        pub fn new() -> Self {
16765            std::default::Default::default()
16766        }
16767    }
16768
16769    impl wkt::message::Message for Float64 {
16770        fn typename() -> &'static str {
16771            "type.googleapis.com/google.bigtable.admin.v2.Type.Float64"
16772        }
16773    }
16774
16775    /// Timestamp
16776    /// Values of type `Timestamp` are stored in `Value.timestamp_value`.
16777    #[derive(Clone, Default, PartialEq)]
16778    #[non_exhaustive]
16779    pub struct Timestamp {
16780        /// The encoding to use when converting to or from lower level types.
16781        pub encoding: std::option::Option<crate::model::r#type::timestamp::Encoding>,
16782
16783        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16784    }
16785
16786    impl Timestamp {
16787        pub fn new() -> Self {
16788            std::default::Default::default()
16789        }
16790
16791        /// Sets the value of [encoding][crate::model::r#type::Timestamp::encoding].
16792        ///
16793        /// # Example
16794        /// ```ignore,no_run
16795        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
16796        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
16797        /// let x = Timestamp::new().set_encoding(Encoding::default()/* use setters */);
16798        /// ```
16799        pub fn set_encoding<T>(mut self, v: T) -> Self
16800        where
16801            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
16802        {
16803            self.encoding = std::option::Option::Some(v.into());
16804            self
16805        }
16806
16807        /// Sets or clears the value of [encoding][crate::model::r#type::Timestamp::encoding].
16808        ///
16809        /// # Example
16810        /// ```ignore,no_run
16811        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
16812        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
16813        /// let x = Timestamp::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16814        /// let x = Timestamp::new().set_or_clear_encoding(None::<Encoding>);
16815        /// ```
16816        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16817        where
16818            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
16819        {
16820            self.encoding = v.map(|x| x.into());
16821            self
16822        }
16823    }
16824
16825    impl wkt::message::Message for Timestamp {
16826        fn typename() -> &'static str {
16827            "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp"
16828        }
16829    }
16830
16831    /// Defines additional types related to [Timestamp].
16832    pub mod timestamp {
16833        #[allow(unused_imports)]
16834        use super::*;
16835
16836        /// Rules used to convert to or from lower level types.
16837        #[derive(Clone, Default, PartialEq)]
16838        #[non_exhaustive]
16839        pub struct Encoding {
16840            /// Which encoding to use.
16841            pub encoding: std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
16842
16843            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16844        }
16845
16846        impl Encoding {
16847            pub fn new() -> Self {
16848                std::default::Default::default()
16849            }
16850
16851            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding].
16852            ///
16853            /// Note that all the setters affecting `encoding` are mutually
16854            /// exclusive.
16855            ///
16856            /// # Example
16857            /// ```ignore,no_run
16858            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
16859            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
16860            /// let x = Encoding::new().set_encoding(Some(
16861            ///     google_cloud_bigtable_admin_v2::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(UnixMicrosInt64::default().into())));
16862            /// ```
16863            pub fn set_encoding<
16864                T: std::convert::Into<
16865                        std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
16866                    >,
16867            >(
16868                mut self,
16869                v: T,
16870            ) -> Self {
16871                self.encoding = v.into();
16872                self
16873            }
16874
16875            /// The value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
16876            /// if it holds a `UnixMicrosInt64`, `None` if the field is not set or
16877            /// holds a different branch.
16878            pub fn unix_micros_int64(
16879                &self,
16880            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::int_64::Encoding>>
16881            {
16882                #[allow(unreachable_patterns)]
16883                self.encoding.as_ref().and_then(|v| match v {
16884                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v) => {
16885                        std::option::Option::Some(v)
16886                    }
16887                    _ => std::option::Option::None,
16888                })
16889            }
16890
16891            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
16892            /// to hold a `UnixMicrosInt64`.
16893            ///
16894            /// Note that all the setters affecting `encoding` are
16895            /// mutually exclusive.
16896            ///
16897            /// # Example
16898            /// ```ignore,no_run
16899            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
16900            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
16901            /// let x = Encoding::new().set_unix_micros_int64(UnixMicrosInt64::default()/* use setters */);
16902            /// assert!(x.unix_micros_int64().is_some());
16903            /// ```
16904            pub fn set_unix_micros_int64<
16905                T: std::convert::Into<std::boxed::Box<crate::model::r#type::int_64::Encoding>>,
16906            >(
16907                mut self,
16908                v: T,
16909            ) -> Self {
16910                self.encoding = std::option::Option::Some(
16911                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v.into()),
16912                );
16913                self
16914            }
16915        }
16916
16917        impl wkt::message::Message for Encoding {
16918            fn typename() -> &'static str {
16919                "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp.Encoding"
16920            }
16921        }
16922
16923        /// Defines additional types related to [Encoding].
16924        pub mod encoding {
16925            #[allow(unused_imports)]
16926            use super::*;
16927
16928            /// Which encoding to use.
16929            #[derive(Clone, Debug, PartialEq)]
16930            #[non_exhaustive]
16931            pub enum Encoding {
16932                /// Encodes the number of microseconds since the Unix epoch using the
16933                /// given `Int64` encoding. Values must be microsecond-aligned.
16934                ///
16935                /// Compatible with:
16936                ///
16937                /// - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
16938                UnixMicrosInt64(std::boxed::Box<crate::model::r#type::int_64::Encoding>),
16939            }
16940        }
16941    }
16942
16943    /// Date
16944    /// Values of type `Date` are stored in `Value.date_value`.
16945    #[derive(Clone, Default, PartialEq)]
16946    #[non_exhaustive]
16947    pub struct Date {
16948        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16949    }
16950
16951    impl Date {
16952        pub fn new() -> Self {
16953            std::default::Default::default()
16954        }
16955    }
16956
16957    impl wkt::message::Message for Date {
16958        fn typename() -> &'static str {
16959            "type.googleapis.com/google.bigtable.admin.v2.Type.Date"
16960        }
16961    }
16962
16963    /// A structured data value, consisting of fields which map to dynamically
16964    /// typed values.
16965    /// Values of type `Struct` are stored in `Value.array_value` where entries are
16966    /// in the same order and number as `field_types`.
16967    #[derive(Clone, Default, PartialEq)]
16968    #[non_exhaustive]
16969    pub struct Struct {
16970        /// The names and types of the fields in this struct.
16971        pub fields: std::vec::Vec<crate::model::r#type::r#struct::Field>,
16972
16973        /// The encoding to use when converting to or from lower level types.
16974        pub encoding: std::option::Option<crate::model::r#type::r#struct::Encoding>,
16975
16976        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16977    }
16978
16979    impl Struct {
16980        pub fn new() -> Self {
16981            std::default::Default::default()
16982        }
16983
16984        /// Sets the value of [fields][crate::model::r#type::Struct::fields].
16985        ///
16986        /// # Example
16987        /// ```ignore,no_run
16988        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
16989        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
16990        /// let x = Struct::new()
16991        ///     .set_fields([
16992        ///         Field::default()/* use setters */,
16993        ///         Field::default()/* use (different) setters */,
16994        ///     ]);
16995        /// ```
16996        pub fn set_fields<T, V>(mut self, v: T) -> Self
16997        where
16998            T: std::iter::IntoIterator<Item = V>,
16999            V: std::convert::Into<crate::model::r#type::r#struct::Field>,
17000        {
17001            use std::iter::Iterator;
17002            self.fields = v.into_iter().map(|i| i.into()).collect();
17003            self
17004        }
17005
17006        /// Sets the value of [encoding][crate::model::r#type::Struct::encoding].
17007        ///
17008        /// # Example
17009        /// ```ignore,no_run
17010        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17011        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17012        /// let x = Struct::new().set_encoding(Encoding::default()/* use setters */);
17013        /// ```
17014        pub fn set_encoding<T>(mut self, v: T) -> Self
17015        where
17016            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17017        {
17018            self.encoding = std::option::Option::Some(v.into());
17019            self
17020        }
17021
17022        /// Sets or clears the value of [encoding][crate::model::r#type::Struct::encoding].
17023        ///
17024        /// # Example
17025        /// ```ignore,no_run
17026        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17027        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17028        /// let x = Struct::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17029        /// let x = Struct::new().set_or_clear_encoding(None::<Encoding>);
17030        /// ```
17031        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17032        where
17033            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17034        {
17035            self.encoding = v.map(|x| x.into());
17036            self
17037        }
17038    }
17039
17040    impl wkt::message::Message for Struct {
17041        fn typename() -> &'static str {
17042            "type.googleapis.com/google.bigtable.admin.v2.Type.Struct"
17043        }
17044    }
17045
17046    /// Defines additional types related to [Struct].
17047    pub mod r#struct {
17048        #[allow(unused_imports)]
17049        use super::*;
17050
17051        /// A struct field and its type.
17052        #[derive(Clone, Default, PartialEq)]
17053        #[non_exhaustive]
17054        pub struct Field {
17055            /// The field name (optional). Fields without a `field_name` are considered
17056            /// anonymous and cannot be referenced by name.
17057            pub field_name: std::string::String,
17058
17059            /// The type of values in this field.
17060            pub r#type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17061
17062            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17063        }
17064
17065        impl Field {
17066            pub fn new() -> Self {
17067                std::default::Default::default()
17068            }
17069
17070            /// Sets the value of [field_name][crate::model::r#type::r#struct::Field::field_name].
17071            ///
17072            /// # Example
17073            /// ```ignore,no_run
17074            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17075            /// let x = Field::new().set_field_name("example");
17076            /// ```
17077            pub fn set_field_name<T: std::convert::Into<std::string::String>>(
17078                mut self,
17079                v: T,
17080            ) -> Self {
17081                self.field_name = v.into();
17082                self
17083            }
17084
17085            /// Sets the value of [r#type][crate::model::r#type::r#struct::Field::type].
17086            ///
17087            /// # Example
17088            /// ```ignore,no_run
17089            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17090            /// use google_cloud_bigtable_admin_v2::model::Type;
17091            /// let x = Field::new().set_type(Type::default()/* use setters */);
17092            /// ```
17093            pub fn set_type<T>(mut self, v: T) -> Self
17094            where
17095                T: std::convert::Into<crate::model::Type>,
17096            {
17097                self.r#type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17098                self
17099            }
17100
17101            /// Sets or clears the value of [r#type][crate::model::r#type::r#struct::Field::type].
17102            ///
17103            /// # Example
17104            /// ```ignore,no_run
17105            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17106            /// use google_cloud_bigtable_admin_v2::model::Type;
17107            /// let x = Field::new().set_or_clear_type(Some(Type::default()/* use setters */));
17108            /// let x = Field::new().set_or_clear_type(None::<Type>);
17109            /// ```
17110            pub fn set_or_clear_type<T>(mut self, v: std::option::Option<T>) -> Self
17111            where
17112                T: std::convert::Into<crate::model::Type>,
17113            {
17114                self.r#type = v.map(|x| std::boxed::Box::new(x.into()));
17115                self
17116            }
17117        }
17118
17119        impl wkt::message::Message for Field {
17120            fn typename() -> &'static str {
17121                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Field"
17122            }
17123        }
17124
17125        /// Rules used to convert to or from lower level types.
17126        #[derive(Clone, Default, PartialEq)]
17127        #[non_exhaustive]
17128        pub struct Encoding {
17129            /// Which encoding to use.
17130            pub encoding: std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17131
17132            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17133        }
17134
17135        impl Encoding {
17136            pub fn new() -> Self {
17137                std::default::Default::default()
17138            }
17139
17140            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding].
17141            ///
17142            /// Note that all the setters affecting `encoding` are mutually
17143            /// exclusive.
17144            ///
17145            /// # Example
17146            /// ```ignore,no_run
17147            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17148            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17149            /// let x = Encoding::new().set_encoding(Some(
17150            ///     google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Encoding::Singleton(Singleton::default().into())));
17151            /// ```
17152            pub fn set_encoding<
17153                T: std::convert::Into<
17154                        std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17155                    >,
17156            >(
17157                mut self,
17158                v: T,
17159            ) -> Self {
17160                self.encoding = v.into();
17161                self
17162            }
17163
17164            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17165            /// if it holds a `Singleton`, `None` if the field is not set or
17166            /// holds a different branch.
17167            pub fn singleton(
17168                &self,
17169            ) -> std::option::Option<
17170                &std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17171            > {
17172                #[allow(unreachable_patterns)]
17173                self.encoding.as_ref().and_then(|v| match v {
17174                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v) => {
17175                        std::option::Option::Some(v)
17176                    }
17177                    _ => std::option::Option::None,
17178                })
17179            }
17180
17181            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17182            /// to hold a `Singleton`.
17183            ///
17184            /// Note that all the setters affecting `encoding` are
17185            /// mutually exclusive.
17186            ///
17187            /// # Example
17188            /// ```ignore,no_run
17189            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17190            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17191            /// let x = Encoding::new().set_singleton(Singleton::default()/* use setters */);
17192            /// assert!(x.singleton().is_some());
17193            /// assert!(x.delimited_bytes().is_none());
17194            /// assert!(x.ordered_code_bytes().is_none());
17195            /// ```
17196            pub fn set_singleton<
17197                T: std::convert::Into<
17198                        std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17199                    >,
17200            >(
17201                mut self,
17202                v: T,
17203            ) -> Self {
17204                self.encoding = std::option::Option::Some(
17205                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v.into()),
17206                );
17207                self
17208            }
17209
17210            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17211            /// if it holds a `DelimitedBytes`, `None` if the field is not set or
17212            /// holds a different branch.
17213            pub fn delimited_bytes(
17214                &self,
17215            ) -> std::option::Option<
17216                &std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17217            > {
17218                #[allow(unreachable_patterns)]
17219                self.encoding.as_ref().and_then(|v| match v {
17220                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v) => {
17221                        std::option::Option::Some(v)
17222                    }
17223                    _ => std::option::Option::None,
17224                })
17225            }
17226
17227            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17228            /// to hold a `DelimitedBytes`.
17229            ///
17230            /// Note that all the setters affecting `encoding` are
17231            /// mutually exclusive.
17232            ///
17233            /// # Example
17234            /// ```ignore,no_run
17235            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17236            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
17237            /// let x = Encoding::new().set_delimited_bytes(DelimitedBytes::default()/* use setters */);
17238            /// assert!(x.delimited_bytes().is_some());
17239            /// assert!(x.singleton().is_none());
17240            /// assert!(x.ordered_code_bytes().is_none());
17241            /// ```
17242            pub fn set_delimited_bytes<
17243                T: std::convert::Into<
17244                        std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17245                    >,
17246            >(
17247                mut self,
17248                v: T,
17249            ) -> Self {
17250                self.encoding = std::option::Option::Some(
17251                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v.into()),
17252                );
17253                self
17254            }
17255
17256            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17257            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
17258            /// holds a different branch.
17259            pub fn ordered_code_bytes(
17260                &self,
17261            ) -> std::option::Option<
17262                &std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
17263            > {
17264                #[allow(unreachable_patterns)]
17265                self.encoding.as_ref().and_then(|v| match v {
17266                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v) => {
17267                        std::option::Option::Some(v)
17268                    }
17269                    _ => std::option::Option::None,
17270                })
17271            }
17272
17273            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17274            /// to hold a `OrderedCodeBytes`.
17275            ///
17276            /// Note that all the setters affecting `encoding` are
17277            /// mutually exclusive.
17278            ///
17279            /// # Example
17280            /// ```ignore,no_run
17281            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17282            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::OrderedCodeBytes;
17283            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
17284            /// assert!(x.ordered_code_bytes().is_some());
17285            /// assert!(x.singleton().is_none());
17286            /// assert!(x.delimited_bytes().is_none());
17287            /// ```
17288            pub fn set_ordered_code_bytes<
17289                T: std::convert::Into<
17290                        std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
17291                    >,
17292            >(
17293                mut self,
17294                v: T,
17295            ) -> Self {
17296                self.encoding = std::option::Option::Some(
17297                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v.into()),
17298                );
17299                self
17300            }
17301        }
17302
17303        impl wkt::message::Message for Encoding {
17304            fn typename() -> &'static str {
17305                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding"
17306            }
17307        }
17308
17309        /// Defines additional types related to [Encoding].
17310        pub mod encoding {
17311            #[allow(unused_imports)]
17312            use super::*;
17313
17314            /// Uses the encoding of `fields[0].type` as-is.
17315            /// Only valid if `fields.size == 1`.
17316            #[derive(Clone, Default, PartialEq)]
17317            #[non_exhaustive]
17318            pub struct Singleton {
17319                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17320            }
17321
17322            impl Singleton {
17323                pub fn new() -> Self {
17324                    std::default::Default::default()
17325                }
17326            }
17327
17328            impl wkt::message::Message for Singleton {
17329                fn typename() -> &'static str {
17330                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.Singleton"
17331                }
17332            }
17333
17334            /// Fields are encoded independently and concatenated with a configurable
17335            /// `delimiter` in between.
17336            ///
17337            /// A struct with no fields defined is encoded as a single `delimiter`.
17338            ///
17339            /// Sorted mode:
17340            ///
17341            /// - Fields are encoded in sorted mode.
17342            /// - Encoded field values must not contain any bytes <= `delimiter[0]`
17343            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
17344            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
17345            ///
17346            /// Distinct mode:
17347            ///
17348            /// - Fields are encoded in distinct mode.
17349            /// - Encoded field values must not contain `delimiter[0]`.
17350            #[derive(Clone, Default, PartialEq)]
17351            #[non_exhaustive]
17352            pub struct DelimitedBytes {
17353                /// Byte sequence used to delimit concatenated fields. The delimiter must
17354                /// contain at least 1 character and at most 50 characters.
17355                pub delimiter: ::bytes::Bytes,
17356
17357                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17358            }
17359
17360            impl DelimitedBytes {
17361                pub fn new() -> Self {
17362                    std::default::Default::default()
17363                }
17364
17365                /// Sets the value of [delimiter][crate::model::r#type::r#struct::encoding::DelimitedBytes::delimiter].
17366                ///
17367                /// # Example
17368                /// ```ignore,no_run
17369                /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
17370                /// let x = DelimitedBytes::new().set_delimiter(bytes::Bytes::from_static(b"example"));
17371                /// ```
17372                pub fn set_delimiter<T: std::convert::Into<::bytes::Bytes>>(
17373                    mut self,
17374                    v: T,
17375                ) -> Self {
17376                    self.delimiter = v.into();
17377                    self
17378                }
17379            }
17380
17381            impl wkt::message::Message for DelimitedBytes {
17382                fn typename() -> &'static str {
17383                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes"
17384                }
17385            }
17386
17387            /// Fields are encoded independently and concatenated with the fixed byte
17388            /// pair {0x00, 0x01} in between.
17389            ///
17390            /// Any null (0x00) byte in an encoded field is replaced by the fixed byte
17391            /// pair {0x00, 0xFF}.
17392            ///
17393            /// Fields that encode to the empty string "" have special handling:
17394            ///
17395            /// - If *every* field encodes to "", or if the STRUCT has no fields
17396            ///   defined, then the STRUCT is encoded as the fixed byte pair
17397            ///   {0x00, 0x00}.
17398            /// - Otherwise, the STRUCT only encodes until the last non-empty field,
17399            ///   omitting any trailing empty fields. Any empty fields that aren't
17400            ///   omitted are replaced with the fixed byte pair {0x00, 0x00}.
17401            ///
17402            /// Examples:
17403            ///
17404            /// - STRUCT()             -> "\00\00"
17405            /// - STRUCT("")           -> "\00\00"
17406            /// - STRUCT("", "")       -> "\00\00"
17407            /// - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
17408            /// - STRUCT("A", "")      -> "A"
17409            /// - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
17410            /// - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
17411            ///
17412            /// Since null bytes are always escaped, this encoding can cause size
17413            /// blowup for encodings like `Int64.BigEndianBytes` that are likely to
17414            /// produce many such bytes.
17415            ///
17416            /// Sorted mode:
17417            ///
17418            /// - Fields are encoded in sorted mode.
17419            /// - All values supported by the field encodings are allowed
17420            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
17421            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
17422            ///
17423            /// Distinct mode:
17424            ///
17425            /// - Fields are encoded in distinct mode.
17426            /// - All values supported by the field encodings are allowed.
17427            #[derive(Clone, Default, PartialEq)]
17428            #[non_exhaustive]
17429            pub struct OrderedCodeBytes {
17430                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17431            }
17432
17433            impl OrderedCodeBytes {
17434                pub fn new() -> Self {
17435                    std::default::Default::default()
17436                }
17437            }
17438
17439            impl wkt::message::Message for OrderedCodeBytes {
17440                fn typename() -> &'static str {
17441                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes"
17442                }
17443            }
17444
17445            /// Which encoding to use.
17446            #[derive(Clone, Debug, PartialEq)]
17447            #[non_exhaustive]
17448            pub enum Encoding {
17449                /// Use `Singleton` encoding.
17450                Singleton(std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>),
17451                /// Use `DelimitedBytes` encoding.
17452                DelimitedBytes(
17453                    std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17454                ),
17455                /// User `OrderedCodeBytes` encoding.
17456                OrderedCodeBytes(
17457                    std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
17458                ),
17459            }
17460        }
17461    }
17462
17463    /// A protobuf message type.
17464    /// Values of type `Proto` are stored in `Value.bytes_value`.
17465    #[derive(Clone, Default, PartialEq)]
17466    #[non_exhaustive]
17467    pub struct Proto {
17468        /// The ID of the schema bundle that this proto is defined in.
17469        pub schema_bundle_id: std::string::String,
17470
17471        /// The fully qualified name of the protobuf message, including package. In
17472        /// the format of "foo.bar.Message".
17473        pub message_name: std::string::String,
17474
17475        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17476    }
17477
17478    impl Proto {
17479        pub fn new() -> Self {
17480            std::default::Default::default()
17481        }
17482
17483        /// Sets the value of [schema_bundle_id][crate::model::r#type::Proto::schema_bundle_id].
17484        ///
17485        /// # Example
17486        /// ```ignore,no_run
17487        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
17488        /// let x = Proto::new().set_schema_bundle_id("example");
17489        /// ```
17490        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
17491            mut self,
17492            v: T,
17493        ) -> Self {
17494            self.schema_bundle_id = v.into();
17495            self
17496        }
17497
17498        /// Sets the value of [message_name][crate::model::r#type::Proto::message_name].
17499        ///
17500        /// # Example
17501        /// ```ignore,no_run
17502        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
17503        /// let x = Proto::new().set_message_name("example");
17504        /// ```
17505        pub fn set_message_name<T: std::convert::Into<std::string::String>>(
17506            mut self,
17507            v: T,
17508        ) -> Self {
17509            self.message_name = v.into();
17510            self
17511        }
17512    }
17513
17514    impl wkt::message::Message for Proto {
17515        fn typename() -> &'static str {
17516            "type.googleapis.com/google.bigtable.admin.v2.Type.Proto"
17517        }
17518    }
17519
17520    /// A protobuf enum type.
17521    /// Values of type `Enum` are stored in `Value.int_value`.
17522    #[derive(Clone, Default, PartialEq)]
17523    #[non_exhaustive]
17524    pub struct Enum {
17525        /// The ID of the schema bundle that this enum is defined in.
17526        pub schema_bundle_id: std::string::String,
17527
17528        /// The fully qualified name of the protobuf enum message, including package.
17529        /// In the format of "foo.bar.EnumMessage".
17530        pub enum_name: std::string::String,
17531
17532        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17533    }
17534
17535    impl Enum {
17536        pub fn new() -> Self {
17537            std::default::Default::default()
17538        }
17539
17540        /// Sets the value of [schema_bundle_id][crate::model::r#type::Enum::schema_bundle_id].
17541        ///
17542        /// # Example
17543        /// ```ignore,no_run
17544        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
17545        /// let x = Enum::new().set_schema_bundle_id("example");
17546        /// ```
17547        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
17548            mut self,
17549            v: T,
17550        ) -> Self {
17551            self.schema_bundle_id = v.into();
17552            self
17553        }
17554
17555        /// Sets the value of [enum_name][crate::model::r#type::Enum::enum_name].
17556        ///
17557        /// # Example
17558        /// ```ignore,no_run
17559        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
17560        /// let x = Enum::new().set_enum_name("example");
17561        /// ```
17562        pub fn set_enum_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17563            self.enum_name = v.into();
17564            self
17565        }
17566    }
17567
17568    impl wkt::message::Message for Enum {
17569        fn typename() -> &'static str {
17570            "type.googleapis.com/google.bigtable.admin.v2.Type.Enum"
17571        }
17572    }
17573
17574    /// An ordered list of elements of a given type.
17575    /// Values of type `Array` are stored in `Value.array_value`.
17576    #[derive(Clone, Default, PartialEq)]
17577    #[non_exhaustive]
17578    pub struct Array {
17579        /// The type of the elements in the array. This must not be `Array`.
17580        pub element_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17581
17582        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17583    }
17584
17585    impl Array {
17586        pub fn new() -> Self {
17587            std::default::Default::default()
17588        }
17589
17590        /// Sets the value of [element_type][crate::model::r#type::Array::element_type].
17591        ///
17592        /// # Example
17593        /// ```ignore,no_run
17594        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
17595        /// use google_cloud_bigtable_admin_v2::model::Type;
17596        /// let x = Array::new().set_element_type(Type::default()/* use setters */);
17597        /// ```
17598        pub fn set_element_type<T>(mut self, v: T) -> Self
17599        where
17600            T: std::convert::Into<crate::model::Type>,
17601        {
17602            self.element_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17603            self
17604        }
17605
17606        /// Sets or clears the value of [element_type][crate::model::r#type::Array::element_type].
17607        ///
17608        /// # Example
17609        /// ```ignore,no_run
17610        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
17611        /// use google_cloud_bigtable_admin_v2::model::Type;
17612        /// let x = Array::new().set_or_clear_element_type(Some(Type::default()/* use setters */));
17613        /// let x = Array::new().set_or_clear_element_type(None::<Type>);
17614        /// ```
17615        pub fn set_or_clear_element_type<T>(mut self, v: std::option::Option<T>) -> Self
17616        where
17617            T: std::convert::Into<crate::model::Type>,
17618        {
17619            self.element_type = v.map(|x| std::boxed::Box::new(x.into()));
17620            self
17621        }
17622    }
17623
17624    impl wkt::message::Message for Array {
17625        fn typename() -> &'static str {
17626            "type.googleapis.com/google.bigtable.admin.v2.Type.Array"
17627        }
17628    }
17629
17630    /// A mapping of keys to values of a given type.
17631    /// Values of type `Map` are stored in a `Value.array_value` where each entry
17632    /// is another `Value.array_value` with two elements (the key and the value,
17633    /// in that order).
17634    /// Normally encoded Map values won't have repeated keys, however, clients are
17635    /// expected to handle the case in which they do. If the same key appears
17636    /// multiple times, the _last_ value takes precedence.
17637    #[derive(Clone, Default, PartialEq)]
17638    #[non_exhaustive]
17639    pub struct Map {
17640        /// The type of a map key.
17641        /// Only `Bytes`, `String`, and `Int64` are allowed as key types.
17642        pub key_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17643
17644        /// The type of the values in a map.
17645        pub value_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17646
17647        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17648    }
17649
17650    impl Map {
17651        pub fn new() -> Self {
17652            std::default::Default::default()
17653        }
17654
17655        /// Sets the value of [key_type][crate::model::r#type::Map::key_type].
17656        ///
17657        /// # Example
17658        /// ```ignore,no_run
17659        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
17660        /// use google_cloud_bigtable_admin_v2::model::Type;
17661        /// let x = Map::new().set_key_type(Type::default()/* use setters */);
17662        /// ```
17663        pub fn set_key_type<T>(mut self, v: T) -> Self
17664        where
17665            T: std::convert::Into<crate::model::Type>,
17666        {
17667            self.key_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17668            self
17669        }
17670
17671        /// Sets or clears the value of [key_type][crate::model::r#type::Map::key_type].
17672        ///
17673        /// # Example
17674        /// ```ignore,no_run
17675        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
17676        /// use google_cloud_bigtable_admin_v2::model::Type;
17677        /// let x = Map::new().set_or_clear_key_type(Some(Type::default()/* use setters */));
17678        /// let x = Map::new().set_or_clear_key_type(None::<Type>);
17679        /// ```
17680        pub fn set_or_clear_key_type<T>(mut self, v: std::option::Option<T>) -> Self
17681        where
17682            T: std::convert::Into<crate::model::Type>,
17683        {
17684            self.key_type = v.map(|x| std::boxed::Box::new(x.into()));
17685            self
17686        }
17687
17688        /// Sets the value of [value_type][crate::model::r#type::Map::value_type].
17689        ///
17690        /// # Example
17691        /// ```ignore,no_run
17692        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
17693        /// use google_cloud_bigtable_admin_v2::model::Type;
17694        /// let x = Map::new().set_value_type(Type::default()/* use setters */);
17695        /// ```
17696        pub fn set_value_type<T>(mut self, v: T) -> Self
17697        where
17698            T: std::convert::Into<crate::model::Type>,
17699        {
17700            self.value_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17701            self
17702        }
17703
17704        /// Sets or clears the value of [value_type][crate::model::r#type::Map::value_type].
17705        ///
17706        /// # Example
17707        /// ```ignore,no_run
17708        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
17709        /// use google_cloud_bigtable_admin_v2::model::Type;
17710        /// let x = Map::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
17711        /// let x = Map::new().set_or_clear_value_type(None::<Type>);
17712        /// ```
17713        pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
17714        where
17715            T: std::convert::Into<crate::model::Type>,
17716        {
17717            self.value_type = v.map(|x| std::boxed::Box::new(x.into()));
17718            self
17719        }
17720    }
17721
17722    impl wkt::message::Message for Map {
17723        fn typename() -> &'static str {
17724            "type.googleapis.com/google.bigtable.admin.v2.Type.Map"
17725        }
17726    }
17727
17728    /// A value that combines incremental updates into a summarized value.
17729    ///
17730    /// Data is never directly written or read using type `Aggregate`. Writes will
17731    /// provide either the `input_type` or `state_type`, and reads will always
17732    /// return the `state_type` .
17733    #[derive(Clone, Default, PartialEq)]
17734    #[non_exhaustive]
17735    pub struct Aggregate {
17736        /// Type of the inputs that are accumulated by this `Aggregate`, which must
17737        /// specify a full encoding.
17738        /// Use `AddInput` mutations to accumulate new inputs.
17739        pub input_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17740
17741        /// Output only. Type that holds the internal accumulator state for the
17742        /// `Aggregate`. This is a function of the `input_type` and `aggregator`
17743        /// chosen, and will always specify a full encoding.
17744        pub state_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17745
17746        /// Which aggregator function to use. The configured types must match.
17747        pub aggregator: std::option::Option<crate::model::r#type::aggregate::Aggregator>,
17748
17749        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17750    }
17751
17752    impl Aggregate {
17753        pub fn new() -> Self {
17754            std::default::Default::default()
17755        }
17756
17757        /// Sets the value of [input_type][crate::model::r#type::Aggregate::input_type].
17758        ///
17759        /// # Example
17760        /// ```ignore,no_run
17761        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17762        /// use google_cloud_bigtable_admin_v2::model::Type;
17763        /// let x = Aggregate::new().set_input_type(Type::default()/* use setters */);
17764        /// ```
17765        pub fn set_input_type<T>(mut self, v: T) -> Self
17766        where
17767            T: std::convert::Into<crate::model::Type>,
17768        {
17769            self.input_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17770            self
17771        }
17772
17773        /// Sets or clears the value of [input_type][crate::model::r#type::Aggregate::input_type].
17774        ///
17775        /// # Example
17776        /// ```ignore,no_run
17777        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17778        /// use google_cloud_bigtable_admin_v2::model::Type;
17779        /// let x = Aggregate::new().set_or_clear_input_type(Some(Type::default()/* use setters */));
17780        /// let x = Aggregate::new().set_or_clear_input_type(None::<Type>);
17781        /// ```
17782        pub fn set_or_clear_input_type<T>(mut self, v: std::option::Option<T>) -> Self
17783        where
17784            T: std::convert::Into<crate::model::Type>,
17785        {
17786            self.input_type = v.map(|x| std::boxed::Box::new(x.into()));
17787            self
17788        }
17789
17790        /// Sets the value of [state_type][crate::model::r#type::Aggregate::state_type].
17791        ///
17792        /// # Example
17793        /// ```ignore,no_run
17794        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17795        /// use google_cloud_bigtable_admin_v2::model::Type;
17796        /// let x = Aggregate::new().set_state_type(Type::default()/* use setters */);
17797        /// ```
17798        pub fn set_state_type<T>(mut self, v: T) -> Self
17799        where
17800            T: std::convert::Into<crate::model::Type>,
17801        {
17802            self.state_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17803            self
17804        }
17805
17806        /// Sets or clears the value of [state_type][crate::model::r#type::Aggregate::state_type].
17807        ///
17808        /// # Example
17809        /// ```ignore,no_run
17810        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17811        /// use google_cloud_bigtable_admin_v2::model::Type;
17812        /// let x = Aggregate::new().set_or_clear_state_type(Some(Type::default()/* use setters */));
17813        /// let x = Aggregate::new().set_or_clear_state_type(None::<Type>);
17814        /// ```
17815        pub fn set_or_clear_state_type<T>(mut self, v: std::option::Option<T>) -> Self
17816        where
17817            T: std::convert::Into<crate::model::Type>,
17818        {
17819            self.state_type = v.map(|x| std::boxed::Box::new(x.into()));
17820            self
17821        }
17822
17823        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator].
17824        ///
17825        /// Note that all the setters affecting `aggregator` are mutually
17826        /// exclusive.
17827        ///
17828        /// # Example
17829        /// ```ignore,no_run
17830        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17831        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
17832        /// let x = Aggregate::new().set_aggregator(Some(
17833        ///     google_cloud_bigtable_admin_v2::model::r#type::aggregate::Aggregator::Sum(Sum::default().into())));
17834        /// ```
17835        pub fn set_aggregator<
17836            T: std::convert::Into<std::option::Option<crate::model::r#type::aggregate::Aggregator>>,
17837        >(
17838            mut self,
17839            v: T,
17840        ) -> Self {
17841            self.aggregator = v.into();
17842            self
17843        }
17844
17845        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
17846        /// if it holds a `Sum`, `None` if the field is not set or
17847        /// holds a different branch.
17848        pub fn sum(
17849            &self,
17850        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Sum>> {
17851            #[allow(unreachable_patterns)]
17852            self.aggregator.as_ref().and_then(|v| match v {
17853                crate::model::r#type::aggregate::Aggregator::Sum(v) => std::option::Option::Some(v),
17854                _ => std::option::Option::None,
17855            })
17856        }
17857
17858        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
17859        /// to hold a `Sum`.
17860        ///
17861        /// Note that all the setters affecting `aggregator` are
17862        /// mutually exclusive.
17863        ///
17864        /// # Example
17865        /// ```ignore,no_run
17866        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17867        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
17868        /// let x = Aggregate::new().set_sum(Sum::default()/* use setters */);
17869        /// assert!(x.sum().is_some());
17870        /// assert!(x.hllpp_unique_count().is_none());
17871        /// assert!(x.max().is_none());
17872        /// assert!(x.min().is_none());
17873        /// ```
17874        pub fn set_sum<
17875            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Sum>>,
17876        >(
17877            mut self,
17878            v: T,
17879        ) -> Self {
17880            self.aggregator = std::option::Option::Some(
17881                crate::model::r#type::aggregate::Aggregator::Sum(v.into()),
17882            );
17883            self
17884        }
17885
17886        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
17887        /// if it holds a `HllppUniqueCount`, `None` if the field is not set or
17888        /// holds a different branch.
17889        pub fn hllpp_unique_count(
17890            &self,
17891        ) -> std::option::Option<
17892            &std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
17893        > {
17894            #[allow(unreachable_patterns)]
17895            self.aggregator.as_ref().and_then(|v| match v {
17896                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v) => {
17897                    std::option::Option::Some(v)
17898                }
17899                _ => std::option::Option::None,
17900            })
17901        }
17902
17903        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
17904        /// to hold a `HllppUniqueCount`.
17905        ///
17906        /// Note that all the setters affecting `aggregator` are
17907        /// mutually exclusive.
17908        ///
17909        /// # Example
17910        /// ```ignore,no_run
17911        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17912        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount;
17913        /// let x = Aggregate::new().set_hllpp_unique_count(HyperLogLogPlusPlusUniqueCount::default()/* use setters */);
17914        /// assert!(x.hllpp_unique_count().is_some());
17915        /// assert!(x.sum().is_none());
17916        /// assert!(x.max().is_none());
17917        /// assert!(x.min().is_none());
17918        /// ```
17919        pub fn set_hllpp_unique_count<
17920            T: std::convert::Into<
17921                    std::boxed::Box<
17922                        crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount,
17923                    >,
17924                >,
17925        >(
17926            mut self,
17927            v: T,
17928        ) -> Self {
17929            self.aggregator = std::option::Option::Some(
17930                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v.into()),
17931            );
17932            self
17933        }
17934
17935        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
17936        /// if it holds a `Max`, `None` if the field is not set or
17937        /// holds a different branch.
17938        pub fn max(
17939            &self,
17940        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Max>> {
17941            #[allow(unreachable_patterns)]
17942            self.aggregator.as_ref().and_then(|v| match v {
17943                crate::model::r#type::aggregate::Aggregator::Max(v) => std::option::Option::Some(v),
17944                _ => std::option::Option::None,
17945            })
17946        }
17947
17948        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
17949        /// to hold a `Max`.
17950        ///
17951        /// Note that all the setters affecting `aggregator` are
17952        /// mutually exclusive.
17953        ///
17954        /// # Example
17955        /// ```ignore,no_run
17956        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17957        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Max;
17958        /// let x = Aggregate::new().set_max(Max::default()/* use setters */);
17959        /// assert!(x.max().is_some());
17960        /// assert!(x.sum().is_none());
17961        /// assert!(x.hllpp_unique_count().is_none());
17962        /// assert!(x.min().is_none());
17963        /// ```
17964        pub fn set_max<
17965            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Max>>,
17966        >(
17967            mut self,
17968            v: T,
17969        ) -> Self {
17970            self.aggregator = std::option::Option::Some(
17971                crate::model::r#type::aggregate::Aggregator::Max(v.into()),
17972            );
17973            self
17974        }
17975
17976        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
17977        /// if it holds a `Min`, `None` if the field is not set or
17978        /// holds a different branch.
17979        pub fn min(
17980            &self,
17981        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Min>> {
17982            #[allow(unreachable_patterns)]
17983            self.aggregator.as_ref().and_then(|v| match v {
17984                crate::model::r#type::aggregate::Aggregator::Min(v) => std::option::Option::Some(v),
17985                _ => std::option::Option::None,
17986            })
17987        }
17988
17989        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
17990        /// to hold a `Min`.
17991        ///
17992        /// Note that all the setters affecting `aggregator` are
17993        /// mutually exclusive.
17994        ///
17995        /// # Example
17996        /// ```ignore,no_run
17997        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17998        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Min;
17999        /// let x = Aggregate::new().set_min(Min::default()/* use setters */);
18000        /// assert!(x.min().is_some());
18001        /// assert!(x.sum().is_none());
18002        /// assert!(x.hllpp_unique_count().is_none());
18003        /// assert!(x.max().is_none());
18004        /// ```
18005        pub fn set_min<
18006            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Min>>,
18007        >(
18008            mut self,
18009            v: T,
18010        ) -> Self {
18011            self.aggregator = std::option::Option::Some(
18012                crate::model::r#type::aggregate::Aggregator::Min(v.into()),
18013            );
18014            self
18015        }
18016    }
18017
18018    impl wkt::message::Message for Aggregate {
18019        fn typename() -> &'static str {
18020            "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate"
18021        }
18022    }
18023
18024    /// Defines additional types related to [Aggregate].
18025    pub mod aggregate {
18026        #[allow(unused_imports)]
18027        use super::*;
18028
18029        /// Computes the sum of the input values.
18030        /// Allowed input: `Int64`
18031        /// State: same as input
18032        #[derive(Clone, Default, PartialEq)]
18033        #[non_exhaustive]
18034        pub struct Sum {
18035            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18036        }
18037
18038        impl Sum {
18039            pub fn new() -> Self {
18040                std::default::Default::default()
18041            }
18042        }
18043
18044        impl wkt::message::Message for Sum {
18045            fn typename() -> &'static str {
18046                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Sum"
18047            }
18048        }
18049
18050        /// Computes the max of the input values.
18051        /// Allowed input: `Int64`
18052        /// State: same as input
18053        #[derive(Clone, Default, PartialEq)]
18054        #[non_exhaustive]
18055        pub struct Max {
18056            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18057        }
18058
18059        impl Max {
18060            pub fn new() -> Self {
18061                std::default::Default::default()
18062            }
18063        }
18064
18065        impl wkt::message::Message for Max {
18066            fn typename() -> &'static str {
18067                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Max"
18068            }
18069        }
18070
18071        /// Computes the min of the input values.
18072        /// Allowed input: `Int64`
18073        /// State: same as input
18074        #[derive(Clone, Default, PartialEq)]
18075        #[non_exhaustive]
18076        pub struct Min {
18077            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18078        }
18079
18080        impl Min {
18081            pub fn new() -> Self {
18082                std::default::Default::default()
18083            }
18084        }
18085
18086        impl wkt::message::Message for Min {
18087            fn typename() -> &'static str {
18088                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Min"
18089            }
18090        }
18091
18092        /// Computes an approximate unique count over the input values. When using
18093        /// raw data as input, be careful to use a consistent encoding. Otherwise
18094        /// the same value encoded differently could count more than once, or two
18095        /// distinct values could count as identical.
18096        /// Input: Any, or omit for Raw
18097        /// State: TBD
18098        /// Special state conversions: `Int64` (the unique count estimate)
18099        #[derive(Clone, Default, PartialEq)]
18100        #[non_exhaustive]
18101        pub struct HyperLogLogPlusPlusUniqueCount {
18102            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18103        }
18104
18105        impl HyperLogLogPlusPlusUniqueCount {
18106            pub fn new() -> Self {
18107                std::default::Default::default()
18108            }
18109        }
18110
18111        impl wkt::message::Message for HyperLogLogPlusPlusUniqueCount {
18112            fn typename() -> &'static str {
18113                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount"
18114            }
18115        }
18116
18117        /// Which aggregator function to use. The configured types must match.
18118        #[derive(Clone, Debug, PartialEq)]
18119        #[non_exhaustive]
18120        pub enum Aggregator {
18121            /// Sum aggregator.
18122            Sum(std::boxed::Box<crate::model::r#type::aggregate::Sum>),
18123            /// HyperLogLogPlusPlusUniqueCount aggregator.
18124            HllppUniqueCount(
18125                std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18126            ),
18127            /// Max aggregator.
18128            Max(std::boxed::Box<crate::model::r#type::aggregate::Max>),
18129            /// Min aggregator.
18130            Min(std::boxed::Box<crate::model::r#type::aggregate::Min>),
18131        }
18132    }
18133
18134    /// The kind of type that this represents.
18135    #[derive(Clone, Debug, PartialEq)]
18136    #[non_exhaustive]
18137    pub enum Kind {
18138        /// Bytes
18139        BytesType(std::boxed::Box<crate::model::r#type::Bytes>),
18140        /// String
18141        StringType(std::boxed::Box<crate::model::r#type::String>),
18142        /// Int64
18143        Int64Type(std::boxed::Box<crate::model::r#type::Int64>),
18144        /// Float32
18145        Float32Type(std::boxed::Box<crate::model::r#type::Float32>),
18146        /// Float64
18147        Float64Type(std::boxed::Box<crate::model::r#type::Float64>),
18148        /// Bool
18149        BoolType(std::boxed::Box<crate::model::r#type::Bool>),
18150        /// Timestamp
18151        TimestampType(std::boxed::Box<crate::model::r#type::Timestamp>),
18152        /// Date
18153        DateType(std::boxed::Box<crate::model::r#type::Date>),
18154        /// Aggregate
18155        AggregateType(std::boxed::Box<crate::model::r#type::Aggregate>),
18156        /// Struct
18157        StructType(std::boxed::Box<crate::model::r#type::Struct>),
18158        /// Array
18159        ArrayType(std::boxed::Box<crate::model::r#type::Array>),
18160        /// Map
18161        MapType(std::boxed::Box<crate::model::r#type::Map>),
18162        /// Proto
18163        ProtoType(std::boxed::Box<crate::model::r#type::Proto>),
18164        /// Enum
18165        EnumType(std::boxed::Box<crate::model::r#type::Enum>),
18166    }
18167}
18168
18169/// Storage media types for persisting Bigtable data.
18170///
18171/// # Working with unknown values
18172///
18173/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18174/// additional enum variants at any time. Adding new variants is not considered
18175/// a breaking change. Applications should write their code in anticipation of:
18176///
18177/// - New values appearing in future releases of the client library, **and**
18178/// - New values received dynamically, without application changes.
18179///
18180/// Please consult the [Working with enums] section in the user guide for some
18181/// guidelines.
18182///
18183/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18184#[derive(Clone, Debug, PartialEq)]
18185#[non_exhaustive]
18186pub enum StorageType {
18187    /// The user did not specify a storage type.
18188    Unspecified,
18189    /// Flash (SSD) storage should be used.
18190    Ssd,
18191    /// Magnetic drive (HDD) storage should be used.
18192    Hdd,
18193    /// If set, the enum was initialized with an unknown value.
18194    ///
18195    /// Applications can examine the value using [StorageType::value] or
18196    /// [StorageType::name].
18197    UnknownValue(storage_type::UnknownValue),
18198}
18199
18200#[doc(hidden)]
18201pub mod storage_type {
18202    #[allow(unused_imports)]
18203    use super::*;
18204    #[derive(Clone, Debug, PartialEq)]
18205    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18206}
18207
18208impl StorageType {
18209    /// Gets the enum value.
18210    ///
18211    /// Returns `None` if the enum contains an unknown value deserialized from
18212    /// the string representation of enums.
18213    pub fn value(&self) -> std::option::Option<i32> {
18214        match self {
18215            Self::Unspecified => std::option::Option::Some(0),
18216            Self::Ssd => std::option::Option::Some(1),
18217            Self::Hdd => std::option::Option::Some(2),
18218            Self::UnknownValue(u) => u.0.value(),
18219        }
18220    }
18221
18222    /// Gets the enum value as a string.
18223    ///
18224    /// Returns `None` if the enum contains an unknown value deserialized from
18225    /// the integer representation of enums.
18226    pub fn name(&self) -> std::option::Option<&str> {
18227        match self {
18228            Self::Unspecified => std::option::Option::Some("STORAGE_TYPE_UNSPECIFIED"),
18229            Self::Ssd => std::option::Option::Some("SSD"),
18230            Self::Hdd => std::option::Option::Some("HDD"),
18231            Self::UnknownValue(u) => u.0.name(),
18232        }
18233    }
18234}
18235
18236impl std::default::Default for StorageType {
18237    fn default() -> Self {
18238        use std::convert::From;
18239        Self::from(0)
18240    }
18241}
18242
18243impl std::fmt::Display for StorageType {
18244    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18245        wkt::internal::display_enum(f, self.name(), self.value())
18246    }
18247}
18248
18249impl std::convert::From<i32> for StorageType {
18250    fn from(value: i32) -> Self {
18251        match value {
18252            0 => Self::Unspecified,
18253            1 => Self::Ssd,
18254            2 => Self::Hdd,
18255            _ => Self::UnknownValue(storage_type::UnknownValue(
18256                wkt::internal::UnknownEnumValue::Integer(value),
18257            )),
18258        }
18259    }
18260}
18261
18262impl std::convert::From<&str> for StorageType {
18263    fn from(value: &str) -> Self {
18264        use std::string::ToString;
18265        match value {
18266            "STORAGE_TYPE_UNSPECIFIED" => Self::Unspecified,
18267            "SSD" => Self::Ssd,
18268            "HDD" => Self::Hdd,
18269            _ => Self::UnknownValue(storage_type::UnknownValue(
18270                wkt::internal::UnknownEnumValue::String(value.to_string()),
18271            )),
18272        }
18273    }
18274}
18275
18276impl serde::ser::Serialize for StorageType {
18277    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18278    where
18279        S: serde::Serializer,
18280    {
18281        match self {
18282            Self::Unspecified => serializer.serialize_i32(0),
18283            Self::Ssd => serializer.serialize_i32(1),
18284            Self::Hdd => serializer.serialize_i32(2),
18285            Self::UnknownValue(u) => u.0.serialize(serializer),
18286        }
18287    }
18288}
18289
18290impl<'de> serde::de::Deserialize<'de> for StorageType {
18291    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18292    where
18293        D: serde::Deserializer<'de>,
18294    {
18295        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageType>::new(
18296            ".google.bigtable.admin.v2.StorageType",
18297        ))
18298    }
18299}
18300
18301/// Indicates the type of the restore source.
18302///
18303/// # Working with unknown values
18304///
18305/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18306/// additional enum variants at any time. Adding new variants is not considered
18307/// a breaking change. Applications should write their code in anticipation of:
18308///
18309/// - New values appearing in future releases of the client library, **and**
18310/// - New values received dynamically, without application changes.
18311///
18312/// Please consult the [Working with enums] section in the user guide for some
18313/// guidelines.
18314///
18315/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
18316#[derive(Clone, Debug, PartialEq)]
18317#[non_exhaustive]
18318pub enum RestoreSourceType {
18319    /// No restore associated.
18320    Unspecified,
18321    /// A backup was used as the source of the restore.
18322    Backup,
18323    /// If set, the enum was initialized with an unknown value.
18324    ///
18325    /// Applications can examine the value using [RestoreSourceType::value] or
18326    /// [RestoreSourceType::name].
18327    UnknownValue(restore_source_type::UnknownValue),
18328}
18329
18330#[doc(hidden)]
18331pub mod restore_source_type {
18332    #[allow(unused_imports)]
18333    use super::*;
18334    #[derive(Clone, Debug, PartialEq)]
18335    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18336}
18337
18338impl RestoreSourceType {
18339    /// Gets the enum value.
18340    ///
18341    /// Returns `None` if the enum contains an unknown value deserialized from
18342    /// the string representation of enums.
18343    pub fn value(&self) -> std::option::Option<i32> {
18344        match self {
18345            Self::Unspecified => std::option::Option::Some(0),
18346            Self::Backup => std::option::Option::Some(1),
18347            Self::UnknownValue(u) => u.0.value(),
18348        }
18349    }
18350
18351    /// Gets the enum value as a string.
18352    ///
18353    /// Returns `None` if the enum contains an unknown value deserialized from
18354    /// the integer representation of enums.
18355    pub fn name(&self) -> std::option::Option<&str> {
18356        match self {
18357            Self::Unspecified => std::option::Option::Some("RESTORE_SOURCE_TYPE_UNSPECIFIED"),
18358            Self::Backup => std::option::Option::Some("BACKUP"),
18359            Self::UnknownValue(u) => u.0.name(),
18360        }
18361    }
18362}
18363
18364impl std::default::Default for RestoreSourceType {
18365    fn default() -> Self {
18366        use std::convert::From;
18367        Self::from(0)
18368    }
18369}
18370
18371impl std::fmt::Display for RestoreSourceType {
18372    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18373        wkt::internal::display_enum(f, self.name(), self.value())
18374    }
18375}
18376
18377impl std::convert::From<i32> for RestoreSourceType {
18378    fn from(value: i32) -> Self {
18379        match value {
18380            0 => Self::Unspecified,
18381            1 => Self::Backup,
18382            _ => Self::UnknownValue(restore_source_type::UnknownValue(
18383                wkt::internal::UnknownEnumValue::Integer(value),
18384            )),
18385        }
18386    }
18387}
18388
18389impl std::convert::From<&str> for RestoreSourceType {
18390    fn from(value: &str) -> Self {
18391        use std::string::ToString;
18392        match value {
18393            "RESTORE_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
18394            "BACKUP" => Self::Backup,
18395            _ => Self::UnknownValue(restore_source_type::UnknownValue(
18396                wkt::internal::UnknownEnumValue::String(value.to_string()),
18397            )),
18398        }
18399    }
18400}
18401
18402impl serde::ser::Serialize for RestoreSourceType {
18403    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18404    where
18405        S: serde::Serializer,
18406    {
18407        match self {
18408            Self::Unspecified => serializer.serialize_i32(0),
18409            Self::Backup => serializer.serialize_i32(1),
18410            Self::UnknownValue(u) => u.0.serialize(serializer),
18411        }
18412    }
18413}
18414
18415impl<'de> serde::de::Deserialize<'de> for RestoreSourceType {
18416    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18417    where
18418        D: serde::Deserializer<'de>,
18419    {
18420        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RestoreSourceType>::new(
18421            ".google.bigtable.admin.v2.RestoreSourceType",
18422        ))
18423    }
18424}