Skip to main content

google_cloud_bigtable_admin_v2/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_iam_v1;
25extern crate google_cloud_longrunning;
26extern crate google_cloud_lro;
27extern crate google_cloud_rpc;
28extern crate serde;
29extern crate serde_json;
30extern crate serde_with;
31extern crate std;
32extern crate tracing;
33extern crate wkt;
34
35mod debug;
36mod deserialize;
37mod serialize;
38
39/// Request message for BigtableInstanceAdmin.CreateInstance.
40#[derive(Clone, Default, PartialEq)]
41#[non_exhaustive]
42pub struct CreateInstanceRequest {
43    /// Required. The unique name of the project in which to create the new
44    /// instance. Values are of the form `projects/{project}`.
45    pub parent: std::string::String,
46
47    /// Required. The ID to be used when referring to the new instance within its
48    /// project, e.g., just `myinstance` rather than
49    /// `projects/myproject/instances/myinstance`.
50    pub instance_id: std::string::String,
51
52    /// Required. The instance to create.
53    /// Fields marked `OutputOnly` must be left blank.
54    pub instance: std::option::Option<crate::model::Instance>,
55
56    /// Required. The clusters to be created within the instance, mapped by desired
57    /// cluster ID, e.g., just `mycluster` rather than
58    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
59    /// Fields marked `OutputOnly` must be left blank.
60    pub clusters: std::collections::HashMap<std::string::String, crate::model::Cluster>,
61
62    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
63}
64
65impl CreateInstanceRequest {
66    pub fn new() -> Self {
67        std::default::Default::default()
68    }
69
70    /// Sets the value of [parent][crate::model::CreateInstanceRequest::parent].
71    ///
72    /// # Example
73    /// ```ignore,no_run
74    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
75    /// let x = CreateInstanceRequest::new().set_parent("example");
76    /// ```
77    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
78        self.parent = v.into();
79        self
80    }
81
82    /// Sets the value of [instance_id][crate::model::CreateInstanceRequest::instance_id].
83    ///
84    /// # Example
85    /// ```ignore,no_run
86    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
87    /// let x = CreateInstanceRequest::new().set_instance_id("example");
88    /// ```
89    pub fn set_instance_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
90        self.instance_id = v.into();
91        self
92    }
93
94    /// Sets the value of [instance][crate::model::CreateInstanceRequest::instance].
95    ///
96    /// # Example
97    /// ```ignore,no_run
98    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
99    /// use google_cloud_bigtable_admin_v2::model::Instance;
100    /// let x = CreateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
101    /// ```
102    pub fn set_instance<T>(mut self, v: T) -> Self
103    where
104        T: std::convert::Into<crate::model::Instance>,
105    {
106        self.instance = std::option::Option::Some(v.into());
107        self
108    }
109
110    /// Sets or clears the value of [instance][crate::model::CreateInstanceRequest::instance].
111    ///
112    /// # Example
113    /// ```ignore,no_run
114    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
115    /// use google_cloud_bigtable_admin_v2::model::Instance;
116    /// let x = CreateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
117    /// let x = CreateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
118    /// ```
119    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
120    where
121        T: std::convert::Into<crate::model::Instance>,
122    {
123        self.instance = v.map(|x| x.into());
124        self
125    }
126
127    /// Sets the value of [clusters][crate::model::CreateInstanceRequest::clusters].
128    ///
129    /// # Example
130    /// ```ignore,no_run
131    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
132    /// use google_cloud_bigtable_admin_v2::model::Cluster;
133    /// let x = CreateInstanceRequest::new().set_clusters([
134    ///     ("key0", Cluster::default()/* use setters */),
135    ///     ("key1", Cluster::default()/* use (different) setters */),
136    /// ]);
137    /// ```
138    pub fn set_clusters<T, K, V>(mut self, v: T) -> Self
139    where
140        T: std::iter::IntoIterator<Item = (K, V)>,
141        K: std::convert::Into<std::string::String>,
142        V: std::convert::Into<crate::model::Cluster>,
143    {
144        use std::iter::Iterator;
145        self.clusters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
146        self
147    }
148}
149
150impl wkt::message::Message for CreateInstanceRequest {
151    fn typename() -> &'static str {
152        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceRequest"
153    }
154}
155
156/// Request message for BigtableInstanceAdmin.GetInstance.
157#[derive(Clone, Default, PartialEq)]
158#[non_exhaustive]
159pub struct GetInstanceRequest {
160    /// Required. The unique name of the requested instance. Values are of the form
161    /// `projects/{project}/instances/{instance}`.
162    pub name: std::string::String,
163
164    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
165}
166
167impl GetInstanceRequest {
168    pub fn new() -> Self {
169        std::default::Default::default()
170    }
171
172    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
173    ///
174    /// # Example
175    /// ```ignore,no_run
176    /// # use google_cloud_bigtable_admin_v2::model::GetInstanceRequest;
177    /// let x = GetInstanceRequest::new().set_name("example");
178    /// ```
179    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
180        self.name = v.into();
181        self
182    }
183}
184
185impl wkt::message::Message for GetInstanceRequest {
186    fn typename() -> &'static str {
187        "type.googleapis.com/google.bigtable.admin.v2.GetInstanceRequest"
188    }
189}
190
191/// Request message for BigtableInstanceAdmin.ListInstances.
192#[derive(Clone, Default, PartialEq)]
193#[non_exhaustive]
194pub struct ListInstancesRequest {
195    /// Required. The unique name of the project for which a list of instances is
196    /// requested. Values are of the form `projects/{project}`.
197    pub parent: std::string::String,
198
199    /// DEPRECATED: This field is unused and ignored.
200    pub page_token: std::string::String,
201
202    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
203}
204
205impl ListInstancesRequest {
206    pub fn new() -> Self {
207        std::default::Default::default()
208    }
209
210    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
211    ///
212    /// # Example
213    /// ```ignore,no_run
214    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
215    /// let x = ListInstancesRequest::new().set_parent("example");
216    /// ```
217    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
218        self.parent = v.into();
219        self
220    }
221
222    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
223    ///
224    /// # Example
225    /// ```ignore,no_run
226    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
227    /// let x = ListInstancesRequest::new().set_page_token("example");
228    /// ```
229    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
230        self.page_token = v.into();
231        self
232    }
233}
234
235impl wkt::message::Message for ListInstancesRequest {
236    fn typename() -> &'static str {
237        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesRequest"
238    }
239}
240
241/// Response message for BigtableInstanceAdmin.ListInstances.
242#[derive(Clone, Default, PartialEq)]
243#[non_exhaustive]
244pub struct ListInstancesResponse {
245    /// The list of requested instances.
246    pub instances: std::vec::Vec<crate::model::Instance>,
247
248    /// Locations from which Instance information could not be retrieved,
249    /// due to an outage or some other transient condition.
250    /// Instances whose Clusters are all in one of the failed locations
251    /// may be missing from `instances`, and Instances with at least one
252    /// Cluster in a failed location may only have partial information returned.
253    /// Values are of the form `projects/<project>/locations/<zone_id>`
254    pub failed_locations: std::vec::Vec<std::string::String>,
255
256    /// DEPRECATED: This field is unused and ignored.
257    pub next_page_token: std::string::String,
258
259    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
260}
261
262impl ListInstancesResponse {
263    pub fn new() -> Self {
264        std::default::Default::default()
265    }
266
267    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
268    ///
269    /// # Example
270    /// ```ignore,no_run
271    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
272    /// use google_cloud_bigtable_admin_v2::model::Instance;
273    /// let x = ListInstancesResponse::new()
274    ///     .set_instances([
275    ///         Instance::default()/* use setters */,
276    ///         Instance::default()/* use (different) setters */,
277    ///     ]);
278    /// ```
279    pub fn set_instances<T, V>(mut self, v: T) -> Self
280    where
281        T: std::iter::IntoIterator<Item = V>,
282        V: std::convert::Into<crate::model::Instance>,
283    {
284        use std::iter::Iterator;
285        self.instances = v.into_iter().map(|i| i.into()).collect();
286        self
287    }
288
289    /// Sets the value of [failed_locations][crate::model::ListInstancesResponse::failed_locations].
290    ///
291    /// # Example
292    /// ```ignore,no_run
293    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
294    /// let x = ListInstancesResponse::new().set_failed_locations(["a", "b", "c"]);
295    /// ```
296    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
297    where
298        T: std::iter::IntoIterator<Item = V>,
299        V: std::convert::Into<std::string::String>,
300    {
301        use std::iter::Iterator;
302        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
303        self
304    }
305
306    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
307    ///
308    /// # Example
309    /// ```ignore,no_run
310    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
311    /// let x = ListInstancesResponse::new().set_next_page_token("example");
312    /// ```
313    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
314        self.next_page_token = v.into();
315        self
316    }
317}
318
319impl wkt::message::Message for ListInstancesResponse {
320    fn typename() -> &'static str {
321        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesResponse"
322    }
323}
324
325/// Request message for BigtableInstanceAdmin.PartialUpdateInstance.
326#[derive(Clone, Default, PartialEq)]
327#[non_exhaustive]
328pub struct PartialUpdateInstanceRequest {
329    /// Required. The Instance which will (partially) replace the current value.
330    pub instance: std::option::Option<crate::model::Instance>,
331
332    /// Required. The subset of Instance fields which should be replaced.
333    /// Must be explicitly set.
334    pub update_mask: std::option::Option<wkt::FieldMask>,
335
336    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
337}
338
339impl PartialUpdateInstanceRequest {
340    pub fn new() -> Self {
341        std::default::Default::default()
342    }
343
344    /// Sets the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
345    ///
346    /// # Example
347    /// ```ignore,no_run
348    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
349    /// use google_cloud_bigtable_admin_v2::model::Instance;
350    /// let x = PartialUpdateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
351    /// ```
352    pub fn set_instance<T>(mut self, v: T) -> Self
353    where
354        T: std::convert::Into<crate::model::Instance>,
355    {
356        self.instance = std::option::Option::Some(v.into());
357        self
358    }
359
360    /// Sets or clears the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
361    ///
362    /// # Example
363    /// ```ignore,no_run
364    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
365    /// use google_cloud_bigtable_admin_v2::model::Instance;
366    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
367    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
368    /// ```
369    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
370    where
371        T: std::convert::Into<crate::model::Instance>,
372    {
373        self.instance = v.map(|x| x.into());
374        self
375    }
376
377    /// Sets the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
378    ///
379    /// # Example
380    /// ```ignore,no_run
381    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
382    /// use wkt::FieldMask;
383    /// let x = PartialUpdateInstanceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
384    /// ```
385    pub fn set_update_mask<T>(mut self, v: T) -> Self
386    where
387        T: std::convert::Into<wkt::FieldMask>,
388    {
389        self.update_mask = std::option::Option::Some(v.into());
390        self
391    }
392
393    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
394    ///
395    /// # Example
396    /// ```ignore,no_run
397    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
398    /// use wkt::FieldMask;
399    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
400    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
401    /// ```
402    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
403    where
404        T: std::convert::Into<wkt::FieldMask>,
405    {
406        self.update_mask = v.map(|x| x.into());
407        self
408    }
409}
410
411impl wkt::message::Message for PartialUpdateInstanceRequest {
412    fn typename() -> &'static str {
413        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateInstanceRequest"
414    }
415}
416
417/// Request message for BigtableInstanceAdmin.DeleteInstance.
418#[derive(Clone, Default, PartialEq)]
419#[non_exhaustive]
420pub struct DeleteInstanceRequest {
421    /// Required. The unique name of the instance to be deleted.
422    /// Values are of the form `projects/{project}/instances/{instance}`.
423    pub name: std::string::String,
424
425    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
426}
427
428impl DeleteInstanceRequest {
429    pub fn new() -> Self {
430        std::default::Default::default()
431    }
432
433    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
434    ///
435    /// # Example
436    /// ```ignore,no_run
437    /// # use google_cloud_bigtable_admin_v2::model::DeleteInstanceRequest;
438    /// let x = DeleteInstanceRequest::new().set_name("example");
439    /// ```
440    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
441        self.name = v.into();
442        self
443    }
444}
445
446impl wkt::message::Message for DeleteInstanceRequest {
447    fn typename() -> &'static str {
448        "type.googleapis.com/google.bigtable.admin.v2.DeleteInstanceRequest"
449    }
450}
451
452/// Request message for BigtableInstanceAdmin.CreateCluster.
453#[derive(Clone, Default, PartialEq)]
454#[non_exhaustive]
455pub struct CreateClusterRequest {
456    /// Required. The unique name of the instance in which to create the new
457    /// cluster. Values are of the form `projects/{project}/instances/{instance}`.
458    pub parent: std::string::String,
459
460    /// Required. The ID to be used when referring to the new cluster within its
461    /// instance, e.g., just `mycluster` rather than
462    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
463    pub cluster_id: std::string::String,
464
465    /// Required. The cluster to be created.
466    /// Fields marked `OutputOnly` must be left blank.
467    pub cluster: std::option::Option<crate::model::Cluster>,
468
469    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
470}
471
472impl CreateClusterRequest {
473    pub fn new() -> Self {
474        std::default::Default::default()
475    }
476
477    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
478    ///
479    /// # Example
480    /// ```ignore,no_run
481    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
482    /// let x = CreateClusterRequest::new().set_parent("example");
483    /// ```
484    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
485        self.parent = v.into();
486        self
487    }
488
489    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
490    ///
491    /// # Example
492    /// ```ignore,no_run
493    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
494    /// let x = CreateClusterRequest::new().set_cluster_id("example");
495    /// ```
496    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
497        self.cluster_id = v.into();
498        self
499    }
500
501    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
502    ///
503    /// # Example
504    /// ```ignore,no_run
505    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
506    /// use google_cloud_bigtable_admin_v2::model::Cluster;
507    /// let x = CreateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
508    /// ```
509    pub fn set_cluster<T>(mut self, v: T) -> Self
510    where
511        T: std::convert::Into<crate::model::Cluster>,
512    {
513        self.cluster = std::option::Option::Some(v.into());
514        self
515    }
516
517    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
518    ///
519    /// # Example
520    /// ```ignore,no_run
521    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
522    /// use google_cloud_bigtable_admin_v2::model::Cluster;
523    /// let x = CreateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
524    /// let x = CreateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
525    /// ```
526    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
527    where
528        T: std::convert::Into<crate::model::Cluster>,
529    {
530        self.cluster = v.map(|x| x.into());
531        self
532    }
533}
534
535impl wkt::message::Message for CreateClusterRequest {
536    fn typename() -> &'static str {
537        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterRequest"
538    }
539}
540
541/// Request message for BigtableInstanceAdmin.GetCluster.
542#[derive(Clone, Default, PartialEq)]
543#[non_exhaustive]
544pub struct GetClusterRequest {
545    /// Required. The unique name of the requested cluster. Values are of the form
546    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
547    pub name: std::string::String,
548
549    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
550}
551
552impl GetClusterRequest {
553    pub fn new() -> Self {
554        std::default::Default::default()
555    }
556
557    /// Sets the value of [name][crate::model::GetClusterRequest::name].
558    ///
559    /// # Example
560    /// ```ignore,no_run
561    /// # use google_cloud_bigtable_admin_v2::model::GetClusterRequest;
562    /// let x = GetClusterRequest::new().set_name("example");
563    /// ```
564    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
565        self.name = v.into();
566        self
567    }
568}
569
570impl wkt::message::Message for GetClusterRequest {
571    fn typename() -> &'static str {
572        "type.googleapis.com/google.bigtable.admin.v2.GetClusterRequest"
573    }
574}
575
576/// Request message for BigtableInstanceAdmin.ListClusters.
577#[derive(Clone, Default, PartialEq)]
578#[non_exhaustive]
579pub struct ListClustersRequest {
580    /// Required. The unique name of the instance for which a list of clusters is
581    /// requested. Values are of the form
582    /// `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list
583    /// Clusters for all Instances in a project, e.g.,
584    /// `projects/myproject/instances/-`.
585    pub parent: std::string::String,
586
587    /// DEPRECATED: This field is unused and ignored.
588    pub page_token: std::string::String,
589
590    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
591}
592
593impl ListClustersRequest {
594    pub fn new() -> Self {
595        std::default::Default::default()
596    }
597
598    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
599    ///
600    /// # Example
601    /// ```ignore,no_run
602    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
603    /// let x = ListClustersRequest::new().set_parent("example");
604    /// ```
605    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
606        self.parent = v.into();
607        self
608    }
609
610    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
611    ///
612    /// # Example
613    /// ```ignore,no_run
614    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
615    /// let x = ListClustersRequest::new().set_page_token("example");
616    /// ```
617    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
618        self.page_token = v.into();
619        self
620    }
621}
622
623impl wkt::message::Message for ListClustersRequest {
624    fn typename() -> &'static str {
625        "type.googleapis.com/google.bigtable.admin.v2.ListClustersRequest"
626    }
627}
628
629/// Response message for BigtableInstanceAdmin.ListClusters.
630#[derive(Clone, Default, PartialEq)]
631#[non_exhaustive]
632pub struct ListClustersResponse {
633    /// The list of requested clusters.
634    pub clusters: std::vec::Vec<crate::model::Cluster>,
635
636    /// Locations from which Cluster information could not be retrieved,
637    /// due to an outage or some other transient condition.
638    /// Clusters from these locations may be missing from `clusters`,
639    /// or may only have partial information returned.
640    /// Values are of the form `projects/<project>/locations/<zone_id>`
641    pub failed_locations: std::vec::Vec<std::string::String>,
642
643    /// DEPRECATED: This field is unused and ignored.
644    pub next_page_token: std::string::String,
645
646    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
647}
648
649impl ListClustersResponse {
650    pub fn new() -> Self {
651        std::default::Default::default()
652    }
653
654    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
655    ///
656    /// # Example
657    /// ```ignore,no_run
658    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
659    /// use google_cloud_bigtable_admin_v2::model::Cluster;
660    /// let x = ListClustersResponse::new()
661    ///     .set_clusters([
662    ///         Cluster::default()/* use setters */,
663    ///         Cluster::default()/* use (different) setters */,
664    ///     ]);
665    /// ```
666    pub fn set_clusters<T, V>(mut self, v: T) -> Self
667    where
668        T: std::iter::IntoIterator<Item = V>,
669        V: std::convert::Into<crate::model::Cluster>,
670    {
671        use std::iter::Iterator;
672        self.clusters = v.into_iter().map(|i| i.into()).collect();
673        self
674    }
675
676    /// Sets the value of [failed_locations][crate::model::ListClustersResponse::failed_locations].
677    ///
678    /// # Example
679    /// ```ignore,no_run
680    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
681    /// let x = ListClustersResponse::new().set_failed_locations(["a", "b", "c"]);
682    /// ```
683    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
684    where
685        T: std::iter::IntoIterator<Item = V>,
686        V: std::convert::Into<std::string::String>,
687    {
688        use std::iter::Iterator;
689        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
690        self
691    }
692
693    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
694    ///
695    /// # Example
696    /// ```ignore,no_run
697    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
698    /// let x = ListClustersResponse::new().set_next_page_token("example");
699    /// ```
700    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
701        self.next_page_token = v.into();
702        self
703    }
704}
705
706impl wkt::message::Message for ListClustersResponse {
707    fn typename() -> &'static str {
708        "type.googleapis.com/google.bigtable.admin.v2.ListClustersResponse"
709    }
710}
711
712/// Request message for BigtableInstanceAdmin.DeleteCluster.
713#[derive(Clone, Default, PartialEq)]
714#[non_exhaustive]
715pub struct DeleteClusterRequest {
716    /// Required. The unique name of the cluster to be deleted. Values are of the
717    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
718    pub name: std::string::String,
719
720    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
721}
722
723impl DeleteClusterRequest {
724    pub fn new() -> Self {
725        std::default::Default::default()
726    }
727
728    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
729    ///
730    /// # Example
731    /// ```ignore,no_run
732    /// # use google_cloud_bigtable_admin_v2::model::DeleteClusterRequest;
733    /// let x = DeleteClusterRequest::new().set_name("example");
734    /// ```
735    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
736        self.name = v.into();
737        self
738    }
739}
740
741impl wkt::message::Message for DeleteClusterRequest {
742    fn typename() -> &'static str {
743        "type.googleapis.com/google.bigtable.admin.v2.DeleteClusterRequest"
744    }
745}
746
747/// The metadata for the Operation returned by CreateInstance.
748#[derive(Clone, Default, PartialEq)]
749#[non_exhaustive]
750pub struct CreateInstanceMetadata {
751    /// The request that prompted the initiation of this CreateInstance operation.
752    pub original_request: std::option::Option<crate::model::CreateInstanceRequest>,
753
754    /// The time at which the original request was received.
755    pub request_time: std::option::Option<wkt::Timestamp>,
756
757    /// The time at which the operation failed or was completed successfully.
758    pub finish_time: std::option::Option<wkt::Timestamp>,
759
760    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
761}
762
763impl CreateInstanceMetadata {
764    pub fn new() -> Self {
765        std::default::Default::default()
766    }
767
768    /// Sets the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
769    ///
770    /// # Example
771    /// ```ignore,no_run
772    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
773    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
774    /// let x = CreateInstanceMetadata::new().set_original_request(CreateInstanceRequest::default()/* use setters */);
775    /// ```
776    pub fn set_original_request<T>(mut self, v: T) -> Self
777    where
778        T: std::convert::Into<crate::model::CreateInstanceRequest>,
779    {
780        self.original_request = std::option::Option::Some(v.into());
781        self
782    }
783
784    /// Sets or clears the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
785    ///
786    /// # Example
787    /// ```ignore,no_run
788    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
789    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
790    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(Some(CreateInstanceRequest::default()/* use setters */));
791    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(None::<CreateInstanceRequest>);
792    /// ```
793    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
794    where
795        T: std::convert::Into<crate::model::CreateInstanceRequest>,
796    {
797        self.original_request = v.map(|x| x.into());
798        self
799    }
800
801    /// Sets the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
802    ///
803    /// # Example
804    /// ```ignore,no_run
805    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
806    /// use wkt::Timestamp;
807    /// let x = CreateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
808    /// ```
809    pub fn set_request_time<T>(mut self, v: T) -> Self
810    where
811        T: std::convert::Into<wkt::Timestamp>,
812    {
813        self.request_time = std::option::Option::Some(v.into());
814        self
815    }
816
817    /// Sets or clears the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
818    ///
819    /// # Example
820    /// ```ignore,no_run
821    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
822    /// use wkt::Timestamp;
823    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
824    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
825    /// ```
826    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
827    where
828        T: std::convert::Into<wkt::Timestamp>,
829    {
830        self.request_time = v.map(|x| x.into());
831        self
832    }
833
834    /// Sets the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
835    ///
836    /// # Example
837    /// ```ignore,no_run
838    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
839    /// use wkt::Timestamp;
840    /// let x = CreateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
841    /// ```
842    pub fn set_finish_time<T>(mut self, v: T) -> Self
843    where
844        T: std::convert::Into<wkt::Timestamp>,
845    {
846        self.finish_time = std::option::Option::Some(v.into());
847        self
848    }
849
850    /// Sets or clears the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
851    ///
852    /// # Example
853    /// ```ignore,no_run
854    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
855    /// use wkt::Timestamp;
856    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
857    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
858    /// ```
859    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
860    where
861        T: std::convert::Into<wkt::Timestamp>,
862    {
863        self.finish_time = v.map(|x| x.into());
864        self
865    }
866}
867
868impl wkt::message::Message for CreateInstanceMetadata {
869    fn typename() -> &'static str {
870        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceMetadata"
871    }
872}
873
874/// The metadata for the Operation returned by UpdateInstance.
875#[derive(Clone, Default, PartialEq)]
876#[non_exhaustive]
877pub struct UpdateInstanceMetadata {
878    /// The request that prompted the initiation of this UpdateInstance operation.
879    pub original_request: std::option::Option<crate::model::PartialUpdateInstanceRequest>,
880
881    /// The time at which the original request was received.
882    pub request_time: std::option::Option<wkt::Timestamp>,
883
884    /// The time at which the operation failed or was completed successfully.
885    pub finish_time: std::option::Option<wkt::Timestamp>,
886
887    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
888}
889
890impl UpdateInstanceMetadata {
891    pub fn new() -> Self {
892        std::default::Default::default()
893    }
894
895    /// Sets the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
896    ///
897    /// # Example
898    /// ```ignore,no_run
899    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
900    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
901    /// let x = UpdateInstanceMetadata::new().set_original_request(PartialUpdateInstanceRequest::default()/* use setters */);
902    /// ```
903    pub fn set_original_request<T>(mut self, v: T) -> Self
904    where
905        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
906    {
907        self.original_request = std::option::Option::Some(v.into());
908        self
909    }
910
911    /// Sets or clears the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
912    ///
913    /// # Example
914    /// ```ignore,no_run
915    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
916    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
917    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(Some(PartialUpdateInstanceRequest::default()/* use setters */));
918    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(None::<PartialUpdateInstanceRequest>);
919    /// ```
920    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
921    where
922        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
923    {
924        self.original_request = v.map(|x| x.into());
925        self
926    }
927
928    /// Sets the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
929    ///
930    /// # Example
931    /// ```ignore,no_run
932    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
933    /// use wkt::Timestamp;
934    /// let x = UpdateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
935    /// ```
936    pub fn set_request_time<T>(mut self, v: T) -> Self
937    where
938        T: std::convert::Into<wkt::Timestamp>,
939    {
940        self.request_time = std::option::Option::Some(v.into());
941        self
942    }
943
944    /// Sets or clears the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
945    ///
946    /// # Example
947    /// ```ignore,no_run
948    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
949    /// use wkt::Timestamp;
950    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
951    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
952    /// ```
953    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
954    where
955        T: std::convert::Into<wkt::Timestamp>,
956    {
957        self.request_time = v.map(|x| x.into());
958        self
959    }
960
961    /// Sets the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
962    ///
963    /// # Example
964    /// ```ignore,no_run
965    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
966    /// use wkt::Timestamp;
967    /// let x = UpdateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
968    /// ```
969    pub fn set_finish_time<T>(mut self, v: T) -> Self
970    where
971        T: std::convert::Into<wkt::Timestamp>,
972    {
973        self.finish_time = std::option::Option::Some(v.into());
974        self
975    }
976
977    /// Sets or clears the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
978    ///
979    /// # Example
980    /// ```ignore,no_run
981    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
982    /// use wkt::Timestamp;
983    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
984    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
985    /// ```
986    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
987    where
988        T: std::convert::Into<wkt::Timestamp>,
989    {
990        self.finish_time = v.map(|x| x.into());
991        self
992    }
993}
994
995impl wkt::message::Message for UpdateInstanceMetadata {
996    fn typename() -> &'static str {
997        "type.googleapis.com/google.bigtable.admin.v2.UpdateInstanceMetadata"
998    }
999}
1000
1001/// The metadata for the Operation returned by CreateCluster.
1002#[derive(Clone, Default, PartialEq)]
1003#[non_exhaustive]
1004pub struct CreateClusterMetadata {
1005    /// The request that prompted the initiation of this CreateCluster operation.
1006    pub original_request: std::option::Option<crate::model::CreateClusterRequest>,
1007
1008    /// The time at which the original request was received.
1009    pub request_time: std::option::Option<wkt::Timestamp>,
1010
1011    /// The time at which the operation failed or was completed successfully.
1012    pub finish_time: std::option::Option<wkt::Timestamp>,
1013
1014    /// Keys: the full `name` of each table that existed in the instance when
1015    /// CreateCluster was first called, i.e.
1016    /// `projects/<project>/instances/<instance>/tables/<table>`. Any table added
1017    /// to the instance by a later API call will be created in the new cluster by
1018    /// that API call, not this one.
1019    ///
1020    /// Values: information on how much of a table's data has been copied to the
1021    /// newly-created cluster so far.
1022    pub tables: std::collections::HashMap<
1023        std::string::String,
1024        crate::model::create_cluster_metadata::TableProgress,
1025    >,
1026
1027    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1028}
1029
1030impl CreateClusterMetadata {
1031    pub fn new() -> Self {
1032        std::default::Default::default()
1033    }
1034
1035    /// Sets the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1036    ///
1037    /// # Example
1038    /// ```ignore,no_run
1039    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1040    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1041    /// let x = CreateClusterMetadata::new().set_original_request(CreateClusterRequest::default()/* use setters */);
1042    /// ```
1043    pub fn set_original_request<T>(mut self, v: T) -> Self
1044    where
1045        T: std::convert::Into<crate::model::CreateClusterRequest>,
1046    {
1047        self.original_request = std::option::Option::Some(v.into());
1048        self
1049    }
1050
1051    /// Sets or clears the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1052    ///
1053    /// # Example
1054    /// ```ignore,no_run
1055    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1056    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1057    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(Some(CreateClusterRequest::default()/* use setters */));
1058    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(None::<CreateClusterRequest>);
1059    /// ```
1060    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1061    where
1062        T: std::convert::Into<crate::model::CreateClusterRequest>,
1063    {
1064        self.original_request = v.map(|x| x.into());
1065        self
1066    }
1067
1068    /// Sets the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1069    ///
1070    /// # Example
1071    /// ```ignore,no_run
1072    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1073    /// use wkt::Timestamp;
1074    /// let x = CreateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1075    /// ```
1076    pub fn set_request_time<T>(mut self, v: T) -> Self
1077    where
1078        T: std::convert::Into<wkt::Timestamp>,
1079    {
1080        self.request_time = std::option::Option::Some(v.into());
1081        self
1082    }
1083
1084    /// Sets or clears the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1085    ///
1086    /// # Example
1087    /// ```ignore,no_run
1088    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1089    /// use wkt::Timestamp;
1090    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1091    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1092    /// ```
1093    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1094    where
1095        T: std::convert::Into<wkt::Timestamp>,
1096    {
1097        self.request_time = v.map(|x| x.into());
1098        self
1099    }
1100
1101    /// Sets the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1102    ///
1103    /// # Example
1104    /// ```ignore,no_run
1105    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1106    /// use wkt::Timestamp;
1107    /// let x = CreateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1108    /// ```
1109    pub fn set_finish_time<T>(mut self, v: T) -> Self
1110    where
1111        T: std::convert::Into<wkt::Timestamp>,
1112    {
1113        self.finish_time = std::option::Option::Some(v.into());
1114        self
1115    }
1116
1117    /// Sets or clears the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1118    ///
1119    /// # Example
1120    /// ```ignore,no_run
1121    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1122    /// use wkt::Timestamp;
1123    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1124    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1125    /// ```
1126    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1127    where
1128        T: std::convert::Into<wkt::Timestamp>,
1129    {
1130        self.finish_time = v.map(|x| x.into());
1131        self
1132    }
1133
1134    /// Sets the value of [tables][crate::model::CreateClusterMetadata::tables].
1135    ///
1136    /// # Example
1137    /// ```ignore,no_run
1138    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1139    /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1140    /// let x = CreateClusterMetadata::new().set_tables([
1141    ///     ("key0", TableProgress::default()/* use setters */),
1142    ///     ("key1", TableProgress::default()/* use (different) setters */),
1143    /// ]);
1144    /// ```
1145    pub fn set_tables<T, K, V>(mut self, v: T) -> Self
1146    where
1147        T: std::iter::IntoIterator<Item = (K, V)>,
1148        K: std::convert::Into<std::string::String>,
1149        V: std::convert::Into<crate::model::create_cluster_metadata::TableProgress>,
1150    {
1151        use std::iter::Iterator;
1152        self.tables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1153        self
1154    }
1155}
1156
1157impl wkt::message::Message for CreateClusterMetadata {
1158    fn typename() -> &'static str {
1159        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata"
1160    }
1161}
1162
1163/// Defines additional types related to [CreateClusterMetadata].
1164pub mod create_cluster_metadata {
1165    #[allow(unused_imports)]
1166    use super::*;
1167
1168    /// Progress info for copying a table's data to the new cluster.
1169    #[derive(Clone, Default, PartialEq)]
1170    #[non_exhaustive]
1171    pub struct TableProgress {
1172        /// Estimate of the size of the table to be copied.
1173        pub estimated_size_bytes: i64,
1174
1175        /// Estimate of the number of bytes copied so far for this table.
1176        /// This will eventually reach 'estimated_size_bytes' unless the table copy
1177        /// is CANCELLED.
1178        pub estimated_copied_bytes: i64,
1179
1180        pub state: crate::model::create_cluster_metadata::table_progress::State,
1181
1182        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1183    }
1184
1185    impl TableProgress {
1186        pub fn new() -> Self {
1187            std::default::Default::default()
1188        }
1189
1190        /// Sets the value of [estimated_size_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_size_bytes].
1191        ///
1192        /// # Example
1193        /// ```ignore,no_run
1194        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1195        /// let x = TableProgress::new().set_estimated_size_bytes(42);
1196        /// ```
1197        pub fn set_estimated_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1198            self.estimated_size_bytes = v.into();
1199            self
1200        }
1201
1202        /// Sets the value of [estimated_copied_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_copied_bytes].
1203        ///
1204        /// # Example
1205        /// ```ignore,no_run
1206        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1207        /// let x = TableProgress::new().set_estimated_copied_bytes(42);
1208        /// ```
1209        pub fn set_estimated_copied_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1210            self.estimated_copied_bytes = v.into();
1211            self
1212        }
1213
1214        /// Sets the value of [state][crate::model::create_cluster_metadata::TableProgress::state].
1215        ///
1216        /// # Example
1217        /// ```ignore,no_run
1218        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1219        /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::table_progress::State;
1220        /// let x0 = TableProgress::new().set_state(State::Pending);
1221        /// let x1 = TableProgress::new().set_state(State::Copying);
1222        /// let x2 = TableProgress::new().set_state(State::Completed);
1223        /// ```
1224        pub fn set_state<
1225            T: std::convert::Into<crate::model::create_cluster_metadata::table_progress::State>,
1226        >(
1227            mut self,
1228            v: T,
1229        ) -> Self {
1230            self.state = v.into();
1231            self
1232        }
1233    }
1234
1235    impl wkt::message::Message for TableProgress {
1236        fn typename() -> &'static str {
1237            "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata.TableProgress"
1238        }
1239    }
1240
1241    /// Defines additional types related to [TableProgress].
1242    pub mod table_progress {
1243        #[allow(unused_imports)]
1244        use super::*;
1245
1246        ///
1247        /// # Working with unknown values
1248        ///
1249        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1250        /// additional enum variants at any time. Adding new variants is not considered
1251        /// a breaking change. Applications should write their code in anticipation of:
1252        ///
1253        /// - New values appearing in future releases of the client library, **and**
1254        /// - New values received dynamically, without application changes.
1255        ///
1256        /// Please consult the [Working with enums] section in the user guide for some
1257        /// guidelines.
1258        ///
1259        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1260        #[derive(Clone, Debug, PartialEq)]
1261        #[non_exhaustive]
1262        pub enum State {
1263            Unspecified,
1264            /// The table has not yet begun copying to the new cluster.
1265            Pending,
1266            /// The table is actively being copied to the new cluster.
1267            Copying,
1268            /// The table has been fully copied to the new cluster.
1269            Completed,
1270            /// The table was deleted before it finished copying to the new cluster.
1271            /// Note that tables deleted after completion will stay marked as
1272            /// COMPLETED, not CANCELLED.
1273            Cancelled,
1274            /// If set, the enum was initialized with an unknown value.
1275            ///
1276            /// Applications can examine the value using [State::value] or
1277            /// [State::name].
1278            UnknownValue(state::UnknownValue),
1279        }
1280
1281        #[doc(hidden)]
1282        pub mod state {
1283            #[allow(unused_imports)]
1284            use super::*;
1285            #[derive(Clone, Debug, PartialEq)]
1286            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1287        }
1288
1289        impl State {
1290            /// Gets the enum value.
1291            ///
1292            /// Returns `None` if the enum contains an unknown value deserialized from
1293            /// the string representation of enums.
1294            pub fn value(&self) -> std::option::Option<i32> {
1295                match self {
1296                    Self::Unspecified => std::option::Option::Some(0),
1297                    Self::Pending => std::option::Option::Some(1),
1298                    Self::Copying => std::option::Option::Some(2),
1299                    Self::Completed => std::option::Option::Some(3),
1300                    Self::Cancelled => std::option::Option::Some(4),
1301                    Self::UnknownValue(u) => u.0.value(),
1302                }
1303            }
1304
1305            /// Gets the enum value as a string.
1306            ///
1307            /// Returns `None` if the enum contains an unknown value deserialized from
1308            /// the integer representation of enums.
1309            pub fn name(&self) -> std::option::Option<&str> {
1310                match self {
1311                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1312                    Self::Pending => std::option::Option::Some("PENDING"),
1313                    Self::Copying => std::option::Option::Some("COPYING"),
1314                    Self::Completed => std::option::Option::Some("COMPLETED"),
1315                    Self::Cancelled => std::option::Option::Some("CANCELLED"),
1316                    Self::UnknownValue(u) => u.0.name(),
1317                }
1318            }
1319        }
1320
1321        impl std::default::Default for State {
1322            fn default() -> Self {
1323                use std::convert::From;
1324                Self::from(0)
1325            }
1326        }
1327
1328        impl std::fmt::Display for State {
1329            fn fmt(
1330                &self,
1331                f: &mut std::fmt::Formatter<'_>,
1332            ) -> std::result::Result<(), std::fmt::Error> {
1333                wkt::internal::display_enum(f, self.name(), self.value())
1334            }
1335        }
1336
1337        impl std::convert::From<i32> for State {
1338            fn from(value: i32) -> Self {
1339                match value {
1340                    0 => Self::Unspecified,
1341                    1 => Self::Pending,
1342                    2 => Self::Copying,
1343                    3 => Self::Completed,
1344                    4 => Self::Cancelled,
1345                    _ => Self::UnknownValue(state::UnknownValue(
1346                        wkt::internal::UnknownEnumValue::Integer(value),
1347                    )),
1348                }
1349            }
1350        }
1351
1352        impl std::convert::From<&str> for State {
1353            fn from(value: &str) -> Self {
1354                use std::string::ToString;
1355                match value {
1356                    "STATE_UNSPECIFIED" => Self::Unspecified,
1357                    "PENDING" => Self::Pending,
1358                    "COPYING" => Self::Copying,
1359                    "COMPLETED" => Self::Completed,
1360                    "CANCELLED" => Self::Cancelled,
1361                    _ => Self::UnknownValue(state::UnknownValue(
1362                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1363                    )),
1364                }
1365            }
1366        }
1367
1368        impl serde::ser::Serialize for State {
1369            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1370            where
1371                S: serde::Serializer,
1372            {
1373                match self {
1374                    Self::Unspecified => serializer.serialize_i32(0),
1375                    Self::Pending => serializer.serialize_i32(1),
1376                    Self::Copying => serializer.serialize_i32(2),
1377                    Self::Completed => serializer.serialize_i32(3),
1378                    Self::Cancelled => serializer.serialize_i32(4),
1379                    Self::UnknownValue(u) => u.0.serialize(serializer),
1380                }
1381            }
1382        }
1383
1384        impl<'de> serde::de::Deserialize<'de> for State {
1385            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1386            where
1387                D: serde::Deserializer<'de>,
1388            {
1389                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1390                    ".google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State",
1391                ))
1392            }
1393        }
1394    }
1395}
1396
1397/// The metadata for the Operation returned by UpdateCluster.
1398#[derive(Clone, Default, PartialEq)]
1399#[non_exhaustive]
1400pub struct UpdateClusterMetadata {
1401    /// The request that prompted the initiation of this UpdateCluster operation.
1402    pub original_request: std::option::Option<crate::model::Cluster>,
1403
1404    /// The time at which the original request was received.
1405    pub request_time: std::option::Option<wkt::Timestamp>,
1406
1407    /// The time at which the operation failed or was completed successfully.
1408    pub finish_time: std::option::Option<wkt::Timestamp>,
1409
1410    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1411}
1412
1413impl UpdateClusterMetadata {
1414    pub fn new() -> Self {
1415        std::default::Default::default()
1416    }
1417
1418    /// Sets the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1419    ///
1420    /// # Example
1421    /// ```ignore,no_run
1422    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1423    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1424    /// let x = UpdateClusterMetadata::new().set_original_request(Cluster::default()/* use setters */);
1425    /// ```
1426    pub fn set_original_request<T>(mut self, v: T) -> Self
1427    where
1428        T: std::convert::Into<crate::model::Cluster>,
1429    {
1430        self.original_request = std::option::Option::Some(v.into());
1431        self
1432    }
1433
1434    /// Sets or clears the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1435    ///
1436    /// # Example
1437    /// ```ignore,no_run
1438    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1439    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1440    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(Some(Cluster::default()/* use setters */));
1441    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(None::<Cluster>);
1442    /// ```
1443    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1444    where
1445        T: std::convert::Into<crate::model::Cluster>,
1446    {
1447        self.original_request = v.map(|x| x.into());
1448        self
1449    }
1450
1451    /// Sets the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1452    ///
1453    /// # Example
1454    /// ```ignore,no_run
1455    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1456    /// use wkt::Timestamp;
1457    /// let x = UpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1458    /// ```
1459    pub fn set_request_time<T>(mut self, v: T) -> Self
1460    where
1461        T: std::convert::Into<wkt::Timestamp>,
1462    {
1463        self.request_time = std::option::Option::Some(v.into());
1464        self
1465    }
1466
1467    /// Sets or clears the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1468    ///
1469    /// # Example
1470    /// ```ignore,no_run
1471    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1472    /// use wkt::Timestamp;
1473    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1474    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1475    /// ```
1476    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1477    where
1478        T: std::convert::Into<wkt::Timestamp>,
1479    {
1480        self.request_time = v.map(|x| x.into());
1481        self
1482    }
1483
1484    /// Sets the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1485    ///
1486    /// # Example
1487    /// ```ignore,no_run
1488    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1489    /// use wkt::Timestamp;
1490    /// let x = UpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1491    /// ```
1492    pub fn set_finish_time<T>(mut self, v: T) -> Self
1493    where
1494        T: std::convert::Into<wkt::Timestamp>,
1495    {
1496        self.finish_time = std::option::Option::Some(v.into());
1497        self
1498    }
1499
1500    /// Sets or clears the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1501    ///
1502    /// # Example
1503    /// ```ignore,no_run
1504    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1505    /// use wkt::Timestamp;
1506    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1507    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1508    /// ```
1509    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1510    where
1511        T: std::convert::Into<wkt::Timestamp>,
1512    {
1513        self.finish_time = v.map(|x| x.into());
1514        self
1515    }
1516}
1517
1518impl wkt::message::Message for UpdateClusterMetadata {
1519    fn typename() -> &'static str {
1520        "type.googleapis.com/google.bigtable.admin.v2.UpdateClusterMetadata"
1521    }
1522}
1523
1524/// The metadata for the Operation returned by PartialUpdateCluster.
1525#[derive(Clone, Default, PartialEq)]
1526#[non_exhaustive]
1527pub struct PartialUpdateClusterMetadata {
1528    /// The time at which the original request was received.
1529    pub request_time: std::option::Option<wkt::Timestamp>,
1530
1531    /// The time at which the operation failed or was completed successfully.
1532    pub finish_time: std::option::Option<wkt::Timestamp>,
1533
1534    /// The original request for PartialUpdateCluster.
1535    pub original_request: std::option::Option<crate::model::PartialUpdateClusterRequest>,
1536
1537    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1538}
1539
1540impl PartialUpdateClusterMetadata {
1541    pub fn new() -> Self {
1542        std::default::Default::default()
1543    }
1544
1545    /// Sets the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1546    ///
1547    /// # Example
1548    /// ```ignore,no_run
1549    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1550    /// use wkt::Timestamp;
1551    /// let x = PartialUpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1552    /// ```
1553    pub fn set_request_time<T>(mut self, v: T) -> Self
1554    where
1555        T: std::convert::Into<wkt::Timestamp>,
1556    {
1557        self.request_time = std::option::Option::Some(v.into());
1558        self
1559    }
1560
1561    /// Sets or clears the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1562    ///
1563    /// # Example
1564    /// ```ignore,no_run
1565    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1566    /// use wkt::Timestamp;
1567    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1568    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1569    /// ```
1570    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1571    where
1572        T: std::convert::Into<wkt::Timestamp>,
1573    {
1574        self.request_time = v.map(|x| x.into());
1575        self
1576    }
1577
1578    /// Sets the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1579    ///
1580    /// # Example
1581    /// ```ignore,no_run
1582    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1583    /// use wkt::Timestamp;
1584    /// let x = PartialUpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1585    /// ```
1586    pub fn set_finish_time<T>(mut self, v: T) -> Self
1587    where
1588        T: std::convert::Into<wkt::Timestamp>,
1589    {
1590        self.finish_time = std::option::Option::Some(v.into());
1591        self
1592    }
1593
1594    /// Sets or clears the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1595    ///
1596    /// # Example
1597    /// ```ignore,no_run
1598    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1599    /// use wkt::Timestamp;
1600    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1601    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1602    /// ```
1603    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1604    where
1605        T: std::convert::Into<wkt::Timestamp>,
1606    {
1607        self.finish_time = v.map(|x| x.into());
1608        self
1609    }
1610
1611    /// Sets the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1612    ///
1613    /// # Example
1614    /// ```ignore,no_run
1615    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1616    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1617    /// let x = PartialUpdateClusterMetadata::new().set_original_request(PartialUpdateClusterRequest::default()/* use setters */);
1618    /// ```
1619    pub fn set_original_request<T>(mut self, v: T) -> Self
1620    where
1621        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1622    {
1623        self.original_request = std::option::Option::Some(v.into());
1624        self
1625    }
1626
1627    /// Sets or clears the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1628    ///
1629    /// # Example
1630    /// ```ignore,no_run
1631    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1632    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1633    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(Some(PartialUpdateClusterRequest::default()/* use setters */));
1634    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(None::<PartialUpdateClusterRequest>);
1635    /// ```
1636    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1637    where
1638        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1639    {
1640        self.original_request = v.map(|x| x.into());
1641        self
1642    }
1643}
1644
1645impl wkt::message::Message for PartialUpdateClusterMetadata {
1646    fn typename() -> &'static str {
1647        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterMetadata"
1648    }
1649}
1650
1651/// Request message for BigtableInstanceAdmin.PartialUpdateCluster.
1652#[derive(Clone, Default, PartialEq)]
1653#[non_exhaustive]
1654pub struct PartialUpdateClusterRequest {
1655    /// Required. The Cluster which contains the partial updates to be applied,
1656    /// subject to the update_mask.
1657    pub cluster: std::option::Option<crate::model::Cluster>,
1658
1659    /// Required. The subset of Cluster fields which should be replaced.
1660    pub update_mask: std::option::Option<wkt::FieldMask>,
1661
1662    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1663}
1664
1665impl PartialUpdateClusterRequest {
1666    pub fn new() -> Self {
1667        std::default::Default::default()
1668    }
1669
1670    /// Sets the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1671    ///
1672    /// # Example
1673    /// ```ignore,no_run
1674    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1675    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1676    /// let x = PartialUpdateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
1677    /// ```
1678    pub fn set_cluster<T>(mut self, v: T) -> Self
1679    where
1680        T: std::convert::Into<crate::model::Cluster>,
1681    {
1682        self.cluster = std::option::Option::Some(v.into());
1683        self
1684    }
1685
1686    /// Sets or clears the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1687    ///
1688    /// # Example
1689    /// ```ignore,no_run
1690    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1691    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1692    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
1693    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
1694    /// ```
1695    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1696    where
1697        T: std::convert::Into<crate::model::Cluster>,
1698    {
1699        self.cluster = v.map(|x| x.into());
1700        self
1701    }
1702
1703    /// Sets the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1704    ///
1705    /// # Example
1706    /// ```ignore,no_run
1707    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1708    /// use wkt::FieldMask;
1709    /// let x = PartialUpdateClusterRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1710    /// ```
1711    pub fn set_update_mask<T>(mut self, v: T) -> Self
1712    where
1713        T: std::convert::Into<wkt::FieldMask>,
1714    {
1715        self.update_mask = std::option::Option::Some(v.into());
1716        self
1717    }
1718
1719    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1720    ///
1721    /// # Example
1722    /// ```ignore,no_run
1723    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1724    /// use wkt::FieldMask;
1725    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1726    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1727    /// ```
1728    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1729    where
1730        T: std::convert::Into<wkt::FieldMask>,
1731    {
1732        self.update_mask = v.map(|x| x.into());
1733        self
1734    }
1735}
1736
1737impl wkt::message::Message for PartialUpdateClusterRequest {
1738    fn typename() -> &'static str {
1739        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterRequest"
1740    }
1741}
1742
1743/// Request message for BigtableInstanceAdmin.CreateAppProfile.
1744#[derive(Clone, Default, PartialEq)]
1745#[non_exhaustive]
1746pub struct CreateAppProfileRequest {
1747    /// Required. The unique name of the instance in which to create the new app
1748    /// profile. Values are of the form `projects/{project}/instances/{instance}`.
1749    pub parent: std::string::String,
1750
1751    /// Required. The ID to be used when referring to the new app profile within
1752    /// its instance, e.g., just `myprofile` rather than
1753    /// `projects/myproject/instances/myinstance/appProfiles/myprofile`.
1754    pub app_profile_id: std::string::String,
1755
1756    /// Required. The app profile to be created.
1757    /// Fields marked `OutputOnly` will be ignored.
1758    pub app_profile: std::option::Option<crate::model::AppProfile>,
1759
1760    /// If true, ignore safety checks when creating the app profile.
1761    pub ignore_warnings: bool,
1762
1763    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1764}
1765
1766impl CreateAppProfileRequest {
1767    pub fn new() -> Self {
1768        std::default::Default::default()
1769    }
1770
1771    /// Sets the value of [parent][crate::model::CreateAppProfileRequest::parent].
1772    ///
1773    /// # Example
1774    /// ```ignore,no_run
1775    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1776    /// let x = CreateAppProfileRequest::new().set_parent("example");
1777    /// ```
1778    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1779        self.parent = v.into();
1780        self
1781    }
1782
1783    /// Sets the value of [app_profile_id][crate::model::CreateAppProfileRequest::app_profile_id].
1784    ///
1785    /// # Example
1786    /// ```ignore,no_run
1787    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1788    /// let x = CreateAppProfileRequest::new().set_app_profile_id("example");
1789    /// ```
1790    pub fn set_app_profile_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1791        self.app_profile_id = v.into();
1792        self
1793    }
1794
1795    /// Sets the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1796    ///
1797    /// # Example
1798    /// ```ignore,no_run
1799    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1800    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1801    /// let x = CreateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
1802    /// ```
1803    pub fn set_app_profile<T>(mut self, v: T) -> Self
1804    where
1805        T: std::convert::Into<crate::model::AppProfile>,
1806    {
1807        self.app_profile = std::option::Option::Some(v.into());
1808        self
1809    }
1810
1811    /// Sets or clears the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1812    ///
1813    /// # Example
1814    /// ```ignore,no_run
1815    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1816    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1817    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
1818    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
1819    /// ```
1820    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1821    where
1822        T: std::convert::Into<crate::model::AppProfile>,
1823    {
1824        self.app_profile = v.map(|x| x.into());
1825        self
1826    }
1827
1828    /// Sets the value of [ignore_warnings][crate::model::CreateAppProfileRequest::ignore_warnings].
1829    ///
1830    /// # Example
1831    /// ```ignore,no_run
1832    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1833    /// let x = CreateAppProfileRequest::new().set_ignore_warnings(true);
1834    /// ```
1835    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1836        self.ignore_warnings = v.into();
1837        self
1838    }
1839}
1840
1841impl wkt::message::Message for CreateAppProfileRequest {
1842    fn typename() -> &'static str {
1843        "type.googleapis.com/google.bigtable.admin.v2.CreateAppProfileRequest"
1844    }
1845}
1846
1847/// Request message for BigtableInstanceAdmin.GetAppProfile.
1848#[derive(Clone, Default, PartialEq)]
1849#[non_exhaustive]
1850pub struct GetAppProfileRequest {
1851    /// Required. The unique name of the requested app profile. Values are of the
1852    /// form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
1853    pub name: std::string::String,
1854
1855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1856}
1857
1858impl GetAppProfileRequest {
1859    pub fn new() -> Self {
1860        std::default::Default::default()
1861    }
1862
1863    /// Sets the value of [name][crate::model::GetAppProfileRequest::name].
1864    ///
1865    /// # Example
1866    /// ```ignore,no_run
1867    /// # use google_cloud_bigtable_admin_v2::model::GetAppProfileRequest;
1868    /// let x = GetAppProfileRequest::new().set_name("example");
1869    /// ```
1870    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1871        self.name = v.into();
1872        self
1873    }
1874}
1875
1876impl wkt::message::Message for GetAppProfileRequest {
1877    fn typename() -> &'static str {
1878        "type.googleapis.com/google.bigtable.admin.v2.GetAppProfileRequest"
1879    }
1880}
1881
1882/// Request message for BigtableInstanceAdmin.ListAppProfiles.
1883#[derive(Clone, Default, PartialEq)]
1884#[non_exhaustive]
1885pub struct ListAppProfilesRequest {
1886    /// Required. The unique name of the instance for which a list of app profiles
1887    /// is requested. Values are of the form
1888    /// `projects/{project}/instances/{instance}`.
1889    /// Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
1890    /// e.g., `projects/myproject/instances/-`.
1891    pub parent: std::string::String,
1892
1893    /// Maximum number of results per page.
1894    ///
1895    /// A page_size of zero lets the server choose the number of items to return.
1896    /// A page_size which is strictly positive will return at most that many items.
1897    /// A negative page_size will cause an error.
1898    ///
1899    /// Following the first request, subsequent paginated calls are not required
1900    /// to pass a page_size. If a page_size is set in subsequent calls, it must
1901    /// match the page_size given in the first request.
1902    pub page_size: i32,
1903
1904    /// The value of `next_page_token` returned by a previous call.
1905    pub page_token: std::string::String,
1906
1907    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1908}
1909
1910impl ListAppProfilesRequest {
1911    pub fn new() -> Self {
1912        std::default::Default::default()
1913    }
1914
1915    /// Sets the value of [parent][crate::model::ListAppProfilesRequest::parent].
1916    ///
1917    /// # Example
1918    /// ```ignore,no_run
1919    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1920    /// let x = ListAppProfilesRequest::new().set_parent("example");
1921    /// ```
1922    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1923        self.parent = v.into();
1924        self
1925    }
1926
1927    /// Sets the value of [page_size][crate::model::ListAppProfilesRequest::page_size].
1928    ///
1929    /// # Example
1930    /// ```ignore,no_run
1931    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1932    /// let x = ListAppProfilesRequest::new().set_page_size(42);
1933    /// ```
1934    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1935        self.page_size = v.into();
1936        self
1937    }
1938
1939    /// Sets the value of [page_token][crate::model::ListAppProfilesRequest::page_token].
1940    ///
1941    /// # Example
1942    /// ```ignore,no_run
1943    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1944    /// let x = ListAppProfilesRequest::new().set_page_token("example");
1945    /// ```
1946    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1947        self.page_token = v.into();
1948        self
1949    }
1950}
1951
1952impl wkt::message::Message for ListAppProfilesRequest {
1953    fn typename() -> &'static str {
1954        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesRequest"
1955    }
1956}
1957
1958/// Response message for BigtableInstanceAdmin.ListAppProfiles.
1959#[derive(Clone, Default, PartialEq)]
1960#[non_exhaustive]
1961pub struct ListAppProfilesResponse {
1962    /// The list of requested app profiles.
1963    pub app_profiles: std::vec::Vec<crate::model::AppProfile>,
1964
1965    /// Set if not all app profiles could be returned in a single response.
1966    /// Pass this value to `page_token` in another request to get the next
1967    /// page of results.
1968    pub next_page_token: std::string::String,
1969
1970    /// Locations from which AppProfile information could not be retrieved,
1971    /// due to an outage or some other transient condition.
1972    /// AppProfiles from these locations may be missing from `app_profiles`.
1973    /// Values are of the form `projects/<project>/locations/<zone_id>`
1974    pub failed_locations: std::vec::Vec<std::string::String>,
1975
1976    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1977}
1978
1979impl ListAppProfilesResponse {
1980    pub fn new() -> Self {
1981        std::default::Default::default()
1982    }
1983
1984    /// Sets the value of [app_profiles][crate::model::ListAppProfilesResponse::app_profiles].
1985    ///
1986    /// # Example
1987    /// ```ignore,no_run
1988    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
1989    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1990    /// let x = ListAppProfilesResponse::new()
1991    ///     .set_app_profiles([
1992    ///         AppProfile::default()/* use setters */,
1993    ///         AppProfile::default()/* use (different) setters */,
1994    ///     ]);
1995    /// ```
1996    pub fn set_app_profiles<T, V>(mut self, v: T) -> Self
1997    where
1998        T: std::iter::IntoIterator<Item = V>,
1999        V: std::convert::Into<crate::model::AppProfile>,
2000    {
2001        use std::iter::Iterator;
2002        self.app_profiles = v.into_iter().map(|i| i.into()).collect();
2003        self
2004    }
2005
2006    /// Sets the value of [next_page_token][crate::model::ListAppProfilesResponse::next_page_token].
2007    ///
2008    /// # Example
2009    /// ```ignore,no_run
2010    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2011    /// let x = ListAppProfilesResponse::new().set_next_page_token("example");
2012    /// ```
2013    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2014        self.next_page_token = v.into();
2015        self
2016    }
2017
2018    /// Sets the value of [failed_locations][crate::model::ListAppProfilesResponse::failed_locations].
2019    ///
2020    /// # Example
2021    /// ```ignore,no_run
2022    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2023    /// let x = ListAppProfilesResponse::new().set_failed_locations(["a", "b", "c"]);
2024    /// ```
2025    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
2026    where
2027        T: std::iter::IntoIterator<Item = V>,
2028        V: std::convert::Into<std::string::String>,
2029    {
2030        use std::iter::Iterator;
2031        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
2032        self
2033    }
2034}
2035
2036impl wkt::message::Message for ListAppProfilesResponse {
2037    fn typename() -> &'static str {
2038        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesResponse"
2039    }
2040}
2041
2042#[doc(hidden)]
2043impl google_cloud_gax::paginator::internal::PageableResponse for ListAppProfilesResponse {
2044    type PageItem = crate::model::AppProfile;
2045
2046    fn items(self) -> std::vec::Vec<Self::PageItem> {
2047        self.app_profiles
2048    }
2049
2050    fn next_page_token(&self) -> std::string::String {
2051        use std::clone::Clone;
2052        self.next_page_token.clone()
2053    }
2054}
2055
2056/// Request message for BigtableInstanceAdmin.UpdateAppProfile.
2057#[derive(Clone, Default, PartialEq)]
2058#[non_exhaustive]
2059pub struct UpdateAppProfileRequest {
2060    /// Required. The app profile which will (partially) replace the current value.
2061    pub app_profile: std::option::Option<crate::model::AppProfile>,
2062
2063    /// Required. The subset of app profile fields which should be replaced.
2064    /// If unset, all fields will be replaced.
2065    pub update_mask: std::option::Option<wkt::FieldMask>,
2066
2067    /// If true, ignore safety checks when updating the app profile.
2068    pub ignore_warnings: bool,
2069
2070    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2071}
2072
2073impl UpdateAppProfileRequest {
2074    pub fn new() -> Self {
2075        std::default::Default::default()
2076    }
2077
2078    /// Sets the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2079    ///
2080    /// # Example
2081    /// ```ignore,no_run
2082    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2083    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2084    /// let x = UpdateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
2085    /// ```
2086    pub fn set_app_profile<T>(mut self, v: T) -> Self
2087    where
2088        T: std::convert::Into<crate::model::AppProfile>,
2089    {
2090        self.app_profile = std::option::Option::Some(v.into());
2091        self
2092    }
2093
2094    /// Sets or clears the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2095    ///
2096    /// # Example
2097    /// ```ignore,no_run
2098    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2099    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2100    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
2101    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
2102    /// ```
2103    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
2104    where
2105        T: std::convert::Into<crate::model::AppProfile>,
2106    {
2107        self.app_profile = v.map(|x| x.into());
2108        self
2109    }
2110
2111    /// Sets the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2112    ///
2113    /// # Example
2114    /// ```ignore,no_run
2115    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2116    /// use wkt::FieldMask;
2117    /// let x = UpdateAppProfileRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2118    /// ```
2119    pub fn set_update_mask<T>(mut self, v: T) -> Self
2120    where
2121        T: std::convert::Into<wkt::FieldMask>,
2122    {
2123        self.update_mask = std::option::Option::Some(v.into());
2124        self
2125    }
2126
2127    /// Sets or clears the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2128    ///
2129    /// # Example
2130    /// ```ignore,no_run
2131    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2132    /// use wkt::FieldMask;
2133    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2134    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2135    /// ```
2136    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2137    where
2138        T: std::convert::Into<wkt::FieldMask>,
2139    {
2140        self.update_mask = v.map(|x| x.into());
2141        self
2142    }
2143
2144    /// Sets the value of [ignore_warnings][crate::model::UpdateAppProfileRequest::ignore_warnings].
2145    ///
2146    /// # Example
2147    /// ```ignore,no_run
2148    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2149    /// let x = UpdateAppProfileRequest::new().set_ignore_warnings(true);
2150    /// ```
2151    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2152        self.ignore_warnings = v.into();
2153        self
2154    }
2155}
2156
2157impl wkt::message::Message for UpdateAppProfileRequest {
2158    fn typename() -> &'static str {
2159        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileRequest"
2160    }
2161}
2162
2163/// Request message for BigtableInstanceAdmin.DeleteAppProfile.
2164#[derive(Clone, Default, PartialEq)]
2165#[non_exhaustive]
2166pub struct DeleteAppProfileRequest {
2167    /// Required. The unique name of the app profile to be deleted. Values are of
2168    /// the form
2169    /// `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
2170    pub name: std::string::String,
2171
2172    /// Required. If true, ignore safety checks when deleting the app profile.
2173    pub ignore_warnings: bool,
2174
2175    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2176}
2177
2178impl DeleteAppProfileRequest {
2179    pub fn new() -> Self {
2180        std::default::Default::default()
2181    }
2182
2183    /// Sets the value of [name][crate::model::DeleteAppProfileRequest::name].
2184    ///
2185    /// # Example
2186    /// ```ignore,no_run
2187    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2188    /// let x = DeleteAppProfileRequest::new().set_name("example");
2189    /// ```
2190    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2191        self.name = v.into();
2192        self
2193    }
2194
2195    /// Sets the value of [ignore_warnings][crate::model::DeleteAppProfileRequest::ignore_warnings].
2196    ///
2197    /// # Example
2198    /// ```ignore,no_run
2199    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2200    /// let x = DeleteAppProfileRequest::new().set_ignore_warnings(true);
2201    /// ```
2202    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2203        self.ignore_warnings = v.into();
2204        self
2205    }
2206}
2207
2208impl wkt::message::Message for DeleteAppProfileRequest {
2209    fn typename() -> &'static str {
2210        "type.googleapis.com/google.bigtable.admin.v2.DeleteAppProfileRequest"
2211    }
2212}
2213
2214/// The metadata for the Operation returned by UpdateAppProfile.
2215#[derive(Clone, Default, PartialEq)]
2216#[non_exhaustive]
2217pub struct UpdateAppProfileMetadata {
2218    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2219}
2220
2221impl UpdateAppProfileMetadata {
2222    pub fn new() -> Self {
2223        std::default::Default::default()
2224    }
2225}
2226
2227impl wkt::message::Message for UpdateAppProfileMetadata {
2228    fn typename() -> &'static str {
2229        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileMetadata"
2230    }
2231}
2232
2233/// Request message for BigtableInstanceAdmin.ListHotTablets.
2234#[derive(Clone, Default, PartialEq)]
2235#[non_exhaustive]
2236pub struct ListHotTabletsRequest {
2237    /// Required. The cluster name to list hot tablets.
2238    /// Value is in the following form:
2239    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
2240    pub parent: std::string::String,
2241
2242    /// The start time to list hot tablets. The hot tablets in the response will
2243    /// have start times between the requested start time and end time. Start time
2244    /// defaults to Now if it is unset, and end time defaults to Now - 24 hours if
2245    /// it is unset. The start time should be less than the end time, and the
2246    /// maximum allowed time range between start time and end time is 48 hours.
2247    /// Start time and end time should have values between Now and Now - 14 days.
2248    pub start_time: std::option::Option<wkt::Timestamp>,
2249
2250    /// The end time to list hot tablets.
2251    pub end_time: std::option::Option<wkt::Timestamp>,
2252
2253    /// Maximum number of results per page.
2254    ///
2255    /// A page_size that is empty or zero lets the server choose the number of
2256    /// items to return. A page_size which is strictly positive will return at most
2257    /// that many items. A negative page_size will cause an error.
2258    ///
2259    /// Following the first request, subsequent paginated calls do not need a
2260    /// page_size field. If a page_size is set in subsequent calls, it must match
2261    /// the page_size given in the first request.
2262    pub page_size: i32,
2263
2264    /// The value of `next_page_token` returned by a previous call.
2265    pub page_token: std::string::String,
2266
2267    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2268}
2269
2270impl ListHotTabletsRequest {
2271    pub fn new() -> Self {
2272        std::default::Default::default()
2273    }
2274
2275    /// Sets the value of [parent][crate::model::ListHotTabletsRequest::parent].
2276    ///
2277    /// # Example
2278    /// ```ignore,no_run
2279    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2280    /// let x = ListHotTabletsRequest::new().set_parent("example");
2281    /// ```
2282    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2283        self.parent = v.into();
2284        self
2285    }
2286
2287    /// Sets the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2288    ///
2289    /// # Example
2290    /// ```ignore,no_run
2291    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2292    /// use wkt::Timestamp;
2293    /// let x = ListHotTabletsRequest::new().set_start_time(Timestamp::default()/* use setters */);
2294    /// ```
2295    pub fn set_start_time<T>(mut self, v: T) -> Self
2296    where
2297        T: std::convert::Into<wkt::Timestamp>,
2298    {
2299        self.start_time = std::option::Option::Some(v.into());
2300        self
2301    }
2302
2303    /// Sets or clears the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2304    ///
2305    /// # Example
2306    /// ```ignore,no_run
2307    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2308    /// use wkt::Timestamp;
2309    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2310    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(None::<Timestamp>);
2311    /// ```
2312    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2313    where
2314        T: std::convert::Into<wkt::Timestamp>,
2315    {
2316        self.start_time = v.map(|x| x.into());
2317        self
2318    }
2319
2320    /// Sets the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2321    ///
2322    /// # Example
2323    /// ```ignore,no_run
2324    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2325    /// use wkt::Timestamp;
2326    /// let x = ListHotTabletsRequest::new().set_end_time(Timestamp::default()/* use setters */);
2327    /// ```
2328    pub fn set_end_time<T>(mut self, v: T) -> Self
2329    where
2330        T: std::convert::Into<wkt::Timestamp>,
2331    {
2332        self.end_time = std::option::Option::Some(v.into());
2333        self
2334    }
2335
2336    /// Sets or clears the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2337    ///
2338    /// # Example
2339    /// ```ignore,no_run
2340    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2341    /// use wkt::Timestamp;
2342    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2343    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(None::<Timestamp>);
2344    /// ```
2345    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2346    where
2347        T: std::convert::Into<wkt::Timestamp>,
2348    {
2349        self.end_time = v.map(|x| x.into());
2350        self
2351    }
2352
2353    /// Sets the value of [page_size][crate::model::ListHotTabletsRequest::page_size].
2354    ///
2355    /// # Example
2356    /// ```ignore,no_run
2357    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2358    /// let x = ListHotTabletsRequest::new().set_page_size(42);
2359    /// ```
2360    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2361        self.page_size = v.into();
2362        self
2363    }
2364
2365    /// Sets the value of [page_token][crate::model::ListHotTabletsRequest::page_token].
2366    ///
2367    /// # Example
2368    /// ```ignore,no_run
2369    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2370    /// let x = ListHotTabletsRequest::new().set_page_token("example");
2371    /// ```
2372    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2373        self.page_token = v.into();
2374        self
2375    }
2376}
2377
2378impl wkt::message::Message for ListHotTabletsRequest {
2379    fn typename() -> &'static str {
2380        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsRequest"
2381    }
2382}
2383
2384/// Response message for BigtableInstanceAdmin.ListHotTablets.
2385#[derive(Clone, Default, PartialEq)]
2386#[non_exhaustive]
2387pub struct ListHotTabletsResponse {
2388    /// List of hot tablets in the tables of the requested cluster that fall
2389    /// within the requested time range. Hot tablets are ordered by node cpu usage
2390    /// percent. If there are multiple hot tablets that correspond to the same
2391    /// tablet within a 15-minute interval, only the hot tablet with the highest
2392    /// node cpu usage will be included in the response.
2393    pub hot_tablets: std::vec::Vec<crate::model::HotTablet>,
2394
2395    /// Set if not all hot tablets could be returned in a single response.
2396    /// Pass this value to `page_token` in another request to get the next
2397    /// page of results.
2398    pub next_page_token: std::string::String,
2399
2400    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2401}
2402
2403impl ListHotTabletsResponse {
2404    pub fn new() -> Self {
2405        std::default::Default::default()
2406    }
2407
2408    /// Sets the value of [hot_tablets][crate::model::ListHotTabletsResponse::hot_tablets].
2409    ///
2410    /// # Example
2411    /// ```ignore,no_run
2412    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2413    /// use google_cloud_bigtable_admin_v2::model::HotTablet;
2414    /// let x = ListHotTabletsResponse::new()
2415    ///     .set_hot_tablets([
2416    ///         HotTablet::default()/* use setters */,
2417    ///         HotTablet::default()/* use (different) setters */,
2418    ///     ]);
2419    /// ```
2420    pub fn set_hot_tablets<T, V>(mut self, v: T) -> Self
2421    where
2422        T: std::iter::IntoIterator<Item = V>,
2423        V: std::convert::Into<crate::model::HotTablet>,
2424    {
2425        use std::iter::Iterator;
2426        self.hot_tablets = v.into_iter().map(|i| i.into()).collect();
2427        self
2428    }
2429
2430    /// Sets the value of [next_page_token][crate::model::ListHotTabletsResponse::next_page_token].
2431    ///
2432    /// # Example
2433    /// ```ignore,no_run
2434    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2435    /// let x = ListHotTabletsResponse::new().set_next_page_token("example");
2436    /// ```
2437    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2438        self.next_page_token = v.into();
2439        self
2440    }
2441}
2442
2443impl wkt::message::Message for ListHotTabletsResponse {
2444    fn typename() -> &'static str {
2445        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsResponse"
2446    }
2447}
2448
2449#[doc(hidden)]
2450impl google_cloud_gax::paginator::internal::PageableResponse for ListHotTabletsResponse {
2451    type PageItem = crate::model::HotTablet;
2452
2453    fn items(self) -> std::vec::Vec<Self::PageItem> {
2454        self.hot_tablets
2455    }
2456
2457    fn next_page_token(&self) -> std::string::String {
2458        use std::clone::Clone;
2459        self.next_page_token.clone()
2460    }
2461}
2462
2463/// Request message for BigtableInstanceAdmin.CreateLogicalView.
2464#[derive(Clone, Default, PartialEq)]
2465#[non_exhaustive]
2466pub struct CreateLogicalViewRequest {
2467    /// Required. The parent instance where this logical view will be created.
2468    /// Format: `projects/{project}/instances/{instance}`.
2469    pub parent: std::string::String,
2470
2471    /// Required. The ID to use for the logical view, which will become the final
2472    /// component of the logical view's resource name.
2473    pub logical_view_id: std::string::String,
2474
2475    /// Required. The logical view to create.
2476    pub logical_view: std::option::Option<crate::model::LogicalView>,
2477
2478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2479}
2480
2481impl CreateLogicalViewRequest {
2482    pub fn new() -> Self {
2483        std::default::Default::default()
2484    }
2485
2486    /// Sets the value of [parent][crate::model::CreateLogicalViewRequest::parent].
2487    ///
2488    /// # Example
2489    /// ```ignore,no_run
2490    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2491    /// let x = CreateLogicalViewRequest::new().set_parent("example");
2492    /// ```
2493    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2494        self.parent = v.into();
2495        self
2496    }
2497
2498    /// Sets the value of [logical_view_id][crate::model::CreateLogicalViewRequest::logical_view_id].
2499    ///
2500    /// # Example
2501    /// ```ignore,no_run
2502    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2503    /// let x = CreateLogicalViewRequest::new().set_logical_view_id("example");
2504    /// ```
2505    pub fn set_logical_view_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2506        self.logical_view_id = v.into();
2507        self
2508    }
2509
2510    /// Sets the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2511    ///
2512    /// # Example
2513    /// ```ignore,no_run
2514    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2515    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2516    /// let x = CreateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
2517    /// ```
2518    pub fn set_logical_view<T>(mut self, v: T) -> Self
2519    where
2520        T: std::convert::Into<crate::model::LogicalView>,
2521    {
2522        self.logical_view = std::option::Option::Some(v.into());
2523        self
2524    }
2525
2526    /// Sets or clears the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2527    ///
2528    /// # Example
2529    /// ```ignore,no_run
2530    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2531    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2532    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
2533    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
2534    /// ```
2535    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2536    where
2537        T: std::convert::Into<crate::model::LogicalView>,
2538    {
2539        self.logical_view = v.map(|x| x.into());
2540        self
2541    }
2542}
2543
2544impl wkt::message::Message for CreateLogicalViewRequest {
2545    fn typename() -> &'static str {
2546        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewRequest"
2547    }
2548}
2549
2550/// The metadata for the Operation returned by CreateLogicalView.
2551#[derive(Clone, Default, PartialEq)]
2552#[non_exhaustive]
2553pub struct CreateLogicalViewMetadata {
2554    /// The request that prompted the initiation of this CreateLogicalView
2555    /// operation.
2556    pub original_request: std::option::Option<crate::model::CreateLogicalViewRequest>,
2557
2558    /// The time at which this operation started.
2559    pub start_time: std::option::Option<wkt::Timestamp>,
2560
2561    /// If set, the time at which this operation finished or was canceled.
2562    pub end_time: std::option::Option<wkt::Timestamp>,
2563
2564    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2565}
2566
2567impl CreateLogicalViewMetadata {
2568    pub fn new() -> Self {
2569        std::default::Default::default()
2570    }
2571
2572    /// Sets the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
2573    ///
2574    /// # Example
2575    /// ```ignore,no_run
2576    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2577    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2578    /// let x = CreateLogicalViewMetadata::new().set_original_request(CreateLogicalViewRequest::default()/* use setters */);
2579    /// ```
2580    pub fn set_original_request<T>(mut self, v: T) -> Self
2581    where
2582        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
2583    {
2584        self.original_request = std::option::Option::Some(v.into());
2585        self
2586    }
2587
2588    /// Sets or clears the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
2589    ///
2590    /// # Example
2591    /// ```ignore,no_run
2592    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2593    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2594    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(Some(CreateLogicalViewRequest::default()/* use setters */));
2595    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(None::<CreateLogicalViewRequest>);
2596    /// ```
2597    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
2598    where
2599        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
2600    {
2601        self.original_request = v.map(|x| x.into());
2602        self
2603    }
2604
2605    /// Sets the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
2606    ///
2607    /// # Example
2608    /// ```ignore,no_run
2609    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2610    /// use wkt::Timestamp;
2611    /// let x = CreateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
2612    /// ```
2613    pub fn set_start_time<T>(mut self, v: T) -> Self
2614    where
2615        T: std::convert::Into<wkt::Timestamp>,
2616    {
2617        self.start_time = std::option::Option::Some(v.into());
2618        self
2619    }
2620
2621    /// Sets or clears the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
2622    ///
2623    /// # Example
2624    /// ```ignore,no_run
2625    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2626    /// use wkt::Timestamp;
2627    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2628    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
2629    /// ```
2630    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2631    where
2632        T: std::convert::Into<wkt::Timestamp>,
2633    {
2634        self.start_time = v.map(|x| x.into());
2635        self
2636    }
2637
2638    /// Sets the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
2639    ///
2640    /// # Example
2641    /// ```ignore,no_run
2642    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2643    /// use wkt::Timestamp;
2644    /// let x = CreateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
2645    /// ```
2646    pub fn set_end_time<T>(mut self, v: T) -> Self
2647    where
2648        T: std::convert::Into<wkt::Timestamp>,
2649    {
2650        self.end_time = std::option::Option::Some(v.into());
2651        self
2652    }
2653
2654    /// Sets or clears the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
2655    ///
2656    /// # Example
2657    /// ```ignore,no_run
2658    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2659    /// use wkt::Timestamp;
2660    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2661    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
2662    /// ```
2663    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2664    where
2665        T: std::convert::Into<wkt::Timestamp>,
2666    {
2667        self.end_time = v.map(|x| x.into());
2668        self
2669    }
2670}
2671
2672impl wkt::message::Message for CreateLogicalViewMetadata {
2673    fn typename() -> &'static str {
2674        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewMetadata"
2675    }
2676}
2677
2678/// Request message for BigtableInstanceAdmin.GetLogicalView.
2679#[derive(Clone, Default, PartialEq)]
2680#[non_exhaustive]
2681pub struct GetLogicalViewRequest {
2682    /// Required. The unique name of the requested logical view. Values are of the
2683    /// form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2684    pub name: std::string::String,
2685
2686    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2687}
2688
2689impl GetLogicalViewRequest {
2690    pub fn new() -> Self {
2691        std::default::Default::default()
2692    }
2693
2694    /// Sets the value of [name][crate::model::GetLogicalViewRequest::name].
2695    ///
2696    /// # Example
2697    /// ```ignore,no_run
2698    /// # use google_cloud_bigtable_admin_v2::model::GetLogicalViewRequest;
2699    /// let x = GetLogicalViewRequest::new().set_name("example");
2700    /// ```
2701    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2702        self.name = v.into();
2703        self
2704    }
2705}
2706
2707impl wkt::message::Message for GetLogicalViewRequest {
2708    fn typename() -> &'static str {
2709        "type.googleapis.com/google.bigtable.admin.v2.GetLogicalViewRequest"
2710    }
2711}
2712
2713/// Request message for BigtableInstanceAdmin.ListLogicalViews.
2714#[derive(Clone, Default, PartialEq)]
2715#[non_exhaustive]
2716pub struct ListLogicalViewsRequest {
2717    /// Required. The unique name of the instance for which the list of logical
2718    /// views is requested. Values are of the form
2719    /// `projects/{project}/instances/{instance}`.
2720    pub parent: std::string::String,
2721
2722    /// Optional. The maximum number of logical views to return. The service may
2723    /// return fewer than this value
2724    pub page_size: i32,
2725
2726    /// Optional. A page token, received from a previous `ListLogicalViews` call.
2727    /// Provide this to retrieve the subsequent page.
2728    ///
2729    /// When paginating, all other parameters provided to `ListLogicalViews` must
2730    /// match the call that provided the page token.
2731    pub page_token: std::string::String,
2732
2733    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2734}
2735
2736impl ListLogicalViewsRequest {
2737    pub fn new() -> Self {
2738        std::default::Default::default()
2739    }
2740
2741    /// Sets the value of [parent][crate::model::ListLogicalViewsRequest::parent].
2742    ///
2743    /// # Example
2744    /// ```ignore,no_run
2745    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2746    /// let x = ListLogicalViewsRequest::new().set_parent("example");
2747    /// ```
2748    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2749        self.parent = v.into();
2750        self
2751    }
2752
2753    /// Sets the value of [page_size][crate::model::ListLogicalViewsRequest::page_size].
2754    ///
2755    /// # Example
2756    /// ```ignore,no_run
2757    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2758    /// let x = ListLogicalViewsRequest::new().set_page_size(42);
2759    /// ```
2760    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2761        self.page_size = v.into();
2762        self
2763    }
2764
2765    /// Sets the value of [page_token][crate::model::ListLogicalViewsRequest::page_token].
2766    ///
2767    /// # Example
2768    /// ```ignore,no_run
2769    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2770    /// let x = ListLogicalViewsRequest::new().set_page_token("example");
2771    /// ```
2772    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2773        self.page_token = v.into();
2774        self
2775    }
2776}
2777
2778impl wkt::message::Message for ListLogicalViewsRequest {
2779    fn typename() -> &'static str {
2780        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsRequest"
2781    }
2782}
2783
2784/// Response message for BigtableInstanceAdmin.ListLogicalViews.
2785#[derive(Clone, Default, PartialEq)]
2786#[non_exhaustive]
2787pub struct ListLogicalViewsResponse {
2788    /// The list of requested logical views.
2789    pub logical_views: std::vec::Vec<crate::model::LogicalView>,
2790
2791    /// A token, which can be sent as `page_token` to retrieve the next page.
2792    /// If this field is omitted, there are no subsequent pages.
2793    pub next_page_token: std::string::String,
2794
2795    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2796}
2797
2798impl ListLogicalViewsResponse {
2799    pub fn new() -> Self {
2800        std::default::Default::default()
2801    }
2802
2803    /// Sets the value of [logical_views][crate::model::ListLogicalViewsResponse::logical_views].
2804    ///
2805    /// # Example
2806    /// ```ignore,no_run
2807    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
2808    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2809    /// let x = ListLogicalViewsResponse::new()
2810    ///     .set_logical_views([
2811    ///         LogicalView::default()/* use setters */,
2812    ///         LogicalView::default()/* use (different) setters */,
2813    ///     ]);
2814    /// ```
2815    pub fn set_logical_views<T, V>(mut self, v: T) -> Self
2816    where
2817        T: std::iter::IntoIterator<Item = V>,
2818        V: std::convert::Into<crate::model::LogicalView>,
2819    {
2820        use std::iter::Iterator;
2821        self.logical_views = v.into_iter().map(|i| i.into()).collect();
2822        self
2823    }
2824
2825    /// Sets the value of [next_page_token][crate::model::ListLogicalViewsResponse::next_page_token].
2826    ///
2827    /// # Example
2828    /// ```ignore,no_run
2829    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
2830    /// let x = ListLogicalViewsResponse::new().set_next_page_token("example");
2831    /// ```
2832    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2833        self.next_page_token = v.into();
2834        self
2835    }
2836}
2837
2838impl wkt::message::Message for ListLogicalViewsResponse {
2839    fn typename() -> &'static str {
2840        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsResponse"
2841    }
2842}
2843
2844#[doc(hidden)]
2845impl google_cloud_gax::paginator::internal::PageableResponse for ListLogicalViewsResponse {
2846    type PageItem = crate::model::LogicalView;
2847
2848    fn items(self) -> std::vec::Vec<Self::PageItem> {
2849        self.logical_views
2850    }
2851
2852    fn next_page_token(&self) -> std::string::String {
2853        use std::clone::Clone;
2854        self.next_page_token.clone()
2855    }
2856}
2857
2858/// Request message for BigtableInstanceAdmin.UpdateLogicalView.
2859#[derive(Clone, Default, PartialEq)]
2860#[non_exhaustive]
2861pub struct UpdateLogicalViewRequest {
2862    /// Required. The logical view to update.
2863    ///
2864    /// The logical view's `name` field is used to identify the view to update.
2865    /// Format:
2866    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2867    pub logical_view: std::option::Option<crate::model::LogicalView>,
2868
2869    /// Optional. The list of fields to update.
2870    pub update_mask: std::option::Option<wkt::FieldMask>,
2871
2872    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2873}
2874
2875impl UpdateLogicalViewRequest {
2876    pub fn new() -> Self {
2877        std::default::Default::default()
2878    }
2879
2880    /// Sets the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2881    ///
2882    /// # Example
2883    /// ```ignore,no_run
2884    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2885    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2886    /// let x = UpdateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
2887    /// ```
2888    pub fn set_logical_view<T>(mut self, v: T) -> Self
2889    where
2890        T: std::convert::Into<crate::model::LogicalView>,
2891    {
2892        self.logical_view = std::option::Option::Some(v.into());
2893        self
2894    }
2895
2896    /// Sets or clears the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2897    ///
2898    /// # Example
2899    /// ```ignore,no_run
2900    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2901    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2902    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
2903    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
2904    /// ```
2905    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2906    where
2907        T: std::convert::Into<crate::model::LogicalView>,
2908    {
2909        self.logical_view = v.map(|x| x.into());
2910        self
2911    }
2912
2913    /// Sets the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
2914    ///
2915    /// # Example
2916    /// ```ignore,no_run
2917    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2918    /// use wkt::FieldMask;
2919    /// let x = UpdateLogicalViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2920    /// ```
2921    pub fn set_update_mask<T>(mut self, v: T) -> Self
2922    where
2923        T: std::convert::Into<wkt::FieldMask>,
2924    {
2925        self.update_mask = std::option::Option::Some(v.into());
2926        self
2927    }
2928
2929    /// Sets or clears the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
2930    ///
2931    /// # Example
2932    /// ```ignore,no_run
2933    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2934    /// use wkt::FieldMask;
2935    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2936    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2937    /// ```
2938    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2939    where
2940        T: std::convert::Into<wkt::FieldMask>,
2941    {
2942        self.update_mask = v.map(|x| x.into());
2943        self
2944    }
2945}
2946
2947impl wkt::message::Message for UpdateLogicalViewRequest {
2948    fn typename() -> &'static str {
2949        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewRequest"
2950    }
2951}
2952
2953/// The metadata for the Operation returned by UpdateLogicalView.
2954#[derive(Clone, Default, PartialEq)]
2955#[non_exhaustive]
2956pub struct UpdateLogicalViewMetadata {
2957    /// The request that prompted the initiation of this UpdateLogicalView
2958    /// operation.
2959    pub original_request: std::option::Option<crate::model::UpdateLogicalViewRequest>,
2960
2961    /// The time at which this operation was started.
2962    pub start_time: std::option::Option<wkt::Timestamp>,
2963
2964    /// If set, the time at which this operation finished or was canceled.
2965    pub end_time: std::option::Option<wkt::Timestamp>,
2966
2967    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2968}
2969
2970impl UpdateLogicalViewMetadata {
2971    pub fn new() -> Self {
2972        std::default::Default::default()
2973    }
2974
2975    /// Sets the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
2976    ///
2977    /// # Example
2978    /// ```ignore,no_run
2979    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
2980    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2981    /// let x = UpdateLogicalViewMetadata::new().set_original_request(UpdateLogicalViewRequest::default()/* use setters */);
2982    /// ```
2983    pub fn set_original_request<T>(mut self, v: T) -> Self
2984    where
2985        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
2986    {
2987        self.original_request = std::option::Option::Some(v.into());
2988        self
2989    }
2990
2991    /// Sets or clears the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
2992    ///
2993    /// # Example
2994    /// ```ignore,no_run
2995    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
2996    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2997    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(Some(UpdateLogicalViewRequest::default()/* use setters */));
2998    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(None::<UpdateLogicalViewRequest>);
2999    /// ```
3000    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3001    where
3002        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
3003    {
3004        self.original_request = v.map(|x| x.into());
3005        self
3006    }
3007
3008    /// Sets the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3009    ///
3010    /// # Example
3011    /// ```ignore,no_run
3012    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3013    /// use wkt::Timestamp;
3014    /// let x = UpdateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3015    /// ```
3016    pub fn set_start_time<T>(mut self, v: T) -> Self
3017    where
3018        T: std::convert::Into<wkt::Timestamp>,
3019    {
3020        self.start_time = std::option::Option::Some(v.into());
3021        self
3022    }
3023
3024    /// Sets or clears the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3025    ///
3026    /// # Example
3027    /// ```ignore,no_run
3028    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3029    /// use wkt::Timestamp;
3030    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3031    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3032    /// ```
3033    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3034    where
3035        T: std::convert::Into<wkt::Timestamp>,
3036    {
3037        self.start_time = v.map(|x| x.into());
3038        self
3039    }
3040
3041    /// Sets the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3042    ///
3043    /// # Example
3044    /// ```ignore,no_run
3045    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3046    /// use wkt::Timestamp;
3047    /// let x = UpdateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3048    /// ```
3049    pub fn set_end_time<T>(mut self, v: T) -> Self
3050    where
3051        T: std::convert::Into<wkt::Timestamp>,
3052    {
3053        self.end_time = std::option::Option::Some(v.into());
3054        self
3055    }
3056
3057    /// Sets or clears the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3058    ///
3059    /// # Example
3060    /// ```ignore,no_run
3061    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3062    /// use wkt::Timestamp;
3063    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3064    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3065    /// ```
3066    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3067    where
3068        T: std::convert::Into<wkt::Timestamp>,
3069    {
3070        self.end_time = v.map(|x| x.into());
3071        self
3072    }
3073}
3074
3075impl wkt::message::Message for UpdateLogicalViewMetadata {
3076    fn typename() -> &'static str {
3077        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewMetadata"
3078    }
3079}
3080
3081/// Request message for BigtableInstanceAdmin.DeleteLogicalView.
3082#[derive(Clone, Default, PartialEq)]
3083#[non_exhaustive]
3084pub struct DeleteLogicalViewRequest {
3085    /// Required. The unique name of the logical view to be deleted.
3086    /// Format:
3087    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
3088    pub name: std::string::String,
3089
3090    /// Optional. The current etag of the logical view.
3091    /// If an etag is provided and does not match the current etag of the
3092    /// logical view, deletion will be blocked and an ABORTED error will be
3093    /// returned.
3094    pub etag: std::string::String,
3095
3096    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3097}
3098
3099impl DeleteLogicalViewRequest {
3100    pub fn new() -> Self {
3101        std::default::Default::default()
3102    }
3103
3104    /// Sets the value of [name][crate::model::DeleteLogicalViewRequest::name].
3105    ///
3106    /// # Example
3107    /// ```ignore,no_run
3108    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3109    /// let x = DeleteLogicalViewRequest::new().set_name("example");
3110    /// ```
3111    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3112        self.name = v.into();
3113        self
3114    }
3115
3116    /// Sets the value of [etag][crate::model::DeleteLogicalViewRequest::etag].
3117    ///
3118    /// # Example
3119    /// ```ignore,no_run
3120    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3121    /// let x = DeleteLogicalViewRequest::new().set_etag("example");
3122    /// ```
3123    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3124        self.etag = v.into();
3125        self
3126    }
3127}
3128
3129impl wkt::message::Message for DeleteLogicalViewRequest {
3130    fn typename() -> &'static str {
3131        "type.googleapis.com/google.bigtable.admin.v2.DeleteLogicalViewRequest"
3132    }
3133}
3134
3135/// Request message for BigtableInstanceAdmin.CreateMaterializedView.
3136#[derive(Clone, Default, PartialEq)]
3137#[non_exhaustive]
3138pub struct CreateMaterializedViewRequest {
3139    /// Required. The parent instance where this materialized view will be created.
3140    /// Format: `projects/{project}/instances/{instance}`.
3141    pub parent: std::string::String,
3142
3143    /// Required. The ID to use for the materialized view, which will become the
3144    /// final component of the materialized view's resource name.
3145    pub materialized_view_id: std::string::String,
3146
3147    /// Required. The materialized view to create.
3148    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3149
3150    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3151}
3152
3153impl CreateMaterializedViewRequest {
3154    pub fn new() -> Self {
3155        std::default::Default::default()
3156    }
3157
3158    /// Sets the value of [parent][crate::model::CreateMaterializedViewRequest::parent].
3159    ///
3160    /// # Example
3161    /// ```ignore,no_run
3162    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3163    /// let x = CreateMaterializedViewRequest::new().set_parent("example");
3164    /// ```
3165    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3166        self.parent = v.into();
3167        self
3168    }
3169
3170    /// Sets the value of [materialized_view_id][crate::model::CreateMaterializedViewRequest::materialized_view_id].
3171    ///
3172    /// # Example
3173    /// ```ignore,no_run
3174    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3175    /// let x = CreateMaterializedViewRequest::new().set_materialized_view_id("example");
3176    /// ```
3177    pub fn set_materialized_view_id<T: std::convert::Into<std::string::String>>(
3178        mut self,
3179        v: T,
3180    ) -> Self {
3181        self.materialized_view_id = v.into();
3182        self
3183    }
3184
3185    /// Sets the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3186    ///
3187    /// # Example
3188    /// ```ignore,no_run
3189    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3190    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3191    /// let x = CreateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3192    /// ```
3193    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3194    where
3195        T: std::convert::Into<crate::model::MaterializedView>,
3196    {
3197        self.materialized_view = std::option::Option::Some(v.into());
3198        self
3199    }
3200
3201    /// Sets or clears the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3202    ///
3203    /// # Example
3204    /// ```ignore,no_run
3205    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3206    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3207    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3208    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3209    /// ```
3210    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3211    where
3212        T: std::convert::Into<crate::model::MaterializedView>,
3213    {
3214        self.materialized_view = v.map(|x| x.into());
3215        self
3216    }
3217}
3218
3219impl wkt::message::Message for CreateMaterializedViewRequest {
3220    fn typename() -> &'static str {
3221        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewRequest"
3222    }
3223}
3224
3225/// The metadata for the Operation returned by CreateMaterializedView.
3226#[derive(Clone, Default, PartialEq)]
3227#[non_exhaustive]
3228pub struct CreateMaterializedViewMetadata {
3229    /// The request that prompted the initiation of this CreateMaterializedView
3230    /// operation.
3231    pub original_request: std::option::Option<crate::model::CreateMaterializedViewRequest>,
3232
3233    /// The time at which this operation started.
3234    pub start_time: std::option::Option<wkt::Timestamp>,
3235
3236    /// If set, the time at which this operation finished or was canceled.
3237    pub end_time: std::option::Option<wkt::Timestamp>,
3238
3239    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3240}
3241
3242impl CreateMaterializedViewMetadata {
3243    pub fn new() -> Self {
3244        std::default::Default::default()
3245    }
3246
3247    /// Sets the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3248    ///
3249    /// # Example
3250    /// ```ignore,no_run
3251    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3252    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3253    /// let x = CreateMaterializedViewMetadata::new().set_original_request(CreateMaterializedViewRequest::default()/* use setters */);
3254    /// ```
3255    pub fn set_original_request<T>(mut self, v: T) -> Self
3256    where
3257        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3258    {
3259        self.original_request = std::option::Option::Some(v.into());
3260        self
3261    }
3262
3263    /// Sets or clears the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3264    ///
3265    /// # Example
3266    /// ```ignore,no_run
3267    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3268    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3269    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(Some(CreateMaterializedViewRequest::default()/* use setters */));
3270    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(None::<CreateMaterializedViewRequest>);
3271    /// ```
3272    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3273    where
3274        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3275    {
3276        self.original_request = v.map(|x| x.into());
3277        self
3278    }
3279
3280    /// Sets the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3281    ///
3282    /// # Example
3283    /// ```ignore,no_run
3284    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3285    /// use wkt::Timestamp;
3286    /// let x = CreateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3287    /// ```
3288    pub fn set_start_time<T>(mut self, v: T) -> Self
3289    where
3290        T: std::convert::Into<wkt::Timestamp>,
3291    {
3292        self.start_time = std::option::Option::Some(v.into());
3293        self
3294    }
3295
3296    /// Sets or clears the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3297    ///
3298    /// # Example
3299    /// ```ignore,no_run
3300    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3301    /// use wkt::Timestamp;
3302    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3303    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3304    /// ```
3305    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3306    where
3307        T: std::convert::Into<wkt::Timestamp>,
3308    {
3309        self.start_time = v.map(|x| x.into());
3310        self
3311    }
3312
3313    /// Sets the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3314    ///
3315    /// # Example
3316    /// ```ignore,no_run
3317    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3318    /// use wkt::Timestamp;
3319    /// let x = CreateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3320    /// ```
3321    pub fn set_end_time<T>(mut self, v: T) -> Self
3322    where
3323        T: std::convert::Into<wkt::Timestamp>,
3324    {
3325        self.end_time = std::option::Option::Some(v.into());
3326        self
3327    }
3328
3329    /// Sets or clears the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3330    ///
3331    /// # Example
3332    /// ```ignore,no_run
3333    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3334    /// use wkt::Timestamp;
3335    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3336    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3337    /// ```
3338    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3339    where
3340        T: std::convert::Into<wkt::Timestamp>,
3341    {
3342        self.end_time = v.map(|x| x.into());
3343        self
3344    }
3345}
3346
3347impl wkt::message::Message for CreateMaterializedViewMetadata {
3348    fn typename() -> &'static str {
3349        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewMetadata"
3350    }
3351}
3352
3353/// Request message for BigtableInstanceAdmin.GetMaterializedView.
3354#[derive(Clone, Default, PartialEq)]
3355#[non_exhaustive]
3356pub struct GetMaterializedViewRequest {
3357    /// Required. The unique name of the requested materialized view. Values are of
3358    /// the form
3359    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3360    pub name: std::string::String,
3361
3362    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3363}
3364
3365impl GetMaterializedViewRequest {
3366    pub fn new() -> Self {
3367        std::default::Default::default()
3368    }
3369
3370    /// Sets the value of [name][crate::model::GetMaterializedViewRequest::name].
3371    ///
3372    /// # Example
3373    /// ```ignore,no_run
3374    /// # use google_cloud_bigtable_admin_v2::model::GetMaterializedViewRequest;
3375    /// let x = GetMaterializedViewRequest::new().set_name("example");
3376    /// ```
3377    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3378        self.name = v.into();
3379        self
3380    }
3381}
3382
3383impl wkt::message::Message for GetMaterializedViewRequest {
3384    fn typename() -> &'static str {
3385        "type.googleapis.com/google.bigtable.admin.v2.GetMaterializedViewRequest"
3386    }
3387}
3388
3389/// Request message for BigtableInstanceAdmin.ListMaterializedViews.
3390#[derive(Clone, Default, PartialEq)]
3391#[non_exhaustive]
3392pub struct ListMaterializedViewsRequest {
3393    /// Required. The unique name of the instance for which the list of
3394    /// materialized views is requested. Values are of the form
3395    /// `projects/{project}/instances/{instance}`.
3396    pub parent: std::string::String,
3397
3398    /// Optional. The maximum number of materialized views to return. The service
3399    /// may return fewer than this value
3400    pub page_size: i32,
3401
3402    /// Optional. A page token, received from a previous `ListMaterializedViews`
3403    /// call. Provide this to retrieve the subsequent page.
3404    ///
3405    /// When paginating, all other parameters provided to `ListMaterializedViews`
3406    /// must match the call that provided the page token.
3407    pub page_token: std::string::String,
3408
3409    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3410}
3411
3412impl ListMaterializedViewsRequest {
3413    pub fn new() -> Self {
3414        std::default::Default::default()
3415    }
3416
3417    /// Sets the value of [parent][crate::model::ListMaterializedViewsRequest::parent].
3418    ///
3419    /// # Example
3420    /// ```ignore,no_run
3421    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3422    /// let x = ListMaterializedViewsRequest::new().set_parent("example");
3423    /// ```
3424    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3425        self.parent = v.into();
3426        self
3427    }
3428
3429    /// Sets the value of [page_size][crate::model::ListMaterializedViewsRequest::page_size].
3430    ///
3431    /// # Example
3432    /// ```ignore,no_run
3433    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3434    /// let x = ListMaterializedViewsRequest::new().set_page_size(42);
3435    /// ```
3436    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3437        self.page_size = v.into();
3438        self
3439    }
3440
3441    /// Sets the value of [page_token][crate::model::ListMaterializedViewsRequest::page_token].
3442    ///
3443    /// # Example
3444    /// ```ignore,no_run
3445    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3446    /// let x = ListMaterializedViewsRequest::new().set_page_token("example");
3447    /// ```
3448    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3449        self.page_token = v.into();
3450        self
3451    }
3452}
3453
3454impl wkt::message::Message for ListMaterializedViewsRequest {
3455    fn typename() -> &'static str {
3456        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsRequest"
3457    }
3458}
3459
3460/// Response message for BigtableInstanceAdmin.ListMaterializedViews.
3461#[derive(Clone, Default, PartialEq)]
3462#[non_exhaustive]
3463pub struct ListMaterializedViewsResponse {
3464    /// The list of requested materialized views.
3465    pub materialized_views: std::vec::Vec<crate::model::MaterializedView>,
3466
3467    /// A token, which can be sent as `page_token` to retrieve the next page.
3468    /// If this field is omitted, there are no subsequent pages.
3469    pub next_page_token: std::string::String,
3470
3471    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3472}
3473
3474impl ListMaterializedViewsResponse {
3475    pub fn new() -> Self {
3476        std::default::Default::default()
3477    }
3478
3479    /// Sets the value of [materialized_views][crate::model::ListMaterializedViewsResponse::materialized_views].
3480    ///
3481    /// # Example
3482    /// ```ignore,no_run
3483    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
3484    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3485    /// let x = ListMaterializedViewsResponse::new()
3486    ///     .set_materialized_views([
3487    ///         MaterializedView::default()/* use setters */,
3488    ///         MaterializedView::default()/* use (different) setters */,
3489    ///     ]);
3490    /// ```
3491    pub fn set_materialized_views<T, V>(mut self, v: T) -> Self
3492    where
3493        T: std::iter::IntoIterator<Item = V>,
3494        V: std::convert::Into<crate::model::MaterializedView>,
3495    {
3496        use std::iter::Iterator;
3497        self.materialized_views = v.into_iter().map(|i| i.into()).collect();
3498        self
3499    }
3500
3501    /// Sets the value of [next_page_token][crate::model::ListMaterializedViewsResponse::next_page_token].
3502    ///
3503    /// # Example
3504    /// ```ignore,no_run
3505    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
3506    /// let x = ListMaterializedViewsResponse::new().set_next_page_token("example");
3507    /// ```
3508    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3509        self.next_page_token = v.into();
3510        self
3511    }
3512}
3513
3514impl wkt::message::Message for ListMaterializedViewsResponse {
3515    fn typename() -> &'static str {
3516        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsResponse"
3517    }
3518}
3519
3520#[doc(hidden)]
3521impl google_cloud_gax::paginator::internal::PageableResponse for ListMaterializedViewsResponse {
3522    type PageItem = crate::model::MaterializedView;
3523
3524    fn items(self) -> std::vec::Vec<Self::PageItem> {
3525        self.materialized_views
3526    }
3527
3528    fn next_page_token(&self) -> std::string::String {
3529        use std::clone::Clone;
3530        self.next_page_token.clone()
3531    }
3532}
3533
3534/// Request message for BigtableInstanceAdmin.UpdateMaterializedView.
3535#[derive(Clone, Default, PartialEq)]
3536#[non_exhaustive]
3537pub struct UpdateMaterializedViewRequest {
3538    /// Required. The materialized view to update.
3539    ///
3540    /// The materialized view's `name` field is used to identify the view to
3541    /// update. Format:
3542    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3543    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3544
3545    /// Optional. The list of fields to update.
3546    pub update_mask: std::option::Option<wkt::FieldMask>,
3547
3548    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3549}
3550
3551impl UpdateMaterializedViewRequest {
3552    pub fn new() -> Self {
3553        std::default::Default::default()
3554    }
3555
3556    /// Sets the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3557    ///
3558    /// # Example
3559    /// ```ignore,no_run
3560    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3561    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3562    /// let x = UpdateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3563    /// ```
3564    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3565    where
3566        T: std::convert::Into<crate::model::MaterializedView>,
3567    {
3568        self.materialized_view = std::option::Option::Some(v.into());
3569        self
3570    }
3571
3572    /// Sets or clears the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3573    ///
3574    /// # Example
3575    /// ```ignore,no_run
3576    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3577    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3578    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3579    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3580    /// ```
3581    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3582    where
3583        T: std::convert::Into<crate::model::MaterializedView>,
3584    {
3585        self.materialized_view = v.map(|x| x.into());
3586        self
3587    }
3588
3589    /// Sets the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3590    ///
3591    /// # Example
3592    /// ```ignore,no_run
3593    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3594    /// use wkt::FieldMask;
3595    /// let x = UpdateMaterializedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3596    /// ```
3597    pub fn set_update_mask<T>(mut self, v: T) -> Self
3598    where
3599        T: std::convert::Into<wkt::FieldMask>,
3600    {
3601        self.update_mask = std::option::Option::Some(v.into());
3602        self
3603    }
3604
3605    /// Sets or clears the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3606    ///
3607    /// # Example
3608    /// ```ignore,no_run
3609    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3610    /// use wkt::FieldMask;
3611    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3612    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3613    /// ```
3614    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3615    where
3616        T: std::convert::Into<wkt::FieldMask>,
3617    {
3618        self.update_mask = v.map(|x| x.into());
3619        self
3620    }
3621}
3622
3623impl wkt::message::Message for UpdateMaterializedViewRequest {
3624    fn typename() -> &'static str {
3625        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewRequest"
3626    }
3627}
3628
3629/// The metadata for the Operation returned by UpdateMaterializedView.
3630#[derive(Clone, Default, PartialEq)]
3631#[non_exhaustive]
3632pub struct UpdateMaterializedViewMetadata {
3633    /// The request that prompted the initiation of this UpdateMaterializedView
3634    /// operation.
3635    pub original_request: std::option::Option<crate::model::UpdateMaterializedViewRequest>,
3636
3637    /// The time at which this operation was started.
3638    pub start_time: std::option::Option<wkt::Timestamp>,
3639
3640    /// If set, the time at which this operation finished or was canceled.
3641    pub end_time: std::option::Option<wkt::Timestamp>,
3642
3643    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3644}
3645
3646impl UpdateMaterializedViewMetadata {
3647    pub fn new() -> Self {
3648        std::default::Default::default()
3649    }
3650
3651    /// Sets the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
3652    ///
3653    /// # Example
3654    /// ```ignore,no_run
3655    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3656    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3657    /// let x = UpdateMaterializedViewMetadata::new().set_original_request(UpdateMaterializedViewRequest::default()/* use setters */);
3658    /// ```
3659    pub fn set_original_request<T>(mut self, v: T) -> Self
3660    where
3661        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
3662    {
3663        self.original_request = std::option::Option::Some(v.into());
3664        self
3665    }
3666
3667    /// Sets or clears the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
3668    ///
3669    /// # Example
3670    /// ```ignore,no_run
3671    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3672    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3673    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(Some(UpdateMaterializedViewRequest::default()/* use setters */));
3674    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(None::<UpdateMaterializedViewRequest>);
3675    /// ```
3676    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3677    where
3678        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
3679    {
3680        self.original_request = v.map(|x| x.into());
3681        self
3682    }
3683
3684    /// Sets the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
3685    ///
3686    /// # Example
3687    /// ```ignore,no_run
3688    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3689    /// use wkt::Timestamp;
3690    /// let x = UpdateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3691    /// ```
3692    pub fn set_start_time<T>(mut self, v: T) -> Self
3693    where
3694        T: std::convert::Into<wkt::Timestamp>,
3695    {
3696        self.start_time = std::option::Option::Some(v.into());
3697        self
3698    }
3699
3700    /// Sets or clears the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
3701    ///
3702    /// # Example
3703    /// ```ignore,no_run
3704    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3705    /// use wkt::Timestamp;
3706    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3707    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3708    /// ```
3709    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3710    where
3711        T: std::convert::Into<wkt::Timestamp>,
3712    {
3713        self.start_time = v.map(|x| x.into());
3714        self
3715    }
3716
3717    /// Sets the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
3718    ///
3719    /// # Example
3720    /// ```ignore,no_run
3721    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3722    /// use wkt::Timestamp;
3723    /// let x = UpdateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3724    /// ```
3725    pub fn set_end_time<T>(mut self, v: T) -> Self
3726    where
3727        T: std::convert::Into<wkt::Timestamp>,
3728    {
3729        self.end_time = std::option::Option::Some(v.into());
3730        self
3731    }
3732
3733    /// Sets or clears the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
3734    ///
3735    /// # Example
3736    /// ```ignore,no_run
3737    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3738    /// use wkt::Timestamp;
3739    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3740    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3741    /// ```
3742    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3743    where
3744        T: std::convert::Into<wkt::Timestamp>,
3745    {
3746        self.end_time = v.map(|x| x.into());
3747        self
3748    }
3749}
3750
3751impl wkt::message::Message for UpdateMaterializedViewMetadata {
3752    fn typename() -> &'static str {
3753        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewMetadata"
3754    }
3755}
3756
3757/// Request message for BigtableInstanceAdmin.DeleteMaterializedView.
3758#[derive(Clone, Default, PartialEq)]
3759#[non_exhaustive]
3760pub struct DeleteMaterializedViewRequest {
3761    /// Required. The unique name of the materialized view to be deleted.
3762    /// Format:
3763    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3764    pub name: std::string::String,
3765
3766    /// Optional. The current etag of the materialized view.
3767    /// If an etag is provided and does not match the current etag of the
3768    /// materialized view, deletion will be blocked and an ABORTED error will be
3769    /// returned.
3770    pub etag: std::string::String,
3771
3772    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3773}
3774
3775impl DeleteMaterializedViewRequest {
3776    pub fn new() -> Self {
3777        std::default::Default::default()
3778    }
3779
3780    /// Sets the value of [name][crate::model::DeleteMaterializedViewRequest::name].
3781    ///
3782    /// # Example
3783    /// ```ignore,no_run
3784    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
3785    /// let x = DeleteMaterializedViewRequest::new().set_name("example");
3786    /// ```
3787    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3788        self.name = v.into();
3789        self
3790    }
3791
3792    /// Sets the value of [etag][crate::model::DeleteMaterializedViewRequest::etag].
3793    ///
3794    /// # Example
3795    /// ```ignore,no_run
3796    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
3797    /// let x = DeleteMaterializedViewRequest::new().set_etag("example");
3798    /// ```
3799    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3800        self.etag = v.into();
3801        self
3802    }
3803}
3804
3805impl wkt::message::Message for DeleteMaterializedViewRequest {
3806    fn typename() -> &'static str {
3807        "type.googleapis.com/google.bigtable.admin.v2.DeleteMaterializedViewRequest"
3808    }
3809}
3810
3811/// The request for
3812/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
3813///
3814/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
3815#[derive(Clone, Default, PartialEq)]
3816#[non_exhaustive]
3817pub struct RestoreTableRequest {
3818    /// Required. The name of the instance in which to create the restored
3819    /// table. Values are of the form `projects/<project>/instances/<instance>`.
3820    pub parent: std::string::String,
3821
3822    /// Required. The id of the table to create and restore to. This
3823    /// table must not already exist. The `table_id` appended to
3824    /// `parent` forms the full table name of the form
3825    /// `projects/<project>/instances/<instance>/tables/<table_id>`.
3826    pub table_id: std::string::String,
3827
3828    /// Required. The source from which to restore.
3829    pub source: std::option::Option<crate::model::restore_table_request::Source>,
3830
3831    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3832}
3833
3834impl RestoreTableRequest {
3835    pub fn new() -> Self {
3836        std::default::Default::default()
3837    }
3838
3839    /// Sets the value of [parent][crate::model::RestoreTableRequest::parent].
3840    ///
3841    /// # Example
3842    /// ```ignore,no_run
3843    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3844    /// let x = RestoreTableRequest::new().set_parent("example");
3845    /// ```
3846    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3847        self.parent = v.into();
3848        self
3849    }
3850
3851    /// Sets the value of [table_id][crate::model::RestoreTableRequest::table_id].
3852    ///
3853    /// # Example
3854    /// ```ignore,no_run
3855    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3856    /// let x = RestoreTableRequest::new().set_table_id("example");
3857    /// ```
3858    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3859        self.table_id = v.into();
3860        self
3861    }
3862
3863    /// Sets the value of [source][crate::model::RestoreTableRequest::source].
3864    ///
3865    /// Note that all the setters affecting `source` are mutually
3866    /// exclusive.
3867    ///
3868    /// # Example
3869    /// ```ignore,no_run
3870    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3871    /// use google_cloud_bigtable_admin_v2::model::restore_table_request::Source;
3872    /// let x = RestoreTableRequest::new().set_source(Some(Source::Backup("example".to_string())));
3873    /// ```
3874    pub fn set_source<
3875        T: std::convert::Into<std::option::Option<crate::model::restore_table_request::Source>>,
3876    >(
3877        mut self,
3878        v: T,
3879    ) -> Self {
3880        self.source = v.into();
3881        self
3882    }
3883
3884    /// The value of [source][crate::model::RestoreTableRequest::source]
3885    /// if it holds a `Backup`, `None` if the field is not set or
3886    /// holds a different branch.
3887    pub fn backup(&self) -> std::option::Option<&std::string::String> {
3888        #[allow(unreachable_patterns)]
3889        self.source.as_ref().and_then(|v| match v {
3890            crate::model::restore_table_request::Source::Backup(v) => std::option::Option::Some(v),
3891            _ => std::option::Option::None,
3892        })
3893    }
3894
3895    /// Sets the value of [source][crate::model::RestoreTableRequest::source]
3896    /// to hold a `Backup`.
3897    ///
3898    /// Note that all the setters affecting `source` are
3899    /// mutually exclusive.
3900    ///
3901    /// # Example
3902    /// ```ignore,no_run
3903    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3904    /// let x = RestoreTableRequest::new().set_backup("example");
3905    /// assert!(x.backup().is_some());
3906    /// ```
3907    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3908        self.source = std::option::Option::Some(
3909            crate::model::restore_table_request::Source::Backup(v.into()),
3910        );
3911        self
3912    }
3913}
3914
3915impl wkt::message::Message for RestoreTableRequest {
3916    fn typename() -> &'static str {
3917        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableRequest"
3918    }
3919}
3920
3921/// Defines additional types related to [RestoreTableRequest].
3922pub mod restore_table_request {
3923    #[allow(unused_imports)]
3924    use super::*;
3925
3926    /// Required. The source from which to restore.
3927    #[derive(Clone, Debug, PartialEq)]
3928    #[non_exhaustive]
3929    pub enum Source {
3930        /// Name of the backup from which to restore.  Values are of the form
3931        /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
3932        Backup(std::string::String),
3933    }
3934}
3935
3936/// Metadata type for the long-running operation returned by
3937/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
3938///
3939/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
3940#[derive(Clone, Default, PartialEq)]
3941#[non_exhaustive]
3942pub struct RestoreTableMetadata {
3943    /// Name of the table being created and restored to.
3944    pub name: std::string::String,
3945
3946    /// The type of the restore source.
3947    pub source_type: crate::model::RestoreSourceType,
3948
3949    /// If exists, the name of the long-running operation that will be used to
3950    /// track the post-restore optimization process to optimize the performance of
3951    /// the restored table. The metadata type of the long-running operation is
3952    /// [OptimizeRestoreTableMetadata][]. The response type is
3953    /// [Empty][google.protobuf.Empty]. This long-running operation may be
3954    /// automatically created by the system if applicable after the
3955    /// RestoreTable long-running operation completes successfully. This operation
3956    /// may not be created if the table is already optimized or the restore was
3957    /// not successful.
3958    ///
3959    /// [google.protobuf.Empty]: wkt::Empty
3960    pub optimize_table_operation_name: std::string::String,
3961
3962    /// The progress of the
3963    /// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]
3964    /// operation.
3965    ///
3966    /// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
3967    pub progress: std::option::Option<crate::model::OperationProgress>,
3968
3969    /// Information about the source used to restore the table, as specified by
3970    /// `source` in
3971    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
3972    ///
3973    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
3974    pub source_info: std::option::Option<crate::model::restore_table_metadata::SourceInfo>,
3975
3976    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3977}
3978
3979impl RestoreTableMetadata {
3980    pub fn new() -> Self {
3981        std::default::Default::default()
3982    }
3983
3984    /// Sets the value of [name][crate::model::RestoreTableMetadata::name].
3985    ///
3986    /// # Example
3987    /// ```ignore,no_run
3988    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
3989    /// let x = RestoreTableMetadata::new().set_name("example");
3990    /// ```
3991    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3992        self.name = v.into();
3993        self
3994    }
3995
3996    /// Sets the value of [source_type][crate::model::RestoreTableMetadata::source_type].
3997    ///
3998    /// # Example
3999    /// ```ignore,no_run
4000    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4001    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
4002    /// let x0 = RestoreTableMetadata::new().set_source_type(RestoreSourceType::Backup);
4003    /// ```
4004    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
4005        mut self,
4006        v: T,
4007    ) -> Self {
4008        self.source_type = v.into();
4009        self
4010    }
4011
4012    /// Sets the value of [optimize_table_operation_name][crate::model::RestoreTableMetadata::optimize_table_operation_name].
4013    ///
4014    /// # Example
4015    /// ```ignore,no_run
4016    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4017    /// let x = RestoreTableMetadata::new().set_optimize_table_operation_name("example");
4018    /// ```
4019    pub fn set_optimize_table_operation_name<T: std::convert::Into<std::string::String>>(
4020        mut self,
4021        v: T,
4022    ) -> Self {
4023        self.optimize_table_operation_name = v.into();
4024        self
4025    }
4026
4027    /// Sets the value of [progress][crate::model::RestoreTableMetadata::progress].
4028    ///
4029    /// # Example
4030    /// ```ignore,no_run
4031    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4032    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4033    /// let x = RestoreTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4034    /// ```
4035    pub fn set_progress<T>(mut self, v: T) -> Self
4036    where
4037        T: std::convert::Into<crate::model::OperationProgress>,
4038    {
4039        self.progress = std::option::Option::Some(v.into());
4040        self
4041    }
4042
4043    /// Sets or clears the value of [progress][crate::model::RestoreTableMetadata::progress].
4044    ///
4045    /// # Example
4046    /// ```ignore,no_run
4047    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4048    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4049    /// let x = RestoreTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4050    /// let x = RestoreTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4051    /// ```
4052    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4053    where
4054        T: std::convert::Into<crate::model::OperationProgress>,
4055    {
4056        self.progress = v.map(|x| x.into());
4057        self
4058    }
4059
4060    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info].
4061    ///
4062    /// Note that all the setters affecting `source_info` are mutually
4063    /// exclusive.
4064    ///
4065    /// # Example
4066    /// ```ignore,no_run
4067    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4068    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4069    /// let x = RestoreTableMetadata::new().set_source_info(Some(
4070    ///     google_cloud_bigtable_admin_v2::model::restore_table_metadata::SourceInfo::BackupInfo(BackupInfo::default().into())));
4071    /// ```
4072    pub fn set_source_info<
4073        T: std::convert::Into<std::option::Option<crate::model::restore_table_metadata::SourceInfo>>,
4074    >(
4075        mut self,
4076        v: T,
4077    ) -> Self {
4078        self.source_info = v.into();
4079        self
4080    }
4081
4082    /// The value of [source_info][crate::model::RestoreTableMetadata::source_info]
4083    /// if it holds a `BackupInfo`, `None` if the field is not set or
4084    /// holds a different branch.
4085    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
4086        #[allow(unreachable_patterns)]
4087        self.source_info.as_ref().and_then(|v| match v {
4088            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v) => {
4089                std::option::Option::Some(v)
4090            }
4091            _ => std::option::Option::None,
4092        })
4093    }
4094
4095    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info]
4096    /// to hold a `BackupInfo`.
4097    ///
4098    /// Note that all the setters affecting `source_info` are
4099    /// mutually exclusive.
4100    ///
4101    /// # Example
4102    /// ```ignore,no_run
4103    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4104    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4105    /// let x = RestoreTableMetadata::new().set_backup_info(BackupInfo::default()/* use setters */);
4106    /// assert!(x.backup_info().is_some());
4107    /// ```
4108    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
4109        mut self,
4110        v: T,
4111    ) -> Self {
4112        self.source_info = std::option::Option::Some(
4113            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v.into()),
4114        );
4115        self
4116    }
4117}
4118
4119impl wkt::message::Message for RestoreTableMetadata {
4120    fn typename() -> &'static str {
4121        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableMetadata"
4122    }
4123}
4124
4125/// Defines additional types related to [RestoreTableMetadata].
4126pub mod restore_table_metadata {
4127    #[allow(unused_imports)]
4128    use super::*;
4129
4130    /// Information about the source used to restore the table, as specified by
4131    /// `source` in
4132    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
4133    ///
4134    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
4135    #[derive(Clone, Debug, PartialEq)]
4136    #[non_exhaustive]
4137    pub enum SourceInfo {
4138        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
4139    }
4140}
4141
4142/// Metadata type for the long-running operation used to track the progress
4143/// of optimizations performed on a newly restored table. This long-running
4144/// operation is automatically created by the system after the successful
4145/// completion of a table restore, and cannot be cancelled.
4146#[derive(Clone, Default, PartialEq)]
4147#[non_exhaustive]
4148pub struct OptimizeRestoredTableMetadata {
4149    /// Name of the restored table being optimized.
4150    pub name: std::string::String,
4151
4152    /// The progress of the post-restore optimizations.
4153    pub progress: std::option::Option<crate::model::OperationProgress>,
4154
4155    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4156}
4157
4158impl OptimizeRestoredTableMetadata {
4159    pub fn new() -> Self {
4160        std::default::Default::default()
4161    }
4162
4163    /// Sets the value of [name][crate::model::OptimizeRestoredTableMetadata::name].
4164    ///
4165    /// # Example
4166    /// ```ignore,no_run
4167    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4168    /// let x = OptimizeRestoredTableMetadata::new().set_name("example");
4169    /// ```
4170    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4171        self.name = v.into();
4172        self
4173    }
4174
4175    /// Sets the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4176    ///
4177    /// # Example
4178    /// ```ignore,no_run
4179    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4180    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4181    /// let x = OptimizeRestoredTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4182    /// ```
4183    pub fn set_progress<T>(mut self, v: T) -> Self
4184    where
4185        T: std::convert::Into<crate::model::OperationProgress>,
4186    {
4187        self.progress = std::option::Option::Some(v.into());
4188        self
4189    }
4190
4191    /// Sets or clears the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4192    ///
4193    /// # Example
4194    /// ```ignore,no_run
4195    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4196    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4197    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4198    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4199    /// ```
4200    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4201    where
4202        T: std::convert::Into<crate::model::OperationProgress>,
4203    {
4204        self.progress = v.map(|x| x.into());
4205        self
4206    }
4207}
4208
4209impl wkt::message::Message for OptimizeRestoredTableMetadata {
4210    fn typename() -> &'static str {
4211        "type.googleapis.com/google.bigtable.admin.v2.OptimizeRestoredTableMetadata"
4212    }
4213}
4214
4215/// Request message for
4216/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
4217///
4218/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]: crate::client::BigtableTableAdmin::create_table
4219#[derive(Clone, Default, PartialEq)]
4220#[non_exhaustive]
4221pub struct CreateTableRequest {
4222    /// Required. The unique name of the instance in which to create the table.
4223    /// Values are of the form `projects/{project}/instances/{instance}`.
4224    pub parent: std::string::String,
4225
4226    /// Required. The name by which the new table should be referred to within the
4227    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4228    /// Maximum 50 characters.
4229    pub table_id: std::string::String,
4230
4231    /// Required. The Table to create.
4232    pub table: std::option::Option<crate::model::Table>,
4233
4234    /// The optional list of row keys that will be used to initially split the
4235    /// table into several tablets (tablets are similar to HBase regions).
4236    /// Given two split keys, `s1` and `s2`, three tablets will be created,
4237    /// spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
4238    ///
4239    /// Example:
4240    ///
4241    /// * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
4242    ///   `"other", "zz"]`
4243    /// * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
4244    /// * Key assignment:
4245    ///   - Tablet 1 `[, apple)                => {"a"}.`
4246    ///   - Tablet 2 `[apple, customer_1)      => {"apple", "custom"}.`
4247    ///   - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
4248    ///   - Tablet 4 `[customer_2, other)      => {"customer_2"}.`
4249    ///   - Tablet 5 `[other, )                => {"other", "zz"}.`
4250    pub initial_splits: std::vec::Vec<crate::model::create_table_request::Split>,
4251
4252    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4253}
4254
4255impl CreateTableRequest {
4256    pub fn new() -> Self {
4257        std::default::Default::default()
4258    }
4259
4260    /// Sets the value of [parent][crate::model::CreateTableRequest::parent].
4261    ///
4262    /// # Example
4263    /// ```ignore,no_run
4264    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4265    /// let x = CreateTableRequest::new().set_parent("example");
4266    /// ```
4267    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4268        self.parent = v.into();
4269        self
4270    }
4271
4272    /// Sets the value of [table_id][crate::model::CreateTableRequest::table_id].
4273    ///
4274    /// # Example
4275    /// ```ignore,no_run
4276    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4277    /// let x = CreateTableRequest::new().set_table_id("example");
4278    /// ```
4279    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4280        self.table_id = v.into();
4281        self
4282    }
4283
4284    /// Sets the value of [table][crate::model::CreateTableRequest::table].
4285    ///
4286    /// # Example
4287    /// ```ignore,no_run
4288    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4289    /// use google_cloud_bigtable_admin_v2::model::Table;
4290    /// let x = CreateTableRequest::new().set_table(Table::default()/* use setters */);
4291    /// ```
4292    pub fn set_table<T>(mut self, v: T) -> Self
4293    where
4294        T: std::convert::Into<crate::model::Table>,
4295    {
4296        self.table = std::option::Option::Some(v.into());
4297        self
4298    }
4299
4300    /// Sets or clears the value of [table][crate::model::CreateTableRequest::table].
4301    ///
4302    /// # Example
4303    /// ```ignore,no_run
4304    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4305    /// use google_cloud_bigtable_admin_v2::model::Table;
4306    /// let x = CreateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
4307    /// let x = CreateTableRequest::new().set_or_clear_table(None::<Table>);
4308    /// ```
4309    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4310    where
4311        T: std::convert::Into<crate::model::Table>,
4312    {
4313        self.table = v.map(|x| x.into());
4314        self
4315    }
4316
4317    /// Sets the value of [initial_splits][crate::model::CreateTableRequest::initial_splits].
4318    ///
4319    /// # Example
4320    /// ```ignore,no_run
4321    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4322    /// use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4323    /// let x = CreateTableRequest::new()
4324    ///     .set_initial_splits([
4325    ///         Split::default()/* use setters */,
4326    ///         Split::default()/* use (different) setters */,
4327    ///     ]);
4328    /// ```
4329    pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
4330    where
4331        T: std::iter::IntoIterator<Item = V>,
4332        V: std::convert::Into<crate::model::create_table_request::Split>,
4333    {
4334        use std::iter::Iterator;
4335        self.initial_splits = v.into_iter().map(|i| i.into()).collect();
4336        self
4337    }
4338}
4339
4340impl wkt::message::Message for CreateTableRequest {
4341    fn typename() -> &'static str {
4342        "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest"
4343    }
4344}
4345
4346/// Defines additional types related to [CreateTableRequest].
4347pub mod create_table_request {
4348    #[allow(unused_imports)]
4349    use super::*;
4350
4351    /// An initial split point for a newly created table.
4352    #[derive(Clone, Default, PartialEq)]
4353    #[non_exhaustive]
4354    pub struct Split {
4355        /// Row key to use as an initial tablet boundary.
4356        pub key: ::bytes::Bytes,
4357
4358        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4359    }
4360
4361    impl Split {
4362        pub fn new() -> Self {
4363            std::default::Default::default()
4364        }
4365
4366        /// Sets the value of [key][crate::model::create_table_request::Split::key].
4367        ///
4368        /// # Example
4369        /// ```ignore,no_run
4370        /// # use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4371        /// let x = Split::new().set_key(bytes::Bytes::from_static(b"example"));
4372        /// ```
4373        pub fn set_key<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4374            self.key = v.into();
4375            self
4376        }
4377    }
4378
4379    impl wkt::message::Message for Split {
4380        fn typename() -> &'static str {
4381            "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest.Split"
4382        }
4383    }
4384}
4385
4386/// Request message for
4387/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
4388///
4389/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4390/// feature is not currently available to most Cloud Bigtable customers. This
4391/// feature might be changed in backward-incompatible ways and is not recommended
4392/// for production use. It is not subject to any SLA or deprecation policy.
4393///
4394/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]: crate::client::BigtableTableAdmin::create_table_from_snapshot
4395#[derive(Clone, Default, PartialEq)]
4396#[non_exhaustive]
4397pub struct CreateTableFromSnapshotRequest {
4398    /// Required. The unique name of the instance in which to create the table.
4399    /// Values are of the form `projects/{project}/instances/{instance}`.
4400    pub parent: std::string::String,
4401
4402    /// Required. The name by which the new table should be referred to within the
4403    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4404    pub table_id: std::string::String,
4405
4406    /// Required. The unique name of the snapshot from which to restore the table.
4407    /// The snapshot and the table must be in the same instance. Values are of the
4408    /// form
4409    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
4410    pub source_snapshot: std::string::String,
4411
4412    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4413}
4414
4415impl CreateTableFromSnapshotRequest {
4416    pub fn new() -> Self {
4417        std::default::Default::default()
4418    }
4419
4420    /// Sets the value of [parent][crate::model::CreateTableFromSnapshotRequest::parent].
4421    ///
4422    /// # Example
4423    /// ```ignore,no_run
4424    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4425    /// let x = CreateTableFromSnapshotRequest::new().set_parent("example");
4426    /// ```
4427    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4428        self.parent = v.into();
4429        self
4430    }
4431
4432    /// Sets the value of [table_id][crate::model::CreateTableFromSnapshotRequest::table_id].
4433    ///
4434    /// # Example
4435    /// ```ignore,no_run
4436    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4437    /// let x = CreateTableFromSnapshotRequest::new().set_table_id("example");
4438    /// ```
4439    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4440        self.table_id = v.into();
4441        self
4442    }
4443
4444    /// Sets the value of [source_snapshot][crate::model::CreateTableFromSnapshotRequest::source_snapshot].
4445    ///
4446    /// # Example
4447    /// ```ignore,no_run
4448    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4449    /// let x = CreateTableFromSnapshotRequest::new().set_source_snapshot("example");
4450    /// ```
4451    pub fn set_source_snapshot<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4452        self.source_snapshot = v.into();
4453        self
4454    }
4455}
4456
4457impl wkt::message::Message for CreateTableFromSnapshotRequest {
4458    fn typename() -> &'static str {
4459        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotRequest"
4460    }
4461}
4462
4463/// Request message for
4464/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
4465///
4466/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]: crate::client::BigtableTableAdmin::drop_row_range
4467#[derive(Clone, Default, PartialEq)]
4468#[non_exhaustive]
4469pub struct DropRowRangeRequest {
4470    /// Required. The unique name of the table on which to drop a range of rows.
4471    /// Values are of the form
4472    /// `projects/{project}/instances/{instance}/tables/{table}`.
4473    pub name: std::string::String,
4474
4475    /// Delete all rows or by prefix.
4476    pub target: std::option::Option<crate::model::drop_row_range_request::Target>,
4477
4478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4479}
4480
4481impl DropRowRangeRequest {
4482    pub fn new() -> Self {
4483        std::default::Default::default()
4484    }
4485
4486    /// Sets the value of [name][crate::model::DropRowRangeRequest::name].
4487    ///
4488    /// # Example
4489    /// ```ignore,no_run
4490    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4491    /// let x = DropRowRangeRequest::new().set_name("example");
4492    /// ```
4493    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4494        self.name = v.into();
4495        self
4496    }
4497
4498    /// Sets the value of [target][crate::model::DropRowRangeRequest::target].
4499    ///
4500    /// Note that all the setters affecting `target` are mutually
4501    /// exclusive.
4502    ///
4503    /// # Example
4504    /// ```ignore,no_run
4505    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4506    /// use google_cloud_bigtable_admin_v2::model::drop_row_range_request::Target;
4507    /// let x = DropRowRangeRequest::new().set_target(Some(Target::RowKeyPrefix(bytes::Bytes::from_static(b"example"))));
4508    /// ```
4509    pub fn set_target<
4510        T: std::convert::Into<std::option::Option<crate::model::drop_row_range_request::Target>>,
4511    >(
4512        mut self,
4513        v: T,
4514    ) -> Self {
4515        self.target = v.into();
4516        self
4517    }
4518
4519    /// The value of [target][crate::model::DropRowRangeRequest::target]
4520    /// if it holds a `RowKeyPrefix`, `None` if the field is not set or
4521    /// holds a different branch.
4522    pub fn row_key_prefix(&self) -> std::option::Option<&::bytes::Bytes> {
4523        #[allow(unreachable_patterns)]
4524        self.target.as_ref().and_then(|v| match v {
4525            crate::model::drop_row_range_request::Target::RowKeyPrefix(v) => {
4526                std::option::Option::Some(v)
4527            }
4528            _ => std::option::Option::None,
4529        })
4530    }
4531
4532    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
4533    /// to hold a `RowKeyPrefix`.
4534    ///
4535    /// Note that all the setters affecting `target` are
4536    /// mutually exclusive.
4537    ///
4538    /// # Example
4539    /// ```ignore,no_run
4540    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4541    /// let x = DropRowRangeRequest::new().set_row_key_prefix(bytes::Bytes::from_static(b"example"));
4542    /// assert!(x.row_key_prefix().is_some());
4543    /// assert!(x.delete_all_data_from_table().is_none());
4544    /// ```
4545    pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4546        self.target = std::option::Option::Some(
4547            crate::model::drop_row_range_request::Target::RowKeyPrefix(v.into()),
4548        );
4549        self
4550    }
4551
4552    /// The value of [target][crate::model::DropRowRangeRequest::target]
4553    /// if it holds a `DeleteAllDataFromTable`, `None` if the field is not set or
4554    /// holds a different branch.
4555    pub fn delete_all_data_from_table(&self) -> std::option::Option<&bool> {
4556        #[allow(unreachable_patterns)]
4557        self.target.as_ref().and_then(|v| match v {
4558            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v) => {
4559                std::option::Option::Some(v)
4560            }
4561            _ => std::option::Option::None,
4562        })
4563    }
4564
4565    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
4566    /// to hold a `DeleteAllDataFromTable`.
4567    ///
4568    /// Note that all the setters affecting `target` are
4569    /// mutually exclusive.
4570    ///
4571    /// # Example
4572    /// ```ignore,no_run
4573    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4574    /// let x = DropRowRangeRequest::new().set_delete_all_data_from_table(true);
4575    /// assert!(x.delete_all_data_from_table().is_some());
4576    /// assert!(x.row_key_prefix().is_none());
4577    /// ```
4578    pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4579        self.target = std::option::Option::Some(
4580            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v.into()),
4581        );
4582        self
4583    }
4584}
4585
4586impl wkt::message::Message for DropRowRangeRequest {
4587    fn typename() -> &'static str {
4588        "type.googleapis.com/google.bigtable.admin.v2.DropRowRangeRequest"
4589    }
4590}
4591
4592/// Defines additional types related to [DropRowRangeRequest].
4593pub mod drop_row_range_request {
4594    #[allow(unused_imports)]
4595    use super::*;
4596
4597    /// Delete all rows or by prefix.
4598    #[derive(Clone, Debug, PartialEq)]
4599    #[non_exhaustive]
4600    pub enum Target {
4601        /// Delete all rows that start with this row key prefix. Prefix cannot be
4602        /// zero length.
4603        RowKeyPrefix(::bytes::Bytes),
4604        /// Delete all rows in the table. Setting this to false is a no-op.
4605        DeleteAllDataFromTable(bool),
4606    }
4607}
4608
4609/// Request message for
4610/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
4611///
4612/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
4613#[derive(Clone, Default, PartialEq)]
4614#[non_exhaustive]
4615pub struct ListTablesRequest {
4616    /// Required. The unique name of the instance for which tables should be
4617    /// listed. Values are of the form `projects/{project}/instances/{instance}`.
4618    pub parent: std::string::String,
4619
4620    /// The view to be applied to the returned tables' fields.
4621    /// NAME_ONLY view (default) and REPLICATION_VIEW are supported.
4622    pub view: crate::model::table::View,
4623
4624    /// Maximum number of results per page.
4625    ///
4626    /// A page_size of zero lets the server choose the number of items to return.
4627    /// A page_size which is strictly positive will return at most that many items.
4628    /// A negative page_size will cause an error.
4629    ///
4630    /// Following the first request, subsequent paginated calls are not required
4631    /// to pass a page_size. If a page_size is set in subsequent calls, it must
4632    /// match the page_size given in the first request.
4633    pub page_size: i32,
4634
4635    /// The value of `next_page_token` returned by a previous call.
4636    pub page_token: std::string::String,
4637
4638    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4639}
4640
4641impl ListTablesRequest {
4642    pub fn new() -> Self {
4643        std::default::Default::default()
4644    }
4645
4646    /// Sets the value of [parent][crate::model::ListTablesRequest::parent].
4647    ///
4648    /// # Example
4649    /// ```ignore,no_run
4650    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4651    /// let x = ListTablesRequest::new().set_parent("example");
4652    /// ```
4653    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4654        self.parent = v.into();
4655        self
4656    }
4657
4658    /// Sets the value of [view][crate::model::ListTablesRequest::view].
4659    ///
4660    /// # Example
4661    /// ```ignore,no_run
4662    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4663    /// use google_cloud_bigtable_admin_v2::model::table::View;
4664    /// let x0 = ListTablesRequest::new().set_view(View::NameOnly);
4665    /// let x1 = ListTablesRequest::new().set_view(View::SchemaView);
4666    /// let x2 = ListTablesRequest::new().set_view(View::ReplicationView);
4667    /// ```
4668    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
4669        self.view = v.into();
4670        self
4671    }
4672
4673    /// Sets the value of [page_size][crate::model::ListTablesRequest::page_size].
4674    ///
4675    /// # Example
4676    /// ```ignore,no_run
4677    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4678    /// let x = ListTablesRequest::new().set_page_size(42);
4679    /// ```
4680    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4681        self.page_size = v.into();
4682        self
4683    }
4684
4685    /// Sets the value of [page_token][crate::model::ListTablesRequest::page_token].
4686    ///
4687    /// # Example
4688    /// ```ignore,no_run
4689    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4690    /// let x = ListTablesRequest::new().set_page_token("example");
4691    /// ```
4692    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4693        self.page_token = v.into();
4694        self
4695    }
4696}
4697
4698impl wkt::message::Message for ListTablesRequest {
4699    fn typename() -> &'static str {
4700        "type.googleapis.com/google.bigtable.admin.v2.ListTablesRequest"
4701    }
4702}
4703
4704/// Response message for
4705/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
4706///
4707/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
4708#[derive(Clone, Default, PartialEq)]
4709#[non_exhaustive]
4710pub struct ListTablesResponse {
4711    /// The tables present in the requested instance.
4712    pub tables: std::vec::Vec<crate::model::Table>,
4713
4714    /// Set if not all tables could be returned in a single response.
4715    /// Pass this value to `page_token` in another request to get the next
4716    /// page of results.
4717    pub next_page_token: std::string::String,
4718
4719    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4720}
4721
4722impl ListTablesResponse {
4723    pub fn new() -> Self {
4724        std::default::Default::default()
4725    }
4726
4727    /// Sets the value of [tables][crate::model::ListTablesResponse::tables].
4728    ///
4729    /// # Example
4730    /// ```ignore,no_run
4731    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
4732    /// use google_cloud_bigtable_admin_v2::model::Table;
4733    /// let x = ListTablesResponse::new()
4734    ///     .set_tables([
4735    ///         Table::default()/* use setters */,
4736    ///         Table::default()/* use (different) setters */,
4737    ///     ]);
4738    /// ```
4739    pub fn set_tables<T, V>(mut self, v: T) -> Self
4740    where
4741        T: std::iter::IntoIterator<Item = V>,
4742        V: std::convert::Into<crate::model::Table>,
4743    {
4744        use std::iter::Iterator;
4745        self.tables = v.into_iter().map(|i| i.into()).collect();
4746        self
4747    }
4748
4749    /// Sets the value of [next_page_token][crate::model::ListTablesResponse::next_page_token].
4750    ///
4751    /// # Example
4752    /// ```ignore,no_run
4753    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
4754    /// let x = ListTablesResponse::new().set_next_page_token("example");
4755    /// ```
4756    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4757        self.next_page_token = v.into();
4758        self
4759    }
4760}
4761
4762impl wkt::message::Message for ListTablesResponse {
4763    fn typename() -> &'static str {
4764        "type.googleapis.com/google.bigtable.admin.v2.ListTablesResponse"
4765    }
4766}
4767
4768#[doc(hidden)]
4769impl google_cloud_gax::paginator::internal::PageableResponse for ListTablesResponse {
4770    type PageItem = crate::model::Table;
4771
4772    fn items(self) -> std::vec::Vec<Self::PageItem> {
4773        self.tables
4774    }
4775
4776    fn next_page_token(&self) -> std::string::String {
4777        use std::clone::Clone;
4778        self.next_page_token.clone()
4779    }
4780}
4781
4782/// Request message for
4783/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
4784///
4785/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable]: crate::client::BigtableTableAdmin::get_table
4786#[derive(Clone, Default, PartialEq)]
4787#[non_exhaustive]
4788pub struct GetTableRequest {
4789    /// Required. The unique name of the requested table.
4790    /// Values are of the form
4791    /// `projects/{project}/instances/{instance}/tables/{table}`.
4792    pub name: std::string::String,
4793
4794    /// The view to be applied to the returned table's fields.
4795    /// Defaults to `SCHEMA_VIEW` if unspecified.
4796    pub view: crate::model::table::View,
4797
4798    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4799}
4800
4801impl GetTableRequest {
4802    pub fn new() -> Self {
4803        std::default::Default::default()
4804    }
4805
4806    /// Sets the value of [name][crate::model::GetTableRequest::name].
4807    ///
4808    /// # Example
4809    /// ```ignore,no_run
4810    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
4811    /// let x = GetTableRequest::new().set_name("example");
4812    /// ```
4813    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4814        self.name = v.into();
4815        self
4816    }
4817
4818    /// Sets the value of [view][crate::model::GetTableRequest::view].
4819    ///
4820    /// # Example
4821    /// ```ignore,no_run
4822    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
4823    /// use google_cloud_bigtable_admin_v2::model::table::View;
4824    /// let x0 = GetTableRequest::new().set_view(View::NameOnly);
4825    /// let x1 = GetTableRequest::new().set_view(View::SchemaView);
4826    /// let x2 = GetTableRequest::new().set_view(View::ReplicationView);
4827    /// ```
4828    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
4829        self.view = v.into();
4830        self
4831    }
4832}
4833
4834impl wkt::message::Message for GetTableRequest {
4835    fn typename() -> &'static str {
4836        "type.googleapis.com/google.bigtable.admin.v2.GetTableRequest"
4837    }
4838}
4839
4840/// The request for
4841/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
4842///
4843/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
4844#[derive(Clone, Default, PartialEq)]
4845#[non_exhaustive]
4846pub struct UpdateTableRequest {
4847    /// Required. The table to update.
4848    /// The table's `name` field is used to identify the table to update.
4849    pub table: std::option::Option<crate::model::Table>,
4850
4851    /// Required. The list of fields to update.
4852    /// A mask specifying which fields (e.g. `change_stream_config`) in the `table`
4853    /// field should be updated. This mask is relative to the `table` field, not to
4854    /// the request message. The wildcard (*) path is currently not supported.
4855    /// Currently UpdateTable is only supported for the following fields:
4856    ///
4857    /// * `change_stream_config`
4858    /// * `change_stream_config.retention_period`
4859    /// * `deletion_protection`
4860    /// * `row_key_schema`
4861    ///
4862    /// If `column_families` is set in `update_mask`, it will return an
4863    /// UNIMPLEMENTED error.
4864    pub update_mask: std::option::Option<wkt::FieldMask>,
4865
4866    /// Optional. If true, ignore safety checks when updating the table.
4867    pub ignore_warnings: bool,
4868
4869    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4870}
4871
4872impl UpdateTableRequest {
4873    pub fn new() -> Self {
4874        std::default::Default::default()
4875    }
4876
4877    /// Sets the value of [table][crate::model::UpdateTableRequest::table].
4878    ///
4879    /// # Example
4880    /// ```ignore,no_run
4881    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4882    /// use google_cloud_bigtable_admin_v2::model::Table;
4883    /// let x = UpdateTableRequest::new().set_table(Table::default()/* use setters */);
4884    /// ```
4885    pub fn set_table<T>(mut self, v: T) -> Self
4886    where
4887        T: std::convert::Into<crate::model::Table>,
4888    {
4889        self.table = std::option::Option::Some(v.into());
4890        self
4891    }
4892
4893    /// Sets or clears the value of [table][crate::model::UpdateTableRequest::table].
4894    ///
4895    /// # Example
4896    /// ```ignore,no_run
4897    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4898    /// use google_cloud_bigtable_admin_v2::model::Table;
4899    /// let x = UpdateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
4900    /// let x = UpdateTableRequest::new().set_or_clear_table(None::<Table>);
4901    /// ```
4902    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4903    where
4904        T: std::convert::Into<crate::model::Table>,
4905    {
4906        self.table = v.map(|x| x.into());
4907        self
4908    }
4909
4910    /// Sets the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
4911    ///
4912    /// # Example
4913    /// ```ignore,no_run
4914    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4915    /// use wkt::FieldMask;
4916    /// let x = UpdateTableRequest::new().set_update_mask(FieldMask::default()/* use setters */);
4917    /// ```
4918    pub fn set_update_mask<T>(mut self, v: T) -> Self
4919    where
4920        T: std::convert::Into<wkt::FieldMask>,
4921    {
4922        self.update_mask = std::option::Option::Some(v.into());
4923        self
4924    }
4925
4926    /// Sets or clears the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
4927    ///
4928    /// # Example
4929    /// ```ignore,no_run
4930    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4931    /// use wkt::FieldMask;
4932    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
4933    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(None::<FieldMask>);
4934    /// ```
4935    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4936    where
4937        T: std::convert::Into<wkt::FieldMask>,
4938    {
4939        self.update_mask = v.map(|x| x.into());
4940        self
4941    }
4942
4943    /// Sets the value of [ignore_warnings][crate::model::UpdateTableRequest::ignore_warnings].
4944    ///
4945    /// # Example
4946    /// ```ignore,no_run
4947    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4948    /// let x = UpdateTableRequest::new().set_ignore_warnings(true);
4949    /// ```
4950    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4951        self.ignore_warnings = v.into();
4952        self
4953    }
4954}
4955
4956impl wkt::message::Message for UpdateTableRequest {
4957    fn typename() -> &'static str {
4958        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableRequest"
4959    }
4960}
4961
4962/// Metadata type for the operation returned by
4963/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
4964///
4965/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
4966#[derive(Clone, Default, PartialEq)]
4967#[non_exhaustive]
4968pub struct UpdateTableMetadata {
4969    /// The name of the table being updated.
4970    pub name: std::string::String,
4971
4972    /// The time at which this operation started.
4973    pub start_time: std::option::Option<wkt::Timestamp>,
4974
4975    /// If set, the time at which this operation finished or was canceled.
4976    pub end_time: std::option::Option<wkt::Timestamp>,
4977
4978    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4979}
4980
4981impl UpdateTableMetadata {
4982    pub fn new() -> Self {
4983        std::default::Default::default()
4984    }
4985
4986    /// Sets the value of [name][crate::model::UpdateTableMetadata::name].
4987    ///
4988    /// # Example
4989    /// ```ignore,no_run
4990    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
4991    /// let x = UpdateTableMetadata::new().set_name("example");
4992    /// ```
4993    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4994        self.name = v.into();
4995        self
4996    }
4997
4998    /// Sets the value of [start_time][crate::model::UpdateTableMetadata::start_time].
4999    ///
5000    /// # Example
5001    /// ```ignore,no_run
5002    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5003    /// use wkt::Timestamp;
5004    /// let x = UpdateTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5005    /// ```
5006    pub fn set_start_time<T>(mut self, v: T) -> Self
5007    where
5008        T: std::convert::Into<wkt::Timestamp>,
5009    {
5010        self.start_time = std::option::Option::Some(v.into());
5011        self
5012    }
5013
5014    /// Sets or clears the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5015    ///
5016    /// # Example
5017    /// ```ignore,no_run
5018    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5019    /// use wkt::Timestamp;
5020    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5021    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5022    /// ```
5023    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5024    where
5025        T: std::convert::Into<wkt::Timestamp>,
5026    {
5027        self.start_time = v.map(|x| x.into());
5028        self
5029    }
5030
5031    /// Sets the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5032    ///
5033    /// # Example
5034    /// ```ignore,no_run
5035    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5036    /// use wkt::Timestamp;
5037    /// let x = UpdateTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5038    /// ```
5039    pub fn set_end_time<T>(mut self, v: T) -> Self
5040    where
5041        T: std::convert::Into<wkt::Timestamp>,
5042    {
5043        self.end_time = std::option::Option::Some(v.into());
5044        self
5045    }
5046
5047    /// Sets or clears the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5048    ///
5049    /// # Example
5050    /// ```ignore,no_run
5051    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5052    /// use wkt::Timestamp;
5053    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5054    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5055    /// ```
5056    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5057    where
5058        T: std::convert::Into<wkt::Timestamp>,
5059    {
5060        self.end_time = v.map(|x| x.into());
5061        self
5062    }
5063}
5064
5065impl wkt::message::Message for UpdateTableMetadata {
5066    fn typename() -> &'static str {
5067        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableMetadata"
5068    }
5069}
5070
5071/// Request message for
5072/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
5073///
5074/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]: crate::client::BigtableTableAdmin::delete_table
5075#[derive(Clone, Default, PartialEq)]
5076#[non_exhaustive]
5077pub struct DeleteTableRequest {
5078    /// Required. The unique name of the table to be deleted.
5079    /// Values are of the form
5080    /// `projects/{project}/instances/{instance}/tables/{table}`.
5081    pub name: std::string::String,
5082
5083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5084}
5085
5086impl DeleteTableRequest {
5087    pub fn new() -> Self {
5088        std::default::Default::default()
5089    }
5090
5091    /// Sets the value of [name][crate::model::DeleteTableRequest::name].
5092    ///
5093    /// # Example
5094    /// ```ignore,no_run
5095    /// # use google_cloud_bigtable_admin_v2::model::DeleteTableRequest;
5096    /// let x = DeleteTableRequest::new().set_name("example");
5097    /// ```
5098    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5099        self.name = v.into();
5100        self
5101    }
5102}
5103
5104impl wkt::message::Message for DeleteTableRequest {
5105    fn typename() -> &'static str {
5106        "type.googleapis.com/google.bigtable.admin.v2.DeleteTableRequest"
5107    }
5108}
5109
5110/// Request message for
5111/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
5112///
5113/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5114#[derive(Clone, Default, PartialEq)]
5115#[non_exhaustive]
5116pub struct UndeleteTableRequest {
5117    /// Required. The unique name of the table to be restored.
5118    /// Values are of the form
5119    /// `projects/{project}/instances/{instance}/tables/{table}`.
5120    pub name: std::string::String,
5121
5122    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5123}
5124
5125impl UndeleteTableRequest {
5126    pub fn new() -> Self {
5127        std::default::Default::default()
5128    }
5129
5130    /// Sets the value of [name][crate::model::UndeleteTableRequest::name].
5131    ///
5132    /// # Example
5133    /// ```ignore,no_run
5134    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableRequest;
5135    /// let x = UndeleteTableRequest::new().set_name("example");
5136    /// ```
5137    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5138        self.name = v.into();
5139        self
5140    }
5141}
5142
5143impl wkt::message::Message for UndeleteTableRequest {
5144    fn typename() -> &'static str {
5145        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableRequest"
5146    }
5147}
5148
5149/// Metadata type for the operation returned by
5150/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
5151///
5152/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5153#[derive(Clone, Default, PartialEq)]
5154#[non_exhaustive]
5155pub struct UndeleteTableMetadata {
5156    /// The name of the table being restored.
5157    pub name: std::string::String,
5158
5159    /// The time at which this operation started.
5160    pub start_time: std::option::Option<wkt::Timestamp>,
5161
5162    /// If set, the time at which this operation finished or was cancelled.
5163    pub end_time: std::option::Option<wkt::Timestamp>,
5164
5165    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5166}
5167
5168impl UndeleteTableMetadata {
5169    pub fn new() -> Self {
5170        std::default::Default::default()
5171    }
5172
5173    /// Sets the value of [name][crate::model::UndeleteTableMetadata::name].
5174    ///
5175    /// # Example
5176    /// ```ignore,no_run
5177    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5178    /// let x = UndeleteTableMetadata::new().set_name("example");
5179    /// ```
5180    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5181        self.name = v.into();
5182        self
5183    }
5184
5185    /// Sets the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5186    ///
5187    /// # Example
5188    /// ```ignore,no_run
5189    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5190    /// use wkt::Timestamp;
5191    /// let x = UndeleteTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5192    /// ```
5193    pub fn set_start_time<T>(mut self, v: T) -> Self
5194    where
5195        T: std::convert::Into<wkt::Timestamp>,
5196    {
5197        self.start_time = std::option::Option::Some(v.into());
5198        self
5199    }
5200
5201    /// Sets or clears the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5202    ///
5203    /// # Example
5204    /// ```ignore,no_run
5205    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5206    /// use wkt::Timestamp;
5207    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5208    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5209    /// ```
5210    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5211    where
5212        T: std::convert::Into<wkt::Timestamp>,
5213    {
5214        self.start_time = v.map(|x| x.into());
5215        self
5216    }
5217
5218    /// Sets the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5219    ///
5220    /// # Example
5221    /// ```ignore,no_run
5222    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5223    /// use wkt::Timestamp;
5224    /// let x = UndeleteTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5225    /// ```
5226    pub fn set_end_time<T>(mut self, v: T) -> Self
5227    where
5228        T: std::convert::Into<wkt::Timestamp>,
5229    {
5230        self.end_time = std::option::Option::Some(v.into());
5231        self
5232    }
5233
5234    /// Sets or clears the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5235    ///
5236    /// # Example
5237    /// ```ignore,no_run
5238    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5239    /// use wkt::Timestamp;
5240    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5241    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5242    /// ```
5243    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5244    where
5245        T: std::convert::Into<wkt::Timestamp>,
5246    {
5247        self.end_time = v.map(|x| x.into());
5248        self
5249    }
5250}
5251
5252impl wkt::message::Message for UndeleteTableMetadata {
5253    fn typename() -> &'static str {
5254        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableMetadata"
5255    }
5256}
5257
5258/// Request message for
5259/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
5260///
5261/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]: crate::client::BigtableTableAdmin::modify_column_families
5262#[derive(Clone, Default, PartialEq)]
5263#[non_exhaustive]
5264pub struct ModifyColumnFamiliesRequest {
5265    /// Required. The unique name of the table whose families should be modified.
5266    /// Values are of the form
5267    /// `projects/{project}/instances/{instance}/tables/{table}`.
5268    pub name: std::string::String,
5269
5270    /// Required. Modifications to be atomically applied to the specified table's
5271    /// families. Entries are applied in order, meaning that earlier modifications
5272    /// can be masked by later ones (in the case of repeated updates to the same
5273    /// family, for example).
5274    pub modifications: std::vec::Vec<crate::model::modify_column_families_request::Modification>,
5275
5276    /// Optional. If true, ignore safety checks when modifying the column families.
5277    pub ignore_warnings: bool,
5278
5279    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5280}
5281
5282impl ModifyColumnFamiliesRequest {
5283    pub fn new() -> Self {
5284        std::default::Default::default()
5285    }
5286
5287    /// Sets the value of [name][crate::model::ModifyColumnFamiliesRequest::name].
5288    ///
5289    /// # Example
5290    /// ```ignore,no_run
5291    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5292    /// let x = ModifyColumnFamiliesRequest::new().set_name("example");
5293    /// ```
5294    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5295        self.name = v.into();
5296        self
5297    }
5298
5299    /// Sets the value of [modifications][crate::model::ModifyColumnFamiliesRequest::modifications].
5300    ///
5301    /// # Example
5302    /// ```ignore,no_run
5303    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5304    /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5305    /// let x = ModifyColumnFamiliesRequest::new()
5306    ///     .set_modifications([
5307    ///         Modification::default()/* use setters */,
5308    ///         Modification::default()/* use (different) setters */,
5309    ///     ]);
5310    /// ```
5311    pub fn set_modifications<T, V>(mut self, v: T) -> Self
5312    where
5313        T: std::iter::IntoIterator<Item = V>,
5314        V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
5315    {
5316        use std::iter::Iterator;
5317        self.modifications = v.into_iter().map(|i| i.into()).collect();
5318        self
5319    }
5320
5321    /// Sets the value of [ignore_warnings][crate::model::ModifyColumnFamiliesRequest::ignore_warnings].
5322    ///
5323    /// # Example
5324    /// ```ignore,no_run
5325    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5326    /// let x = ModifyColumnFamiliesRequest::new().set_ignore_warnings(true);
5327    /// ```
5328    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5329        self.ignore_warnings = v.into();
5330        self
5331    }
5332}
5333
5334impl wkt::message::Message for ModifyColumnFamiliesRequest {
5335    fn typename() -> &'static str {
5336        "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest"
5337    }
5338}
5339
5340/// Defines additional types related to [ModifyColumnFamiliesRequest].
5341pub mod modify_column_families_request {
5342    #[allow(unused_imports)]
5343    use super::*;
5344
5345    /// A create, update, or delete of a particular column family.
5346    #[derive(Clone, Default, PartialEq)]
5347    #[non_exhaustive]
5348    pub struct Modification {
5349        /// The ID of the column family to be modified.
5350        pub id: std::string::String,
5351
5352        /// Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update`
5353        /// mod should be updated, ignored for other modification types. If unset or
5354        /// empty, we treat it as updating `gc_rule` to be backward compatible.
5355        pub update_mask: std::option::Option<wkt::FieldMask>,
5356
5357        /// Column family modifications.
5358        pub r#mod:
5359            std::option::Option<crate::model::modify_column_families_request::modification::Mod>,
5360
5361        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5362    }
5363
5364    impl Modification {
5365        pub fn new() -> Self {
5366            std::default::Default::default()
5367        }
5368
5369        /// Sets the value of [id][crate::model::modify_column_families_request::Modification::id].
5370        ///
5371        /// # Example
5372        /// ```ignore,no_run
5373        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5374        /// let x = Modification::new().set_id("example");
5375        /// ```
5376        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5377            self.id = v.into();
5378            self
5379        }
5380
5381        /// Sets the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5382        ///
5383        /// # Example
5384        /// ```ignore,no_run
5385        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5386        /// use wkt::FieldMask;
5387        /// let x = Modification::new().set_update_mask(FieldMask::default()/* use setters */);
5388        /// ```
5389        pub fn set_update_mask<T>(mut self, v: T) -> Self
5390        where
5391            T: std::convert::Into<wkt::FieldMask>,
5392        {
5393            self.update_mask = std::option::Option::Some(v.into());
5394            self
5395        }
5396
5397        /// Sets or clears the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5398        ///
5399        /// # Example
5400        /// ```ignore,no_run
5401        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5402        /// use wkt::FieldMask;
5403        /// let x = Modification::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5404        /// let x = Modification::new().set_or_clear_update_mask(None::<FieldMask>);
5405        /// ```
5406        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5407        where
5408            T: std::convert::Into<wkt::FieldMask>,
5409        {
5410            self.update_mask = v.map(|x| x.into());
5411            self
5412        }
5413
5414        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::mod].
5415        ///
5416        /// Note that all the setters affecting `r#mod` are mutually
5417        /// exclusive.
5418        ///
5419        /// # Example
5420        /// ```ignore,no_run
5421        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5422        /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::modification::Mod;
5423        /// let x = Modification::new().set_mod(Some(Mod::Drop(true)));
5424        /// ```
5425        pub fn set_mod<
5426            T: std::convert::Into<
5427                    std::option::Option<
5428                        crate::model::modify_column_families_request::modification::Mod,
5429                    >,
5430                >,
5431        >(
5432            mut self,
5433            v: T,
5434        ) -> Self {
5435            self.r#mod = v.into();
5436            self
5437        }
5438
5439        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5440        /// if it holds a `Create`, `None` if the field is not set or
5441        /// holds a different branch.
5442        pub fn create(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
5443            #[allow(unreachable_patterns)]
5444            self.r#mod.as_ref().and_then(|v| match v {
5445                crate::model::modify_column_families_request::modification::Mod::Create(v) => {
5446                    std::option::Option::Some(v)
5447                }
5448                _ => std::option::Option::None,
5449            })
5450        }
5451
5452        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5453        /// to hold a `Create`.
5454        ///
5455        /// Note that all the setters affecting `r#mod` are
5456        /// mutually exclusive.
5457        ///
5458        /// # Example
5459        /// ```ignore,no_run
5460        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5461        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
5462        /// let x = Modification::new().set_create(ColumnFamily::default()/* use setters */);
5463        /// assert!(x.create().is_some());
5464        /// assert!(x.update().is_none());
5465        /// assert!(x.drop().is_none());
5466        /// ```
5467        pub fn set_create<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
5468            mut self,
5469            v: T,
5470        ) -> Self {
5471            self.r#mod = std::option::Option::Some(
5472                crate::model::modify_column_families_request::modification::Mod::Create(v.into()),
5473            );
5474            self
5475        }
5476
5477        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5478        /// if it holds a `Update`, `None` if the field is not set or
5479        /// holds a different branch.
5480        pub fn update(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
5481            #[allow(unreachable_patterns)]
5482            self.r#mod.as_ref().and_then(|v| match v {
5483                crate::model::modify_column_families_request::modification::Mod::Update(v) => {
5484                    std::option::Option::Some(v)
5485                }
5486                _ => std::option::Option::None,
5487            })
5488        }
5489
5490        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5491        /// to hold a `Update`.
5492        ///
5493        /// Note that all the setters affecting `r#mod` are
5494        /// mutually exclusive.
5495        ///
5496        /// # Example
5497        /// ```ignore,no_run
5498        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5499        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
5500        /// let x = Modification::new().set_update(ColumnFamily::default()/* use setters */);
5501        /// assert!(x.update().is_some());
5502        /// assert!(x.create().is_none());
5503        /// assert!(x.drop().is_none());
5504        /// ```
5505        pub fn set_update<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
5506            mut self,
5507            v: T,
5508        ) -> Self {
5509            self.r#mod = std::option::Option::Some(
5510                crate::model::modify_column_families_request::modification::Mod::Update(v.into()),
5511            );
5512            self
5513        }
5514
5515        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5516        /// if it holds a `Drop`, `None` if the field is not set or
5517        /// holds a different branch.
5518        pub fn drop(&self) -> std::option::Option<&bool> {
5519            #[allow(unreachable_patterns)]
5520            self.r#mod.as_ref().and_then(|v| match v {
5521                crate::model::modify_column_families_request::modification::Mod::Drop(v) => {
5522                    std::option::Option::Some(v)
5523                }
5524                _ => std::option::Option::None,
5525            })
5526        }
5527
5528        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5529        /// to hold a `Drop`.
5530        ///
5531        /// Note that all the setters affecting `r#mod` are
5532        /// mutually exclusive.
5533        ///
5534        /// # Example
5535        /// ```ignore,no_run
5536        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5537        /// let x = Modification::new().set_drop(true);
5538        /// assert!(x.drop().is_some());
5539        /// assert!(x.create().is_none());
5540        /// assert!(x.update().is_none());
5541        /// ```
5542        pub fn set_drop<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5543            self.r#mod = std::option::Option::Some(
5544                crate::model::modify_column_families_request::modification::Mod::Drop(v.into()),
5545            );
5546            self
5547        }
5548    }
5549
5550    impl wkt::message::Message for Modification {
5551        fn typename() -> &'static str {
5552            "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification"
5553        }
5554    }
5555
5556    /// Defines additional types related to [Modification].
5557    pub mod modification {
5558        #[allow(unused_imports)]
5559        use super::*;
5560
5561        /// Column family modifications.
5562        #[derive(Clone, Debug, PartialEq)]
5563        #[non_exhaustive]
5564        pub enum Mod {
5565            /// Create a new column family with the specified schema, or fail if
5566            /// one already exists with the given ID.
5567            Create(std::boxed::Box<crate::model::ColumnFamily>),
5568            /// Update an existing column family to the specified schema, or fail
5569            /// if no column family exists with the given ID.
5570            Update(std::boxed::Box<crate::model::ColumnFamily>),
5571            /// Drop (delete) the column family with the given ID, or fail if no such
5572            /// family exists.
5573            Drop(bool),
5574        }
5575    }
5576}
5577
5578/// Request message for
5579/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
5580///
5581/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
5582#[derive(Clone, Default, PartialEq)]
5583#[non_exhaustive]
5584pub struct GenerateConsistencyTokenRequest {
5585    /// Required. The unique name of the Table for which to create a consistency
5586    /// token. Values are of the form
5587    /// `projects/{project}/instances/{instance}/tables/{table}`.
5588    pub name: std::string::String,
5589
5590    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5591}
5592
5593impl GenerateConsistencyTokenRequest {
5594    pub fn new() -> Self {
5595        std::default::Default::default()
5596    }
5597
5598    /// Sets the value of [name][crate::model::GenerateConsistencyTokenRequest::name].
5599    ///
5600    /// # Example
5601    /// ```ignore,no_run
5602    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenRequest;
5603    /// let x = GenerateConsistencyTokenRequest::new().set_name("example");
5604    /// ```
5605    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5606        self.name = v.into();
5607        self
5608    }
5609}
5610
5611impl wkt::message::Message for GenerateConsistencyTokenRequest {
5612    fn typename() -> &'static str {
5613        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenRequest"
5614    }
5615}
5616
5617/// Response message for
5618/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
5619///
5620/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
5621#[derive(Clone, Default, PartialEq)]
5622#[non_exhaustive]
5623pub struct GenerateConsistencyTokenResponse {
5624    /// The generated consistency token.
5625    pub consistency_token: std::string::String,
5626
5627    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5628}
5629
5630impl GenerateConsistencyTokenResponse {
5631    pub fn new() -> Self {
5632        std::default::Default::default()
5633    }
5634
5635    /// Sets the value of [consistency_token][crate::model::GenerateConsistencyTokenResponse::consistency_token].
5636    ///
5637    /// # Example
5638    /// ```ignore,no_run
5639    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenResponse;
5640    /// let x = GenerateConsistencyTokenResponse::new().set_consistency_token("example");
5641    /// ```
5642    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
5643        mut self,
5644        v: T,
5645    ) -> Self {
5646        self.consistency_token = v.into();
5647        self
5648    }
5649}
5650
5651impl wkt::message::Message for GenerateConsistencyTokenResponse {
5652    fn typename() -> &'static str {
5653        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenResponse"
5654    }
5655}
5656
5657/// Request message for
5658/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
5659///
5660/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
5661#[derive(Clone, Default, PartialEq)]
5662#[non_exhaustive]
5663pub struct CheckConsistencyRequest {
5664    /// Required. The unique name of the Table for which to check replication
5665    /// consistency. Values are of the form
5666    /// `projects/{project}/instances/{instance}/tables/{table}`.
5667    pub name: std::string::String,
5668
5669    /// Required. The token created using GenerateConsistencyToken for the Table.
5670    pub consistency_token: std::string::String,
5671
5672    /// Which type of read needs to consistently observe which type of write?
5673    /// Default: `standard_read_remote_writes`
5674    pub mode: std::option::Option<crate::model::check_consistency_request::Mode>,
5675
5676    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5677}
5678
5679impl CheckConsistencyRequest {
5680    pub fn new() -> Self {
5681        std::default::Default::default()
5682    }
5683
5684    /// Sets the value of [name][crate::model::CheckConsistencyRequest::name].
5685    ///
5686    /// # Example
5687    /// ```ignore,no_run
5688    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5689    /// let x = CheckConsistencyRequest::new().set_name("example");
5690    /// ```
5691    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5692        self.name = v.into();
5693        self
5694    }
5695
5696    /// Sets the value of [consistency_token][crate::model::CheckConsistencyRequest::consistency_token].
5697    ///
5698    /// # Example
5699    /// ```ignore,no_run
5700    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5701    /// let x = CheckConsistencyRequest::new().set_consistency_token("example");
5702    /// ```
5703    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
5704        mut self,
5705        v: T,
5706    ) -> Self {
5707        self.consistency_token = v.into();
5708        self
5709    }
5710
5711    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode].
5712    ///
5713    /// Note that all the setters affecting `mode` are mutually
5714    /// exclusive.
5715    ///
5716    /// # Example
5717    /// ```ignore,no_run
5718    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5719    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
5720    /// let x = CheckConsistencyRequest::new().set_mode(Some(
5721    ///     google_cloud_bigtable_admin_v2::model::check_consistency_request::Mode::StandardReadRemoteWrites(StandardReadRemoteWrites::default().into())));
5722    /// ```
5723    pub fn set_mode<
5724        T: std::convert::Into<std::option::Option<crate::model::check_consistency_request::Mode>>,
5725    >(
5726        mut self,
5727        v: T,
5728    ) -> Self {
5729        self.mode = v.into();
5730        self
5731    }
5732
5733    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
5734    /// if it holds a `StandardReadRemoteWrites`, `None` if the field is not set or
5735    /// holds a different branch.
5736    pub fn standard_read_remote_writes(
5737        &self,
5738    ) -> std::option::Option<&std::boxed::Box<crate::model::StandardReadRemoteWrites>> {
5739        #[allow(unreachable_patterns)]
5740        self.mode.as_ref().and_then(|v| match v {
5741            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v) => {
5742                std::option::Option::Some(v)
5743            }
5744            _ => std::option::Option::None,
5745        })
5746    }
5747
5748    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5749    /// to hold a `StandardReadRemoteWrites`.
5750    ///
5751    /// Note that all the setters affecting `mode` are
5752    /// mutually exclusive.
5753    ///
5754    /// # Example
5755    /// ```ignore,no_run
5756    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5757    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
5758    /// let x = CheckConsistencyRequest::new().set_standard_read_remote_writes(StandardReadRemoteWrites::default()/* use setters */);
5759    /// assert!(x.standard_read_remote_writes().is_some());
5760    /// assert!(x.data_boost_read_local_writes().is_none());
5761    /// ```
5762    pub fn set_standard_read_remote_writes<
5763        T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
5764    >(
5765        mut self,
5766        v: T,
5767    ) -> Self {
5768        self.mode = std::option::Option::Some(
5769            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v.into()),
5770        );
5771        self
5772    }
5773
5774    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
5775    /// if it holds a `DataBoostReadLocalWrites`, `None` if the field is not set or
5776    /// holds a different branch.
5777    pub fn data_boost_read_local_writes(
5778        &self,
5779    ) -> std::option::Option<&std::boxed::Box<crate::model::DataBoostReadLocalWrites>> {
5780        #[allow(unreachable_patterns)]
5781        self.mode.as_ref().and_then(|v| match v {
5782            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v) => {
5783                std::option::Option::Some(v)
5784            }
5785            _ => std::option::Option::None,
5786        })
5787    }
5788
5789    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5790    /// to hold a `DataBoostReadLocalWrites`.
5791    ///
5792    /// Note that all the setters affecting `mode` are
5793    /// mutually exclusive.
5794    ///
5795    /// # Example
5796    /// ```ignore,no_run
5797    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5798    /// use google_cloud_bigtable_admin_v2::model::DataBoostReadLocalWrites;
5799    /// let x = CheckConsistencyRequest::new().set_data_boost_read_local_writes(DataBoostReadLocalWrites::default()/* use setters */);
5800    /// assert!(x.data_boost_read_local_writes().is_some());
5801    /// assert!(x.standard_read_remote_writes().is_none());
5802    /// ```
5803    pub fn set_data_boost_read_local_writes<
5804        T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
5805    >(
5806        mut self,
5807        v: T,
5808    ) -> Self {
5809        self.mode = std::option::Option::Some(
5810            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v.into()),
5811        );
5812        self
5813    }
5814}
5815
5816impl wkt::message::Message for CheckConsistencyRequest {
5817    fn typename() -> &'static str {
5818        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyRequest"
5819    }
5820}
5821
5822/// Defines additional types related to [CheckConsistencyRequest].
5823pub mod check_consistency_request {
5824    #[allow(unused_imports)]
5825    use super::*;
5826
5827    /// Which type of read needs to consistently observe which type of write?
5828    /// Default: `standard_read_remote_writes`
5829    #[derive(Clone, Debug, PartialEq)]
5830    #[non_exhaustive]
5831    pub enum Mode {
5832        /// Checks that reads using an app profile with `StandardIsolation` can
5833        /// see all writes committed before the token was created, even if the
5834        /// read and write target different clusters.
5835        StandardReadRemoteWrites(std::boxed::Box<crate::model::StandardReadRemoteWrites>),
5836        /// Checks that reads using an app profile with `DataBoostIsolationReadOnly`
5837        /// can see all writes committed before the token was created, but only if
5838        /// the read and write target the same cluster.
5839        DataBoostReadLocalWrites(std::boxed::Box<crate::model::DataBoostReadLocalWrites>),
5840    }
5841}
5842
5843/// Checks that all writes before the consistency token was generated are
5844/// replicated in every cluster and readable.
5845#[derive(Clone, Default, PartialEq)]
5846#[non_exhaustive]
5847pub struct StandardReadRemoteWrites {
5848    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5849}
5850
5851impl StandardReadRemoteWrites {
5852    pub fn new() -> Self {
5853        std::default::Default::default()
5854    }
5855}
5856
5857impl wkt::message::Message for StandardReadRemoteWrites {
5858    fn typename() -> &'static str {
5859        "type.googleapis.com/google.bigtable.admin.v2.StandardReadRemoteWrites"
5860    }
5861}
5862
5863/// Checks that all writes before the consistency token was generated in the same
5864/// cluster are readable by Databoost.
5865#[derive(Clone, Default, PartialEq)]
5866#[non_exhaustive]
5867pub struct DataBoostReadLocalWrites {
5868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5869}
5870
5871impl DataBoostReadLocalWrites {
5872    pub fn new() -> Self {
5873        std::default::Default::default()
5874    }
5875}
5876
5877impl wkt::message::Message for DataBoostReadLocalWrites {
5878    fn typename() -> &'static str {
5879        "type.googleapis.com/google.bigtable.admin.v2.DataBoostReadLocalWrites"
5880    }
5881}
5882
5883/// Response message for
5884/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
5885///
5886/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
5887#[derive(Clone, Default, PartialEq)]
5888#[non_exhaustive]
5889pub struct CheckConsistencyResponse {
5890    /// True only if the token is consistent. A token is consistent if replication
5891    /// has caught up with the restrictions specified in the request.
5892    pub consistent: bool,
5893
5894    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5895}
5896
5897impl CheckConsistencyResponse {
5898    pub fn new() -> Self {
5899        std::default::Default::default()
5900    }
5901
5902    /// Sets the value of [consistent][crate::model::CheckConsistencyResponse::consistent].
5903    ///
5904    /// # Example
5905    /// ```ignore,no_run
5906    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyResponse;
5907    /// let x = CheckConsistencyResponse::new().set_consistent(true);
5908    /// ```
5909    pub fn set_consistent<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5910        self.consistent = v.into();
5911        self
5912    }
5913}
5914
5915impl wkt::message::Message for CheckConsistencyResponse {
5916    fn typename() -> &'static str {
5917        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyResponse"
5918    }
5919}
5920
5921/// Request message for
5922/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
5923///
5924/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
5925/// feature is not currently available to most Cloud Bigtable customers. This
5926/// feature might be changed in backward-incompatible ways and is not recommended
5927/// for production use. It is not subject to any SLA or deprecation policy.
5928///
5929/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]: crate::client::BigtableTableAdmin::snapshot_table
5930#[derive(Clone, Default, PartialEq)]
5931#[non_exhaustive]
5932pub struct SnapshotTableRequest {
5933    /// Required. The unique name of the table to have the snapshot taken.
5934    /// Values are of the form
5935    /// `projects/{project}/instances/{instance}/tables/{table}`.
5936    pub name: std::string::String,
5937
5938    /// Required. The name of the cluster where the snapshot will be created in.
5939    /// Values are of the form
5940    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
5941    pub cluster: std::string::String,
5942
5943    /// Required. The ID by which the new snapshot should be referred to within the
5944    /// parent cluster, e.g., `mysnapshot` of the form:
5945    /// `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than
5946    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
5947    pub snapshot_id: std::string::String,
5948
5949    /// The amount of time that the new snapshot can stay active after it is
5950    /// created. Once 'ttl' expires, the snapshot will get deleted. The maximum
5951    /// amount of time a snapshot can stay active is 7 days. If 'ttl' is not
5952    /// specified, the default value of 24 hours will be used.
5953    pub ttl: std::option::Option<wkt::Duration>,
5954
5955    /// Description of the snapshot.
5956    pub description: std::string::String,
5957
5958    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5959}
5960
5961impl SnapshotTableRequest {
5962    pub fn new() -> Self {
5963        std::default::Default::default()
5964    }
5965
5966    /// Sets the value of [name][crate::model::SnapshotTableRequest::name].
5967    ///
5968    /// # Example
5969    /// ```ignore,no_run
5970    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
5971    /// let x = SnapshotTableRequest::new().set_name("example");
5972    /// ```
5973    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5974        self.name = v.into();
5975        self
5976    }
5977
5978    /// Sets the value of [cluster][crate::model::SnapshotTableRequest::cluster].
5979    ///
5980    /// # Example
5981    /// ```ignore,no_run
5982    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
5983    /// let x = SnapshotTableRequest::new().set_cluster("example");
5984    /// ```
5985    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5986        self.cluster = v.into();
5987        self
5988    }
5989
5990    /// Sets the value of [snapshot_id][crate::model::SnapshotTableRequest::snapshot_id].
5991    ///
5992    /// # Example
5993    /// ```ignore,no_run
5994    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
5995    /// let x = SnapshotTableRequest::new().set_snapshot_id("example");
5996    /// ```
5997    pub fn set_snapshot_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5998        self.snapshot_id = v.into();
5999        self
6000    }
6001
6002    /// Sets the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6003    ///
6004    /// # Example
6005    /// ```ignore,no_run
6006    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6007    /// use wkt::Duration;
6008    /// let x = SnapshotTableRequest::new().set_ttl(Duration::default()/* use setters */);
6009    /// ```
6010    pub fn set_ttl<T>(mut self, v: T) -> Self
6011    where
6012        T: std::convert::Into<wkt::Duration>,
6013    {
6014        self.ttl = std::option::Option::Some(v.into());
6015        self
6016    }
6017
6018    /// Sets or clears the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6019    ///
6020    /// # Example
6021    /// ```ignore,no_run
6022    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6023    /// use wkt::Duration;
6024    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(Some(Duration::default()/* use setters */));
6025    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(None::<Duration>);
6026    /// ```
6027    pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
6028    where
6029        T: std::convert::Into<wkt::Duration>,
6030    {
6031        self.ttl = v.map(|x| x.into());
6032        self
6033    }
6034
6035    /// Sets the value of [description][crate::model::SnapshotTableRequest::description].
6036    ///
6037    /// # Example
6038    /// ```ignore,no_run
6039    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6040    /// let x = SnapshotTableRequest::new().set_description("example");
6041    /// ```
6042    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6043        self.description = v.into();
6044        self
6045    }
6046}
6047
6048impl wkt::message::Message for SnapshotTableRequest {
6049    fn typename() -> &'static str {
6050        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableRequest"
6051    }
6052}
6053
6054/// Request message for
6055/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
6056///
6057/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6058/// feature is not currently available to most Cloud Bigtable customers. This
6059/// feature might be changed in backward-incompatible ways and is not recommended
6060/// for production use. It is not subject to any SLA or deprecation policy.
6061///
6062/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]: crate::client::BigtableTableAdmin::get_snapshot
6063#[derive(Clone, Default, PartialEq)]
6064#[non_exhaustive]
6065pub struct GetSnapshotRequest {
6066    /// Required. The unique name of the requested snapshot.
6067    /// Values are of the form
6068    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6069    pub name: std::string::String,
6070
6071    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6072}
6073
6074impl GetSnapshotRequest {
6075    pub fn new() -> Self {
6076        std::default::Default::default()
6077    }
6078
6079    /// Sets the value of [name][crate::model::GetSnapshotRequest::name].
6080    ///
6081    /// # Example
6082    /// ```ignore,no_run
6083    /// # use google_cloud_bigtable_admin_v2::model::GetSnapshotRequest;
6084    /// let x = GetSnapshotRequest::new().set_name("example");
6085    /// ```
6086    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6087        self.name = v.into();
6088        self
6089    }
6090}
6091
6092impl wkt::message::Message for GetSnapshotRequest {
6093    fn typename() -> &'static str {
6094        "type.googleapis.com/google.bigtable.admin.v2.GetSnapshotRequest"
6095    }
6096}
6097
6098/// Request message for
6099/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6100///
6101/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6102/// feature is not currently available to most Cloud Bigtable customers. This
6103/// feature might be changed in backward-incompatible ways and is not recommended
6104/// for production use. It is not subject to any SLA or deprecation policy.
6105///
6106/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6107#[derive(Clone, Default, PartialEq)]
6108#[non_exhaustive]
6109pub struct ListSnapshotsRequest {
6110    /// Required. The unique name of the cluster for which snapshots should be
6111    /// listed. Values are of the form
6112    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
6113    /// Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
6114    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
6115    pub parent: std::string::String,
6116
6117    /// The maximum number of snapshots to return per page.
6118    /// CURRENTLY UNIMPLEMENTED AND IGNORED.
6119    pub page_size: i32,
6120
6121    /// The value of `next_page_token` returned by a previous call.
6122    pub page_token: std::string::String,
6123
6124    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6125}
6126
6127impl ListSnapshotsRequest {
6128    pub fn new() -> Self {
6129        std::default::Default::default()
6130    }
6131
6132    /// Sets the value of [parent][crate::model::ListSnapshotsRequest::parent].
6133    ///
6134    /// # Example
6135    /// ```ignore,no_run
6136    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6137    /// let x = ListSnapshotsRequest::new().set_parent("example");
6138    /// ```
6139    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6140        self.parent = v.into();
6141        self
6142    }
6143
6144    /// Sets the value of [page_size][crate::model::ListSnapshotsRequest::page_size].
6145    ///
6146    /// # Example
6147    /// ```ignore,no_run
6148    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6149    /// let x = ListSnapshotsRequest::new().set_page_size(42);
6150    /// ```
6151    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6152        self.page_size = v.into();
6153        self
6154    }
6155
6156    /// Sets the value of [page_token][crate::model::ListSnapshotsRequest::page_token].
6157    ///
6158    /// # Example
6159    /// ```ignore,no_run
6160    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6161    /// let x = ListSnapshotsRequest::new().set_page_token("example");
6162    /// ```
6163    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6164        self.page_token = v.into();
6165        self
6166    }
6167}
6168
6169impl wkt::message::Message for ListSnapshotsRequest {
6170    fn typename() -> &'static str {
6171        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsRequest"
6172    }
6173}
6174
6175/// Response message for
6176/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6177///
6178/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6179/// feature is not currently available to most Cloud Bigtable customers. This
6180/// feature might be changed in backward-incompatible ways and is not recommended
6181/// for production use. It is not subject to any SLA or deprecation policy.
6182///
6183/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6184#[derive(Clone, Default, PartialEq)]
6185#[non_exhaustive]
6186pub struct ListSnapshotsResponse {
6187    /// The snapshots present in the requested cluster.
6188    pub snapshots: std::vec::Vec<crate::model::Snapshot>,
6189
6190    /// Set if not all snapshots could be returned in a single response.
6191    /// Pass this value to `page_token` in another request to get the next
6192    /// page of results.
6193    pub next_page_token: std::string::String,
6194
6195    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6196}
6197
6198impl ListSnapshotsResponse {
6199    pub fn new() -> Self {
6200        std::default::Default::default()
6201    }
6202
6203    /// Sets the value of [snapshots][crate::model::ListSnapshotsResponse::snapshots].
6204    ///
6205    /// # Example
6206    /// ```ignore,no_run
6207    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6208    /// use google_cloud_bigtable_admin_v2::model::Snapshot;
6209    /// let x = ListSnapshotsResponse::new()
6210    ///     .set_snapshots([
6211    ///         Snapshot::default()/* use setters */,
6212    ///         Snapshot::default()/* use (different) setters */,
6213    ///     ]);
6214    /// ```
6215    pub fn set_snapshots<T, V>(mut self, v: T) -> Self
6216    where
6217        T: std::iter::IntoIterator<Item = V>,
6218        V: std::convert::Into<crate::model::Snapshot>,
6219    {
6220        use std::iter::Iterator;
6221        self.snapshots = v.into_iter().map(|i| i.into()).collect();
6222        self
6223    }
6224
6225    /// Sets the value of [next_page_token][crate::model::ListSnapshotsResponse::next_page_token].
6226    ///
6227    /// # Example
6228    /// ```ignore,no_run
6229    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6230    /// let x = ListSnapshotsResponse::new().set_next_page_token("example");
6231    /// ```
6232    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6233        self.next_page_token = v.into();
6234        self
6235    }
6236}
6237
6238impl wkt::message::Message for ListSnapshotsResponse {
6239    fn typename() -> &'static str {
6240        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsResponse"
6241    }
6242}
6243
6244#[doc(hidden)]
6245impl google_cloud_gax::paginator::internal::PageableResponse for ListSnapshotsResponse {
6246    type PageItem = crate::model::Snapshot;
6247
6248    fn items(self) -> std::vec::Vec<Self::PageItem> {
6249        self.snapshots
6250    }
6251
6252    fn next_page_token(&self) -> std::string::String {
6253        use std::clone::Clone;
6254        self.next_page_token.clone()
6255    }
6256}
6257
6258/// Request message for
6259/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
6260///
6261/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6262/// feature is not currently available to most Cloud Bigtable customers. This
6263/// feature might be changed in backward-incompatible ways and is not recommended
6264/// for production use. It is not subject to any SLA or deprecation policy.
6265///
6266/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]: crate::client::BigtableTableAdmin::delete_snapshot
6267#[derive(Clone, Default, PartialEq)]
6268#[non_exhaustive]
6269pub struct DeleteSnapshotRequest {
6270    /// Required. The unique name of the snapshot to be deleted.
6271    /// Values are of the form
6272    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6273    pub name: std::string::String,
6274
6275    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6276}
6277
6278impl DeleteSnapshotRequest {
6279    pub fn new() -> Self {
6280        std::default::Default::default()
6281    }
6282
6283    /// Sets the value of [name][crate::model::DeleteSnapshotRequest::name].
6284    ///
6285    /// # Example
6286    /// ```ignore,no_run
6287    /// # use google_cloud_bigtable_admin_v2::model::DeleteSnapshotRequest;
6288    /// let x = DeleteSnapshotRequest::new().set_name("example");
6289    /// ```
6290    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6291        self.name = v.into();
6292        self
6293    }
6294}
6295
6296impl wkt::message::Message for DeleteSnapshotRequest {
6297    fn typename() -> &'static str {
6298        "type.googleapis.com/google.bigtable.admin.v2.DeleteSnapshotRequest"
6299    }
6300}
6301
6302/// The metadata for the Operation returned by SnapshotTable.
6303///
6304/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6305/// feature is not currently available to most Cloud Bigtable customers. This
6306/// feature might be changed in backward-incompatible ways and is not recommended
6307/// for production use. It is not subject to any SLA or deprecation policy.
6308#[derive(Clone, Default, PartialEq)]
6309#[non_exhaustive]
6310pub struct SnapshotTableMetadata {
6311    /// The request that prompted the initiation of this SnapshotTable operation.
6312    pub original_request: std::option::Option<crate::model::SnapshotTableRequest>,
6313
6314    /// The time at which the original request was received.
6315    pub request_time: std::option::Option<wkt::Timestamp>,
6316
6317    /// The time at which the operation failed or was completed successfully.
6318    pub finish_time: std::option::Option<wkt::Timestamp>,
6319
6320    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6321}
6322
6323impl SnapshotTableMetadata {
6324    pub fn new() -> Self {
6325        std::default::Default::default()
6326    }
6327
6328    /// Sets the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6329    ///
6330    /// # Example
6331    /// ```ignore,no_run
6332    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6333    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6334    /// let x = SnapshotTableMetadata::new().set_original_request(SnapshotTableRequest::default()/* use setters */);
6335    /// ```
6336    pub fn set_original_request<T>(mut self, v: T) -> Self
6337    where
6338        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6339    {
6340        self.original_request = std::option::Option::Some(v.into());
6341        self
6342    }
6343
6344    /// Sets or clears the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6345    ///
6346    /// # Example
6347    /// ```ignore,no_run
6348    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6349    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6350    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(Some(SnapshotTableRequest::default()/* use setters */));
6351    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(None::<SnapshotTableRequest>);
6352    /// ```
6353    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6354    where
6355        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6356    {
6357        self.original_request = v.map(|x| x.into());
6358        self
6359    }
6360
6361    /// Sets the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6362    ///
6363    /// # Example
6364    /// ```ignore,no_run
6365    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6366    /// use wkt::Timestamp;
6367    /// let x = SnapshotTableMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6368    /// ```
6369    pub fn set_request_time<T>(mut self, v: T) -> Self
6370    where
6371        T: std::convert::Into<wkt::Timestamp>,
6372    {
6373        self.request_time = std::option::Option::Some(v.into());
6374        self
6375    }
6376
6377    /// Sets or clears the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6378    ///
6379    /// # Example
6380    /// ```ignore,no_run
6381    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6382    /// use wkt::Timestamp;
6383    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
6384    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(None::<Timestamp>);
6385    /// ```
6386    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
6387    where
6388        T: std::convert::Into<wkt::Timestamp>,
6389    {
6390        self.request_time = v.map(|x| x.into());
6391        self
6392    }
6393
6394    /// Sets the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
6395    ///
6396    /// # Example
6397    /// ```ignore,no_run
6398    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6399    /// use wkt::Timestamp;
6400    /// let x = SnapshotTableMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
6401    /// ```
6402    pub fn set_finish_time<T>(mut self, v: T) -> Self
6403    where
6404        T: std::convert::Into<wkt::Timestamp>,
6405    {
6406        self.finish_time = std::option::Option::Some(v.into());
6407        self
6408    }
6409
6410    /// Sets or clears the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
6411    ///
6412    /// # Example
6413    /// ```ignore,no_run
6414    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6415    /// use wkt::Timestamp;
6416    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
6417    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
6418    /// ```
6419    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
6420    where
6421        T: std::convert::Into<wkt::Timestamp>,
6422    {
6423        self.finish_time = v.map(|x| x.into());
6424        self
6425    }
6426}
6427
6428impl wkt::message::Message for SnapshotTableMetadata {
6429    fn typename() -> &'static str {
6430        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableMetadata"
6431    }
6432}
6433
6434/// The metadata for the Operation returned by CreateTableFromSnapshot.
6435///
6436/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6437/// feature is not currently available to most Cloud Bigtable customers. This
6438/// feature might be changed in backward-incompatible ways and is not recommended
6439/// for production use. It is not subject to any SLA or deprecation policy.
6440#[derive(Clone, Default, PartialEq)]
6441#[non_exhaustive]
6442pub struct CreateTableFromSnapshotMetadata {
6443    /// The request that prompted the initiation of this CreateTableFromSnapshot
6444    /// operation.
6445    pub original_request: std::option::Option<crate::model::CreateTableFromSnapshotRequest>,
6446
6447    /// The time at which the original request was received.
6448    pub request_time: std::option::Option<wkt::Timestamp>,
6449
6450    /// The time at which the operation failed or was completed successfully.
6451    pub finish_time: std::option::Option<wkt::Timestamp>,
6452
6453    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6454}
6455
6456impl CreateTableFromSnapshotMetadata {
6457    pub fn new() -> Self {
6458        std::default::Default::default()
6459    }
6460
6461    /// Sets the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
6462    ///
6463    /// # Example
6464    /// ```ignore,no_run
6465    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6466    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
6467    /// let x = CreateTableFromSnapshotMetadata::new().set_original_request(CreateTableFromSnapshotRequest::default()/* use setters */);
6468    /// ```
6469    pub fn set_original_request<T>(mut self, v: T) -> Self
6470    where
6471        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
6472    {
6473        self.original_request = std::option::Option::Some(v.into());
6474        self
6475    }
6476
6477    /// Sets or clears the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
6478    ///
6479    /// # Example
6480    /// ```ignore,no_run
6481    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6482    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
6483    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(Some(CreateTableFromSnapshotRequest::default()/* use setters */));
6484    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(None::<CreateTableFromSnapshotRequest>);
6485    /// ```
6486    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6487    where
6488        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
6489    {
6490        self.original_request = v.map(|x| x.into());
6491        self
6492    }
6493
6494    /// Sets the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
6495    ///
6496    /// # Example
6497    /// ```ignore,no_run
6498    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6499    /// use wkt::Timestamp;
6500    /// let x = CreateTableFromSnapshotMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6501    /// ```
6502    pub fn set_request_time<T>(mut self, v: T) -> Self
6503    where
6504        T: std::convert::Into<wkt::Timestamp>,
6505    {
6506        self.request_time = std::option::Option::Some(v.into());
6507        self
6508    }
6509
6510    /// Sets or clears the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
6511    ///
6512    /// # Example
6513    /// ```ignore,no_run
6514    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6515    /// use wkt::Timestamp;
6516    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
6517    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(None::<Timestamp>);
6518    /// ```
6519    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
6520    where
6521        T: std::convert::Into<wkt::Timestamp>,
6522    {
6523        self.request_time = v.map(|x| x.into());
6524        self
6525    }
6526
6527    /// Sets the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
6528    ///
6529    /// # Example
6530    /// ```ignore,no_run
6531    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6532    /// use wkt::Timestamp;
6533    /// let x = CreateTableFromSnapshotMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
6534    /// ```
6535    pub fn set_finish_time<T>(mut self, v: T) -> Self
6536    where
6537        T: std::convert::Into<wkt::Timestamp>,
6538    {
6539        self.finish_time = std::option::Option::Some(v.into());
6540        self
6541    }
6542
6543    /// Sets or clears the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
6544    ///
6545    /// # Example
6546    /// ```ignore,no_run
6547    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6548    /// use wkt::Timestamp;
6549    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
6550    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
6551    /// ```
6552    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
6553    where
6554        T: std::convert::Into<wkt::Timestamp>,
6555    {
6556        self.finish_time = v.map(|x| x.into());
6557        self
6558    }
6559}
6560
6561impl wkt::message::Message for CreateTableFromSnapshotMetadata {
6562    fn typename() -> &'static str {
6563        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotMetadata"
6564    }
6565}
6566
6567/// The request for
6568/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
6569///
6570/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
6571#[derive(Clone, Default, PartialEq)]
6572#[non_exhaustive]
6573pub struct CreateBackupRequest {
6574    /// Required. This must be one of the clusters in the instance in which this
6575    /// table is located. The backup will be stored in this cluster. Values are
6576    /// of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
6577    pub parent: std::string::String,
6578
6579    /// Required. The id of the backup to be created. The `backup_id` along with
6580    /// the parent `parent` are combined as {parent}/backups/{backup_id} to create
6581    /// the full backup name, of the form:
6582    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
6583    /// This string must be between 1 and 50 characters in length and match the
6584    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
6585    pub backup_id: std::string::String,
6586
6587    /// Required. The backup to create.
6588    pub backup: std::option::Option<crate::model::Backup>,
6589
6590    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6591}
6592
6593impl CreateBackupRequest {
6594    pub fn new() -> Self {
6595        std::default::Default::default()
6596    }
6597
6598    /// Sets the value of [parent][crate::model::CreateBackupRequest::parent].
6599    ///
6600    /// # Example
6601    /// ```ignore,no_run
6602    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6603    /// let x = CreateBackupRequest::new().set_parent("example");
6604    /// ```
6605    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6606        self.parent = v.into();
6607        self
6608    }
6609
6610    /// Sets the value of [backup_id][crate::model::CreateBackupRequest::backup_id].
6611    ///
6612    /// # Example
6613    /// ```ignore,no_run
6614    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6615    /// let x = CreateBackupRequest::new().set_backup_id("example");
6616    /// ```
6617    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6618        self.backup_id = v.into();
6619        self
6620    }
6621
6622    /// Sets the value of [backup][crate::model::CreateBackupRequest::backup].
6623    ///
6624    /// # Example
6625    /// ```ignore,no_run
6626    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6627    /// use google_cloud_bigtable_admin_v2::model::Backup;
6628    /// let x = CreateBackupRequest::new().set_backup(Backup::default()/* use setters */);
6629    /// ```
6630    pub fn set_backup<T>(mut self, v: T) -> Self
6631    where
6632        T: std::convert::Into<crate::model::Backup>,
6633    {
6634        self.backup = std::option::Option::Some(v.into());
6635        self
6636    }
6637
6638    /// Sets or clears the value of [backup][crate::model::CreateBackupRequest::backup].
6639    ///
6640    /// # Example
6641    /// ```ignore,no_run
6642    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6643    /// use google_cloud_bigtable_admin_v2::model::Backup;
6644    /// let x = CreateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
6645    /// let x = CreateBackupRequest::new().set_or_clear_backup(None::<Backup>);
6646    /// ```
6647    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6648    where
6649        T: std::convert::Into<crate::model::Backup>,
6650    {
6651        self.backup = v.map(|x| x.into());
6652        self
6653    }
6654}
6655
6656impl wkt::message::Message for CreateBackupRequest {
6657    fn typename() -> &'static str {
6658        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupRequest"
6659    }
6660}
6661
6662/// Metadata type for the operation returned by
6663/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
6664///
6665/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
6666#[derive(Clone, Default, PartialEq)]
6667#[non_exhaustive]
6668pub struct CreateBackupMetadata {
6669    /// The name of the backup being created.
6670    pub name: std::string::String,
6671
6672    /// The name of the table the backup is created from.
6673    pub source_table: std::string::String,
6674
6675    /// The time at which this operation started.
6676    pub start_time: std::option::Option<wkt::Timestamp>,
6677
6678    /// If set, the time at which this operation finished or was cancelled.
6679    pub end_time: std::option::Option<wkt::Timestamp>,
6680
6681    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6682}
6683
6684impl CreateBackupMetadata {
6685    pub fn new() -> Self {
6686        std::default::Default::default()
6687    }
6688
6689    /// Sets the value of [name][crate::model::CreateBackupMetadata::name].
6690    ///
6691    /// # Example
6692    /// ```ignore,no_run
6693    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6694    /// let x = CreateBackupMetadata::new().set_name("example");
6695    /// ```
6696    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6697        self.name = v.into();
6698        self
6699    }
6700
6701    /// Sets the value of [source_table][crate::model::CreateBackupMetadata::source_table].
6702    ///
6703    /// # Example
6704    /// ```ignore,no_run
6705    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6706    /// let x = CreateBackupMetadata::new().set_source_table("example");
6707    /// ```
6708    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6709        self.source_table = v.into();
6710        self
6711    }
6712
6713    /// Sets the value of [start_time][crate::model::CreateBackupMetadata::start_time].
6714    ///
6715    /// # Example
6716    /// ```ignore,no_run
6717    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6718    /// use wkt::Timestamp;
6719    /// let x = CreateBackupMetadata::new().set_start_time(Timestamp::default()/* use setters */);
6720    /// ```
6721    pub fn set_start_time<T>(mut self, v: T) -> Self
6722    where
6723        T: std::convert::Into<wkt::Timestamp>,
6724    {
6725        self.start_time = std::option::Option::Some(v.into());
6726        self
6727    }
6728
6729    /// Sets or clears the value of [start_time][crate::model::CreateBackupMetadata::start_time].
6730    ///
6731    /// # Example
6732    /// ```ignore,no_run
6733    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6734    /// use wkt::Timestamp;
6735    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
6736    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(None::<Timestamp>);
6737    /// ```
6738    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6739    where
6740        T: std::convert::Into<wkt::Timestamp>,
6741    {
6742        self.start_time = v.map(|x| x.into());
6743        self
6744    }
6745
6746    /// Sets the value of [end_time][crate::model::CreateBackupMetadata::end_time].
6747    ///
6748    /// # Example
6749    /// ```ignore,no_run
6750    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6751    /// use wkt::Timestamp;
6752    /// let x = CreateBackupMetadata::new().set_end_time(Timestamp::default()/* use setters */);
6753    /// ```
6754    pub fn set_end_time<T>(mut self, v: T) -> Self
6755    where
6756        T: std::convert::Into<wkt::Timestamp>,
6757    {
6758        self.end_time = std::option::Option::Some(v.into());
6759        self
6760    }
6761
6762    /// Sets or clears the value of [end_time][crate::model::CreateBackupMetadata::end_time].
6763    ///
6764    /// # Example
6765    /// ```ignore,no_run
6766    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6767    /// use wkt::Timestamp;
6768    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
6769    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(None::<Timestamp>);
6770    /// ```
6771    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6772    where
6773        T: std::convert::Into<wkt::Timestamp>,
6774    {
6775        self.end_time = v.map(|x| x.into());
6776        self
6777    }
6778}
6779
6780impl wkt::message::Message for CreateBackupMetadata {
6781    fn typename() -> &'static str {
6782        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupMetadata"
6783    }
6784}
6785
6786/// The request for
6787/// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup].
6788///
6789/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]: crate::client::BigtableTableAdmin::update_backup
6790#[derive(Clone, Default, PartialEq)]
6791#[non_exhaustive]
6792pub struct UpdateBackupRequest {
6793    /// Required. The backup to update. `backup.name`, and the fields to be updated
6794    /// as specified by `update_mask` are required. Other fields are ignored.
6795    /// Update is only supported for the following fields:
6796    ///
6797    /// * `backup.expire_time`.
6798    pub backup: std::option::Option<crate::model::Backup>,
6799
6800    /// Required. A mask specifying which fields (e.g. `expire_time`) in the
6801    /// Backup resource should be updated. This mask is relative to the Backup
6802    /// resource, not to the request message. The field mask must always be
6803    /// specified; this prevents any future fields from being erased accidentally
6804    /// by clients that do not know about them.
6805    pub update_mask: std::option::Option<wkt::FieldMask>,
6806
6807    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6808}
6809
6810impl UpdateBackupRequest {
6811    pub fn new() -> Self {
6812        std::default::Default::default()
6813    }
6814
6815    /// Sets the value of [backup][crate::model::UpdateBackupRequest::backup].
6816    ///
6817    /// # Example
6818    /// ```ignore,no_run
6819    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6820    /// use google_cloud_bigtable_admin_v2::model::Backup;
6821    /// let x = UpdateBackupRequest::new().set_backup(Backup::default()/* use setters */);
6822    /// ```
6823    pub fn set_backup<T>(mut self, v: T) -> Self
6824    where
6825        T: std::convert::Into<crate::model::Backup>,
6826    {
6827        self.backup = std::option::Option::Some(v.into());
6828        self
6829    }
6830
6831    /// Sets or clears the value of [backup][crate::model::UpdateBackupRequest::backup].
6832    ///
6833    /// # Example
6834    /// ```ignore,no_run
6835    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6836    /// use google_cloud_bigtable_admin_v2::model::Backup;
6837    /// let x = UpdateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
6838    /// let x = UpdateBackupRequest::new().set_or_clear_backup(None::<Backup>);
6839    /// ```
6840    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6841    where
6842        T: std::convert::Into<crate::model::Backup>,
6843    {
6844        self.backup = v.map(|x| x.into());
6845        self
6846    }
6847
6848    /// Sets the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
6849    ///
6850    /// # Example
6851    /// ```ignore,no_run
6852    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6853    /// use wkt::FieldMask;
6854    /// let x = UpdateBackupRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6855    /// ```
6856    pub fn set_update_mask<T>(mut self, v: T) -> Self
6857    where
6858        T: std::convert::Into<wkt::FieldMask>,
6859    {
6860        self.update_mask = std::option::Option::Some(v.into());
6861        self
6862    }
6863
6864    /// Sets or clears the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
6865    ///
6866    /// # Example
6867    /// ```ignore,no_run
6868    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6869    /// use wkt::FieldMask;
6870    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6871    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6872    /// ```
6873    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6874    where
6875        T: std::convert::Into<wkt::FieldMask>,
6876    {
6877        self.update_mask = v.map(|x| x.into());
6878        self
6879    }
6880}
6881
6882impl wkt::message::Message for UpdateBackupRequest {
6883    fn typename() -> &'static str {
6884        "type.googleapis.com/google.bigtable.admin.v2.UpdateBackupRequest"
6885    }
6886}
6887
6888/// The request for
6889/// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup].
6890///
6891/// [google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]: crate::client::BigtableTableAdmin::get_backup
6892#[derive(Clone, Default, PartialEq)]
6893#[non_exhaustive]
6894pub struct GetBackupRequest {
6895    /// Required. Name of the backup.
6896    /// Values are of the form
6897    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
6898    pub name: std::string::String,
6899
6900    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6901}
6902
6903impl GetBackupRequest {
6904    pub fn new() -> Self {
6905        std::default::Default::default()
6906    }
6907
6908    /// Sets the value of [name][crate::model::GetBackupRequest::name].
6909    ///
6910    /// # Example
6911    /// ```ignore,no_run
6912    /// # use google_cloud_bigtable_admin_v2::model::GetBackupRequest;
6913    /// let x = GetBackupRequest::new().set_name("example");
6914    /// ```
6915    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6916        self.name = v.into();
6917        self
6918    }
6919}
6920
6921impl wkt::message::Message for GetBackupRequest {
6922    fn typename() -> &'static str {
6923        "type.googleapis.com/google.bigtable.admin.v2.GetBackupRequest"
6924    }
6925}
6926
6927/// The request for
6928/// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup].
6929///
6930/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]: crate::client::BigtableTableAdmin::delete_backup
6931#[derive(Clone, Default, PartialEq)]
6932#[non_exhaustive]
6933pub struct DeleteBackupRequest {
6934    /// Required. Name of the backup to delete.
6935    /// Values are of the form
6936    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
6937    pub name: std::string::String,
6938
6939    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6940}
6941
6942impl DeleteBackupRequest {
6943    pub fn new() -> Self {
6944        std::default::Default::default()
6945    }
6946
6947    /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
6948    ///
6949    /// # Example
6950    /// ```ignore,no_run
6951    /// # use google_cloud_bigtable_admin_v2::model::DeleteBackupRequest;
6952    /// let x = DeleteBackupRequest::new().set_name("example");
6953    /// ```
6954    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6955        self.name = v.into();
6956        self
6957    }
6958}
6959
6960impl wkt::message::Message for DeleteBackupRequest {
6961    fn typename() -> &'static str {
6962        "type.googleapis.com/google.bigtable.admin.v2.DeleteBackupRequest"
6963    }
6964}
6965
6966/// The request for
6967/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
6968///
6969/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
6970#[derive(Clone, Default, PartialEq)]
6971#[non_exhaustive]
6972pub struct ListBackupsRequest {
6973    /// Required. The cluster to list backups from.  Values are of the
6974    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
6975    /// Use `{cluster} = '-'` to list backups for all clusters in an instance,
6976    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
6977    pub parent: std::string::String,
6978
6979    /// A filter expression that filters backups listed in the response.
6980    /// The expression must specify the field name, a comparison operator,
6981    /// and the value that you want to use for filtering. The value must be a
6982    /// string, a number, or a boolean. The comparison operator must be
6983    /// <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is
6984    /// roughly synonymous with equality. Filter rules are case insensitive.
6985    ///
6986    /// The fields eligible for filtering are:
6987    ///
6988    /// * `name`
6989    /// * `source_table`
6990    /// * `state`
6991    /// * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
6992    /// * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
6993    /// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
6994    /// * `size_bytes`
6995    ///
6996    /// To filter on multiple expressions, provide each separate expression within
6997    /// parentheses. By default, each expression is an AND expression. However,
6998    /// you can include AND, OR, and NOT expressions explicitly.
6999    ///
7000    /// Some examples of using filters are:
7001    ///
7002    /// * `name:"exact"` --> The backup's name is the string "exact".
7003    /// * `name:howl` --> The backup's name contains the string "howl".
7004    /// * `source_table:prod`
7005    ///   --> The source_table's name contains the string "prod".
7006    /// * `state:CREATING` --> The backup is pending creation.
7007    /// * `state:READY` --> The backup is fully created and ready for use.
7008    /// * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")`
7009    ///   --> The backup name contains the string "howl" and start_time
7010    ///   of the backup is before 2018-03-28T14:50:00Z.
7011    /// * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
7012    pub filter: std::string::String,
7013
7014    /// An expression for specifying the sort order of the results of the request.
7015    /// The string value should specify one or more fields in
7016    /// [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at
7017    /// <https://aip.dev/132#ordering>.
7018    ///
7019    /// Fields supported are:
7020    ///
7021    /// * name
7022    /// * source_table
7023    /// * expire_time
7024    /// * start_time
7025    /// * end_time
7026    /// * size_bytes
7027    /// * state
7028    ///
7029    /// For example, "start_time". The default sorting order is ascending.
7030    /// To specify descending order for the field, a suffix " desc" should
7031    /// be appended to the field name. For example, "start_time desc".
7032    /// Redundant space characters in the syntax are insigificant.
7033    ///
7034    /// If order_by is empty, results will be sorted by `start_time` in descending
7035    /// order starting from the most recently created backup.
7036    ///
7037    /// [google.bigtable.admin.v2.Backup]: crate::model::Backup
7038    pub order_by: std::string::String,
7039
7040    /// Number of backups to be returned in the response. If 0 or
7041    /// less, defaults to the server's maximum allowed page size.
7042    pub page_size: i32,
7043
7044    /// If non-empty, `page_token` should contain a
7045    /// [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token]
7046    /// from a previous
7047    /// [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the
7048    /// same `parent` and with the same `filter`.
7049    ///
7050    /// [google.bigtable.admin.v2.ListBackupsResponse]: crate::model::ListBackupsResponse
7051    /// [google.bigtable.admin.v2.ListBackupsResponse.next_page_token]: crate::model::ListBackupsResponse::next_page_token
7052    pub page_token: std::string::String,
7053
7054    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7055}
7056
7057impl ListBackupsRequest {
7058    pub fn new() -> Self {
7059        std::default::Default::default()
7060    }
7061
7062    /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
7063    ///
7064    /// # Example
7065    /// ```ignore,no_run
7066    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7067    /// let x = ListBackupsRequest::new().set_parent("example");
7068    /// ```
7069    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7070        self.parent = v.into();
7071        self
7072    }
7073
7074    /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
7075    ///
7076    /// # Example
7077    /// ```ignore,no_run
7078    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7079    /// let x = ListBackupsRequest::new().set_filter("example");
7080    /// ```
7081    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7082        self.filter = v.into();
7083        self
7084    }
7085
7086    /// Sets the value of [order_by][crate::model::ListBackupsRequest::order_by].
7087    ///
7088    /// # Example
7089    /// ```ignore,no_run
7090    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7091    /// let x = ListBackupsRequest::new().set_order_by("example");
7092    /// ```
7093    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7094        self.order_by = v.into();
7095        self
7096    }
7097
7098    /// Sets the value of [page_size][crate::model::ListBackupsRequest::page_size].
7099    ///
7100    /// # Example
7101    /// ```ignore,no_run
7102    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7103    /// let x = ListBackupsRequest::new().set_page_size(42);
7104    /// ```
7105    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7106        self.page_size = v.into();
7107        self
7108    }
7109
7110    /// Sets the value of [page_token][crate::model::ListBackupsRequest::page_token].
7111    ///
7112    /// # Example
7113    /// ```ignore,no_run
7114    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7115    /// let x = ListBackupsRequest::new().set_page_token("example");
7116    /// ```
7117    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7118        self.page_token = v.into();
7119        self
7120    }
7121}
7122
7123impl wkt::message::Message for ListBackupsRequest {
7124    fn typename() -> &'static str {
7125        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsRequest"
7126    }
7127}
7128
7129/// The response for
7130/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
7131///
7132/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7133#[derive(Clone, Default, PartialEq)]
7134#[non_exhaustive]
7135pub struct ListBackupsResponse {
7136    /// The list of matching backups.
7137    pub backups: std::vec::Vec<crate::model::Backup>,
7138
7139    /// `next_page_token` can be sent in a subsequent
7140    /// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call
7141    /// to fetch more of the matching backups.
7142    ///
7143    /// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7144    pub next_page_token: std::string::String,
7145
7146    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7147}
7148
7149impl ListBackupsResponse {
7150    pub fn new() -> Self {
7151        std::default::Default::default()
7152    }
7153
7154    /// Sets the value of [backups][crate::model::ListBackupsResponse::backups].
7155    ///
7156    /// # Example
7157    /// ```ignore,no_run
7158    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7159    /// use google_cloud_bigtable_admin_v2::model::Backup;
7160    /// let x = ListBackupsResponse::new()
7161    ///     .set_backups([
7162    ///         Backup::default()/* use setters */,
7163    ///         Backup::default()/* use (different) setters */,
7164    ///     ]);
7165    /// ```
7166    pub fn set_backups<T, V>(mut self, v: T) -> Self
7167    where
7168        T: std::iter::IntoIterator<Item = V>,
7169        V: std::convert::Into<crate::model::Backup>,
7170    {
7171        use std::iter::Iterator;
7172        self.backups = v.into_iter().map(|i| i.into()).collect();
7173        self
7174    }
7175
7176    /// Sets the value of [next_page_token][crate::model::ListBackupsResponse::next_page_token].
7177    ///
7178    /// # Example
7179    /// ```ignore,no_run
7180    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7181    /// let x = ListBackupsResponse::new().set_next_page_token("example");
7182    /// ```
7183    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7184        self.next_page_token = v.into();
7185        self
7186    }
7187}
7188
7189impl wkt::message::Message for ListBackupsResponse {
7190    fn typename() -> &'static str {
7191        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsResponse"
7192    }
7193}
7194
7195#[doc(hidden)]
7196impl google_cloud_gax::paginator::internal::PageableResponse for ListBackupsResponse {
7197    type PageItem = crate::model::Backup;
7198
7199    fn items(self) -> std::vec::Vec<Self::PageItem> {
7200        self.backups
7201    }
7202
7203    fn next_page_token(&self) -> std::string::String {
7204        use std::clone::Clone;
7205        self.next_page_token.clone()
7206    }
7207}
7208
7209/// The request for
7210/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7211///
7212/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7213#[derive(Clone, Default, PartialEq)]
7214#[non_exhaustive]
7215pub struct CopyBackupRequest {
7216    /// Required. The name of the destination cluster that will contain the backup
7217    /// copy. The cluster must already exist. Values are of the form:
7218    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
7219    pub parent: std::string::String,
7220
7221    /// Required. The id of the new backup. The `backup_id` along with `parent`
7222    /// are combined as {parent}/backups/{backup_id} to create the full backup
7223    /// name, of the form:
7224    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
7225    /// This string must be between 1 and 50 characters in length and match the
7226    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
7227    pub backup_id: std::string::String,
7228
7229    /// Required. The source backup to be copied from.
7230    /// The source backup needs to be in READY state for it to be copied.
7231    /// Copying a copied backup is not allowed.
7232    /// Once CopyBackup is in progress, the source backup cannot be deleted or
7233    /// cleaned up on expiration until CopyBackup is finished.
7234    /// Values are of the form:
7235    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7236    pub source_backup: std::string::String,
7237
7238    /// Required. Required. The expiration time of the copied backup with
7239    /// microsecond granularity that must be at least 6 hours and at most 30 days
7240    /// from the time the request is received. Once the `expire_time` has
7241    /// passed, Cloud Bigtable will delete the backup and free the resources used
7242    /// by the backup.
7243    pub expire_time: std::option::Option<wkt::Timestamp>,
7244
7245    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7246}
7247
7248impl CopyBackupRequest {
7249    pub fn new() -> Self {
7250        std::default::Default::default()
7251    }
7252
7253    /// Sets the value of [parent][crate::model::CopyBackupRequest::parent].
7254    ///
7255    /// # Example
7256    /// ```ignore,no_run
7257    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7258    /// let x = CopyBackupRequest::new().set_parent("example");
7259    /// ```
7260    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7261        self.parent = v.into();
7262        self
7263    }
7264
7265    /// Sets the value of [backup_id][crate::model::CopyBackupRequest::backup_id].
7266    ///
7267    /// # Example
7268    /// ```ignore,no_run
7269    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7270    /// let x = CopyBackupRequest::new().set_backup_id("example");
7271    /// ```
7272    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7273        self.backup_id = v.into();
7274        self
7275    }
7276
7277    /// Sets the value of [source_backup][crate::model::CopyBackupRequest::source_backup].
7278    ///
7279    /// # Example
7280    /// ```ignore,no_run
7281    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7282    /// let x = CopyBackupRequest::new().set_source_backup("example");
7283    /// ```
7284    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7285        self.source_backup = v.into();
7286        self
7287    }
7288
7289    /// Sets the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7290    ///
7291    /// # Example
7292    /// ```ignore,no_run
7293    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7294    /// use wkt::Timestamp;
7295    /// let x = CopyBackupRequest::new().set_expire_time(Timestamp::default()/* use setters */);
7296    /// ```
7297    pub fn set_expire_time<T>(mut self, v: T) -> Self
7298    where
7299        T: std::convert::Into<wkt::Timestamp>,
7300    {
7301        self.expire_time = std::option::Option::Some(v.into());
7302        self
7303    }
7304
7305    /// Sets or clears the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7306    ///
7307    /// # Example
7308    /// ```ignore,no_run
7309    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7310    /// use wkt::Timestamp;
7311    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
7312    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(None::<Timestamp>);
7313    /// ```
7314    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
7315    where
7316        T: std::convert::Into<wkt::Timestamp>,
7317    {
7318        self.expire_time = v.map(|x| x.into());
7319        self
7320    }
7321}
7322
7323impl wkt::message::Message for CopyBackupRequest {
7324    fn typename() -> &'static str {
7325        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupRequest"
7326    }
7327}
7328
7329/// Metadata type for the google.longrunning.Operation returned by
7330/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7331///
7332/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7333#[derive(Clone, Default, PartialEq)]
7334#[non_exhaustive]
7335pub struct CopyBackupMetadata {
7336    /// The name of the backup being created through the copy operation.
7337    /// Values are of the form
7338    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7339    pub name: std::string::String,
7340
7341    /// Information about the source backup that is being copied from.
7342    pub source_backup_info: std::option::Option<crate::model::BackupInfo>,
7343
7344    /// The progress of the
7345    /// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]
7346    /// operation.
7347    ///
7348    /// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7349    pub progress: std::option::Option<crate::model::OperationProgress>,
7350
7351    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7352}
7353
7354impl CopyBackupMetadata {
7355    pub fn new() -> Self {
7356        std::default::Default::default()
7357    }
7358
7359    /// Sets the value of [name][crate::model::CopyBackupMetadata::name].
7360    ///
7361    /// # Example
7362    /// ```ignore,no_run
7363    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7364    /// let x = CopyBackupMetadata::new().set_name("example");
7365    /// ```
7366    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7367        self.name = v.into();
7368        self
7369    }
7370
7371    /// Sets the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
7372    ///
7373    /// # Example
7374    /// ```ignore,no_run
7375    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7376    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
7377    /// let x = CopyBackupMetadata::new().set_source_backup_info(BackupInfo::default()/* use setters */);
7378    /// ```
7379    pub fn set_source_backup_info<T>(mut self, v: T) -> Self
7380    where
7381        T: std::convert::Into<crate::model::BackupInfo>,
7382    {
7383        self.source_backup_info = std::option::Option::Some(v.into());
7384        self
7385    }
7386
7387    /// Sets or clears the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
7388    ///
7389    /// # Example
7390    /// ```ignore,no_run
7391    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7392    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
7393    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(Some(BackupInfo::default()/* use setters */));
7394    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(None::<BackupInfo>);
7395    /// ```
7396    pub fn set_or_clear_source_backup_info<T>(mut self, v: std::option::Option<T>) -> Self
7397    where
7398        T: std::convert::Into<crate::model::BackupInfo>,
7399    {
7400        self.source_backup_info = v.map(|x| x.into());
7401        self
7402    }
7403
7404    /// Sets the value of [progress][crate::model::CopyBackupMetadata::progress].
7405    ///
7406    /// # Example
7407    /// ```ignore,no_run
7408    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7409    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
7410    /// let x = CopyBackupMetadata::new().set_progress(OperationProgress::default()/* use setters */);
7411    /// ```
7412    pub fn set_progress<T>(mut self, v: T) -> Self
7413    where
7414        T: std::convert::Into<crate::model::OperationProgress>,
7415    {
7416        self.progress = std::option::Option::Some(v.into());
7417        self
7418    }
7419
7420    /// Sets or clears the value of [progress][crate::model::CopyBackupMetadata::progress].
7421    ///
7422    /// # Example
7423    /// ```ignore,no_run
7424    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7425    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
7426    /// let x = CopyBackupMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
7427    /// let x = CopyBackupMetadata::new().set_or_clear_progress(None::<OperationProgress>);
7428    /// ```
7429    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
7430    where
7431        T: std::convert::Into<crate::model::OperationProgress>,
7432    {
7433        self.progress = v.map(|x| x.into());
7434        self
7435    }
7436}
7437
7438impl wkt::message::Message for CopyBackupMetadata {
7439    fn typename() -> &'static str {
7440        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupMetadata"
7441    }
7442}
7443
7444/// The request for
7445/// [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]
7446///
7447/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]: crate::client::BigtableTableAdmin::create_authorized_view
7448#[derive(Clone, Default, PartialEq)]
7449#[non_exhaustive]
7450pub struct CreateAuthorizedViewRequest {
7451    /// Required. This is the name of the table the AuthorizedView belongs to.
7452    /// Values are of the form
7453    /// `projects/{project}/instances/{instance}/tables/{table}`.
7454    pub parent: std::string::String,
7455
7456    /// Required. The id of the AuthorizedView to create. This AuthorizedView must
7457    /// not already exist. The `authorized_view_id` appended to `parent` forms the
7458    /// full AuthorizedView name of the form
7459    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
7460    pub authorized_view_id: std::string::String,
7461
7462    /// Required. The AuthorizedView to create.
7463    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
7464
7465    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7466}
7467
7468impl CreateAuthorizedViewRequest {
7469    pub fn new() -> Self {
7470        std::default::Default::default()
7471    }
7472
7473    /// Sets the value of [parent][crate::model::CreateAuthorizedViewRequest::parent].
7474    ///
7475    /// # Example
7476    /// ```ignore,no_run
7477    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7478    /// let x = CreateAuthorizedViewRequest::new().set_parent("example");
7479    /// ```
7480    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7481        self.parent = v.into();
7482        self
7483    }
7484
7485    /// Sets the value of [authorized_view_id][crate::model::CreateAuthorizedViewRequest::authorized_view_id].
7486    ///
7487    /// # Example
7488    /// ```ignore,no_run
7489    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7490    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view_id("example");
7491    /// ```
7492    pub fn set_authorized_view_id<T: std::convert::Into<std::string::String>>(
7493        mut self,
7494        v: T,
7495    ) -> Self {
7496        self.authorized_view_id = v.into();
7497        self
7498    }
7499
7500    /// Sets the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
7501    ///
7502    /// # Example
7503    /// ```ignore,no_run
7504    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7505    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7506    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
7507    /// ```
7508    pub fn set_authorized_view<T>(mut self, v: T) -> Self
7509    where
7510        T: std::convert::Into<crate::model::AuthorizedView>,
7511    {
7512        self.authorized_view = std::option::Option::Some(v.into());
7513        self
7514    }
7515
7516    /// Sets or clears the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
7517    ///
7518    /// # Example
7519    /// ```ignore,no_run
7520    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7521    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7522    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
7523    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
7524    /// ```
7525    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
7526    where
7527        T: std::convert::Into<crate::model::AuthorizedView>,
7528    {
7529        self.authorized_view = v.map(|x| x.into());
7530        self
7531    }
7532}
7533
7534impl wkt::message::Message for CreateAuthorizedViewRequest {
7535    fn typename() -> &'static str {
7536        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewRequest"
7537    }
7538}
7539
7540/// The metadata for the Operation returned by CreateAuthorizedView.
7541#[derive(Clone, Default, PartialEq)]
7542#[non_exhaustive]
7543pub struct CreateAuthorizedViewMetadata {
7544    /// The request that prompted the initiation of this CreateAuthorizedView
7545    /// operation.
7546    pub original_request: std::option::Option<crate::model::CreateAuthorizedViewRequest>,
7547
7548    /// The time at which the original request was received.
7549    pub request_time: std::option::Option<wkt::Timestamp>,
7550
7551    /// The time at which the operation failed or was completed successfully.
7552    pub finish_time: std::option::Option<wkt::Timestamp>,
7553
7554    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7555}
7556
7557impl CreateAuthorizedViewMetadata {
7558    pub fn new() -> Self {
7559        std::default::Default::default()
7560    }
7561
7562    /// Sets the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
7563    ///
7564    /// # Example
7565    /// ```ignore,no_run
7566    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7567    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7568    /// let x = CreateAuthorizedViewMetadata::new().set_original_request(CreateAuthorizedViewRequest::default()/* use setters */);
7569    /// ```
7570    pub fn set_original_request<T>(mut self, v: T) -> Self
7571    where
7572        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
7573    {
7574        self.original_request = std::option::Option::Some(v.into());
7575        self
7576    }
7577
7578    /// Sets or clears the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
7579    ///
7580    /// # Example
7581    /// ```ignore,no_run
7582    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7583    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7584    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(CreateAuthorizedViewRequest::default()/* use setters */));
7585    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<CreateAuthorizedViewRequest>);
7586    /// ```
7587    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
7588    where
7589        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
7590    {
7591        self.original_request = v.map(|x| x.into());
7592        self
7593    }
7594
7595    /// Sets the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
7596    ///
7597    /// # Example
7598    /// ```ignore,no_run
7599    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7600    /// use wkt::Timestamp;
7601    /// let x = CreateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
7602    /// ```
7603    pub fn set_request_time<T>(mut self, v: T) -> Self
7604    where
7605        T: std::convert::Into<wkt::Timestamp>,
7606    {
7607        self.request_time = std::option::Option::Some(v.into());
7608        self
7609    }
7610
7611    /// Sets or clears the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
7612    ///
7613    /// # Example
7614    /// ```ignore,no_run
7615    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7616    /// use wkt::Timestamp;
7617    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
7618    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
7619    /// ```
7620    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
7621    where
7622        T: std::convert::Into<wkt::Timestamp>,
7623    {
7624        self.request_time = v.map(|x| x.into());
7625        self
7626    }
7627
7628    /// Sets the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
7629    ///
7630    /// # Example
7631    /// ```ignore,no_run
7632    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7633    /// use wkt::Timestamp;
7634    /// let x = CreateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
7635    /// ```
7636    pub fn set_finish_time<T>(mut self, v: T) -> Self
7637    where
7638        T: std::convert::Into<wkt::Timestamp>,
7639    {
7640        self.finish_time = std::option::Option::Some(v.into());
7641        self
7642    }
7643
7644    /// Sets or clears the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
7645    ///
7646    /// # Example
7647    /// ```ignore,no_run
7648    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7649    /// use wkt::Timestamp;
7650    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
7651    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
7652    /// ```
7653    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
7654    where
7655        T: std::convert::Into<wkt::Timestamp>,
7656    {
7657        self.finish_time = v.map(|x| x.into());
7658        self
7659    }
7660}
7661
7662impl wkt::message::Message for CreateAuthorizedViewMetadata {
7663    fn typename() -> &'static str {
7664        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewMetadata"
7665    }
7666}
7667
7668/// Request message for
7669/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
7670///
7671/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
7672#[derive(Clone, Default, PartialEq)]
7673#[non_exhaustive]
7674pub struct ListAuthorizedViewsRequest {
7675    /// Required. The unique name of the table for which AuthorizedViews should be
7676    /// listed. Values are of the form
7677    /// `projects/{project}/instances/{instance}/tables/{table}`.
7678    pub parent: std::string::String,
7679
7680    /// Optional. Maximum number of results per page.
7681    ///
7682    /// A page_size of zero lets the server choose the number of items to return.
7683    /// A page_size which is strictly positive will return at most that many items.
7684    /// A negative page_size will cause an error.
7685    ///
7686    /// Following the first request, subsequent paginated calls are not required
7687    /// to pass a page_size. If a page_size is set in subsequent calls, it must
7688    /// match the page_size given in the first request.
7689    pub page_size: i32,
7690
7691    /// Optional. The value of `next_page_token` returned by a previous call.
7692    pub page_token: std::string::String,
7693
7694    /// Optional. The resource_view to be applied to the returned AuthorizedViews'
7695    /// fields. Default to NAME_ONLY.
7696    pub view: crate::model::authorized_view::ResponseView,
7697
7698    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7699}
7700
7701impl ListAuthorizedViewsRequest {
7702    pub fn new() -> Self {
7703        std::default::Default::default()
7704    }
7705
7706    /// Sets the value of [parent][crate::model::ListAuthorizedViewsRequest::parent].
7707    ///
7708    /// # Example
7709    /// ```ignore,no_run
7710    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7711    /// let x = ListAuthorizedViewsRequest::new().set_parent("example");
7712    /// ```
7713    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7714        self.parent = v.into();
7715        self
7716    }
7717
7718    /// Sets the value of [page_size][crate::model::ListAuthorizedViewsRequest::page_size].
7719    ///
7720    /// # Example
7721    /// ```ignore,no_run
7722    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7723    /// let x = ListAuthorizedViewsRequest::new().set_page_size(42);
7724    /// ```
7725    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7726        self.page_size = v.into();
7727        self
7728    }
7729
7730    /// Sets the value of [page_token][crate::model::ListAuthorizedViewsRequest::page_token].
7731    ///
7732    /// # Example
7733    /// ```ignore,no_run
7734    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7735    /// let x = ListAuthorizedViewsRequest::new().set_page_token("example");
7736    /// ```
7737    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7738        self.page_token = v.into();
7739        self
7740    }
7741
7742    /// Sets the value of [view][crate::model::ListAuthorizedViewsRequest::view].
7743    ///
7744    /// # Example
7745    /// ```ignore,no_run
7746    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7747    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
7748    /// let x0 = ListAuthorizedViewsRequest::new().set_view(ResponseView::NameOnly);
7749    /// let x1 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Basic);
7750    /// let x2 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Full);
7751    /// ```
7752    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
7753        mut self,
7754        v: T,
7755    ) -> Self {
7756        self.view = v.into();
7757        self
7758    }
7759}
7760
7761impl wkt::message::Message for ListAuthorizedViewsRequest {
7762    fn typename() -> &'static str {
7763        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsRequest"
7764    }
7765}
7766
7767/// Response message for
7768/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
7769///
7770/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
7771#[derive(Clone, Default, PartialEq)]
7772#[non_exhaustive]
7773pub struct ListAuthorizedViewsResponse {
7774    /// The AuthorizedViews present in the requested table.
7775    pub authorized_views: std::vec::Vec<crate::model::AuthorizedView>,
7776
7777    /// Set if not all tables could be returned in a single response.
7778    /// Pass this value to `page_token` in another request to get the next
7779    /// page of results.
7780    pub next_page_token: std::string::String,
7781
7782    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7783}
7784
7785impl ListAuthorizedViewsResponse {
7786    pub fn new() -> Self {
7787        std::default::Default::default()
7788    }
7789
7790    /// Sets the value of [authorized_views][crate::model::ListAuthorizedViewsResponse::authorized_views].
7791    ///
7792    /// # Example
7793    /// ```ignore,no_run
7794    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
7795    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7796    /// let x = ListAuthorizedViewsResponse::new()
7797    ///     .set_authorized_views([
7798    ///         AuthorizedView::default()/* use setters */,
7799    ///         AuthorizedView::default()/* use (different) setters */,
7800    ///     ]);
7801    /// ```
7802    pub fn set_authorized_views<T, V>(mut self, v: T) -> Self
7803    where
7804        T: std::iter::IntoIterator<Item = V>,
7805        V: std::convert::Into<crate::model::AuthorizedView>,
7806    {
7807        use std::iter::Iterator;
7808        self.authorized_views = v.into_iter().map(|i| i.into()).collect();
7809        self
7810    }
7811
7812    /// Sets the value of [next_page_token][crate::model::ListAuthorizedViewsResponse::next_page_token].
7813    ///
7814    /// # Example
7815    /// ```ignore,no_run
7816    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
7817    /// let x = ListAuthorizedViewsResponse::new().set_next_page_token("example");
7818    /// ```
7819    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7820        self.next_page_token = v.into();
7821        self
7822    }
7823}
7824
7825impl wkt::message::Message for ListAuthorizedViewsResponse {
7826    fn typename() -> &'static str {
7827        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsResponse"
7828    }
7829}
7830
7831#[doc(hidden)]
7832impl google_cloud_gax::paginator::internal::PageableResponse for ListAuthorizedViewsResponse {
7833    type PageItem = crate::model::AuthorizedView;
7834
7835    fn items(self) -> std::vec::Vec<Self::PageItem> {
7836        self.authorized_views
7837    }
7838
7839    fn next_page_token(&self) -> std::string::String {
7840        use std::clone::Clone;
7841        self.next_page_token.clone()
7842    }
7843}
7844
7845/// Request message for
7846/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]
7847///
7848/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]: crate::client::BigtableTableAdmin::get_authorized_view
7849#[derive(Clone, Default, PartialEq)]
7850#[non_exhaustive]
7851pub struct GetAuthorizedViewRequest {
7852    /// Required. The unique name of the requested AuthorizedView.
7853    /// Values are of the form
7854    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
7855    pub name: std::string::String,
7856
7857    /// Optional. The resource_view to be applied to the returned AuthorizedView's
7858    /// fields. Default to BASIC.
7859    pub view: crate::model::authorized_view::ResponseView,
7860
7861    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7862}
7863
7864impl GetAuthorizedViewRequest {
7865    pub fn new() -> Self {
7866        std::default::Default::default()
7867    }
7868
7869    /// Sets the value of [name][crate::model::GetAuthorizedViewRequest::name].
7870    ///
7871    /// # Example
7872    /// ```ignore,no_run
7873    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
7874    /// let x = GetAuthorizedViewRequest::new().set_name("example");
7875    /// ```
7876    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7877        self.name = v.into();
7878        self
7879    }
7880
7881    /// Sets the value of [view][crate::model::GetAuthorizedViewRequest::view].
7882    ///
7883    /// # Example
7884    /// ```ignore,no_run
7885    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
7886    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
7887    /// let x0 = GetAuthorizedViewRequest::new().set_view(ResponseView::NameOnly);
7888    /// let x1 = GetAuthorizedViewRequest::new().set_view(ResponseView::Basic);
7889    /// let x2 = GetAuthorizedViewRequest::new().set_view(ResponseView::Full);
7890    /// ```
7891    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
7892        mut self,
7893        v: T,
7894    ) -> Self {
7895        self.view = v.into();
7896        self
7897    }
7898}
7899
7900impl wkt::message::Message for GetAuthorizedViewRequest {
7901    fn typename() -> &'static str {
7902        "type.googleapis.com/google.bigtable.admin.v2.GetAuthorizedViewRequest"
7903    }
7904}
7905
7906/// The request for
7907/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
7908///
7909/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
7910#[derive(Clone, Default, PartialEq)]
7911#[non_exhaustive]
7912pub struct UpdateAuthorizedViewRequest {
7913    /// Required. The AuthorizedView to update. The `name` in `authorized_view` is
7914    /// used to identify the AuthorizedView. AuthorizedView name must in this
7915    /// format:
7916    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
7917    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
7918
7919    /// Optional. The list of fields to update.
7920    /// A mask specifying which fields in the AuthorizedView resource should be
7921    /// updated. This mask is relative to the AuthorizedView resource, not to the
7922    /// request message. A field will be overwritten if it is in the mask. If
7923    /// empty, all fields set in the request will be overwritten. A special value
7924    /// `*` means to overwrite all fields (including fields not set in the
7925    /// request).
7926    pub update_mask: std::option::Option<wkt::FieldMask>,
7927
7928    /// Optional. If true, ignore the safety checks when updating the
7929    /// AuthorizedView.
7930    pub ignore_warnings: bool,
7931
7932    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7933}
7934
7935impl UpdateAuthorizedViewRequest {
7936    pub fn new() -> Self {
7937        std::default::Default::default()
7938    }
7939
7940    /// Sets the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
7941    ///
7942    /// # Example
7943    /// ```ignore,no_run
7944    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
7945    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7946    /// let x = UpdateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
7947    /// ```
7948    pub fn set_authorized_view<T>(mut self, v: T) -> Self
7949    where
7950        T: std::convert::Into<crate::model::AuthorizedView>,
7951    {
7952        self.authorized_view = std::option::Option::Some(v.into());
7953        self
7954    }
7955
7956    /// Sets or clears the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
7957    ///
7958    /// # Example
7959    /// ```ignore,no_run
7960    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
7961    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7962    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
7963    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
7964    /// ```
7965    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
7966    where
7967        T: std::convert::Into<crate::model::AuthorizedView>,
7968    {
7969        self.authorized_view = v.map(|x| x.into());
7970        self
7971    }
7972
7973    /// Sets the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
7974    ///
7975    /// # Example
7976    /// ```ignore,no_run
7977    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
7978    /// use wkt::FieldMask;
7979    /// let x = UpdateAuthorizedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7980    /// ```
7981    pub fn set_update_mask<T>(mut self, v: T) -> Self
7982    where
7983        T: std::convert::Into<wkt::FieldMask>,
7984    {
7985        self.update_mask = std::option::Option::Some(v.into());
7986        self
7987    }
7988
7989    /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
7990    ///
7991    /// # Example
7992    /// ```ignore,no_run
7993    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
7994    /// use wkt::FieldMask;
7995    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7996    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7997    /// ```
7998    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7999    where
8000        T: std::convert::Into<wkt::FieldMask>,
8001    {
8002        self.update_mask = v.map(|x| x.into());
8003        self
8004    }
8005
8006    /// Sets the value of [ignore_warnings][crate::model::UpdateAuthorizedViewRequest::ignore_warnings].
8007    ///
8008    /// # Example
8009    /// ```ignore,no_run
8010    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8011    /// let x = UpdateAuthorizedViewRequest::new().set_ignore_warnings(true);
8012    /// ```
8013    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8014        self.ignore_warnings = v.into();
8015        self
8016    }
8017}
8018
8019impl wkt::message::Message for UpdateAuthorizedViewRequest {
8020    fn typename() -> &'static str {
8021        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewRequest"
8022    }
8023}
8024
8025/// Metadata for the google.longrunning.Operation returned by
8026/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
8027///
8028/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
8029#[derive(Clone, Default, PartialEq)]
8030#[non_exhaustive]
8031pub struct UpdateAuthorizedViewMetadata {
8032    /// The request that prompted the initiation of this UpdateAuthorizedView
8033    /// operation.
8034    pub original_request: std::option::Option<crate::model::UpdateAuthorizedViewRequest>,
8035
8036    /// The time at which the original request was received.
8037    pub request_time: std::option::Option<wkt::Timestamp>,
8038
8039    /// The time at which the operation failed or was completed successfully.
8040    pub finish_time: std::option::Option<wkt::Timestamp>,
8041
8042    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8043}
8044
8045impl UpdateAuthorizedViewMetadata {
8046    pub fn new() -> Self {
8047        std::default::Default::default()
8048    }
8049
8050    /// Sets the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8051    ///
8052    /// # Example
8053    /// ```ignore,no_run
8054    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8055    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8056    /// let x = UpdateAuthorizedViewMetadata::new().set_original_request(UpdateAuthorizedViewRequest::default()/* use setters */);
8057    /// ```
8058    pub fn set_original_request<T>(mut self, v: T) -> Self
8059    where
8060        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8061    {
8062        self.original_request = std::option::Option::Some(v.into());
8063        self
8064    }
8065
8066    /// Sets or clears the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8067    ///
8068    /// # Example
8069    /// ```ignore,no_run
8070    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8071    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8072    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(UpdateAuthorizedViewRequest::default()/* use setters */));
8073    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<UpdateAuthorizedViewRequest>);
8074    /// ```
8075    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
8076    where
8077        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8078    {
8079        self.original_request = v.map(|x| x.into());
8080        self
8081    }
8082
8083    /// Sets the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8084    ///
8085    /// # Example
8086    /// ```ignore,no_run
8087    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8088    /// use wkt::Timestamp;
8089    /// let x = UpdateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
8090    /// ```
8091    pub fn set_request_time<T>(mut self, v: T) -> Self
8092    where
8093        T: std::convert::Into<wkt::Timestamp>,
8094    {
8095        self.request_time = std::option::Option::Some(v.into());
8096        self
8097    }
8098
8099    /// Sets or clears the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8100    ///
8101    /// # Example
8102    /// ```ignore,no_run
8103    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8104    /// use wkt::Timestamp;
8105    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
8106    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
8107    /// ```
8108    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
8109    where
8110        T: std::convert::Into<wkt::Timestamp>,
8111    {
8112        self.request_time = v.map(|x| x.into());
8113        self
8114    }
8115
8116    /// Sets the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8117    ///
8118    /// # Example
8119    /// ```ignore,no_run
8120    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8121    /// use wkt::Timestamp;
8122    /// let x = UpdateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
8123    /// ```
8124    pub fn set_finish_time<T>(mut self, v: T) -> Self
8125    where
8126        T: std::convert::Into<wkt::Timestamp>,
8127    {
8128        self.finish_time = std::option::Option::Some(v.into());
8129        self
8130    }
8131
8132    /// Sets or clears the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8133    ///
8134    /// # Example
8135    /// ```ignore,no_run
8136    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8137    /// use wkt::Timestamp;
8138    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
8139    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
8140    /// ```
8141    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
8142    where
8143        T: std::convert::Into<wkt::Timestamp>,
8144    {
8145        self.finish_time = v.map(|x| x.into());
8146        self
8147    }
8148}
8149
8150impl wkt::message::Message for UpdateAuthorizedViewMetadata {
8151    fn typename() -> &'static str {
8152        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewMetadata"
8153    }
8154}
8155
8156/// Request message for
8157/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]
8158///
8159/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]: crate::client::BigtableTableAdmin::delete_authorized_view
8160#[derive(Clone, Default, PartialEq)]
8161#[non_exhaustive]
8162pub struct DeleteAuthorizedViewRequest {
8163    /// Required. The unique name of the AuthorizedView to be deleted.
8164    /// Values are of the form
8165    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8166    pub name: std::string::String,
8167
8168    /// Optional. The current etag of the AuthorizedView.
8169    /// If an etag is provided and does not match the current etag of the
8170    /// AuthorizedView, deletion will be blocked and an ABORTED error will be
8171    /// returned.
8172    pub etag: std::string::String,
8173
8174    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8175}
8176
8177impl DeleteAuthorizedViewRequest {
8178    pub fn new() -> Self {
8179        std::default::Default::default()
8180    }
8181
8182    /// Sets the value of [name][crate::model::DeleteAuthorizedViewRequest::name].
8183    ///
8184    /// # Example
8185    /// ```ignore,no_run
8186    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8187    /// let x = DeleteAuthorizedViewRequest::new().set_name("example");
8188    /// ```
8189    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8190        self.name = v.into();
8191        self
8192    }
8193
8194    /// Sets the value of [etag][crate::model::DeleteAuthorizedViewRequest::etag].
8195    ///
8196    /// # Example
8197    /// ```ignore,no_run
8198    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8199    /// let x = DeleteAuthorizedViewRequest::new().set_etag("example");
8200    /// ```
8201    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8202        self.etag = v.into();
8203        self
8204    }
8205}
8206
8207impl wkt::message::Message for DeleteAuthorizedViewRequest {
8208    fn typename() -> &'static str {
8209        "type.googleapis.com/google.bigtable.admin.v2.DeleteAuthorizedViewRequest"
8210    }
8211}
8212
8213/// The request for
8214/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8215///
8216/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8217#[derive(Clone, Default, PartialEq)]
8218#[non_exhaustive]
8219pub struct CreateSchemaBundleRequest {
8220    /// Required. The parent resource where this schema bundle will be created.
8221    /// Values are of the form
8222    /// `projects/{project}/instances/{instance}/tables/{table}`.
8223    pub parent: std::string::String,
8224
8225    /// Required. The unique ID to use for the schema bundle, which will become the
8226    /// final component of the schema bundle's resource name.
8227    pub schema_bundle_id: std::string::String,
8228
8229    /// Required. The schema bundle to create.
8230    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8231
8232    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8233}
8234
8235impl CreateSchemaBundleRequest {
8236    pub fn new() -> Self {
8237        std::default::Default::default()
8238    }
8239
8240    /// Sets the value of [parent][crate::model::CreateSchemaBundleRequest::parent].
8241    ///
8242    /// # Example
8243    /// ```ignore,no_run
8244    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8245    /// let x = CreateSchemaBundleRequest::new().set_parent("example");
8246    /// ```
8247    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8248        self.parent = v.into();
8249        self
8250    }
8251
8252    /// Sets the value of [schema_bundle_id][crate::model::CreateSchemaBundleRequest::schema_bundle_id].
8253    ///
8254    /// # Example
8255    /// ```ignore,no_run
8256    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8257    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle_id("example");
8258    /// ```
8259    pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
8260        mut self,
8261        v: T,
8262    ) -> Self {
8263        self.schema_bundle_id = v.into();
8264        self
8265    }
8266
8267    /// Sets the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8268    ///
8269    /// # Example
8270    /// ```ignore,no_run
8271    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8272    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8273    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8274    /// ```
8275    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8276    where
8277        T: std::convert::Into<crate::model::SchemaBundle>,
8278    {
8279        self.schema_bundle = std::option::Option::Some(v.into());
8280        self
8281    }
8282
8283    /// Sets or clears the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8284    ///
8285    /// # Example
8286    /// ```ignore,no_run
8287    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8288    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8289    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8290    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8291    /// ```
8292    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8293    where
8294        T: std::convert::Into<crate::model::SchemaBundle>,
8295    {
8296        self.schema_bundle = v.map(|x| x.into());
8297        self
8298    }
8299}
8300
8301impl wkt::message::Message for CreateSchemaBundleRequest {
8302    fn typename() -> &'static str {
8303        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleRequest"
8304    }
8305}
8306
8307/// The metadata for the Operation returned by
8308/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8309///
8310/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8311#[derive(Clone, Default, PartialEq)]
8312#[non_exhaustive]
8313pub struct CreateSchemaBundleMetadata {
8314    /// The unique name identifying this schema bundle.
8315    /// Values are of the form
8316    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8317    pub name: std::string::String,
8318
8319    /// The time at which this operation started.
8320    pub start_time: std::option::Option<wkt::Timestamp>,
8321
8322    /// If set, the time at which this operation finished or was canceled.
8323    pub end_time: std::option::Option<wkt::Timestamp>,
8324
8325    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8326}
8327
8328impl CreateSchemaBundleMetadata {
8329    pub fn new() -> Self {
8330        std::default::Default::default()
8331    }
8332
8333    /// Sets the value of [name][crate::model::CreateSchemaBundleMetadata::name].
8334    ///
8335    /// # Example
8336    /// ```ignore,no_run
8337    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8338    /// let x = CreateSchemaBundleMetadata::new().set_name("example");
8339    /// ```
8340    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8341        self.name = v.into();
8342        self
8343    }
8344
8345    /// Sets the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
8346    ///
8347    /// # Example
8348    /// ```ignore,no_run
8349    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8350    /// use wkt::Timestamp;
8351    /// let x = CreateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
8352    /// ```
8353    pub fn set_start_time<T>(mut self, v: T) -> Self
8354    where
8355        T: std::convert::Into<wkt::Timestamp>,
8356    {
8357        self.start_time = std::option::Option::Some(v.into());
8358        self
8359    }
8360
8361    /// Sets or clears the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
8362    ///
8363    /// # Example
8364    /// ```ignore,no_run
8365    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8366    /// use wkt::Timestamp;
8367    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8368    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
8369    /// ```
8370    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8371    where
8372        T: std::convert::Into<wkt::Timestamp>,
8373    {
8374        self.start_time = v.map(|x| x.into());
8375        self
8376    }
8377
8378    /// Sets the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
8379    ///
8380    /// # Example
8381    /// ```ignore,no_run
8382    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8383    /// use wkt::Timestamp;
8384    /// let x = CreateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8385    /// ```
8386    pub fn set_end_time<T>(mut self, v: T) -> Self
8387    where
8388        T: std::convert::Into<wkt::Timestamp>,
8389    {
8390        self.end_time = std::option::Option::Some(v.into());
8391        self
8392    }
8393
8394    /// Sets or clears the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
8395    ///
8396    /// # Example
8397    /// ```ignore,no_run
8398    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8399    /// use wkt::Timestamp;
8400    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8401    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8402    /// ```
8403    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8404    where
8405        T: std::convert::Into<wkt::Timestamp>,
8406    {
8407        self.end_time = v.map(|x| x.into());
8408        self
8409    }
8410}
8411
8412impl wkt::message::Message for CreateSchemaBundleMetadata {
8413    fn typename() -> &'static str {
8414        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleMetadata"
8415    }
8416}
8417
8418/// The request for
8419/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
8420///
8421/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
8422#[derive(Clone, Default, PartialEq)]
8423#[non_exhaustive]
8424pub struct UpdateSchemaBundleRequest {
8425    /// Required. The schema bundle to update.
8426    ///
8427    /// The schema bundle's `name` field is used to identify the schema bundle to
8428    /// update. Values are of the form
8429    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8430    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8431
8432    /// Optional. The list of fields to update.
8433    pub update_mask: std::option::Option<wkt::FieldMask>,
8434
8435    /// Optional. If set, ignore the safety checks when updating the Schema Bundle.
8436    /// The safety checks are:
8437    ///
8438    /// - The new Schema Bundle is backwards compatible with the existing Schema
8439    ///   Bundle.
8440    pub ignore_warnings: bool,
8441
8442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8443}
8444
8445impl UpdateSchemaBundleRequest {
8446    pub fn new() -> Self {
8447        std::default::Default::default()
8448    }
8449
8450    /// Sets the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
8451    ///
8452    /// # Example
8453    /// ```ignore,no_run
8454    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8455    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8456    /// let x = UpdateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8457    /// ```
8458    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8459    where
8460        T: std::convert::Into<crate::model::SchemaBundle>,
8461    {
8462        self.schema_bundle = std::option::Option::Some(v.into());
8463        self
8464    }
8465
8466    /// Sets or clears the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
8467    ///
8468    /// # Example
8469    /// ```ignore,no_run
8470    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8471    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8472    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8473    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8474    /// ```
8475    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8476    where
8477        T: std::convert::Into<crate::model::SchemaBundle>,
8478    {
8479        self.schema_bundle = v.map(|x| x.into());
8480        self
8481    }
8482
8483    /// Sets the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
8484    ///
8485    /// # Example
8486    /// ```ignore,no_run
8487    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8488    /// use wkt::FieldMask;
8489    /// let x = UpdateSchemaBundleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8490    /// ```
8491    pub fn set_update_mask<T>(mut self, v: T) -> Self
8492    where
8493        T: std::convert::Into<wkt::FieldMask>,
8494    {
8495        self.update_mask = std::option::Option::Some(v.into());
8496        self
8497    }
8498
8499    /// Sets or clears the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
8500    ///
8501    /// # Example
8502    /// ```ignore,no_run
8503    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8504    /// use wkt::FieldMask;
8505    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8506    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8507    /// ```
8508    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8509    where
8510        T: std::convert::Into<wkt::FieldMask>,
8511    {
8512        self.update_mask = v.map(|x| x.into());
8513        self
8514    }
8515
8516    /// Sets the value of [ignore_warnings][crate::model::UpdateSchemaBundleRequest::ignore_warnings].
8517    ///
8518    /// # Example
8519    /// ```ignore,no_run
8520    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8521    /// let x = UpdateSchemaBundleRequest::new().set_ignore_warnings(true);
8522    /// ```
8523    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8524        self.ignore_warnings = v.into();
8525        self
8526    }
8527}
8528
8529impl wkt::message::Message for UpdateSchemaBundleRequest {
8530    fn typename() -> &'static str {
8531        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleRequest"
8532    }
8533}
8534
8535/// The metadata for the Operation returned by
8536/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
8537///
8538/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
8539#[derive(Clone, Default, PartialEq)]
8540#[non_exhaustive]
8541pub struct UpdateSchemaBundleMetadata {
8542    /// The unique name identifying this schema bundle.
8543    /// Values are of the form
8544    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8545    pub name: std::string::String,
8546
8547    /// The time at which this operation started.
8548    pub start_time: std::option::Option<wkt::Timestamp>,
8549
8550    /// If set, the time at which this operation finished or was canceled.
8551    pub end_time: std::option::Option<wkt::Timestamp>,
8552
8553    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8554}
8555
8556impl UpdateSchemaBundleMetadata {
8557    pub fn new() -> Self {
8558        std::default::Default::default()
8559    }
8560
8561    /// Sets the value of [name][crate::model::UpdateSchemaBundleMetadata::name].
8562    ///
8563    /// # Example
8564    /// ```ignore,no_run
8565    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8566    /// let x = UpdateSchemaBundleMetadata::new().set_name("example");
8567    /// ```
8568    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8569        self.name = v.into();
8570        self
8571    }
8572
8573    /// Sets the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
8574    ///
8575    /// # Example
8576    /// ```ignore,no_run
8577    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8578    /// use wkt::Timestamp;
8579    /// let x = UpdateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
8580    /// ```
8581    pub fn set_start_time<T>(mut self, v: T) -> Self
8582    where
8583        T: std::convert::Into<wkt::Timestamp>,
8584    {
8585        self.start_time = std::option::Option::Some(v.into());
8586        self
8587    }
8588
8589    /// Sets or clears the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
8590    ///
8591    /// # Example
8592    /// ```ignore,no_run
8593    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8594    /// use wkt::Timestamp;
8595    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8596    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
8597    /// ```
8598    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8599    where
8600        T: std::convert::Into<wkt::Timestamp>,
8601    {
8602        self.start_time = v.map(|x| x.into());
8603        self
8604    }
8605
8606    /// Sets the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
8607    ///
8608    /// # Example
8609    /// ```ignore,no_run
8610    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8611    /// use wkt::Timestamp;
8612    /// let x = UpdateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8613    /// ```
8614    pub fn set_end_time<T>(mut self, v: T) -> Self
8615    where
8616        T: std::convert::Into<wkt::Timestamp>,
8617    {
8618        self.end_time = std::option::Option::Some(v.into());
8619        self
8620    }
8621
8622    /// Sets or clears the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
8623    ///
8624    /// # Example
8625    /// ```ignore,no_run
8626    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8627    /// use wkt::Timestamp;
8628    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8629    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8630    /// ```
8631    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8632    where
8633        T: std::convert::Into<wkt::Timestamp>,
8634    {
8635        self.end_time = v.map(|x| x.into());
8636        self
8637    }
8638}
8639
8640impl wkt::message::Message for UpdateSchemaBundleMetadata {
8641    fn typename() -> &'static str {
8642        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleMetadata"
8643    }
8644}
8645
8646/// The request for
8647/// [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle].
8648///
8649/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle]: crate::client::BigtableTableAdmin::get_schema_bundle
8650#[derive(Clone, Default, PartialEq)]
8651#[non_exhaustive]
8652pub struct GetSchemaBundleRequest {
8653    /// Required. The unique name of the schema bundle to retrieve.
8654    /// Values are of the form
8655    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8656    pub name: std::string::String,
8657
8658    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8659}
8660
8661impl GetSchemaBundleRequest {
8662    pub fn new() -> Self {
8663        std::default::Default::default()
8664    }
8665
8666    /// Sets the value of [name][crate::model::GetSchemaBundleRequest::name].
8667    ///
8668    /// # Example
8669    /// ```ignore,no_run
8670    /// # use google_cloud_bigtable_admin_v2::model::GetSchemaBundleRequest;
8671    /// let x = GetSchemaBundleRequest::new().set_name("example");
8672    /// ```
8673    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8674        self.name = v.into();
8675        self
8676    }
8677}
8678
8679impl wkt::message::Message for GetSchemaBundleRequest {
8680    fn typename() -> &'static str {
8681        "type.googleapis.com/google.bigtable.admin.v2.GetSchemaBundleRequest"
8682    }
8683}
8684
8685/// The request for
8686/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
8687///
8688/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
8689#[derive(Clone, Default, PartialEq)]
8690#[non_exhaustive]
8691pub struct ListSchemaBundlesRequest {
8692    /// Required. The parent, which owns this collection of schema bundles.
8693    /// Values are of the form
8694    /// `projects/{project}/instances/{instance}/tables/{table}`.
8695    pub parent: std::string::String,
8696
8697    /// The maximum number of schema bundles to return. If the value is positive,
8698    /// the server may return at most this value. If unspecified, the server will
8699    /// return the maximum allowed page size.
8700    pub page_size: i32,
8701
8702    /// A page token, received from a previous `ListSchemaBundles` call.
8703    /// Provide this to retrieve the subsequent page.
8704    ///
8705    /// When paginating, all other parameters provided to `ListSchemaBundles` must
8706    /// match the call that provided the page token.
8707    pub page_token: std::string::String,
8708
8709    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8710}
8711
8712impl ListSchemaBundlesRequest {
8713    pub fn new() -> Self {
8714        std::default::Default::default()
8715    }
8716
8717    /// Sets the value of [parent][crate::model::ListSchemaBundlesRequest::parent].
8718    ///
8719    /// # Example
8720    /// ```ignore,no_run
8721    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8722    /// let x = ListSchemaBundlesRequest::new().set_parent("example");
8723    /// ```
8724    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8725        self.parent = v.into();
8726        self
8727    }
8728
8729    /// Sets the value of [page_size][crate::model::ListSchemaBundlesRequest::page_size].
8730    ///
8731    /// # Example
8732    /// ```ignore,no_run
8733    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8734    /// let x = ListSchemaBundlesRequest::new().set_page_size(42);
8735    /// ```
8736    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8737        self.page_size = v.into();
8738        self
8739    }
8740
8741    /// Sets the value of [page_token][crate::model::ListSchemaBundlesRequest::page_token].
8742    ///
8743    /// # Example
8744    /// ```ignore,no_run
8745    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8746    /// let x = ListSchemaBundlesRequest::new().set_page_token("example");
8747    /// ```
8748    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8749        self.page_token = v.into();
8750        self
8751    }
8752}
8753
8754impl wkt::message::Message for ListSchemaBundlesRequest {
8755    fn typename() -> &'static str {
8756        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesRequest"
8757    }
8758}
8759
8760/// The response for
8761/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
8762///
8763/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
8764#[derive(Clone, Default, PartialEq)]
8765#[non_exhaustive]
8766pub struct ListSchemaBundlesResponse {
8767    /// The schema bundles from the specified table.
8768    pub schema_bundles: std::vec::Vec<crate::model::SchemaBundle>,
8769
8770    /// A token, which can be sent as `page_token` to retrieve the next page.
8771    /// If this field is omitted, there are no subsequent pages.
8772    pub next_page_token: std::string::String,
8773
8774    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8775}
8776
8777impl ListSchemaBundlesResponse {
8778    pub fn new() -> Self {
8779        std::default::Default::default()
8780    }
8781
8782    /// Sets the value of [schema_bundles][crate::model::ListSchemaBundlesResponse::schema_bundles].
8783    ///
8784    /// # Example
8785    /// ```ignore,no_run
8786    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
8787    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8788    /// let x = ListSchemaBundlesResponse::new()
8789    ///     .set_schema_bundles([
8790    ///         SchemaBundle::default()/* use setters */,
8791    ///         SchemaBundle::default()/* use (different) setters */,
8792    ///     ]);
8793    /// ```
8794    pub fn set_schema_bundles<T, V>(mut self, v: T) -> Self
8795    where
8796        T: std::iter::IntoIterator<Item = V>,
8797        V: std::convert::Into<crate::model::SchemaBundle>,
8798    {
8799        use std::iter::Iterator;
8800        self.schema_bundles = v.into_iter().map(|i| i.into()).collect();
8801        self
8802    }
8803
8804    /// Sets the value of [next_page_token][crate::model::ListSchemaBundlesResponse::next_page_token].
8805    ///
8806    /// # Example
8807    /// ```ignore,no_run
8808    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
8809    /// let x = ListSchemaBundlesResponse::new().set_next_page_token("example");
8810    /// ```
8811    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8812        self.next_page_token = v.into();
8813        self
8814    }
8815}
8816
8817impl wkt::message::Message for ListSchemaBundlesResponse {
8818    fn typename() -> &'static str {
8819        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesResponse"
8820    }
8821}
8822
8823#[doc(hidden)]
8824impl google_cloud_gax::paginator::internal::PageableResponse for ListSchemaBundlesResponse {
8825    type PageItem = crate::model::SchemaBundle;
8826
8827    fn items(self) -> std::vec::Vec<Self::PageItem> {
8828        self.schema_bundles
8829    }
8830
8831    fn next_page_token(&self) -> std::string::String {
8832        use std::clone::Clone;
8833        self.next_page_token.clone()
8834    }
8835}
8836
8837/// The request for
8838/// [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle].
8839///
8840/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle]: crate::client::BigtableTableAdmin::delete_schema_bundle
8841#[derive(Clone, Default, PartialEq)]
8842#[non_exhaustive]
8843pub struct DeleteSchemaBundleRequest {
8844    /// Required. The unique name of the schema bundle to delete.
8845    /// Values are of the form
8846    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8847    pub name: std::string::String,
8848
8849    /// Optional. The etag of the schema bundle.
8850    /// If this is provided, it must match the server's etag. The server
8851    /// returns an ABORTED error on a mismatched etag.
8852    pub etag: std::string::String,
8853
8854    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8855}
8856
8857impl DeleteSchemaBundleRequest {
8858    pub fn new() -> Self {
8859        std::default::Default::default()
8860    }
8861
8862    /// Sets the value of [name][crate::model::DeleteSchemaBundleRequest::name].
8863    ///
8864    /// # Example
8865    /// ```ignore,no_run
8866    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
8867    /// let x = DeleteSchemaBundleRequest::new().set_name("example");
8868    /// ```
8869    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8870        self.name = v.into();
8871        self
8872    }
8873
8874    /// Sets the value of [etag][crate::model::DeleteSchemaBundleRequest::etag].
8875    ///
8876    /// # Example
8877    /// ```ignore,no_run
8878    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
8879    /// let x = DeleteSchemaBundleRequest::new().set_etag("example");
8880    /// ```
8881    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8882        self.etag = v.into();
8883        self
8884    }
8885}
8886
8887impl wkt::message::Message for DeleteSchemaBundleRequest {
8888    fn typename() -> &'static str {
8889        "type.googleapis.com/google.bigtable.admin.v2.DeleteSchemaBundleRequest"
8890    }
8891}
8892
8893/// Encapsulates progress related information for a Cloud Bigtable long
8894/// running operation.
8895#[derive(Clone, Default, PartialEq)]
8896#[non_exhaustive]
8897pub struct OperationProgress {
8898    /// Percent completion of the operation.
8899    /// Values are between 0 and 100 inclusive.
8900    pub progress_percent: i32,
8901
8902    /// Time the request was received.
8903    pub start_time: std::option::Option<wkt::Timestamp>,
8904
8905    /// If set, the time at which this operation failed or was completed
8906    /// successfully.
8907    pub end_time: std::option::Option<wkt::Timestamp>,
8908
8909    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8910}
8911
8912impl OperationProgress {
8913    pub fn new() -> Self {
8914        std::default::Default::default()
8915    }
8916
8917    /// Sets the value of [progress_percent][crate::model::OperationProgress::progress_percent].
8918    ///
8919    /// # Example
8920    /// ```ignore,no_run
8921    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
8922    /// let x = OperationProgress::new().set_progress_percent(42);
8923    /// ```
8924    pub fn set_progress_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8925        self.progress_percent = v.into();
8926        self
8927    }
8928
8929    /// Sets the value of [start_time][crate::model::OperationProgress::start_time].
8930    ///
8931    /// # Example
8932    /// ```ignore,no_run
8933    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
8934    /// use wkt::Timestamp;
8935    /// let x = OperationProgress::new().set_start_time(Timestamp::default()/* use setters */);
8936    /// ```
8937    pub fn set_start_time<T>(mut self, v: T) -> Self
8938    where
8939        T: std::convert::Into<wkt::Timestamp>,
8940    {
8941        self.start_time = std::option::Option::Some(v.into());
8942        self
8943    }
8944
8945    /// Sets or clears the value of [start_time][crate::model::OperationProgress::start_time].
8946    ///
8947    /// # Example
8948    /// ```ignore,no_run
8949    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
8950    /// use wkt::Timestamp;
8951    /// let x = OperationProgress::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8952    /// let x = OperationProgress::new().set_or_clear_start_time(None::<Timestamp>);
8953    /// ```
8954    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8955    where
8956        T: std::convert::Into<wkt::Timestamp>,
8957    {
8958        self.start_time = v.map(|x| x.into());
8959        self
8960    }
8961
8962    /// Sets the value of [end_time][crate::model::OperationProgress::end_time].
8963    ///
8964    /// # Example
8965    /// ```ignore,no_run
8966    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
8967    /// use wkt::Timestamp;
8968    /// let x = OperationProgress::new().set_end_time(Timestamp::default()/* use setters */);
8969    /// ```
8970    pub fn set_end_time<T>(mut self, v: T) -> Self
8971    where
8972        T: std::convert::Into<wkt::Timestamp>,
8973    {
8974        self.end_time = std::option::Option::Some(v.into());
8975        self
8976    }
8977
8978    /// Sets or clears the value of [end_time][crate::model::OperationProgress::end_time].
8979    ///
8980    /// # Example
8981    /// ```ignore,no_run
8982    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
8983    /// use wkt::Timestamp;
8984    /// let x = OperationProgress::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8985    /// let x = OperationProgress::new().set_or_clear_end_time(None::<Timestamp>);
8986    /// ```
8987    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8988    where
8989        T: std::convert::Into<wkt::Timestamp>,
8990    {
8991        self.end_time = v.map(|x| x.into());
8992        self
8993    }
8994}
8995
8996impl wkt::message::Message for OperationProgress {
8997    fn typename() -> &'static str {
8998        "type.googleapis.com/google.bigtable.admin.v2.OperationProgress"
8999    }
9000}
9001
9002/// A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and
9003/// the resources that serve them.
9004/// All tables in an instance are served from all
9005/// [Clusters][google.bigtable.admin.v2.Cluster] in the instance.
9006///
9007/// [google.bigtable.admin.v2.Cluster]: crate::model::Cluster
9008/// [google.bigtable.admin.v2.Table]: crate::model::Table
9009#[derive(Clone, Default, PartialEq)]
9010#[non_exhaustive]
9011pub struct Instance {
9012    /// The unique name of the instance. Values are of the form
9013    /// `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
9014    pub name: std::string::String,
9015
9016    /// Required. The descriptive name for this instance as it appears in UIs.
9017    /// Can be changed at any time, but should be kept globally unique
9018    /// to avoid confusion.
9019    pub display_name: std::string::String,
9020
9021    /// Output only. The current state of the instance.
9022    pub state: crate::model::instance::State,
9023
9024    /// The type of the instance. Defaults to `PRODUCTION`.
9025    pub r#type: crate::model::instance::Type,
9026
9027    /// Labels are a flexible and lightweight mechanism for organizing cloud
9028    /// resources into groups that reflect a customer's organizational needs and
9029    /// deployment strategies. They can be used to filter resources and aggregate
9030    /// metrics.
9031    ///
9032    /// * Label keys must be between 1 and 63 characters long and must conform to
9033    ///   the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
9034    /// * Label values must be between 0 and 63 characters long and must conform to
9035    ///   the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
9036    /// * No more than 64 labels can be associated with a given resource.
9037    /// * Keys and values must both be under 128 bytes.
9038    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9039
9040    /// Output only. A commit timestamp representing when this Instance was
9041    /// created. For instances created before this field was added (August 2021),
9042    /// this value is `seconds: 0, nanos: 1`.
9043    pub create_time: std::option::Option<wkt::Timestamp>,
9044
9045    /// Output only. Reserved for future use.
9046    pub satisfies_pzs: std::option::Option<bool>,
9047
9048    /// Output only. Reserved for future use.
9049    pub satisfies_pzi: std::option::Option<bool>,
9050
9051    /// Optional. Input only. Immutable. Tag keys/values directly bound to this
9052    /// resource. For example:
9053    ///
9054    /// - "123/environment": "production",
9055    /// - "123/costCenter": "marketing"
9056    ///
9057    /// Tags and Labels (above) are both used to bind metadata to resources, with
9058    /// different use-cases. See
9059    /// <https://cloud.google.com/resource-manager/docs/tags/tags-overview> for an
9060    /// in-depth overview on the difference between tags and labels.
9061    pub tags: std::collections::HashMap<std::string::String, std::string::String>,
9062
9063    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9064}
9065
9066impl Instance {
9067    pub fn new() -> Self {
9068        std::default::Default::default()
9069    }
9070
9071    /// Sets the value of [name][crate::model::Instance::name].
9072    ///
9073    /// # Example
9074    /// ```ignore,no_run
9075    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9076    /// let x = Instance::new().set_name("example");
9077    /// ```
9078    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9079        self.name = v.into();
9080        self
9081    }
9082
9083    /// Sets the value of [display_name][crate::model::Instance::display_name].
9084    ///
9085    /// # Example
9086    /// ```ignore,no_run
9087    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9088    /// let x = Instance::new().set_display_name("example");
9089    /// ```
9090    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9091        self.display_name = v.into();
9092        self
9093    }
9094
9095    /// Sets the value of [state][crate::model::Instance::state].
9096    ///
9097    /// # Example
9098    /// ```ignore,no_run
9099    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9100    /// use google_cloud_bigtable_admin_v2::model::instance::State;
9101    /// let x0 = Instance::new().set_state(State::Ready);
9102    /// let x1 = Instance::new().set_state(State::Creating);
9103    /// ```
9104    pub fn set_state<T: std::convert::Into<crate::model::instance::State>>(mut self, v: T) -> Self {
9105        self.state = v.into();
9106        self
9107    }
9108
9109    /// Sets the value of [r#type][crate::model::Instance::type].
9110    ///
9111    /// # Example
9112    /// ```ignore,no_run
9113    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9114    /// use google_cloud_bigtable_admin_v2::model::instance::Type;
9115    /// let x0 = Instance::new().set_type(Type::Production);
9116    /// let x1 = Instance::new().set_type(Type::Development);
9117    /// ```
9118    pub fn set_type<T: std::convert::Into<crate::model::instance::Type>>(mut self, v: T) -> Self {
9119        self.r#type = v.into();
9120        self
9121    }
9122
9123    /// Sets the value of [labels][crate::model::Instance::labels].
9124    ///
9125    /// # Example
9126    /// ```ignore,no_run
9127    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9128    /// let x = Instance::new().set_labels([
9129    ///     ("key0", "abc"),
9130    ///     ("key1", "xyz"),
9131    /// ]);
9132    /// ```
9133    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9134    where
9135        T: std::iter::IntoIterator<Item = (K, V)>,
9136        K: std::convert::Into<std::string::String>,
9137        V: std::convert::Into<std::string::String>,
9138    {
9139        use std::iter::Iterator;
9140        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9141        self
9142    }
9143
9144    /// Sets the value of [create_time][crate::model::Instance::create_time].
9145    ///
9146    /// # Example
9147    /// ```ignore,no_run
9148    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9149    /// use wkt::Timestamp;
9150    /// let x = Instance::new().set_create_time(Timestamp::default()/* use setters */);
9151    /// ```
9152    pub fn set_create_time<T>(mut self, v: T) -> Self
9153    where
9154        T: std::convert::Into<wkt::Timestamp>,
9155    {
9156        self.create_time = std::option::Option::Some(v.into());
9157        self
9158    }
9159
9160    /// Sets or clears the value of [create_time][crate::model::Instance::create_time].
9161    ///
9162    /// # Example
9163    /// ```ignore,no_run
9164    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9165    /// use wkt::Timestamp;
9166    /// let x = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9167    /// let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);
9168    /// ```
9169    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9170    where
9171        T: std::convert::Into<wkt::Timestamp>,
9172    {
9173        self.create_time = v.map(|x| x.into());
9174        self
9175    }
9176
9177    /// Sets the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9178    ///
9179    /// # Example
9180    /// ```ignore,no_run
9181    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9182    /// let x = Instance::new().set_satisfies_pzs(true);
9183    /// ```
9184    pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
9185    where
9186        T: std::convert::Into<bool>,
9187    {
9188        self.satisfies_pzs = std::option::Option::Some(v.into());
9189        self
9190    }
9191
9192    /// Sets or clears the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9193    ///
9194    /// # Example
9195    /// ```ignore,no_run
9196    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9197    /// let x = Instance::new().set_or_clear_satisfies_pzs(Some(false));
9198    /// let x = Instance::new().set_or_clear_satisfies_pzs(None::<bool>);
9199    /// ```
9200    pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
9201    where
9202        T: std::convert::Into<bool>,
9203    {
9204        self.satisfies_pzs = v.map(|x| x.into());
9205        self
9206    }
9207
9208    /// Sets the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9209    ///
9210    /// # Example
9211    /// ```ignore,no_run
9212    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9213    /// let x = Instance::new().set_satisfies_pzi(true);
9214    /// ```
9215    pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
9216    where
9217        T: std::convert::Into<bool>,
9218    {
9219        self.satisfies_pzi = std::option::Option::Some(v.into());
9220        self
9221    }
9222
9223    /// Sets or clears the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9224    ///
9225    /// # Example
9226    /// ```ignore,no_run
9227    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9228    /// let x = Instance::new().set_or_clear_satisfies_pzi(Some(false));
9229    /// let x = Instance::new().set_or_clear_satisfies_pzi(None::<bool>);
9230    /// ```
9231    pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
9232    where
9233        T: std::convert::Into<bool>,
9234    {
9235        self.satisfies_pzi = v.map(|x| x.into());
9236        self
9237    }
9238
9239    /// Sets the value of [tags][crate::model::Instance::tags].
9240    ///
9241    /// # Example
9242    /// ```ignore,no_run
9243    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9244    /// let x = Instance::new().set_tags([
9245    ///     ("key0", "abc"),
9246    ///     ("key1", "xyz"),
9247    /// ]);
9248    /// ```
9249    pub fn set_tags<T, K, V>(mut self, v: T) -> Self
9250    where
9251        T: std::iter::IntoIterator<Item = (K, V)>,
9252        K: std::convert::Into<std::string::String>,
9253        V: std::convert::Into<std::string::String>,
9254    {
9255        use std::iter::Iterator;
9256        self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9257        self
9258    }
9259}
9260
9261impl wkt::message::Message for Instance {
9262    fn typename() -> &'static str {
9263        "type.googleapis.com/google.bigtable.admin.v2.Instance"
9264    }
9265}
9266
9267/// Defines additional types related to [Instance].
9268pub mod instance {
9269    #[allow(unused_imports)]
9270    use super::*;
9271
9272    /// Possible states of an instance.
9273    ///
9274    /// # Working with unknown values
9275    ///
9276    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9277    /// additional enum variants at any time. Adding new variants is not considered
9278    /// a breaking change. Applications should write their code in anticipation of:
9279    ///
9280    /// - New values appearing in future releases of the client library, **and**
9281    /// - New values received dynamically, without application changes.
9282    ///
9283    /// Please consult the [Working with enums] section in the user guide for some
9284    /// guidelines.
9285    ///
9286    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9287    #[derive(Clone, Debug, PartialEq)]
9288    #[non_exhaustive]
9289    pub enum State {
9290        /// The state of the instance could not be determined.
9291        NotKnown,
9292        /// The instance has been successfully created and can serve requests
9293        /// to its tables.
9294        Ready,
9295        /// The instance is currently being created, and may be destroyed
9296        /// if the creation process encounters an error.
9297        Creating,
9298        /// If set, the enum was initialized with an unknown value.
9299        ///
9300        /// Applications can examine the value using [State::value] or
9301        /// [State::name].
9302        UnknownValue(state::UnknownValue),
9303    }
9304
9305    #[doc(hidden)]
9306    pub mod state {
9307        #[allow(unused_imports)]
9308        use super::*;
9309        #[derive(Clone, Debug, PartialEq)]
9310        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9311    }
9312
9313    impl State {
9314        /// Gets the enum value.
9315        ///
9316        /// Returns `None` if the enum contains an unknown value deserialized from
9317        /// the string representation of enums.
9318        pub fn value(&self) -> std::option::Option<i32> {
9319            match self {
9320                Self::NotKnown => std::option::Option::Some(0),
9321                Self::Ready => std::option::Option::Some(1),
9322                Self::Creating => std::option::Option::Some(2),
9323                Self::UnknownValue(u) => u.0.value(),
9324            }
9325        }
9326
9327        /// Gets the enum value as a string.
9328        ///
9329        /// Returns `None` if the enum contains an unknown value deserialized from
9330        /// the integer representation of enums.
9331        pub fn name(&self) -> std::option::Option<&str> {
9332            match self {
9333                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
9334                Self::Ready => std::option::Option::Some("READY"),
9335                Self::Creating => std::option::Option::Some("CREATING"),
9336                Self::UnknownValue(u) => u.0.name(),
9337            }
9338        }
9339    }
9340
9341    impl std::default::Default for State {
9342        fn default() -> Self {
9343            use std::convert::From;
9344            Self::from(0)
9345        }
9346    }
9347
9348    impl std::fmt::Display for State {
9349        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9350            wkt::internal::display_enum(f, self.name(), self.value())
9351        }
9352    }
9353
9354    impl std::convert::From<i32> for State {
9355        fn from(value: i32) -> Self {
9356            match value {
9357                0 => Self::NotKnown,
9358                1 => Self::Ready,
9359                2 => Self::Creating,
9360                _ => Self::UnknownValue(state::UnknownValue(
9361                    wkt::internal::UnknownEnumValue::Integer(value),
9362                )),
9363            }
9364        }
9365    }
9366
9367    impl std::convert::From<&str> for State {
9368        fn from(value: &str) -> Self {
9369            use std::string::ToString;
9370            match value {
9371                "STATE_NOT_KNOWN" => Self::NotKnown,
9372                "READY" => Self::Ready,
9373                "CREATING" => Self::Creating,
9374                _ => Self::UnknownValue(state::UnknownValue(
9375                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9376                )),
9377            }
9378        }
9379    }
9380
9381    impl serde::ser::Serialize for State {
9382        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9383        where
9384            S: serde::Serializer,
9385        {
9386            match self {
9387                Self::NotKnown => serializer.serialize_i32(0),
9388                Self::Ready => serializer.serialize_i32(1),
9389                Self::Creating => serializer.serialize_i32(2),
9390                Self::UnknownValue(u) => u.0.serialize(serializer),
9391            }
9392        }
9393    }
9394
9395    impl<'de> serde::de::Deserialize<'de> for State {
9396        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9397        where
9398            D: serde::Deserializer<'de>,
9399        {
9400            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9401                ".google.bigtable.admin.v2.Instance.State",
9402            ))
9403        }
9404    }
9405
9406    /// The type of the instance.
9407    ///
9408    /// # Working with unknown values
9409    ///
9410    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9411    /// additional enum variants at any time. Adding new variants is not considered
9412    /// a breaking change. Applications should write their code in anticipation of:
9413    ///
9414    /// - New values appearing in future releases of the client library, **and**
9415    /// - New values received dynamically, without application changes.
9416    ///
9417    /// Please consult the [Working with enums] section in the user guide for some
9418    /// guidelines.
9419    ///
9420    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9421    #[derive(Clone, Debug, PartialEq)]
9422    #[non_exhaustive]
9423    pub enum Type {
9424        /// The type of the instance is unspecified. If set when creating an
9425        /// instance, a `PRODUCTION` instance will be created. If set when updating
9426        /// an instance, the type will be left unchanged.
9427        Unspecified,
9428        /// An instance meant for production use. `serve_nodes` must be set
9429        /// on the cluster.
9430        Production,
9431        /// DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces
9432        /// a higher minimum node count than DEVELOPMENT.
9433        Development,
9434        /// If set, the enum was initialized with an unknown value.
9435        ///
9436        /// Applications can examine the value using [Type::value] or
9437        /// [Type::name].
9438        UnknownValue(r#type::UnknownValue),
9439    }
9440
9441    #[doc(hidden)]
9442    pub mod r#type {
9443        #[allow(unused_imports)]
9444        use super::*;
9445        #[derive(Clone, Debug, PartialEq)]
9446        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9447    }
9448
9449    impl Type {
9450        /// Gets the enum value.
9451        ///
9452        /// Returns `None` if the enum contains an unknown value deserialized from
9453        /// the string representation of enums.
9454        pub fn value(&self) -> std::option::Option<i32> {
9455            match self {
9456                Self::Unspecified => std::option::Option::Some(0),
9457                Self::Production => std::option::Option::Some(1),
9458                Self::Development => std::option::Option::Some(2),
9459                Self::UnknownValue(u) => u.0.value(),
9460            }
9461        }
9462
9463        /// Gets the enum value as a string.
9464        ///
9465        /// Returns `None` if the enum contains an unknown value deserialized from
9466        /// the integer representation of enums.
9467        pub fn name(&self) -> std::option::Option<&str> {
9468            match self {
9469                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
9470                Self::Production => std::option::Option::Some("PRODUCTION"),
9471                Self::Development => std::option::Option::Some("DEVELOPMENT"),
9472                Self::UnknownValue(u) => u.0.name(),
9473            }
9474        }
9475    }
9476
9477    impl std::default::Default for Type {
9478        fn default() -> Self {
9479            use std::convert::From;
9480            Self::from(0)
9481        }
9482    }
9483
9484    impl std::fmt::Display for Type {
9485        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9486            wkt::internal::display_enum(f, self.name(), self.value())
9487        }
9488    }
9489
9490    impl std::convert::From<i32> for Type {
9491        fn from(value: i32) -> Self {
9492            match value {
9493                0 => Self::Unspecified,
9494                1 => Self::Production,
9495                2 => Self::Development,
9496                _ => Self::UnknownValue(r#type::UnknownValue(
9497                    wkt::internal::UnknownEnumValue::Integer(value),
9498                )),
9499            }
9500        }
9501    }
9502
9503    impl std::convert::From<&str> for Type {
9504        fn from(value: &str) -> Self {
9505            use std::string::ToString;
9506            match value {
9507                "TYPE_UNSPECIFIED" => Self::Unspecified,
9508                "PRODUCTION" => Self::Production,
9509                "DEVELOPMENT" => Self::Development,
9510                _ => Self::UnknownValue(r#type::UnknownValue(
9511                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9512                )),
9513            }
9514        }
9515    }
9516
9517    impl serde::ser::Serialize for Type {
9518        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9519        where
9520            S: serde::Serializer,
9521        {
9522            match self {
9523                Self::Unspecified => serializer.serialize_i32(0),
9524                Self::Production => serializer.serialize_i32(1),
9525                Self::Development => serializer.serialize_i32(2),
9526                Self::UnknownValue(u) => u.0.serialize(serializer),
9527            }
9528        }
9529    }
9530
9531    impl<'de> serde::de::Deserialize<'de> for Type {
9532        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9533        where
9534            D: serde::Deserializer<'de>,
9535        {
9536            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
9537                ".google.bigtable.admin.v2.Instance.Type",
9538            ))
9539        }
9540    }
9541}
9542
9543/// The Autoscaling targets for a Cluster. These determine the recommended nodes.
9544#[derive(Clone, Default, PartialEq)]
9545#[non_exhaustive]
9546pub struct AutoscalingTargets {
9547    /// The cpu utilization that the Autoscaler should be trying to achieve.
9548    /// This number is on a scale from 0 (no utilization) to
9549    /// 100 (total utilization), and is limited between 10 and 80, otherwise it
9550    /// will return INVALID_ARGUMENT error.
9551    pub cpu_utilization_percent: i32,
9552
9553    /// The storage utilization that the Autoscaler should be trying to achieve.
9554    /// This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
9555    /// cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster,
9556    /// otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
9557    /// it will be treated as if it were set to the default value: 2560 for SSD,
9558    /// 8192 for HDD.
9559    pub storage_utilization_gib_per_node: i32,
9560
9561    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9562}
9563
9564impl AutoscalingTargets {
9565    pub fn new() -> Self {
9566        std::default::Default::default()
9567    }
9568
9569    /// Sets the value of [cpu_utilization_percent][crate::model::AutoscalingTargets::cpu_utilization_percent].
9570    ///
9571    /// # Example
9572    /// ```ignore,no_run
9573    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9574    /// let x = AutoscalingTargets::new().set_cpu_utilization_percent(42);
9575    /// ```
9576    pub fn set_cpu_utilization_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9577        self.cpu_utilization_percent = v.into();
9578        self
9579    }
9580
9581    /// Sets the value of [storage_utilization_gib_per_node][crate::model::AutoscalingTargets::storage_utilization_gib_per_node].
9582    ///
9583    /// # Example
9584    /// ```ignore,no_run
9585    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9586    /// let x = AutoscalingTargets::new().set_storage_utilization_gib_per_node(42);
9587    /// ```
9588    pub fn set_storage_utilization_gib_per_node<T: std::convert::Into<i32>>(
9589        mut self,
9590        v: T,
9591    ) -> Self {
9592        self.storage_utilization_gib_per_node = v.into();
9593        self
9594    }
9595}
9596
9597impl wkt::message::Message for AutoscalingTargets {
9598    fn typename() -> &'static str {
9599        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingTargets"
9600    }
9601}
9602
9603/// Limits for the number of nodes a Cluster can autoscale up/down to.
9604#[derive(Clone, Default, PartialEq)]
9605#[non_exhaustive]
9606pub struct AutoscalingLimits {
9607    /// Required. Minimum number of nodes to scale down to.
9608    pub min_serve_nodes: i32,
9609
9610    /// Required. Maximum number of nodes to scale up to.
9611    pub max_serve_nodes: i32,
9612
9613    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9614}
9615
9616impl AutoscalingLimits {
9617    pub fn new() -> Self {
9618        std::default::Default::default()
9619    }
9620
9621    /// Sets the value of [min_serve_nodes][crate::model::AutoscalingLimits::min_serve_nodes].
9622    ///
9623    /// # Example
9624    /// ```ignore,no_run
9625    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
9626    /// let x = AutoscalingLimits::new().set_min_serve_nodes(42);
9627    /// ```
9628    pub fn set_min_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9629        self.min_serve_nodes = v.into();
9630        self
9631    }
9632
9633    /// Sets the value of [max_serve_nodes][crate::model::AutoscalingLimits::max_serve_nodes].
9634    ///
9635    /// # Example
9636    /// ```ignore,no_run
9637    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
9638    /// let x = AutoscalingLimits::new().set_max_serve_nodes(42);
9639    /// ```
9640    pub fn set_max_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9641        self.max_serve_nodes = v.into();
9642        self
9643    }
9644}
9645
9646impl wkt::message::Message for AutoscalingLimits {
9647    fn typename() -> &'static str {
9648        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingLimits"
9649    }
9650}
9651
9652/// A resizable group of nodes in a particular cloud location, capable
9653/// of serving all [Tables][google.bigtable.admin.v2.Table] in the parent
9654/// [Instance][google.bigtable.admin.v2.Instance].
9655///
9656/// [google.bigtable.admin.v2.Instance]: crate::model::Instance
9657/// [google.bigtable.admin.v2.Table]: crate::model::Table
9658#[derive(Clone, Default, PartialEq)]
9659#[non_exhaustive]
9660pub struct Cluster {
9661    /// The unique name of the cluster. Values are of the form
9662    /// `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
9663    pub name: std::string::String,
9664
9665    /// Immutable. The location where this cluster's nodes and storage reside. For
9666    /// best performance, clients should be located as close as possible to this
9667    /// cluster. Currently only zones are supported, so values should be of the
9668    /// form `projects/{project}/locations/{zone}`.
9669    pub location: std::string::String,
9670
9671    /// Output only. The current state of the cluster.
9672    pub state: crate::model::cluster::State,
9673
9674    /// The number of nodes in the cluster. If no value is set,
9675    /// Cloud Bigtable automatically allocates nodes based on your data footprint
9676    /// and optimized for 50% storage utilization.
9677    pub serve_nodes: i32,
9678
9679    /// Immutable. The node scaling factor of this cluster.
9680    pub node_scaling_factor: crate::model::cluster::NodeScalingFactor,
9681
9682    /// Immutable. The type of storage used by this cluster to serve its
9683    /// parent instance's tables, unless explicitly overridden.
9684    pub default_storage_type: crate::model::StorageType,
9685
9686    /// Immutable. The encryption configuration for CMEK-protected clusters.
9687    pub encryption_config: std::option::Option<crate::model::cluster::EncryptionConfig>,
9688
9689    pub config: std::option::Option<crate::model::cluster::Config>,
9690
9691    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9692}
9693
9694impl Cluster {
9695    pub fn new() -> Self {
9696        std::default::Default::default()
9697    }
9698
9699    /// Sets the value of [name][crate::model::Cluster::name].
9700    ///
9701    /// # Example
9702    /// ```ignore,no_run
9703    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9704    /// let x = Cluster::new().set_name("example");
9705    /// ```
9706    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9707        self.name = v.into();
9708        self
9709    }
9710
9711    /// Sets the value of [location][crate::model::Cluster::location].
9712    ///
9713    /// # Example
9714    /// ```ignore,no_run
9715    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9716    /// let x = Cluster::new().set_location("example");
9717    /// ```
9718    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9719        self.location = v.into();
9720        self
9721    }
9722
9723    /// Sets the value of [state][crate::model::Cluster::state].
9724    ///
9725    /// # Example
9726    /// ```ignore,no_run
9727    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9728    /// use google_cloud_bigtable_admin_v2::model::cluster::State;
9729    /// let x0 = Cluster::new().set_state(State::Ready);
9730    /// let x1 = Cluster::new().set_state(State::Creating);
9731    /// let x2 = Cluster::new().set_state(State::Resizing);
9732    /// ```
9733    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
9734        self.state = v.into();
9735        self
9736    }
9737
9738    /// Sets the value of [serve_nodes][crate::model::Cluster::serve_nodes].
9739    ///
9740    /// # Example
9741    /// ```ignore,no_run
9742    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9743    /// let x = Cluster::new().set_serve_nodes(42);
9744    /// ```
9745    pub fn set_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9746        self.serve_nodes = v.into();
9747        self
9748    }
9749
9750    /// Sets the value of [node_scaling_factor][crate::model::Cluster::node_scaling_factor].
9751    ///
9752    /// # Example
9753    /// ```ignore,no_run
9754    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9755    /// use google_cloud_bigtable_admin_v2::model::cluster::NodeScalingFactor;
9756    /// let x0 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor1X);
9757    /// let x1 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor2X);
9758    /// ```
9759    pub fn set_node_scaling_factor<
9760        T: std::convert::Into<crate::model::cluster::NodeScalingFactor>,
9761    >(
9762        mut self,
9763        v: T,
9764    ) -> Self {
9765        self.node_scaling_factor = v.into();
9766        self
9767    }
9768
9769    /// Sets the value of [default_storage_type][crate::model::Cluster::default_storage_type].
9770    ///
9771    /// # Example
9772    /// ```ignore,no_run
9773    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9774    /// use google_cloud_bigtable_admin_v2::model::StorageType;
9775    /// let x0 = Cluster::new().set_default_storage_type(StorageType::Ssd);
9776    /// let x1 = Cluster::new().set_default_storage_type(StorageType::Hdd);
9777    /// ```
9778    pub fn set_default_storage_type<T: std::convert::Into<crate::model::StorageType>>(
9779        mut self,
9780        v: T,
9781    ) -> Self {
9782        self.default_storage_type = v.into();
9783        self
9784    }
9785
9786    /// Sets the value of [encryption_config][crate::model::Cluster::encryption_config].
9787    ///
9788    /// # Example
9789    /// ```ignore,no_run
9790    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9791    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
9792    /// let x = Cluster::new().set_encryption_config(EncryptionConfig::default()/* use setters */);
9793    /// ```
9794    pub fn set_encryption_config<T>(mut self, v: T) -> Self
9795    where
9796        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
9797    {
9798        self.encryption_config = std::option::Option::Some(v.into());
9799        self
9800    }
9801
9802    /// Sets or clears the value of [encryption_config][crate::model::Cluster::encryption_config].
9803    ///
9804    /// # Example
9805    /// ```ignore,no_run
9806    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9807    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
9808    /// let x = Cluster::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
9809    /// let x = Cluster::new().set_or_clear_encryption_config(None::<EncryptionConfig>);
9810    /// ```
9811    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
9812    where
9813        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
9814    {
9815        self.encryption_config = v.map(|x| x.into());
9816        self
9817    }
9818
9819    /// Sets the value of [config][crate::model::Cluster::config].
9820    ///
9821    /// Note that all the setters affecting `config` are mutually
9822    /// exclusive.
9823    ///
9824    /// # Example
9825    /// ```ignore,no_run
9826    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9827    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
9828    /// let x = Cluster::new().set_config(Some(
9829    ///     google_cloud_bigtable_admin_v2::model::cluster::Config::ClusterConfig(ClusterConfig::default().into())));
9830    /// ```
9831    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::cluster::Config>>>(
9832        mut self,
9833        v: T,
9834    ) -> Self {
9835        self.config = v.into();
9836        self
9837    }
9838
9839    /// The value of [config][crate::model::Cluster::config]
9840    /// if it holds a `ClusterConfig`, `None` if the field is not set or
9841    /// holds a different branch.
9842    pub fn cluster_config(
9843        &self,
9844    ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::ClusterConfig>> {
9845        #[allow(unreachable_patterns)]
9846        self.config.as_ref().and_then(|v| match v {
9847            crate::model::cluster::Config::ClusterConfig(v) => std::option::Option::Some(v),
9848            _ => std::option::Option::None,
9849        })
9850    }
9851
9852    /// Sets the value of [config][crate::model::Cluster::config]
9853    /// to hold a `ClusterConfig`.
9854    ///
9855    /// Note that all the setters affecting `config` are
9856    /// mutually exclusive.
9857    ///
9858    /// # Example
9859    /// ```ignore,no_run
9860    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9861    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
9862    /// let x = Cluster::new().set_cluster_config(ClusterConfig::default()/* use setters */);
9863    /// assert!(x.cluster_config().is_some());
9864    /// ```
9865    pub fn set_cluster_config<
9866        T: std::convert::Into<std::boxed::Box<crate::model::cluster::ClusterConfig>>,
9867    >(
9868        mut self,
9869        v: T,
9870    ) -> Self {
9871        self.config =
9872            std::option::Option::Some(crate::model::cluster::Config::ClusterConfig(v.into()));
9873        self
9874    }
9875}
9876
9877impl wkt::message::Message for Cluster {
9878    fn typename() -> &'static str {
9879        "type.googleapis.com/google.bigtable.admin.v2.Cluster"
9880    }
9881}
9882
9883/// Defines additional types related to [Cluster].
9884pub mod cluster {
9885    #[allow(unused_imports)]
9886    use super::*;
9887
9888    /// Autoscaling config for a cluster.
9889    #[derive(Clone, Default, PartialEq)]
9890    #[non_exhaustive]
9891    pub struct ClusterAutoscalingConfig {
9892        /// Required. Autoscaling limits for this cluster.
9893        pub autoscaling_limits: std::option::Option<crate::model::AutoscalingLimits>,
9894
9895        /// Required. Autoscaling targets for this cluster.
9896        pub autoscaling_targets: std::option::Option<crate::model::AutoscalingTargets>,
9897
9898        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9899    }
9900
9901    impl ClusterAutoscalingConfig {
9902        pub fn new() -> Self {
9903            std::default::Default::default()
9904        }
9905
9906        /// Sets the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
9907        ///
9908        /// # Example
9909        /// ```ignore,no_run
9910        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
9911        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
9912        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_limits(AutoscalingLimits::default()/* use setters */);
9913        /// ```
9914        pub fn set_autoscaling_limits<T>(mut self, v: T) -> Self
9915        where
9916            T: std::convert::Into<crate::model::AutoscalingLimits>,
9917        {
9918            self.autoscaling_limits = std::option::Option::Some(v.into());
9919            self
9920        }
9921
9922        /// Sets or clears the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
9923        ///
9924        /// # Example
9925        /// ```ignore,no_run
9926        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
9927        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
9928        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(Some(AutoscalingLimits::default()/* use setters */));
9929        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(None::<AutoscalingLimits>);
9930        /// ```
9931        pub fn set_or_clear_autoscaling_limits<T>(mut self, v: std::option::Option<T>) -> Self
9932        where
9933            T: std::convert::Into<crate::model::AutoscalingLimits>,
9934        {
9935            self.autoscaling_limits = v.map(|x| x.into());
9936            self
9937        }
9938
9939        /// Sets the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
9940        ///
9941        /// # Example
9942        /// ```ignore,no_run
9943        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
9944        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9945        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_targets(AutoscalingTargets::default()/* use setters */);
9946        /// ```
9947        pub fn set_autoscaling_targets<T>(mut self, v: T) -> Self
9948        where
9949            T: std::convert::Into<crate::model::AutoscalingTargets>,
9950        {
9951            self.autoscaling_targets = std::option::Option::Some(v.into());
9952            self
9953        }
9954
9955        /// Sets or clears the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
9956        ///
9957        /// # Example
9958        /// ```ignore,no_run
9959        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
9960        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9961        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(Some(AutoscalingTargets::default()/* use setters */));
9962        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(None::<AutoscalingTargets>);
9963        /// ```
9964        pub fn set_or_clear_autoscaling_targets<T>(mut self, v: std::option::Option<T>) -> Self
9965        where
9966            T: std::convert::Into<crate::model::AutoscalingTargets>,
9967        {
9968            self.autoscaling_targets = v.map(|x| x.into());
9969            self
9970        }
9971    }
9972
9973    impl wkt::message::Message for ClusterAutoscalingConfig {
9974        fn typename() -> &'static str {
9975            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig"
9976        }
9977    }
9978
9979    /// Configuration for a cluster.
9980    #[derive(Clone, Default, PartialEq)]
9981    #[non_exhaustive]
9982    pub struct ClusterConfig {
9983        /// Autoscaling configuration for this cluster.
9984        pub cluster_autoscaling_config:
9985            std::option::Option<crate::model::cluster::ClusterAutoscalingConfig>,
9986
9987        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9988    }
9989
9990    impl ClusterConfig {
9991        pub fn new() -> Self {
9992            std::default::Default::default()
9993        }
9994
9995        /// Sets the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
9996        ///
9997        /// # Example
9998        /// ```ignore,no_run
9999        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10000        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10001        /// let x = ClusterConfig::new().set_cluster_autoscaling_config(ClusterAutoscalingConfig::default()/* use setters */);
10002        /// ```
10003        pub fn set_cluster_autoscaling_config<T>(mut self, v: T) -> Self
10004        where
10005            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10006        {
10007            self.cluster_autoscaling_config = std::option::Option::Some(v.into());
10008            self
10009        }
10010
10011        /// Sets or clears the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
10012        ///
10013        /// # Example
10014        /// ```ignore,no_run
10015        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10016        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10017        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(Some(ClusterAutoscalingConfig::default()/* use setters */));
10018        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(None::<ClusterAutoscalingConfig>);
10019        /// ```
10020        pub fn set_or_clear_cluster_autoscaling_config<T>(
10021            mut self,
10022            v: std::option::Option<T>,
10023        ) -> Self
10024        where
10025            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10026        {
10027            self.cluster_autoscaling_config = v.map(|x| x.into());
10028            self
10029        }
10030    }
10031
10032    impl wkt::message::Message for ClusterConfig {
10033        fn typename() -> &'static str {
10034            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterConfig"
10035        }
10036    }
10037
10038    /// Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected
10039    /// cluster.
10040    #[derive(Clone, Default, PartialEq)]
10041    #[non_exhaustive]
10042    pub struct EncryptionConfig {
10043        /// Describes the Cloud KMS encryption key that will be used to protect the
10044        /// destination Bigtable cluster. The requirements for this key are:
10045        ///
10046        /// 1. The Cloud Bigtable service account associated with the project that
10047        ///    contains this cluster must be granted the
10048        ///    `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
10049        /// 1. Only regional keys can be used and the region of the CMEK key must
10050        ///    match the region of the cluster.
10051        ///    Values are of the form
10052        ///    `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
10053        pub kms_key_name: std::string::String,
10054
10055        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10056    }
10057
10058    impl EncryptionConfig {
10059        pub fn new() -> Self {
10060            std::default::Default::default()
10061        }
10062
10063        /// Sets the value of [kms_key_name][crate::model::cluster::EncryptionConfig::kms_key_name].
10064        ///
10065        /// # Example
10066        /// ```ignore,no_run
10067        /// # use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10068        /// let x = EncryptionConfig::new().set_kms_key_name("example");
10069        /// ```
10070        pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(
10071            mut self,
10072            v: T,
10073        ) -> Self {
10074            self.kms_key_name = v.into();
10075            self
10076        }
10077    }
10078
10079    impl wkt::message::Message for EncryptionConfig {
10080        fn typename() -> &'static str {
10081            "type.googleapis.com/google.bigtable.admin.v2.Cluster.EncryptionConfig"
10082        }
10083    }
10084
10085    /// Possible states of a cluster.
10086    ///
10087    /// # Working with unknown values
10088    ///
10089    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10090    /// additional enum variants at any time. Adding new variants is not considered
10091    /// a breaking change. Applications should write their code in anticipation of:
10092    ///
10093    /// - New values appearing in future releases of the client library, **and**
10094    /// - New values received dynamically, without application changes.
10095    ///
10096    /// Please consult the [Working with enums] section in the user guide for some
10097    /// guidelines.
10098    ///
10099    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10100    #[derive(Clone, Debug, PartialEq)]
10101    #[non_exhaustive]
10102    pub enum State {
10103        /// The state of the cluster could not be determined.
10104        NotKnown,
10105        /// The cluster has been successfully created and is ready to serve requests.
10106        Ready,
10107        /// The cluster is currently being created, and may be destroyed
10108        /// if the creation process encounters an error.
10109        /// A cluster may not be able to serve requests while being created.
10110        Creating,
10111        /// The cluster is currently being resized, and may revert to its previous
10112        /// node count if the process encounters an error.
10113        /// A cluster is still capable of serving requests while being resized,
10114        /// but may exhibit performance as if its number of allocated nodes is
10115        /// between the starting and requested states.
10116        Resizing,
10117        /// The cluster has no backing nodes. The data (tables) still
10118        /// exist, but no operations can be performed on the cluster.
10119        Disabled,
10120        /// If set, the enum was initialized with an unknown value.
10121        ///
10122        /// Applications can examine the value using [State::value] or
10123        /// [State::name].
10124        UnknownValue(state::UnknownValue),
10125    }
10126
10127    #[doc(hidden)]
10128    pub mod state {
10129        #[allow(unused_imports)]
10130        use super::*;
10131        #[derive(Clone, Debug, PartialEq)]
10132        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10133    }
10134
10135    impl State {
10136        /// Gets the enum value.
10137        ///
10138        /// Returns `None` if the enum contains an unknown value deserialized from
10139        /// the string representation of enums.
10140        pub fn value(&self) -> std::option::Option<i32> {
10141            match self {
10142                Self::NotKnown => std::option::Option::Some(0),
10143                Self::Ready => std::option::Option::Some(1),
10144                Self::Creating => std::option::Option::Some(2),
10145                Self::Resizing => std::option::Option::Some(3),
10146                Self::Disabled => std::option::Option::Some(4),
10147                Self::UnknownValue(u) => u.0.value(),
10148            }
10149        }
10150
10151        /// Gets the enum value as a string.
10152        ///
10153        /// Returns `None` if the enum contains an unknown value deserialized from
10154        /// the integer representation of enums.
10155        pub fn name(&self) -> std::option::Option<&str> {
10156            match self {
10157                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
10158                Self::Ready => std::option::Option::Some("READY"),
10159                Self::Creating => std::option::Option::Some("CREATING"),
10160                Self::Resizing => std::option::Option::Some("RESIZING"),
10161                Self::Disabled => std::option::Option::Some("DISABLED"),
10162                Self::UnknownValue(u) => u.0.name(),
10163            }
10164        }
10165    }
10166
10167    impl std::default::Default for State {
10168        fn default() -> Self {
10169            use std::convert::From;
10170            Self::from(0)
10171        }
10172    }
10173
10174    impl std::fmt::Display for State {
10175        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10176            wkt::internal::display_enum(f, self.name(), self.value())
10177        }
10178    }
10179
10180    impl std::convert::From<i32> for State {
10181        fn from(value: i32) -> Self {
10182            match value {
10183                0 => Self::NotKnown,
10184                1 => Self::Ready,
10185                2 => Self::Creating,
10186                3 => Self::Resizing,
10187                4 => Self::Disabled,
10188                _ => Self::UnknownValue(state::UnknownValue(
10189                    wkt::internal::UnknownEnumValue::Integer(value),
10190                )),
10191            }
10192        }
10193    }
10194
10195    impl std::convert::From<&str> for State {
10196        fn from(value: &str) -> Self {
10197            use std::string::ToString;
10198            match value {
10199                "STATE_NOT_KNOWN" => Self::NotKnown,
10200                "READY" => Self::Ready,
10201                "CREATING" => Self::Creating,
10202                "RESIZING" => Self::Resizing,
10203                "DISABLED" => Self::Disabled,
10204                _ => Self::UnknownValue(state::UnknownValue(
10205                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10206                )),
10207            }
10208        }
10209    }
10210
10211    impl serde::ser::Serialize for State {
10212        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10213        where
10214            S: serde::Serializer,
10215        {
10216            match self {
10217                Self::NotKnown => serializer.serialize_i32(0),
10218                Self::Ready => serializer.serialize_i32(1),
10219                Self::Creating => serializer.serialize_i32(2),
10220                Self::Resizing => serializer.serialize_i32(3),
10221                Self::Disabled => serializer.serialize_i32(4),
10222                Self::UnknownValue(u) => u.0.serialize(serializer),
10223            }
10224        }
10225    }
10226
10227    impl<'de> serde::de::Deserialize<'de> for State {
10228        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10229        where
10230            D: serde::Deserializer<'de>,
10231        {
10232            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10233                ".google.bigtable.admin.v2.Cluster.State",
10234            ))
10235        }
10236    }
10237
10238    /// Possible node scaling factors of the clusters. Node scaling delivers better
10239    /// latency and more throughput by removing node boundaries.
10240    ///
10241    /// # Working with unknown values
10242    ///
10243    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10244    /// additional enum variants at any time. Adding new variants is not considered
10245    /// a breaking change. Applications should write their code in anticipation of:
10246    ///
10247    /// - New values appearing in future releases of the client library, **and**
10248    /// - New values received dynamically, without application changes.
10249    ///
10250    /// Please consult the [Working with enums] section in the user guide for some
10251    /// guidelines.
10252    ///
10253    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10254    #[derive(Clone, Debug, PartialEq)]
10255    #[non_exhaustive]
10256    pub enum NodeScalingFactor {
10257        /// No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X.
10258        Unspecified,
10259        /// The cluster is running with a scaling factor of 1.
10260        NodeScalingFactor1X,
10261        /// The cluster is running with a scaling factor of 2.
10262        /// All node count values must be in increments of 2 with this scaling factor
10263        /// enabled, otherwise an INVALID_ARGUMENT error will be returned.
10264        NodeScalingFactor2X,
10265        /// If set, the enum was initialized with an unknown value.
10266        ///
10267        /// Applications can examine the value using [NodeScalingFactor::value] or
10268        /// [NodeScalingFactor::name].
10269        UnknownValue(node_scaling_factor::UnknownValue),
10270    }
10271
10272    #[doc(hidden)]
10273    pub mod node_scaling_factor {
10274        #[allow(unused_imports)]
10275        use super::*;
10276        #[derive(Clone, Debug, PartialEq)]
10277        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10278    }
10279
10280    impl NodeScalingFactor {
10281        /// Gets the enum value.
10282        ///
10283        /// Returns `None` if the enum contains an unknown value deserialized from
10284        /// the string representation of enums.
10285        pub fn value(&self) -> std::option::Option<i32> {
10286            match self {
10287                Self::Unspecified => std::option::Option::Some(0),
10288                Self::NodeScalingFactor1X => std::option::Option::Some(1),
10289                Self::NodeScalingFactor2X => std::option::Option::Some(2),
10290                Self::UnknownValue(u) => u.0.value(),
10291            }
10292        }
10293
10294        /// Gets the enum value as a string.
10295        ///
10296        /// Returns `None` if the enum contains an unknown value deserialized from
10297        /// the integer representation of enums.
10298        pub fn name(&self) -> std::option::Option<&str> {
10299            match self {
10300                Self::Unspecified => std::option::Option::Some("NODE_SCALING_FACTOR_UNSPECIFIED"),
10301                Self::NodeScalingFactor1X => std::option::Option::Some("NODE_SCALING_FACTOR_1X"),
10302                Self::NodeScalingFactor2X => std::option::Option::Some("NODE_SCALING_FACTOR_2X"),
10303                Self::UnknownValue(u) => u.0.name(),
10304            }
10305        }
10306    }
10307
10308    impl std::default::Default for NodeScalingFactor {
10309        fn default() -> Self {
10310            use std::convert::From;
10311            Self::from(0)
10312        }
10313    }
10314
10315    impl std::fmt::Display for NodeScalingFactor {
10316        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10317            wkt::internal::display_enum(f, self.name(), self.value())
10318        }
10319    }
10320
10321    impl std::convert::From<i32> for NodeScalingFactor {
10322        fn from(value: i32) -> Self {
10323            match value {
10324                0 => Self::Unspecified,
10325                1 => Self::NodeScalingFactor1X,
10326                2 => Self::NodeScalingFactor2X,
10327                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
10328                    wkt::internal::UnknownEnumValue::Integer(value),
10329                )),
10330            }
10331        }
10332    }
10333
10334    impl std::convert::From<&str> for NodeScalingFactor {
10335        fn from(value: &str) -> Self {
10336            use std::string::ToString;
10337            match value {
10338                "NODE_SCALING_FACTOR_UNSPECIFIED" => Self::Unspecified,
10339                "NODE_SCALING_FACTOR_1X" => Self::NodeScalingFactor1X,
10340                "NODE_SCALING_FACTOR_2X" => Self::NodeScalingFactor2X,
10341                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
10342                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10343                )),
10344            }
10345        }
10346    }
10347
10348    impl serde::ser::Serialize for NodeScalingFactor {
10349        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10350        where
10351            S: serde::Serializer,
10352        {
10353            match self {
10354                Self::Unspecified => serializer.serialize_i32(0),
10355                Self::NodeScalingFactor1X => serializer.serialize_i32(1),
10356                Self::NodeScalingFactor2X => serializer.serialize_i32(2),
10357                Self::UnknownValue(u) => u.0.serialize(serializer),
10358            }
10359        }
10360    }
10361
10362    impl<'de> serde::de::Deserialize<'de> for NodeScalingFactor {
10363        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10364        where
10365            D: serde::Deserializer<'de>,
10366        {
10367            deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeScalingFactor>::new(
10368                ".google.bigtable.admin.v2.Cluster.NodeScalingFactor",
10369            ))
10370        }
10371    }
10372
10373    #[derive(Clone, Debug, PartialEq)]
10374    #[non_exhaustive]
10375    pub enum Config {
10376        /// Configuration for this cluster.
10377        ClusterConfig(std::boxed::Box<crate::model::cluster::ClusterConfig>),
10378    }
10379}
10380
10381/// A configuration object describing how Cloud Bigtable should treat traffic
10382/// from a particular end user application.
10383#[derive(Clone, Default, PartialEq)]
10384#[non_exhaustive]
10385pub struct AppProfile {
10386    /// The unique name of the app profile. Values are of the form
10387    /// `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
10388    pub name: std::string::String,
10389
10390    /// Strongly validated etag for optimistic concurrency control. Preserve the
10391    /// value returned from `GetAppProfile` when calling `UpdateAppProfile` to
10392    /// fail the request if there has been a modification in the mean time. The
10393    /// `update_mask` of the request need not include `etag` for this protection
10394    /// to apply.
10395    /// See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
10396    /// [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
10397    /// details.
10398    pub etag: std::string::String,
10399
10400    /// Long form description of the use case for this AppProfile.
10401    pub description: std::string::String,
10402
10403    /// The routing policy for all read/write requests that use this app profile.
10404    /// A value must be explicitly set.
10405    pub routing_policy: std::option::Option<crate::model::app_profile::RoutingPolicy>,
10406
10407    /// Options for isolating this app profile's traffic from other use cases.
10408    pub isolation: std::option::Option<crate::model::app_profile::Isolation>,
10409
10410    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10411}
10412
10413impl AppProfile {
10414    pub fn new() -> Self {
10415        std::default::Default::default()
10416    }
10417
10418    /// Sets the value of [name][crate::model::AppProfile::name].
10419    ///
10420    /// # Example
10421    /// ```ignore,no_run
10422    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10423    /// let x = AppProfile::new().set_name("example");
10424    /// ```
10425    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10426        self.name = v.into();
10427        self
10428    }
10429
10430    /// Sets the value of [etag][crate::model::AppProfile::etag].
10431    ///
10432    /// # Example
10433    /// ```ignore,no_run
10434    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10435    /// let x = AppProfile::new().set_etag("example");
10436    /// ```
10437    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10438        self.etag = v.into();
10439        self
10440    }
10441
10442    /// Sets the value of [description][crate::model::AppProfile::description].
10443    ///
10444    /// # Example
10445    /// ```ignore,no_run
10446    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10447    /// let x = AppProfile::new().set_description("example");
10448    /// ```
10449    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10450        self.description = v.into();
10451        self
10452    }
10453
10454    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy].
10455    ///
10456    /// Note that all the setters affecting `routing_policy` are mutually
10457    /// exclusive.
10458    ///
10459    /// # Example
10460    /// ```ignore,no_run
10461    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10462    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10463    /// let x = AppProfile::new().set_routing_policy(Some(
10464    ///     google_cloud_bigtable_admin_v2::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(MultiClusterRoutingUseAny::default().into())));
10465    /// ```
10466    pub fn set_routing_policy<
10467        T: std::convert::Into<std::option::Option<crate::model::app_profile::RoutingPolicy>>,
10468    >(
10469        mut self,
10470        v: T,
10471    ) -> Self {
10472        self.routing_policy = v.into();
10473        self
10474    }
10475
10476    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
10477    /// if it holds a `MultiClusterRoutingUseAny`, `None` if the field is not set or
10478    /// holds a different branch.
10479    pub fn multi_cluster_routing_use_any(
10480        &self,
10481    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>
10482    {
10483        #[allow(unreachable_patterns)]
10484        self.routing_policy.as_ref().and_then(|v| match v {
10485            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v) => {
10486                std::option::Option::Some(v)
10487            }
10488            _ => std::option::Option::None,
10489        })
10490    }
10491
10492    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
10493    /// to hold a `MultiClusterRoutingUseAny`.
10494    ///
10495    /// Note that all the setters affecting `routing_policy` are
10496    /// mutually exclusive.
10497    ///
10498    /// # Example
10499    /// ```ignore,no_run
10500    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10501    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10502    /// let x = AppProfile::new().set_multi_cluster_routing_use_any(MultiClusterRoutingUseAny::default()/* use setters */);
10503    /// assert!(x.multi_cluster_routing_use_any().is_some());
10504    /// assert!(x.single_cluster_routing().is_none());
10505    /// ```
10506    pub fn set_multi_cluster_routing_use_any<
10507        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>,
10508    >(
10509        mut self,
10510        v: T,
10511    ) -> Self {
10512        self.routing_policy = std::option::Option::Some(
10513            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v.into()),
10514        );
10515        self
10516    }
10517
10518    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
10519    /// if it holds a `SingleClusterRouting`, `None` if the field is not set or
10520    /// holds a different branch.
10521    pub fn single_cluster_routing(
10522        &self,
10523    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>
10524    {
10525        #[allow(unreachable_patterns)]
10526        self.routing_policy.as_ref().and_then(|v| match v {
10527            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v) => {
10528                std::option::Option::Some(v)
10529            }
10530            _ => std::option::Option::None,
10531        })
10532    }
10533
10534    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
10535    /// to hold a `SingleClusterRouting`.
10536    ///
10537    /// Note that all the setters affecting `routing_policy` are
10538    /// mutually exclusive.
10539    ///
10540    /// # Example
10541    /// ```ignore,no_run
10542    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10543    /// use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
10544    /// let x = AppProfile::new().set_single_cluster_routing(SingleClusterRouting::default()/* use setters */);
10545    /// assert!(x.single_cluster_routing().is_some());
10546    /// assert!(x.multi_cluster_routing_use_any().is_none());
10547    /// ```
10548    pub fn set_single_cluster_routing<
10549        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>,
10550    >(
10551        mut self,
10552        v: T,
10553    ) -> Self {
10554        self.routing_policy = std::option::Option::Some(
10555            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v.into()),
10556        );
10557        self
10558    }
10559
10560    /// Sets the value of [isolation][crate::model::AppProfile::isolation].
10561    ///
10562    /// Note that all the setters affecting `isolation` are mutually
10563    /// exclusive.
10564    ///
10565    /// # Example
10566    /// ```ignore,no_run
10567    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10568    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
10569    /// let x = AppProfile::new().set_isolation(Some(
10570    ///     google_cloud_bigtable_admin_v2::model::app_profile::Isolation::StandardIsolation(StandardIsolation::default().into())));
10571    /// ```
10572    pub fn set_isolation<
10573        T: std::convert::Into<std::option::Option<crate::model::app_profile::Isolation>>,
10574    >(
10575        mut self,
10576        v: T,
10577    ) -> Self {
10578        self.isolation = v.into();
10579        self
10580    }
10581
10582    /// The value of [isolation][crate::model::AppProfile::isolation]
10583    /// if it holds a `Priority`, `None` if the field is not set or
10584    /// holds a different branch.
10585    #[deprecated]
10586    pub fn priority(&self) -> std::option::Option<&crate::model::app_profile::Priority> {
10587        #[allow(unreachable_patterns)]
10588        self.isolation.as_ref().and_then(|v| match v {
10589            crate::model::app_profile::Isolation::Priority(v) => std::option::Option::Some(v),
10590            _ => std::option::Option::None,
10591        })
10592    }
10593
10594    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
10595    /// to hold a `Priority`.
10596    ///
10597    /// Note that all the setters affecting `isolation` are
10598    /// mutually exclusive.
10599    ///
10600    /// # Example
10601    /// ```ignore,no_run
10602    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10603    /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
10604    /// let x0 = AppProfile::new().set_priority(Priority::Low);
10605    /// let x1 = AppProfile::new().set_priority(Priority::Medium);
10606    /// let x2 = AppProfile::new().set_priority(Priority::High);
10607    /// assert!(x0.priority().is_some());
10608    /// assert!(x0.standard_isolation().is_none());
10609    /// assert!(x0.data_boost_isolation_read_only().is_none());
10610    /// assert!(x1.priority().is_some());
10611    /// assert!(x1.standard_isolation().is_none());
10612    /// assert!(x1.data_boost_isolation_read_only().is_none());
10613    /// assert!(x2.priority().is_some());
10614    /// assert!(x2.standard_isolation().is_none());
10615    /// assert!(x2.data_boost_isolation_read_only().is_none());
10616    /// ```
10617    #[deprecated]
10618    pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
10619        mut self,
10620        v: T,
10621    ) -> Self {
10622        self.isolation =
10623            std::option::Option::Some(crate::model::app_profile::Isolation::Priority(v.into()));
10624        self
10625    }
10626
10627    /// The value of [isolation][crate::model::AppProfile::isolation]
10628    /// if it holds a `StandardIsolation`, `None` if the field is not set or
10629    /// holds a different branch.
10630    pub fn standard_isolation(
10631        &self,
10632    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::StandardIsolation>> {
10633        #[allow(unreachable_patterns)]
10634        self.isolation.as_ref().and_then(|v| match v {
10635            crate::model::app_profile::Isolation::StandardIsolation(v) => {
10636                std::option::Option::Some(v)
10637            }
10638            _ => std::option::Option::None,
10639        })
10640    }
10641
10642    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
10643    /// to hold a `StandardIsolation`.
10644    ///
10645    /// Note that all the setters affecting `isolation` are
10646    /// mutually exclusive.
10647    ///
10648    /// # Example
10649    /// ```ignore,no_run
10650    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10651    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
10652    /// let x = AppProfile::new().set_standard_isolation(StandardIsolation::default()/* use setters */);
10653    /// assert!(x.standard_isolation().is_some());
10654    /// assert!(x.priority().is_none());
10655    /// assert!(x.data_boost_isolation_read_only().is_none());
10656    /// ```
10657    pub fn set_standard_isolation<
10658        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::StandardIsolation>>,
10659    >(
10660        mut self,
10661        v: T,
10662    ) -> Self {
10663        self.isolation = std::option::Option::Some(
10664            crate::model::app_profile::Isolation::StandardIsolation(v.into()),
10665        );
10666        self
10667    }
10668
10669    /// The value of [isolation][crate::model::AppProfile::isolation]
10670    /// if it holds a `DataBoostIsolationReadOnly`, `None` if the field is not set or
10671    /// holds a different branch.
10672    pub fn data_boost_isolation_read_only(
10673        &self,
10674    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>
10675    {
10676        #[allow(unreachable_patterns)]
10677        self.isolation.as_ref().and_then(|v| match v {
10678            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v) => {
10679                std::option::Option::Some(v)
10680            }
10681            _ => std::option::Option::None,
10682        })
10683    }
10684
10685    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
10686    /// to hold a `DataBoostIsolationReadOnly`.
10687    ///
10688    /// Note that all the setters affecting `isolation` are
10689    /// mutually exclusive.
10690    ///
10691    /// # Example
10692    /// ```ignore,no_run
10693    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10694    /// use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
10695    /// let x = AppProfile::new().set_data_boost_isolation_read_only(DataBoostIsolationReadOnly::default()/* use setters */);
10696    /// assert!(x.data_boost_isolation_read_only().is_some());
10697    /// assert!(x.priority().is_none());
10698    /// assert!(x.standard_isolation().is_none());
10699    /// ```
10700    pub fn set_data_boost_isolation_read_only<
10701        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>,
10702    >(
10703        mut self,
10704        v: T,
10705    ) -> Self {
10706        self.isolation = std::option::Option::Some(
10707            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v.into()),
10708        );
10709        self
10710    }
10711}
10712
10713impl wkt::message::Message for AppProfile {
10714    fn typename() -> &'static str {
10715        "type.googleapis.com/google.bigtable.admin.v2.AppProfile"
10716    }
10717}
10718
10719/// Defines additional types related to [AppProfile].
10720pub mod app_profile {
10721    #[allow(unused_imports)]
10722    use super::*;
10723
10724    /// Read/write requests are routed to the nearest cluster in the instance, and
10725    /// will fail over to the nearest cluster that is available in the event of
10726    /// transient errors or delays. Clusters in a region are considered
10727    /// equidistant. Choosing this option sacrifices read-your-writes consistency
10728    /// to improve availability.
10729    #[derive(Clone, Default, PartialEq)]
10730    #[non_exhaustive]
10731    pub struct MultiClusterRoutingUseAny {
10732        /// The set of clusters to route to. The order is ignored; clusters will be
10733        /// tried in order of distance. If left empty, all clusters are eligible.
10734        pub cluster_ids: std::vec::Vec<std::string::String>,
10735
10736        /// Possible algorithms for routing affinity. If enabled, Bigtable will
10737        /// route between equidistant clusters in a deterministic order rather than
10738        /// choosing randomly.
10739        ///
10740        /// This mechanism gives read-your-writes consistency for *most* requests
10741        /// under *most* circumstances, without sacrificing availability. Consistency
10742        /// is *not* guaranteed, as requests might still fail over between clusters
10743        /// in the event of errors or latency.
10744        pub affinity:
10745            std::option::Option<crate::model::app_profile::multi_cluster_routing_use_any::Affinity>,
10746
10747        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10748    }
10749
10750    impl MultiClusterRoutingUseAny {
10751        pub fn new() -> Self {
10752            std::default::Default::default()
10753        }
10754
10755        /// Sets the value of [cluster_ids][crate::model::app_profile::MultiClusterRoutingUseAny::cluster_ids].
10756        ///
10757        /// # Example
10758        /// ```ignore,no_run
10759        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10760        /// let x = MultiClusterRoutingUseAny::new().set_cluster_ids(["a", "b", "c"]);
10761        /// ```
10762        pub fn set_cluster_ids<T, V>(mut self, v: T) -> Self
10763        where
10764            T: std::iter::IntoIterator<Item = V>,
10765            V: std::convert::Into<std::string::String>,
10766        {
10767            use std::iter::Iterator;
10768            self.cluster_ids = v.into_iter().map(|i| i.into()).collect();
10769            self
10770        }
10771
10772        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity].
10773        ///
10774        /// Note that all the setters affecting `affinity` are mutually
10775        /// exclusive.
10776        ///
10777        /// # Example
10778        /// ```ignore,no_run
10779        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10780        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
10781        /// let x = MultiClusterRoutingUseAny::new().set_affinity(Some(
10782        ///     google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(RowAffinity::default().into())));
10783        /// ```
10784        pub fn set_affinity<
10785            T: std::convert::Into<
10786                    std::option::Option<
10787                        crate::model::app_profile::multi_cluster_routing_use_any::Affinity,
10788                    >,
10789                >,
10790        >(
10791            mut self,
10792            v: T,
10793        ) -> Self {
10794            self.affinity = v.into();
10795            self
10796        }
10797
10798        /// The value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
10799        /// if it holds a `RowAffinity`, `None` if the field is not set or
10800        /// holds a different branch.
10801        pub fn row_affinity(
10802            &self,
10803        ) -> std::option::Option<
10804            &std::boxed::Box<crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity>,
10805        > {
10806            #[allow(unreachable_patterns)]
10807            self.affinity.as_ref().and_then(|v| match v {
10808                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
10809                    v,
10810                ) => std::option::Option::Some(v),
10811                _ => std::option::Option::None,
10812            })
10813        }
10814
10815        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
10816        /// to hold a `RowAffinity`.
10817        ///
10818        /// Note that all the setters affecting `affinity` are
10819        /// mutually exclusive.
10820        ///
10821        /// # Example
10822        /// ```ignore,no_run
10823        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10824        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
10825        /// let x = MultiClusterRoutingUseAny::new().set_row_affinity(RowAffinity::default()/* use setters */);
10826        /// assert!(x.row_affinity().is_some());
10827        /// ```
10828        pub fn set_row_affinity<
10829            T: std::convert::Into<
10830                    std::boxed::Box<
10831                        crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
10832                    >,
10833                >,
10834        >(
10835            mut self,
10836            v: T,
10837        ) -> Self {
10838            self.affinity = std::option::Option::Some(
10839                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
10840                    v.into(),
10841                ),
10842            );
10843            self
10844        }
10845    }
10846
10847    impl wkt::message::Message for MultiClusterRoutingUseAny {
10848        fn typename() -> &'static str {
10849            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny"
10850        }
10851    }
10852
10853    /// Defines additional types related to [MultiClusterRoutingUseAny].
10854    pub mod multi_cluster_routing_use_any {
10855        #[allow(unused_imports)]
10856        use super::*;
10857
10858        /// If enabled, Bigtable will route the request based on the row key of the
10859        /// request, rather than randomly. Instead, each row key will be assigned
10860        /// to a cluster, and will stick to that cluster. If clusters are added or
10861        /// removed, then this may affect which row keys stick to which clusters.
10862        /// To avoid this, users can use a cluster group to specify which clusters
10863        /// are to be used. In this case, new clusters that are not a part of the
10864        /// cluster group will not be routed to, and routing will be unaffected by
10865        /// the new cluster. Moreover, clusters specified in the cluster group cannot
10866        /// be deleted unless removed from the cluster group.
10867        #[derive(Clone, Default, PartialEq)]
10868        #[non_exhaustive]
10869        pub struct RowAffinity {
10870            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10871        }
10872
10873        impl RowAffinity {
10874            pub fn new() -> Self {
10875                std::default::Default::default()
10876            }
10877        }
10878
10879        impl wkt::message::Message for RowAffinity {
10880            fn typename() -> &'static str {
10881                "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity"
10882            }
10883        }
10884
10885        /// Possible algorithms for routing affinity. If enabled, Bigtable will
10886        /// route between equidistant clusters in a deterministic order rather than
10887        /// choosing randomly.
10888        ///
10889        /// This mechanism gives read-your-writes consistency for *most* requests
10890        /// under *most* circumstances, without sacrificing availability. Consistency
10891        /// is *not* guaranteed, as requests might still fail over between clusters
10892        /// in the event of errors or latency.
10893        #[derive(Clone, Debug, PartialEq)]
10894        #[non_exhaustive]
10895        pub enum Affinity {
10896            /// Row affinity sticky routing based on the row key of the request.
10897            /// Requests that span multiple rows are routed non-deterministically.
10898            RowAffinity(
10899                std::boxed::Box<
10900                    crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
10901                >,
10902            ),
10903        }
10904    }
10905
10906    /// Unconditionally routes all read/write requests to a specific cluster.
10907    /// This option preserves read-your-writes consistency but does not improve
10908    /// availability.
10909    #[derive(Clone, Default, PartialEq)]
10910    #[non_exhaustive]
10911    pub struct SingleClusterRouting {
10912        /// The cluster to which read/write requests should be routed.
10913        pub cluster_id: std::string::String,
10914
10915        /// Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
10916        /// allowed by this app profile. It is unsafe to send these requests to
10917        /// the same table/row/column in multiple clusters.
10918        pub allow_transactional_writes: bool,
10919
10920        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10921    }
10922
10923    impl SingleClusterRouting {
10924        pub fn new() -> Self {
10925            std::default::Default::default()
10926        }
10927
10928        /// Sets the value of [cluster_id][crate::model::app_profile::SingleClusterRouting::cluster_id].
10929        ///
10930        /// # Example
10931        /// ```ignore,no_run
10932        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
10933        /// let x = SingleClusterRouting::new().set_cluster_id("example");
10934        /// ```
10935        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10936            self.cluster_id = v.into();
10937            self
10938        }
10939
10940        /// Sets the value of [allow_transactional_writes][crate::model::app_profile::SingleClusterRouting::allow_transactional_writes].
10941        ///
10942        /// # Example
10943        /// ```ignore,no_run
10944        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
10945        /// let x = SingleClusterRouting::new().set_allow_transactional_writes(true);
10946        /// ```
10947        pub fn set_allow_transactional_writes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10948            self.allow_transactional_writes = v.into();
10949            self
10950        }
10951    }
10952
10953    impl wkt::message::Message for SingleClusterRouting {
10954        fn typename() -> &'static str {
10955            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.SingleClusterRouting"
10956        }
10957    }
10958
10959    /// Standard options for isolating this app profile's traffic from other use
10960    /// cases.
10961    #[derive(Clone, Default, PartialEq)]
10962    #[non_exhaustive]
10963    pub struct StandardIsolation {
10964        /// The priority of requests sent using this app profile.
10965        pub priority: crate::model::app_profile::Priority,
10966
10967        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10968    }
10969
10970    impl StandardIsolation {
10971        pub fn new() -> Self {
10972            std::default::Default::default()
10973        }
10974
10975        /// Sets the value of [priority][crate::model::app_profile::StandardIsolation::priority].
10976        ///
10977        /// # Example
10978        /// ```ignore,no_run
10979        /// # use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
10980        /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
10981        /// let x0 = StandardIsolation::new().set_priority(Priority::Low);
10982        /// let x1 = StandardIsolation::new().set_priority(Priority::Medium);
10983        /// let x2 = StandardIsolation::new().set_priority(Priority::High);
10984        /// ```
10985        pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
10986            mut self,
10987            v: T,
10988        ) -> Self {
10989            self.priority = v.into();
10990            self
10991        }
10992    }
10993
10994    impl wkt::message::Message for StandardIsolation {
10995        fn typename() -> &'static str {
10996            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.StandardIsolation"
10997        }
10998    }
10999
11000    /// Data Boost is a serverless compute capability that lets you run
11001    /// high-throughput read jobs and queries on your Bigtable data, without
11002    /// impacting the performance of the clusters that handle your application
11003    /// traffic. Data Boost supports read-only use cases with single-cluster
11004    /// routing.
11005    #[derive(Clone, Default, PartialEq)]
11006    #[non_exhaustive]
11007    pub struct DataBoostIsolationReadOnly {
11008        /// The Compute Billing Owner for this Data Boost App Profile.
11009        pub compute_billing_owner: std::option::Option<
11010            crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11011        >,
11012
11013        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11014    }
11015
11016    impl DataBoostIsolationReadOnly {
11017        pub fn new() -> Self {
11018            std::default::Default::default()
11019        }
11020
11021        /// Sets the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
11022        ///
11023        /// # Example
11024        /// ```ignore,no_run
11025        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11026        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
11027        /// let x0 = DataBoostIsolationReadOnly::new().set_compute_billing_owner(ComputeBillingOwner::HostPays);
11028        /// ```
11029        pub fn set_compute_billing_owner<T>(mut self, v: T) -> Self
11030        where
11031            T: std::convert::Into<
11032                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11033                >,
11034        {
11035            self.compute_billing_owner = std::option::Option::Some(v.into());
11036            self
11037        }
11038
11039        /// Sets or clears the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
11040        ///
11041        /// # Example
11042        /// ```ignore,no_run
11043        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11044        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
11045        /// let x0 = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(Some(ComputeBillingOwner::HostPays));
11046        /// let x_none = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(None::<ComputeBillingOwner>);
11047        /// ```
11048        pub fn set_or_clear_compute_billing_owner<T>(mut self, v: std::option::Option<T>) -> Self
11049        where
11050            T: std::convert::Into<
11051                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11052                >,
11053        {
11054            self.compute_billing_owner = v.map(|x| x.into());
11055            self
11056        }
11057    }
11058
11059    impl wkt::message::Message for DataBoostIsolationReadOnly {
11060        fn typename() -> &'static str {
11061            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly"
11062        }
11063    }
11064
11065    /// Defines additional types related to [DataBoostIsolationReadOnly].
11066    pub mod data_boost_isolation_read_only {
11067        #[allow(unused_imports)]
11068        use super::*;
11069
11070        /// Compute Billing Owner specifies how usage should be accounted when using
11071        /// Data Boost. Compute Billing Owner also configures which Cloud Project is
11072        /// charged for relevant quota.
11073        ///
11074        /// # Working with unknown values
11075        ///
11076        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11077        /// additional enum variants at any time. Adding new variants is not considered
11078        /// a breaking change. Applications should write their code in anticipation of:
11079        ///
11080        /// - New values appearing in future releases of the client library, **and**
11081        /// - New values received dynamically, without application changes.
11082        ///
11083        /// Please consult the [Working with enums] section in the user guide for some
11084        /// guidelines.
11085        ///
11086        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11087        #[derive(Clone, Debug, PartialEq)]
11088        #[non_exhaustive]
11089        pub enum ComputeBillingOwner {
11090            /// Unspecified value.
11091            Unspecified,
11092            /// The host Cloud Project containing the targeted Bigtable Instance /
11093            /// Table pays for compute.
11094            HostPays,
11095            /// If set, the enum was initialized with an unknown value.
11096            ///
11097            /// Applications can examine the value using [ComputeBillingOwner::value] or
11098            /// [ComputeBillingOwner::name].
11099            UnknownValue(compute_billing_owner::UnknownValue),
11100        }
11101
11102        #[doc(hidden)]
11103        pub mod compute_billing_owner {
11104            #[allow(unused_imports)]
11105            use super::*;
11106            #[derive(Clone, Debug, PartialEq)]
11107            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11108        }
11109
11110        impl ComputeBillingOwner {
11111            /// Gets the enum value.
11112            ///
11113            /// Returns `None` if the enum contains an unknown value deserialized from
11114            /// the string representation of enums.
11115            pub fn value(&self) -> std::option::Option<i32> {
11116                match self {
11117                    Self::Unspecified => std::option::Option::Some(0),
11118                    Self::HostPays => std::option::Option::Some(1),
11119                    Self::UnknownValue(u) => u.0.value(),
11120                }
11121            }
11122
11123            /// Gets the enum value as a string.
11124            ///
11125            /// Returns `None` if the enum contains an unknown value deserialized from
11126            /// the integer representation of enums.
11127            pub fn name(&self) -> std::option::Option<&str> {
11128                match self {
11129                    Self::Unspecified => {
11130                        std::option::Option::Some("COMPUTE_BILLING_OWNER_UNSPECIFIED")
11131                    }
11132                    Self::HostPays => std::option::Option::Some("HOST_PAYS"),
11133                    Self::UnknownValue(u) => u.0.name(),
11134                }
11135            }
11136        }
11137
11138        impl std::default::Default for ComputeBillingOwner {
11139            fn default() -> Self {
11140                use std::convert::From;
11141                Self::from(0)
11142            }
11143        }
11144
11145        impl std::fmt::Display for ComputeBillingOwner {
11146            fn fmt(
11147                &self,
11148                f: &mut std::fmt::Formatter<'_>,
11149            ) -> std::result::Result<(), std::fmt::Error> {
11150                wkt::internal::display_enum(f, self.name(), self.value())
11151            }
11152        }
11153
11154        impl std::convert::From<i32> for ComputeBillingOwner {
11155            fn from(value: i32) -> Self {
11156                match value {
11157                    0 => Self::Unspecified,
11158                    1 => Self::HostPays,
11159                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
11160                        wkt::internal::UnknownEnumValue::Integer(value),
11161                    )),
11162                }
11163            }
11164        }
11165
11166        impl std::convert::From<&str> for ComputeBillingOwner {
11167            fn from(value: &str) -> Self {
11168                use std::string::ToString;
11169                match value {
11170                    "COMPUTE_BILLING_OWNER_UNSPECIFIED" => Self::Unspecified,
11171                    "HOST_PAYS" => Self::HostPays,
11172                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
11173                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11174                    )),
11175                }
11176            }
11177        }
11178
11179        impl serde::ser::Serialize for ComputeBillingOwner {
11180            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11181            where
11182                S: serde::Serializer,
11183            {
11184                match self {
11185                    Self::Unspecified => serializer.serialize_i32(0),
11186                    Self::HostPays => serializer.serialize_i32(1),
11187                    Self::UnknownValue(u) => u.0.serialize(serializer),
11188                }
11189            }
11190        }
11191
11192        impl<'de> serde::de::Deserialize<'de> for ComputeBillingOwner {
11193            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11194            where
11195                D: serde::Deserializer<'de>,
11196            {
11197                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComputeBillingOwner>::new(
11198                    ".google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner"))
11199            }
11200        }
11201    }
11202
11203    /// Possible priorities for an app profile. Note that higher priority writes
11204    /// can sometimes queue behind lower priority writes to the same tablet, as
11205    /// writes must be strictly sequenced in the durability log.
11206    ///
11207    /// # Working with unknown values
11208    ///
11209    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11210    /// additional enum variants at any time. Adding new variants is not considered
11211    /// a breaking change. Applications should write their code in anticipation of:
11212    ///
11213    /// - New values appearing in future releases of the client library, **and**
11214    /// - New values received dynamically, without application changes.
11215    ///
11216    /// Please consult the [Working with enums] section in the user guide for some
11217    /// guidelines.
11218    ///
11219    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11220    #[derive(Clone, Debug, PartialEq)]
11221    #[non_exhaustive]
11222    pub enum Priority {
11223        /// Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation.
11224        Unspecified,
11225        Low,
11226        Medium,
11227        High,
11228        /// If set, the enum was initialized with an unknown value.
11229        ///
11230        /// Applications can examine the value using [Priority::value] or
11231        /// [Priority::name].
11232        UnknownValue(priority::UnknownValue),
11233    }
11234
11235    #[doc(hidden)]
11236    pub mod priority {
11237        #[allow(unused_imports)]
11238        use super::*;
11239        #[derive(Clone, Debug, PartialEq)]
11240        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11241    }
11242
11243    impl Priority {
11244        /// Gets the enum value.
11245        ///
11246        /// Returns `None` if the enum contains an unknown value deserialized from
11247        /// the string representation of enums.
11248        pub fn value(&self) -> std::option::Option<i32> {
11249            match self {
11250                Self::Unspecified => std::option::Option::Some(0),
11251                Self::Low => std::option::Option::Some(1),
11252                Self::Medium => std::option::Option::Some(2),
11253                Self::High => std::option::Option::Some(3),
11254                Self::UnknownValue(u) => u.0.value(),
11255            }
11256        }
11257
11258        /// Gets the enum value as a string.
11259        ///
11260        /// Returns `None` if the enum contains an unknown value deserialized from
11261        /// the integer representation of enums.
11262        pub fn name(&self) -> std::option::Option<&str> {
11263            match self {
11264                Self::Unspecified => std::option::Option::Some("PRIORITY_UNSPECIFIED"),
11265                Self::Low => std::option::Option::Some("PRIORITY_LOW"),
11266                Self::Medium => std::option::Option::Some("PRIORITY_MEDIUM"),
11267                Self::High => std::option::Option::Some("PRIORITY_HIGH"),
11268                Self::UnknownValue(u) => u.0.name(),
11269            }
11270        }
11271    }
11272
11273    impl std::default::Default for Priority {
11274        fn default() -> Self {
11275            use std::convert::From;
11276            Self::from(0)
11277        }
11278    }
11279
11280    impl std::fmt::Display for Priority {
11281        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11282            wkt::internal::display_enum(f, self.name(), self.value())
11283        }
11284    }
11285
11286    impl std::convert::From<i32> for Priority {
11287        fn from(value: i32) -> Self {
11288            match value {
11289                0 => Self::Unspecified,
11290                1 => Self::Low,
11291                2 => Self::Medium,
11292                3 => Self::High,
11293                _ => Self::UnknownValue(priority::UnknownValue(
11294                    wkt::internal::UnknownEnumValue::Integer(value),
11295                )),
11296            }
11297        }
11298    }
11299
11300    impl std::convert::From<&str> for Priority {
11301        fn from(value: &str) -> Self {
11302            use std::string::ToString;
11303            match value {
11304                "PRIORITY_UNSPECIFIED" => Self::Unspecified,
11305                "PRIORITY_LOW" => Self::Low,
11306                "PRIORITY_MEDIUM" => Self::Medium,
11307                "PRIORITY_HIGH" => Self::High,
11308                _ => Self::UnknownValue(priority::UnknownValue(
11309                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11310                )),
11311            }
11312        }
11313    }
11314
11315    impl serde::ser::Serialize for Priority {
11316        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11317        where
11318            S: serde::Serializer,
11319        {
11320            match self {
11321                Self::Unspecified => serializer.serialize_i32(0),
11322                Self::Low => serializer.serialize_i32(1),
11323                Self::Medium => serializer.serialize_i32(2),
11324                Self::High => serializer.serialize_i32(3),
11325                Self::UnknownValue(u) => u.0.serialize(serializer),
11326            }
11327        }
11328    }
11329
11330    impl<'de> serde::de::Deserialize<'de> for Priority {
11331        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11332        where
11333            D: serde::Deserializer<'de>,
11334        {
11335            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Priority>::new(
11336                ".google.bigtable.admin.v2.AppProfile.Priority",
11337            ))
11338        }
11339    }
11340
11341    /// The routing policy for all read/write requests that use this app profile.
11342    /// A value must be explicitly set.
11343    #[derive(Clone, Debug, PartialEq)]
11344    #[non_exhaustive]
11345    pub enum RoutingPolicy {
11346        /// Use a multi-cluster routing policy.
11347        MultiClusterRoutingUseAny(
11348            std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>,
11349        ),
11350        /// Use a single-cluster routing policy.
11351        SingleClusterRouting(std::boxed::Box<crate::model::app_profile::SingleClusterRouting>),
11352    }
11353
11354    /// Options for isolating this app profile's traffic from other use cases.
11355    #[derive(Clone, Debug, PartialEq)]
11356    #[non_exhaustive]
11357    pub enum Isolation {
11358        /// This field has been deprecated in favor of `standard_isolation.priority`.
11359        /// If you set this field, `standard_isolation.priority` will be set instead.
11360        ///
11361        /// The priority of requests sent using this app profile.
11362        #[deprecated]
11363        Priority(crate::model::app_profile::Priority),
11364        /// The standard options used for isolating this app profile's traffic from
11365        /// other use cases.
11366        StandardIsolation(std::boxed::Box<crate::model::app_profile::StandardIsolation>),
11367        /// Specifies that this app profile is intended for read-only usage via the
11368        /// Data Boost feature.
11369        DataBoostIsolationReadOnly(
11370            std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>,
11371        ),
11372    }
11373}
11374
11375/// A tablet is a defined by a start and end key and is explained in
11376/// <https://cloud.google.com/bigtable/docs/overview#architecture> and
11377/// <https://cloud.google.com/bigtable/docs/performance#optimization>.
11378/// A Hot tablet is a tablet that exhibits high average cpu usage during the time
11379/// interval from start time to end time.
11380#[derive(Clone, Default, PartialEq)]
11381#[non_exhaustive]
11382pub struct HotTablet {
11383    /// The unique name of the hot tablet. Values are of the form
11384    /// `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`.
11385    pub name: std::string::String,
11386
11387    /// Name of the table that contains the tablet. Values are of the form
11388    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
11389    pub table_name: std::string::String,
11390
11391    /// Output only. The start time of the hot tablet.
11392    pub start_time: std::option::Option<wkt::Timestamp>,
11393
11394    /// Output only. The end time of the hot tablet.
11395    pub end_time: std::option::Option<wkt::Timestamp>,
11396
11397    /// Tablet Start Key (inclusive).
11398    pub start_key: std::string::String,
11399
11400    /// Tablet End Key (inclusive).
11401    pub end_key: std::string::String,
11402
11403    /// Output only. The average CPU usage spent by a node on this tablet over the
11404    /// start_time to end_time time range. The percentage is the amount of CPU used
11405    /// by the node to serve the tablet, from 0% (tablet was not interacted with)
11406    /// to 100% (the node spent all cycles serving the hot tablet).
11407    pub node_cpu_usage_percent: f32,
11408
11409    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11410}
11411
11412impl HotTablet {
11413    pub fn new() -> Self {
11414        std::default::Default::default()
11415    }
11416
11417    /// Sets the value of [name][crate::model::HotTablet::name].
11418    ///
11419    /// # Example
11420    /// ```ignore,no_run
11421    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11422    /// let x = HotTablet::new().set_name("example");
11423    /// ```
11424    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11425        self.name = v.into();
11426        self
11427    }
11428
11429    /// Sets the value of [table_name][crate::model::HotTablet::table_name].
11430    ///
11431    /// # Example
11432    /// ```ignore,no_run
11433    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11434    /// let x = HotTablet::new().set_table_name("example");
11435    /// ```
11436    pub fn set_table_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11437        self.table_name = v.into();
11438        self
11439    }
11440
11441    /// Sets the value of [start_time][crate::model::HotTablet::start_time].
11442    ///
11443    /// # Example
11444    /// ```ignore,no_run
11445    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11446    /// use wkt::Timestamp;
11447    /// let x = HotTablet::new().set_start_time(Timestamp::default()/* use setters */);
11448    /// ```
11449    pub fn set_start_time<T>(mut self, v: T) -> Self
11450    where
11451        T: std::convert::Into<wkt::Timestamp>,
11452    {
11453        self.start_time = std::option::Option::Some(v.into());
11454        self
11455    }
11456
11457    /// Sets or clears the value of [start_time][crate::model::HotTablet::start_time].
11458    ///
11459    /// # Example
11460    /// ```ignore,no_run
11461    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11462    /// use wkt::Timestamp;
11463    /// let x = HotTablet::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
11464    /// let x = HotTablet::new().set_or_clear_start_time(None::<Timestamp>);
11465    /// ```
11466    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
11467    where
11468        T: std::convert::Into<wkt::Timestamp>,
11469    {
11470        self.start_time = v.map(|x| x.into());
11471        self
11472    }
11473
11474    /// Sets the value of [end_time][crate::model::HotTablet::end_time].
11475    ///
11476    /// # Example
11477    /// ```ignore,no_run
11478    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11479    /// use wkt::Timestamp;
11480    /// let x = HotTablet::new().set_end_time(Timestamp::default()/* use setters */);
11481    /// ```
11482    pub fn set_end_time<T>(mut self, v: T) -> Self
11483    where
11484        T: std::convert::Into<wkt::Timestamp>,
11485    {
11486        self.end_time = std::option::Option::Some(v.into());
11487        self
11488    }
11489
11490    /// Sets or clears the value of [end_time][crate::model::HotTablet::end_time].
11491    ///
11492    /// # Example
11493    /// ```ignore,no_run
11494    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11495    /// use wkt::Timestamp;
11496    /// let x = HotTablet::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
11497    /// let x = HotTablet::new().set_or_clear_end_time(None::<Timestamp>);
11498    /// ```
11499    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
11500    where
11501        T: std::convert::Into<wkt::Timestamp>,
11502    {
11503        self.end_time = v.map(|x| x.into());
11504        self
11505    }
11506
11507    /// Sets the value of [start_key][crate::model::HotTablet::start_key].
11508    ///
11509    /// # Example
11510    /// ```ignore,no_run
11511    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11512    /// let x = HotTablet::new().set_start_key("example");
11513    /// ```
11514    pub fn set_start_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11515        self.start_key = v.into();
11516        self
11517    }
11518
11519    /// Sets the value of [end_key][crate::model::HotTablet::end_key].
11520    ///
11521    /// # Example
11522    /// ```ignore,no_run
11523    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11524    /// let x = HotTablet::new().set_end_key("example");
11525    /// ```
11526    pub fn set_end_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11527        self.end_key = v.into();
11528        self
11529    }
11530
11531    /// Sets the value of [node_cpu_usage_percent][crate::model::HotTablet::node_cpu_usage_percent].
11532    ///
11533    /// # Example
11534    /// ```ignore,no_run
11535    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11536    /// let x = HotTablet::new().set_node_cpu_usage_percent(42.0);
11537    /// ```
11538    pub fn set_node_cpu_usage_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
11539        self.node_cpu_usage_percent = v.into();
11540        self
11541    }
11542}
11543
11544impl wkt::message::Message for HotTablet {
11545    fn typename() -> &'static str {
11546        "type.googleapis.com/google.bigtable.admin.v2.HotTablet"
11547    }
11548}
11549
11550/// A SQL logical view object that can be referenced in SQL queries.
11551#[derive(Clone, Default, PartialEq)]
11552#[non_exhaustive]
11553pub struct LogicalView {
11554    /// Identifier. The unique name of the logical view.
11555    /// Format:
11556    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
11557    pub name: std::string::String,
11558
11559    /// Required. The logical view's select query.
11560    pub query: std::string::String,
11561
11562    /// Optional. The etag for this logical view.
11563    /// This may be sent on update requests to ensure that the client has an
11564    /// up-to-date value before proceeding. The server returns an ABORTED error on
11565    /// a mismatched etag.
11566    pub etag: std::string::String,
11567
11568    /// Optional. Set to true to make the LogicalView protected against deletion.
11569    pub deletion_protection: bool,
11570
11571    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11572}
11573
11574impl LogicalView {
11575    pub fn new() -> Self {
11576        std::default::Default::default()
11577    }
11578
11579    /// Sets the value of [name][crate::model::LogicalView::name].
11580    ///
11581    /// # Example
11582    /// ```ignore,no_run
11583    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11584    /// let x = LogicalView::new().set_name("example");
11585    /// ```
11586    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11587        self.name = v.into();
11588        self
11589    }
11590
11591    /// Sets the value of [query][crate::model::LogicalView::query].
11592    ///
11593    /// # Example
11594    /// ```ignore,no_run
11595    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11596    /// let x = LogicalView::new().set_query("example");
11597    /// ```
11598    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11599        self.query = v.into();
11600        self
11601    }
11602
11603    /// Sets the value of [etag][crate::model::LogicalView::etag].
11604    ///
11605    /// # Example
11606    /// ```ignore,no_run
11607    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11608    /// let x = LogicalView::new().set_etag("example");
11609    /// ```
11610    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11611        self.etag = v.into();
11612        self
11613    }
11614
11615    /// Sets the value of [deletion_protection][crate::model::LogicalView::deletion_protection].
11616    ///
11617    /// # Example
11618    /// ```ignore,no_run
11619    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11620    /// let x = LogicalView::new().set_deletion_protection(true);
11621    /// ```
11622    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11623        self.deletion_protection = v.into();
11624        self
11625    }
11626}
11627
11628impl wkt::message::Message for LogicalView {
11629    fn typename() -> &'static str {
11630        "type.googleapis.com/google.bigtable.admin.v2.LogicalView"
11631    }
11632}
11633
11634/// A materialized view object that can be referenced in SQL queries.
11635#[derive(Clone, Default, PartialEq)]
11636#[non_exhaustive]
11637pub struct MaterializedView {
11638    /// Identifier. The unique name of the materialized view.
11639    /// Format:
11640    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
11641    pub name: std::string::String,
11642
11643    /// Required. Immutable. The materialized view's select query.
11644    pub query: std::string::String,
11645
11646    /// Optional. The etag for this materialized view.
11647    /// This may be sent on update requests to ensure that the client has an
11648    /// up-to-date value before proceeding. The server returns an ABORTED error on
11649    /// a mismatched etag.
11650    pub etag: std::string::String,
11651
11652    /// Set to true to make the MaterializedView protected against deletion.
11653    pub deletion_protection: bool,
11654
11655    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11656}
11657
11658impl MaterializedView {
11659    pub fn new() -> Self {
11660        std::default::Default::default()
11661    }
11662
11663    /// Sets the value of [name][crate::model::MaterializedView::name].
11664    ///
11665    /// # Example
11666    /// ```ignore,no_run
11667    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11668    /// let x = MaterializedView::new().set_name("example");
11669    /// ```
11670    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11671        self.name = v.into();
11672        self
11673    }
11674
11675    /// Sets the value of [query][crate::model::MaterializedView::query].
11676    ///
11677    /// # Example
11678    /// ```ignore,no_run
11679    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11680    /// let x = MaterializedView::new().set_query("example");
11681    /// ```
11682    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11683        self.query = v.into();
11684        self
11685    }
11686
11687    /// Sets the value of [etag][crate::model::MaterializedView::etag].
11688    ///
11689    /// # Example
11690    /// ```ignore,no_run
11691    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11692    /// let x = MaterializedView::new().set_etag("example");
11693    /// ```
11694    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11695        self.etag = v.into();
11696        self
11697    }
11698
11699    /// Sets the value of [deletion_protection][crate::model::MaterializedView::deletion_protection].
11700    ///
11701    /// # Example
11702    /// ```ignore,no_run
11703    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11704    /// let x = MaterializedView::new().set_deletion_protection(true);
11705    /// ```
11706    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11707        self.deletion_protection = v.into();
11708        self
11709    }
11710}
11711
11712impl wkt::message::Message for MaterializedView {
11713    fn typename() -> &'static str {
11714        "type.googleapis.com/google.bigtable.admin.v2.MaterializedView"
11715    }
11716}
11717
11718/// Information about a table restore.
11719#[derive(Clone, Default, PartialEq)]
11720#[non_exhaustive]
11721pub struct RestoreInfo {
11722    /// The type of the restore source.
11723    pub source_type: crate::model::RestoreSourceType,
11724
11725    /// Information about the source used to restore the table.
11726    pub source_info: std::option::Option<crate::model::restore_info::SourceInfo>,
11727
11728    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11729}
11730
11731impl RestoreInfo {
11732    pub fn new() -> Self {
11733        std::default::Default::default()
11734    }
11735
11736    /// Sets the value of [source_type][crate::model::RestoreInfo::source_type].
11737    ///
11738    /// # Example
11739    /// ```ignore,no_run
11740    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
11741    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
11742    /// let x0 = RestoreInfo::new().set_source_type(RestoreSourceType::Backup);
11743    /// ```
11744    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
11745        mut self,
11746        v: T,
11747    ) -> Self {
11748        self.source_type = v.into();
11749        self
11750    }
11751
11752    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info].
11753    ///
11754    /// Note that all the setters affecting `source_info` are mutually
11755    /// exclusive.
11756    ///
11757    /// # Example
11758    /// ```ignore,no_run
11759    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
11760    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
11761    /// let x = RestoreInfo::new().set_source_info(Some(
11762    ///     google_cloud_bigtable_admin_v2::model::restore_info::SourceInfo::BackupInfo(BackupInfo::default().into())));
11763    /// ```
11764    pub fn set_source_info<
11765        T: std::convert::Into<std::option::Option<crate::model::restore_info::SourceInfo>>,
11766    >(
11767        mut self,
11768        v: T,
11769    ) -> Self {
11770        self.source_info = v.into();
11771        self
11772    }
11773
11774    /// The value of [source_info][crate::model::RestoreInfo::source_info]
11775    /// if it holds a `BackupInfo`, `None` if the field is not set or
11776    /// holds a different branch.
11777    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
11778        #[allow(unreachable_patterns)]
11779        self.source_info.as_ref().and_then(|v| match v {
11780            crate::model::restore_info::SourceInfo::BackupInfo(v) => std::option::Option::Some(v),
11781            _ => std::option::Option::None,
11782        })
11783    }
11784
11785    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info]
11786    /// to hold a `BackupInfo`.
11787    ///
11788    /// Note that all the setters affecting `source_info` are
11789    /// mutually exclusive.
11790    ///
11791    /// # Example
11792    /// ```ignore,no_run
11793    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
11794    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
11795    /// let x = RestoreInfo::new().set_backup_info(BackupInfo::default()/* use setters */);
11796    /// assert!(x.backup_info().is_some());
11797    /// ```
11798    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
11799        mut self,
11800        v: T,
11801    ) -> Self {
11802        self.source_info =
11803            std::option::Option::Some(crate::model::restore_info::SourceInfo::BackupInfo(v.into()));
11804        self
11805    }
11806}
11807
11808impl wkt::message::Message for RestoreInfo {
11809    fn typename() -> &'static str {
11810        "type.googleapis.com/google.bigtable.admin.v2.RestoreInfo"
11811    }
11812}
11813
11814/// Defines additional types related to [RestoreInfo].
11815pub mod restore_info {
11816    #[allow(unused_imports)]
11817    use super::*;
11818
11819    /// Information about the source used to restore the table.
11820    #[derive(Clone, Debug, PartialEq)]
11821    #[non_exhaustive]
11822    pub enum SourceInfo {
11823        /// Information about the backup used to restore the table. The backup
11824        /// may no longer exist.
11825        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
11826    }
11827}
11828
11829/// Change stream configuration.
11830#[derive(Clone, Default, PartialEq)]
11831#[non_exhaustive]
11832pub struct ChangeStreamConfig {
11833    /// How long the change stream should be retained. Change stream data older
11834    /// than the retention period will not be returned when reading the change
11835    /// stream from the table.
11836    /// Values must be at least 1 day and at most 7 days, and will be truncated to
11837    /// microsecond granularity.
11838    pub retention_period: std::option::Option<wkt::Duration>,
11839
11840    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11841}
11842
11843impl ChangeStreamConfig {
11844    pub fn new() -> Self {
11845        std::default::Default::default()
11846    }
11847
11848    /// Sets the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
11849    ///
11850    /// # Example
11851    /// ```ignore,no_run
11852    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
11853    /// use wkt::Duration;
11854    /// let x = ChangeStreamConfig::new().set_retention_period(Duration::default()/* use setters */);
11855    /// ```
11856    pub fn set_retention_period<T>(mut self, v: T) -> Self
11857    where
11858        T: std::convert::Into<wkt::Duration>,
11859    {
11860        self.retention_period = std::option::Option::Some(v.into());
11861        self
11862    }
11863
11864    /// Sets or clears the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
11865    ///
11866    /// # Example
11867    /// ```ignore,no_run
11868    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
11869    /// use wkt::Duration;
11870    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
11871    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(None::<Duration>);
11872    /// ```
11873    pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
11874    where
11875        T: std::convert::Into<wkt::Duration>,
11876    {
11877        self.retention_period = v.map(|x| x.into());
11878        self
11879    }
11880}
11881
11882impl wkt::message::Message for ChangeStreamConfig {
11883    fn typename() -> &'static str {
11884        "type.googleapis.com/google.bigtable.admin.v2.ChangeStreamConfig"
11885    }
11886}
11887
11888/// A collection of user data indexed by row, column, and timestamp.
11889/// Each table is served using the resources of its parent cluster.
11890#[derive(Clone, Default, PartialEq)]
11891#[non_exhaustive]
11892pub struct Table {
11893    /// The unique name of the table. Values are of the form
11894    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
11895    /// Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
11896    pub name: std::string::String,
11897
11898    /// Output only. Map from cluster ID to per-cluster table state.
11899    /// If it could not be determined whether or not the table has data in a
11900    /// particular cluster (for example, if its zone is unavailable), then
11901    /// there will be an entry for the cluster with UNKNOWN `replication_status`.
11902    /// Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
11903    pub cluster_states:
11904        std::collections::HashMap<std::string::String, crate::model::table::ClusterState>,
11905
11906    /// The column families configured for this table, mapped by column family ID.
11907    /// Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
11908    pub column_families: std::collections::HashMap<std::string::String, crate::model::ColumnFamily>,
11909
11910    /// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
11911    /// in this table. Timestamps not matching the granularity will be rejected. If
11912    /// unspecified at creation time, the value will be set to `MILLIS`. Views:
11913    /// `SCHEMA_VIEW`, `FULL`.
11914    pub granularity: crate::model::table::TimestampGranularity,
11915
11916    /// Output only. If this table was restored from another data source (e.g. a
11917    /// backup), this field will be populated with information about the restore.
11918    pub restore_info: std::option::Option<crate::model::RestoreInfo>,
11919
11920    /// If specified, enable the change stream on this table.
11921    /// Otherwise, the change stream is disabled and the change stream is not
11922    /// retained.
11923    pub change_stream_config: std::option::Option<crate::model::ChangeStreamConfig>,
11924
11925    /// Set to true to make the table protected against data loss. i.e. deleting
11926    /// the following resources through Admin APIs are prohibited:
11927    ///
11928    /// * The table.
11929    /// * The column families in the table.
11930    /// * The instance containing the table.
11931    ///
11932    /// Note one can still delete the data stored in the table through Data APIs.
11933    pub deletion_protection: bool,
11934
11935    /// Rules to specify what data is stored in each storage tier.
11936    /// Different tiers store data differently, providing different trade-offs
11937    /// between cost and performance. Different parts of a table can be stored
11938    /// separately on different tiers.
11939    /// If a config is specified, tiered storage is enabled for this table.
11940    /// Otherwise, tiered storage is disabled.
11941    /// Only SSD instances can configure tiered storage.
11942    pub tiered_storage_config: std::option::Option<crate::model::TieredStorageConfig>,
11943
11944    /// The row key schema for this table. The schema is used to decode the raw row
11945    /// key bytes into a structured format. The order of field declarations in this
11946    /// schema is important, as it reflects how the raw row key bytes are
11947    /// structured. Currently, this only affects how the key is read via a
11948    /// GoogleSQL query from the ExecuteQuery API.
11949    ///
11950    /// For a SQL query, the _key column is still read as raw bytes. But queries
11951    /// can reference the key fields by name, which will be decoded from _key using
11952    /// provided type and encoding. Queries that reference key fields will fail if
11953    /// they encounter an invalid row key.
11954    ///
11955    /// For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
11956    /// following schema:
11957    /// {
11958    /// fields {
11959    /// field_name: "id"
11960    /// type { string { encoding: utf8_bytes {} } }
11961    /// }
11962    /// fields {
11963    /// field_name: "date"
11964    /// type { string { encoding: utf8_bytes {} } }
11965    /// }
11966    /// fields {
11967    /// field_name: "product_code"
11968    /// type { int64 { encoding: big_endian_bytes {} } }
11969    /// }
11970    /// encoding { delimited_bytes { delimiter: "#" } }
11971    /// }
11972    ///
11973    /// The decoded key parts would be:
11974    /// id = "some_id", date = "2024-04-30", product_code = 1245427
11975    /// The query "SELECT _key, product_code FROM table" will return two columns:
11976    /// /------------------------------------------------------\
11977    /// |              _key                     | product_code |
11978    /// | --------------------------------------|--------------|
11979    /// | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
11980    /// \------------------------------------------------------/
11981    ///
11982    /// The schema has the following invariants:
11983    /// (1) The decoded field values are order-preserved. For read, the field
11984    /// values will be decoded in sorted mode from the raw bytes.
11985    /// (2) Every field in the schema must specify a non-empty name.
11986    /// (3) Every field must specify a type with an associated encoding. The type
11987    /// is limited to scalar types only: Array, Map, Aggregate, and Struct are not
11988    /// allowed.
11989    /// (4) The field names must not collide with existing column family
11990    /// names and reserved keywords "_key" and "_timestamp".
11991    ///
11992    /// The following update operations are allowed for row_key_schema:
11993    ///
11994    /// - Update from an empty schema to a new schema.
11995    /// - Remove the existing schema. This operation requires setting the
11996    ///   `ignore_warnings` flag to `true`, since it might be a backward
11997    ///   incompatible change. Without the flag, the update request will fail with
11998    ///   an INVALID_ARGUMENT error.
11999    ///   Any other row key schema update operation (e.g. update existing schema
12000    ///   columns names or types) is currently unsupported.
12001    pub row_key_schema: std::option::Option<crate::model::r#type::Struct>,
12002
12003    pub automated_backup_config: std::option::Option<crate::model::table::AutomatedBackupConfig>,
12004
12005    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12006}
12007
12008impl Table {
12009    pub fn new() -> Self {
12010        std::default::Default::default()
12011    }
12012
12013    /// Sets the value of [name][crate::model::Table::name].
12014    ///
12015    /// # Example
12016    /// ```ignore,no_run
12017    /// # use google_cloud_bigtable_admin_v2::model::Table;
12018    /// let x = Table::new().set_name("example");
12019    /// ```
12020    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12021        self.name = v.into();
12022        self
12023    }
12024
12025    /// Sets the value of [cluster_states][crate::model::Table::cluster_states].
12026    ///
12027    /// # Example
12028    /// ```ignore,no_run
12029    /// # use google_cloud_bigtable_admin_v2::model::Table;
12030    /// use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12031    /// let x = Table::new().set_cluster_states([
12032    ///     ("key0", ClusterState::default()/* use setters */),
12033    ///     ("key1", ClusterState::default()/* use (different) setters */),
12034    /// ]);
12035    /// ```
12036    pub fn set_cluster_states<T, K, V>(mut self, v: T) -> Self
12037    where
12038        T: std::iter::IntoIterator<Item = (K, V)>,
12039        K: std::convert::Into<std::string::String>,
12040        V: std::convert::Into<crate::model::table::ClusterState>,
12041    {
12042        use std::iter::Iterator;
12043        self.cluster_states = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12044        self
12045    }
12046
12047    /// Sets the value of [column_families][crate::model::Table::column_families].
12048    ///
12049    /// # Example
12050    /// ```ignore,no_run
12051    /// # use google_cloud_bigtable_admin_v2::model::Table;
12052    /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
12053    /// let x = Table::new().set_column_families([
12054    ///     ("key0", ColumnFamily::default()/* use setters */),
12055    ///     ("key1", ColumnFamily::default()/* use (different) setters */),
12056    /// ]);
12057    /// ```
12058    pub fn set_column_families<T, K, V>(mut self, v: T) -> Self
12059    where
12060        T: std::iter::IntoIterator<Item = (K, V)>,
12061        K: std::convert::Into<std::string::String>,
12062        V: std::convert::Into<crate::model::ColumnFamily>,
12063    {
12064        use std::iter::Iterator;
12065        self.column_families = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12066        self
12067    }
12068
12069    /// Sets the value of [granularity][crate::model::Table::granularity].
12070    ///
12071    /// # Example
12072    /// ```ignore,no_run
12073    /// # use google_cloud_bigtable_admin_v2::model::Table;
12074    /// use google_cloud_bigtable_admin_v2::model::table::TimestampGranularity;
12075    /// let x0 = Table::new().set_granularity(TimestampGranularity::Millis);
12076    /// ```
12077    pub fn set_granularity<T: std::convert::Into<crate::model::table::TimestampGranularity>>(
12078        mut self,
12079        v: T,
12080    ) -> Self {
12081        self.granularity = v.into();
12082        self
12083    }
12084
12085    /// Sets the value of [restore_info][crate::model::Table::restore_info].
12086    ///
12087    /// # Example
12088    /// ```ignore,no_run
12089    /// # use google_cloud_bigtable_admin_v2::model::Table;
12090    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12091    /// let x = Table::new().set_restore_info(RestoreInfo::default()/* use setters */);
12092    /// ```
12093    pub fn set_restore_info<T>(mut self, v: T) -> Self
12094    where
12095        T: std::convert::Into<crate::model::RestoreInfo>,
12096    {
12097        self.restore_info = std::option::Option::Some(v.into());
12098        self
12099    }
12100
12101    /// Sets or clears the value of [restore_info][crate::model::Table::restore_info].
12102    ///
12103    /// # Example
12104    /// ```ignore,no_run
12105    /// # use google_cloud_bigtable_admin_v2::model::Table;
12106    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12107    /// let x = Table::new().set_or_clear_restore_info(Some(RestoreInfo::default()/* use setters */));
12108    /// let x = Table::new().set_or_clear_restore_info(None::<RestoreInfo>);
12109    /// ```
12110    pub fn set_or_clear_restore_info<T>(mut self, v: std::option::Option<T>) -> Self
12111    where
12112        T: std::convert::Into<crate::model::RestoreInfo>,
12113    {
12114        self.restore_info = v.map(|x| x.into());
12115        self
12116    }
12117
12118    /// Sets the value of [change_stream_config][crate::model::Table::change_stream_config].
12119    ///
12120    /// # Example
12121    /// ```ignore,no_run
12122    /// # use google_cloud_bigtable_admin_v2::model::Table;
12123    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12124    /// let x = Table::new().set_change_stream_config(ChangeStreamConfig::default()/* use setters */);
12125    /// ```
12126    pub fn set_change_stream_config<T>(mut self, v: T) -> Self
12127    where
12128        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12129    {
12130        self.change_stream_config = std::option::Option::Some(v.into());
12131        self
12132    }
12133
12134    /// Sets or clears the value of [change_stream_config][crate::model::Table::change_stream_config].
12135    ///
12136    /// # Example
12137    /// ```ignore,no_run
12138    /// # use google_cloud_bigtable_admin_v2::model::Table;
12139    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12140    /// let x = Table::new().set_or_clear_change_stream_config(Some(ChangeStreamConfig::default()/* use setters */));
12141    /// let x = Table::new().set_or_clear_change_stream_config(None::<ChangeStreamConfig>);
12142    /// ```
12143    pub fn set_or_clear_change_stream_config<T>(mut self, v: std::option::Option<T>) -> Self
12144    where
12145        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12146    {
12147        self.change_stream_config = v.map(|x| x.into());
12148        self
12149    }
12150
12151    /// Sets the value of [deletion_protection][crate::model::Table::deletion_protection].
12152    ///
12153    /// # Example
12154    /// ```ignore,no_run
12155    /// # use google_cloud_bigtable_admin_v2::model::Table;
12156    /// let x = Table::new().set_deletion_protection(true);
12157    /// ```
12158    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12159        self.deletion_protection = v.into();
12160        self
12161    }
12162
12163    /// Sets the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
12164    ///
12165    /// # Example
12166    /// ```ignore,no_run
12167    /// # use google_cloud_bigtable_admin_v2::model::Table;
12168    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
12169    /// let x = Table::new().set_tiered_storage_config(TieredStorageConfig::default()/* use setters */);
12170    /// ```
12171    pub fn set_tiered_storage_config<T>(mut self, v: T) -> Self
12172    where
12173        T: std::convert::Into<crate::model::TieredStorageConfig>,
12174    {
12175        self.tiered_storage_config = std::option::Option::Some(v.into());
12176        self
12177    }
12178
12179    /// Sets or clears the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
12180    ///
12181    /// # Example
12182    /// ```ignore,no_run
12183    /// # use google_cloud_bigtable_admin_v2::model::Table;
12184    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
12185    /// let x = Table::new().set_or_clear_tiered_storage_config(Some(TieredStorageConfig::default()/* use setters */));
12186    /// let x = Table::new().set_or_clear_tiered_storage_config(None::<TieredStorageConfig>);
12187    /// ```
12188    pub fn set_or_clear_tiered_storage_config<T>(mut self, v: std::option::Option<T>) -> Self
12189    where
12190        T: std::convert::Into<crate::model::TieredStorageConfig>,
12191    {
12192        self.tiered_storage_config = v.map(|x| x.into());
12193        self
12194    }
12195
12196    /// Sets the value of [row_key_schema][crate::model::Table::row_key_schema].
12197    ///
12198    /// # Example
12199    /// ```ignore,no_run
12200    /// # use google_cloud_bigtable_admin_v2::model::Table;
12201    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12202    /// let x = Table::new().set_row_key_schema(Struct::default()/* use setters */);
12203    /// ```
12204    pub fn set_row_key_schema<T>(mut self, v: T) -> Self
12205    where
12206        T: std::convert::Into<crate::model::r#type::Struct>,
12207    {
12208        self.row_key_schema = std::option::Option::Some(v.into());
12209        self
12210    }
12211
12212    /// Sets or clears the value of [row_key_schema][crate::model::Table::row_key_schema].
12213    ///
12214    /// # Example
12215    /// ```ignore,no_run
12216    /// # use google_cloud_bigtable_admin_v2::model::Table;
12217    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12218    /// let x = Table::new().set_or_clear_row_key_schema(Some(Struct::default()/* use setters */));
12219    /// let x = Table::new().set_or_clear_row_key_schema(None::<Struct>);
12220    /// ```
12221    pub fn set_or_clear_row_key_schema<T>(mut self, v: std::option::Option<T>) -> Self
12222    where
12223        T: std::convert::Into<crate::model::r#type::Struct>,
12224    {
12225        self.row_key_schema = v.map(|x| x.into());
12226        self
12227    }
12228
12229    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config].
12230    ///
12231    /// Note that all the setters affecting `automated_backup_config` are mutually
12232    /// exclusive.
12233    ///
12234    /// # Example
12235    /// ```ignore,no_run
12236    /// # use google_cloud_bigtable_admin_v2::model::Table;
12237    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12238    /// let x = Table::new().set_automated_backup_config(Some(
12239    ///     google_cloud_bigtable_admin_v2::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(AutomatedBackupPolicy::default().into())));
12240    /// ```
12241    pub fn set_automated_backup_config<
12242        T: std::convert::Into<std::option::Option<crate::model::table::AutomatedBackupConfig>>,
12243    >(
12244        mut self,
12245        v: T,
12246    ) -> Self {
12247        self.automated_backup_config = v.into();
12248        self
12249    }
12250
12251    /// The value of [automated_backup_config][crate::model::Table::automated_backup_config]
12252    /// if it holds a `AutomatedBackupPolicy`, `None` if the field is not set or
12253    /// holds a different branch.
12254    pub fn automated_backup_policy(
12255        &self,
12256    ) -> std::option::Option<&std::boxed::Box<crate::model::table::AutomatedBackupPolicy>> {
12257        #[allow(unreachable_patterns)]
12258        self.automated_backup_config.as_ref().and_then(|v| match v {
12259            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v) => {
12260                std::option::Option::Some(v)
12261            }
12262            _ => std::option::Option::None,
12263        })
12264    }
12265
12266    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config]
12267    /// to hold a `AutomatedBackupPolicy`.
12268    ///
12269    /// Note that all the setters affecting `automated_backup_config` are
12270    /// mutually exclusive.
12271    ///
12272    /// # Example
12273    /// ```ignore,no_run
12274    /// # use google_cloud_bigtable_admin_v2::model::Table;
12275    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12276    /// let x = Table::new().set_automated_backup_policy(AutomatedBackupPolicy::default()/* use setters */);
12277    /// assert!(x.automated_backup_policy().is_some());
12278    /// ```
12279    pub fn set_automated_backup_policy<
12280        T: std::convert::Into<std::boxed::Box<crate::model::table::AutomatedBackupPolicy>>,
12281    >(
12282        mut self,
12283        v: T,
12284    ) -> Self {
12285        self.automated_backup_config = std::option::Option::Some(
12286            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v.into()),
12287        );
12288        self
12289    }
12290}
12291
12292impl wkt::message::Message for Table {
12293    fn typename() -> &'static str {
12294        "type.googleapis.com/google.bigtable.admin.v2.Table"
12295    }
12296}
12297
12298/// Defines additional types related to [Table].
12299pub mod table {
12300    #[allow(unused_imports)]
12301    use super::*;
12302
12303    /// The state of a table's data in a particular cluster.
12304    #[derive(Clone, Default, PartialEq)]
12305    #[non_exhaustive]
12306    pub struct ClusterState {
12307        /// Output only. The state of replication for the table in this cluster.
12308        pub replication_state: crate::model::table::cluster_state::ReplicationState,
12309
12310        /// Output only. The encryption information for the table in this cluster.
12311        /// If the encryption key protecting this resource is customer managed, then
12312        /// its version can be rotated in Cloud Key Management Service (Cloud KMS).
12313        /// The primary version of the key and its status will be reflected here when
12314        /// changes propagate from Cloud KMS.
12315        pub encryption_info: std::vec::Vec<crate::model::EncryptionInfo>,
12316
12317        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12318    }
12319
12320    impl ClusterState {
12321        pub fn new() -> Self {
12322            std::default::Default::default()
12323        }
12324
12325        /// Sets the value of [replication_state][crate::model::table::ClusterState::replication_state].
12326        ///
12327        /// # Example
12328        /// ```ignore,no_run
12329        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12330        /// use google_cloud_bigtable_admin_v2::model::table::cluster_state::ReplicationState;
12331        /// let x0 = ClusterState::new().set_replication_state(ReplicationState::Initializing);
12332        /// let x1 = ClusterState::new().set_replication_state(ReplicationState::PlannedMaintenance);
12333        /// let x2 = ClusterState::new().set_replication_state(ReplicationState::UnplannedMaintenance);
12334        /// ```
12335        pub fn set_replication_state<
12336            T: std::convert::Into<crate::model::table::cluster_state::ReplicationState>,
12337        >(
12338            mut self,
12339            v: T,
12340        ) -> Self {
12341            self.replication_state = v.into();
12342            self
12343        }
12344
12345        /// Sets the value of [encryption_info][crate::model::table::ClusterState::encryption_info].
12346        ///
12347        /// # Example
12348        /// ```ignore,no_run
12349        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12350        /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
12351        /// let x = ClusterState::new()
12352        ///     .set_encryption_info([
12353        ///         EncryptionInfo::default()/* use setters */,
12354        ///         EncryptionInfo::default()/* use (different) setters */,
12355        ///     ]);
12356        /// ```
12357        pub fn set_encryption_info<T, V>(mut self, v: T) -> Self
12358        where
12359            T: std::iter::IntoIterator<Item = V>,
12360            V: std::convert::Into<crate::model::EncryptionInfo>,
12361        {
12362            use std::iter::Iterator;
12363            self.encryption_info = v.into_iter().map(|i| i.into()).collect();
12364            self
12365        }
12366    }
12367
12368    impl wkt::message::Message for ClusterState {
12369        fn typename() -> &'static str {
12370            "type.googleapis.com/google.bigtable.admin.v2.Table.ClusterState"
12371        }
12372    }
12373
12374    /// Defines additional types related to [ClusterState].
12375    pub mod cluster_state {
12376        #[allow(unused_imports)]
12377        use super::*;
12378
12379        /// Table replication states.
12380        ///
12381        /// # Working with unknown values
12382        ///
12383        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12384        /// additional enum variants at any time. Adding new variants is not considered
12385        /// a breaking change. Applications should write their code in anticipation of:
12386        ///
12387        /// - New values appearing in future releases of the client library, **and**
12388        /// - New values received dynamically, without application changes.
12389        ///
12390        /// Please consult the [Working with enums] section in the user guide for some
12391        /// guidelines.
12392        ///
12393        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12394        #[derive(Clone, Debug, PartialEq)]
12395        #[non_exhaustive]
12396        pub enum ReplicationState {
12397            /// The replication state of the table is unknown in this cluster.
12398            StateNotKnown,
12399            /// The cluster was recently created, and the table must finish copying
12400            /// over pre-existing data from other clusters before it can begin
12401            /// receiving live replication updates and serving Data API requests.
12402            Initializing,
12403            /// The table is temporarily unable to serve Data API requests from this
12404            /// cluster due to planned internal maintenance.
12405            PlannedMaintenance,
12406            /// The table is temporarily unable to serve Data API requests from this
12407            /// cluster due to unplanned or emergency maintenance.
12408            UnplannedMaintenance,
12409            /// The table can serve Data API requests from this cluster. Depending on
12410            /// replication delay, reads may not immediately reflect the state of the
12411            /// table in other clusters.
12412            Ready,
12413            /// The table is fully created and ready for use after a restore, and is
12414            /// being optimized for performance. When optimizations are complete, the
12415            /// table will transition to `READY` state.
12416            ReadyOptimizing,
12417            /// If set, the enum was initialized with an unknown value.
12418            ///
12419            /// Applications can examine the value using [ReplicationState::value] or
12420            /// [ReplicationState::name].
12421            UnknownValue(replication_state::UnknownValue),
12422        }
12423
12424        #[doc(hidden)]
12425        pub mod replication_state {
12426            #[allow(unused_imports)]
12427            use super::*;
12428            #[derive(Clone, Debug, PartialEq)]
12429            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12430        }
12431
12432        impl ReplicationState {
12433            /// Gets the enum value.
12434            ///
12435            /// Returns `None` if the enum contains an unknown value deserialized from
12436            /// the string representation of enums.
12437            pub fn value(&self) -> std::option::Option<i32> {
12438                match self {
12439                    Self::StateNotKnown => std::option::Option::Some(0),
12440                    Self::Initializing => std::option::Option::Some(1),
12441                    Self::PlannedMaintenance => std::option::Option::Some(2),
12442                    Self::UnplannedMaintenance => std::option::Option::Some(3),
12443                    Self::Ready => std::option::Option::Some(4),
12444                    Self::ReadyOptimizing => std::option::Option::Some(5),
12445                    Self::UnknownValue(u) => u.0.value(),
12446                }
12447            }
12448
12449            /// Gets the enum value as a string.
12450            ///
12451            /// Returns `None` if the enum contains an unknown value deserialized from
12452            /// the integer representation of enums.
12453            pub fn name(&self) -> std::option::Option<&str> {
12454                match self {
12455                    Self::StateNotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
12456                    Self::Initializing => std::option::Option::Some("INITIALIZING"),
12457                    Self::PlannedMaintenance => std::option::Option::Some("PLANNED_MAINTENANCE"),
12458                    Self::UnplannedMaintenance => {
12459                        std::option::Option::Some("UNPLANNED_MAINTENANCE")
12460                    }
12461                    Self::Ready => std::option::Option::Some("READY"),
12462                    Self::ReadyOptimizing => std::option::Option::Some("READY_OPTIMIZING"),
12463                    Self::UnknownValue(u) => u.0.name(),
12464                }
12465            }
12466        }
12467
12468        impl std::default::Default for ReplicationState {
12469            fn default() -> Self {
12470                use std::convert::From;
12471                Self::from(0)
12472            }
12473        }
12474
12475        impl std::fmt::Display for ReplicationState {
12476            fn fmt(
12477                &self,
12478                f: &mut std::fmt::Formatter<'_>,
12479            ) -> std::result::Result<(), std::fmt::Error> {
12480                wkt::internal::display_enum(f, self.name(), self.value())
12481            }
12482        }
12483
12484        impl std::convert::From<i32> for ReplicationState {
12485            fn from(value: i32) -> Self {
12486                match value {
12487                    0 => Self::StateNotKnown,
12488                    1 => Self::Initializing,
12489                    2 => Self::PlannedMaintenance,
12490                    3 => Self::UnplannedMaintenance,
12491                    4 => Self::Ready,
12492                    5 => Self::ReadyOptimizing,
12493                    _ => Self::UnknownValue(replication_state::UnknownValue(
12494                        wkt::internal::UnknownEnumValue::Integer(value),
12495                    )),
12496                }
12497            }
12498        }
12499
12500        impl std::convert::From<&str> for ReplicationState {
12501            fn from(value: &str) -> Self {
12502                use std::string::ToString;
12503                match value {
12504                    "STATE_NOT_KNOWN" => Self::StateNotKnown,
12505                    "INITIALIZING" => Self::Initializing,
12506                    "PLANNED_MAINTENANCE" => Self::PlannedMaintenance,
12507                    "UNPLANNED_MAINTENANCE" => Self::UnplannedMaintenance,
12508                    "READY" => Self::Ready,
12509                    "READY_OPTIMIZING" => Self::ReadyOptimizing,
12510                    _ => Self::UnknownValue(replication_state::UnknownValue(
12511                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12512                    )),
12513                }
12514            }
12515        }
12516
12517        impl serde::ser::Serialize for ReplicationState {
12518            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12519            where
12520                S: serde::Serializer,
12521            {
12522                match self {
12523                    Self::StateNotKnown => serializer.serialize_i32(0),
12524                    Self::Initializing => serializer.serialize_i32(1),
12525                    Self::PlannedMaintenance => serializer.serialize_i32(2),
12526                    Self::UnplannedMaintenance => serializer.serialize_i32(3),
12527                    Self::Ready => serializer.serialize_i32(4),
12528                    Self::ReadyOptimizing => serializer.serialize_i32(5),
12529                    Self::UnknownValue(u) => u.0.serialize(serializer),
12530                }
12531            }
12532        }
12533
12534        impl<'de> serde::de::Deserialize<'de> for ReplicationState {
12535            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12536            where
12537                D: serde::Deserializer<'de>,
12538            {
12539                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReplicationState>::new(
12540                    ".google.bigtable.admin.v2.Table.ClusterState.ReplicationState",
12541                ))
12542            }
12543        }
12544    }
12545
12546    /// Defines an automated backup policy for a table
12547    #[derive(Clone, Default, PartialEq)]
12548    #[non_exhaustive]
12549    pub struct AutomatedBackupPolicy {
12550        /// Required. How long the automated backups should be retained. Values must
12551        /// be at least 3 days and at most 90 days.
12552        pub retention_period: std::option::Option<wkt::Duration>,
12553
12554        /// How frequently automated backups should occur. The only supported value
12555        /// at this time is 24 hours. An undefined frequency is treated as 24 hours.
12556        pub frequency: std::option::Option<wkt::Duration>,
12557
12558        /// Optional. A list of Cloud Bigtable zones where automated backups are
12559        /// allowed to be created. If empty, automated backups will be created in all
12560        /// zones of the instance. Locations are in the format
12561        /// `projects/{project}/locations/{zone}`.
12562        /// This field can only set for tables in Enterprise Plus instances.
12563        pub locations: std::vec::Vec<std::string::String>,
12564
12565        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12566    }
12567
12568    impl AutomatedBackupPolicy {
12569        pub fn new() -> Self {
12570            std::default::Default::default()
12571        }
12572
12573        /// Sets the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
12574        ///
12575        /// # Example
12576        /// ```ignore,no_run
12577        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12578        /// use wkt::Duration;
12579        /// let x = AutomatedBackupPolicy::new().set_retention_period(Duration::default()/* use setters */);
12580        /// ```
12581        pub fn set_retention_period<T>(mut self, v: T) -> Self
12582        where
12583            T: std::convert::Into<wkt::Duration>,
12584        {
12585            self.retention_period = std::option::Option::Some(v.into());
12586            self
12587        }
12588
12589        /// Sets or clears the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
12590        ///
12591        /// # Example
12592        /// ```ignore,no_run
12593        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12594        /// use wkt::Duration;
12595        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
12596        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(None::<Duration>);
12597        /// ```
12598        pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
12599        where
12600            T: std::convert::Into<wkt::Duration>,
12601        {
12602            self.retention_period = v.map(|x| x.into());
12603            self
12604        }
12605
12606        /// Sets the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
12607        ///
12608        /// # Example
12609        /// ```ignore,no_run
12610        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12611        /// use wkt::Duration;
12612        /// let x = AutomatedBackupPolicy::new().set_frequency(Duration::default()/* use setters */);
12613        /// ```
12614        pub fn set_frequency<T>(mut self, v: T) -> Self
12615        where
12616            T: std::convert::Into<wkt::Duration>,
12617        {
12618            self.frequency = std::option::Option::Some(v.into());
12619            self
12620        }
12621
12622        /// Sets or clears the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
12623        ///
12624        /// # Example
12625        /// ```ignore,no_run
12626        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12627        /// use wkt::Duration;
12628        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(Some(Duration::default()/* use setters */));
12629        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(None::<Duration>);
12630        /// ```
12631        pub fn set_or_clear_frequency<T>(mut self, v: std::option::Option<T>) -> Self
12632        where
12633            T: std::convert::Into<wkt::Duration>,
12634        {
12635            self.frequency = v.map(|x| x.into());
12636            self
12637        }
12638
12639        /// Sets the value of [locations][crate::model::table::AutomatedBackupPolicy::locations].
12640        ///
12641        /// # Example
12642        /// ```ignore,no_run
12643        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12644        /// let x = AutomatedBackupPolicy::new().set_locations(["a", "b", "c"]);
12645        /// ```
12646        pub fn set_locations<T, V>(mut self, v: T) -> Self
12647        where
12648            T: std::iter::IntoIterator<Item = V>,
12649            V: std::convert::Into<std::string::String>,
12650        {
12651            use std::iter::Iterator;
12652            self.locations = v.into_iter().map(|i| i.into()).collect();
12653            self
12654        }
12655    }
12656
12657    impl wkt::message::Message for AutomatedBackupPolicy {
12658        fn typename() -> &'static str {
12659            "type.googleapis.com/google.bigtable.admin.v2.Table.AutomatedBackupPolicy"
12660        }
12661    }
12662
12663    /// Possible timestamp granularities to use when keeping multiple versions
12664    /// of data in a table.
12665    ///
12666    /// # Working with unknown values
12667    ///
12668    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12669    /// additional enum variants at any time. Adding new variants is not considered
12670    /// a breaking change. Applications should write their code in anticipation of:
12671    ///
12672    /// - New values appearing in future releases of the client library, **and**
12673    /// - New values received dynamically, without application changes.
12674    ///
12675    /// Please consult the [Working with enums] section in the user guide for some
12676    /// guidelines.
12677    ///
12678    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12679    #[derive(Clone, Debug, PartialEq)]
12680    #[non_exhaustive]
12681    pub enum TimestampGranularity {
12682        /// The user did not specify a granularity. Should not be returned.
12683        /// When specified during table creation, MILLIS will be used.
12684        Unspecified,
12685        /// The table keeps data versioned at a granularity of 1ms.
12686        Millis,
12687        /// If set, the enum was initialized with an unknown value.
12688        ///
12689        /// Applications can examine the value using [TimestampGranularity::value] or
12690        /// [TimestampGranularity::name].
12691        UnknownValue(timestamp_granularity::UnknownValue),
12692    }
12693
12694    #[doc(hidden)]
12695    pub mod timestamp_granularity {
12696        #[allow(unused_imports)]
12697        use super::*;
12698        #[derive(Clone, Debug, PartialEq)]
12699        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12700    }
12701
12702    impl TimestampGranularity {
12703        /// Gets the enum value.
12704        ///
12705        /// Returns `None` if the enum contains an unknown value deserialized from
12706        /// the string representation of enums.
12707        pub fn value(&self) -> std::option::Option<i32> {
12708            match self {
12709                Self::Unspecified => std::option::Option::Some(0),
12710                Self::Millis => std::option::Option::Some(1),
12711                Self::UnknownValue(u) => u.0.value(),
12712            }
12713        }
12714
12715        /// Gets the enum value as a string.
12716        ///
12717        /// Returns `None` if the enum contains an unknown value deserialized from
12718        /// the integer representation of enums.
12719        pub fn name(&self) -> std::option::Option<&str> {
12720            match self {
12721                Self::Unspecified => std::option::Option::Some("TIMESTAMP_GRANULARITY_UNSPECIFIED"),
12722                Self::Millis => std::option::Option::Some("MILLIS"),
12723                Self::UnknownValue(u) => u.0.name(),
12724            }
12725        }
12726    }
12727
12728    impl std::default::Default for TimestampGranularity {
12729        fn default() -> Self {
12730            use std::convert::From;
12731            Self::from(0)
12732        }
12733    }
12734
12735    impl std::fmt::Display for TimestampGranularity {
12736        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12737            wkt::internal::display_enum(f, self.name(), self.value())
12738        }
12739    }
12740
12741    impl std::convert::From<i32> for TimestampGranularity {
12742        fn from(value: i32) -> Self {
12743            match value {
12744                0 => Self::Unspecified,
12745                1 => Self::Millis,
12746                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
12747                    wkt::internal::UnknownEnumValue::Integer(value),
12748                )),
12749            }
12750        }
12751    }
12752
12753    impl std::convert::From<&str> for TimestampGranularity {
12754        fn from(value: &str) -> Self {
12755            use std::string::ToString;
12756            match value {
12757                "TIMESTAMP_GRANULARITY_UNSPECIFIED" => Self::Unspecified,
12758                "MILLIS" => Self::Millis,
12759                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
12760                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12761                )),
12762            }
12763        }
12764    }
12765
12766    impl serde::ser::Serialize for TimestampGranularity {
12767        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12768        where
12769            S: serde::Serializer,
12770        {
12771            match self {
12772                Self::Unspecified => serializer.serialize_i32(0),
12773                Self::Millis => serializer.serialize_i32(1),
12774                Self::UnknownValue(u) => u.0.serialize(serializer),
12775            }
12776        }
12777    }
12778
12779    impl<'de> serde::de::Deserialize<'de> for TimestampGranularity {
12780        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12781        where
12782            D: serde::Deserializer<'de>,
12783        {
12784            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TimestampGranularity>::new(
12785                ".google.bigtable.admin.v2.Table.TimestampGranularity",
12786            ))
12787        }
12788    }
12789
12790    /// Defines a view over a table's fields.
12791    ///
12792    /// # Working with unknown values
12793    ///
12794    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12795    /// additional enum variants at any time. Adding new variants is not considered
12796    /// a breaking change. Applications should write their code in anticipation of:
12797    ///
12798    /// - New values appearing in future releases of the client library, **and**
12799    /// - New values received dynamically, without application changes.
12800    ///
12801    /// Please consult the [Working with enums] section in the user guide for some
12802    /// guidelines.
12803    ///
12804    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12805    #[derive(Clone, Debug, PartialEq)]
12806    #[non_exhaustive]
12807    pub enum View {
12808        /// Uses the default view for each method as documented in its request.
12809        Unspecified,
12810        /// Only populates `name`.
12811        NameOnly,
12812        /// Only populates `name` and fields related to the table's schema.
12813        SchemaView,
12814        /// Only populates `name` and fields related to the table's replication
12815        /// state.
12816        ReplicationView,
12817        /// Only populates `name` and fields related to the table's encryption state.
12818        EncryptionView,
12819        /// Populates all fields.
12820        Full,
12821        /// If set, the enum was initialized with an unknown value.
12822        ///
12823        /// Applications can examine the value using [View::value] or
12824        /// [View::name].
12825        UnknownValue(view::UnknownValue),
12826    }
12827
12828    #[doc(hidden)]
12829    pub mod view {
12830        #[allow(unused_imports)]
12831        use super::*;
12832        #[derive(Clone, Debug, PartialEq)]
12833        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12834    }
12835
12836    impl View {
12837        /// Gets the enum value.
12838        ///
12839        /// Returns `None` if the enum contains an unknown value deserialized from
12840        /// the string representation of enums.
12841        pub fn value(&self) -> std::option::Option<i32> {
12842            match self {
12843                Self::Unspecified => std::option::Option::Some(0),
12844                Self::NameOnly => std::option::Option::Some(1),
12845                Self::SchemaView => std::option::Option::Some(2),
12846                Self::ReplicationView => std::option::Option::Some(3),
12847                Self::EncryptionView => std::option::Option::Some(5),
12848                Self::Full => std::option::Option::Some(4),
12849                Self::UnknownValue(u) => u.0.value(),
12850            }
12851        }
12852
12853        /// Gets the enum value as a string.
12854        ///
12855        /// Returns `None` if the enum contains an unknown value deserialized from
12856        /// the integer representation of enums.
12857        pub fn name(&self) -> std::option::Option<&str> {
12858            match self {
12859                Self::Unspecified => std::option::Option::Some("VIEW_UNSPECIFIED"),
12860                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
12861                Self::SchemaView => std::option::Option::Some("SCHEMA_VIEW"),
12862                Self::ReplicationView => std::option::Option::Some("REPLICATION_VIEW"),
12863                Self::EncryptionView => std::option::Option::Some("ENCRYPTION_VIEW"),
12864                Self::Full => std::option::Option::Some("FULL"),
12865                Self::UnknownValue(u) => u.0.name(),
12866            }
12867        }
12868    }
12869
12870    impl std::default::Default for View {
12871        fn default() -> Self {
12872            use std::convert::From;
12873            Self::from(0)
12874        }
12875    }
12876
12877    impl std::fmt::Display for View {
12878        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12879            wkt::internal::display_enum(f, self.name(), self.value())
12880        }
12881    }
12882
12883    impl std::convert::From<i32> for View {
12884        fn from(value: i32) -> Self {
12885            match value {
12886                0 => Self::Unspecified,
12887                1 => Self::NameOnly,
12888                2 => Self::SchemaView,
12889                3 => Self::ReplicationView,
12890                4 => Self::Full,
12891                5 => Self::EncryptionView,
12892                _ => Self::UnknownValue(view::UnknownValue(
12893                    wkt::internal::UnknownEnumValue::Integer(value),
12894                )),
12895            }
12896        }
12897    }
12898
12899    impl std::convert::From<&str> for View {
12900        fn from(value: &str) -> Self {
12901            use std::string::ToString;
12902            match value {
12903                "VIEW_UNSPECIFIED" => Self::Unspecified,
12904                "NAME_ONLY" => Self::NameOnly,
12905                "SCHEMA_VIEW" => Self::SchemaView,
12906                "REPLICATION_VIEW" => Self::ReplicationView,
12907                "ENCRYPTION_VIEW" => Self::EncryptionView,
12908                "FULL" => Self::Full,
12909                _ => Self::UnknownValue(view::UnknownValue(
12910                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12911                )),
12912            }
12913        }
12914    }
12915
12916    impl serde::ser::Serialize for View {
12917        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12918        where
12919            S: serde::Serializer,
12920        {
12921            match self {
12922                Self::Unspecified => serializer.serialize_i32(0),
12923                Self::NameOnly => serializer.serialize_i32(1),
12924                Self::SchemaView => serializer.serialize_i32(2),
12925                Self::ReplicationView => serializer.serialize_i32(3),
12926                Self::EncryptionView => serializer.serialize_i32(5),
12927                Self::Full => serializer.serialize_i32(4),
12928                Self::UnknownValue(u) => u.0.serialize(serializer),
12929            }
12930        }
12931    }
12932
12933    impl<'de> serde::de::Deserialize<'de> for View {
12934        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12935        where
12936            D: serde::Deserializer<'de>,
12937        {
12938            deserializer.deserialize_any(wkt::internal::EnumVisitor::<View>::new(
12939                ".google.bigtable.admin.v2.Table.View",
12940            ))
12941        }
12942    }
12943
12944    #[derive(Clone, Debug, PartialEq)]
12945    #[non_exhaustive]
12946    pub enum AutomatedBackupConfig {
12947        /// If specified, automated backups are enabled for this table.
12948        /// Otherwise, automated backups are disabled.
12949        AutomatedBackupPolicy(std::boxed::Box<crate::model::table::AutomatedBackupPolicy>),
12950    }
12951}
12952
12953/// AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users
12954/// can configure access to each Authorized View independently from the table and
12955/// use the existing Data APIs to access the subset of data.
12956#[derive(Clone, Default, PartialEq)]
12957#[non_exhaustive]
12958pub struct AuthorizedView {
12959    /// Identifier. The name of this AuthorizedView.
12960    /// Values are of the form
12961    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`
12962    pub name: std::string::String,
12963
12964    /// The etag for this AuthorizedView.
12965    /// If this is provided on update, it must match the server's etag. The server
12966    /// returns ABORTED error on a mismatched etag.
12967    pub etag: std::string::String,
12968
12969    /// Set to true to make the AuthorizedView protected against deletion.
12970    /// The parent Table and containing Instance cannot be deleted if an
12971    /// AuthorizedView has this bit set.
12972    pub deletion_protection: bool,
12973
12974    /// The type of this AuthorizedView.
12975    pub authorized_view: std::option::Option<crate::model::authorized_view::AuthorizedView>,
12976
12977    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12978}
12979
12980impl AuthorizedView {
12981    pub fn new() -> Self {
12982        std::default::Default::default()
12983    }
12984
12985    /// Sets the value of [name][crate::model::AuthorizedView::name].
12986    ///
12987    /// # Example
12988    /// ```ignore,no_run
12989    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
12990    /// let x = AuthorizedView::new().set_name("example");
12991    /// ```
12992    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12993        self.name = v.into();
12994        self
12995    }
12996
12997    /// Sets the value of [etag][crate::model::AuthorizedView::etag].
12998    ///
12999    /// # Example
13000    /// ```ignore,no_run
13001    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13002    /// let x = AuthorizedView::new().set_etag("example");
13003    /// ```
13004    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13005        self.etag = v.into();
13006        self
13007    }
13008
13009    /// Sets the value of [deletion_protection][crate::model::AuthorizedView::deletion_protection].
13010    ///
13011    /// # Example
13012    /// ```ignore,no_run
13013    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13014    /// let x = AuthorizedView::new().set_deletion_protection(true);
13015    /// ```
13016    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13017        self.deletion_protection = v.into();
13018        self
13019    }
13020
13021    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view].
13022    ///
13023    /// Note that all the setters affecting `authorized_view` are mutually
13024    /// exclusive.
13025    ///
13026    /// # Example
13027    /// ```ignore,no_run
13028    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13029    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13030    /// let x = AuthorizedView::new().set_authorized_view(Some(
13031    ///     google_cloud_bigtable_admin_v2::model::authorized_view::AuthorizedView::SubsetView(SubsetView::default().into())));
13032    /// ```
13033    pub fn set_authorized_view<
13034        T: std::convert::Into<std::option::Option<crate::model::authorized_view::AuthorizedView>>,
13035    >(
13036        mut self,
13037        v: T,
13038    ) -> Self {
13039        self.authorized_view = v.into();
13040        self
13041    }
13042
13043    /// The value of [authorized_view][crate::model::AuthorizedView::authorized_view]
13044    /// if it holds a `SubsetView`, `None` if the field is not set or
13045    /// holds a different branch.
13046    pub fn subset_view(
13047        &self,
13048    ) -> std::option::Option<&std::boxed::Box<crate::model::authorized_view::SubsetView>> {
13049        #[allow(unreachable_patterns)]
13050        self.authorized_view.as_ref().and_then(|v| match v {
13051            crate::model::authorized_view::AuthorizedView::SubsetView(v) => {
13052                std::option::Option::Some(v)
13053            }
13054            _ => std::option::Option::None,
13055        })
13056    }
13057
13058    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view]
13059    /// to hold a `SubsetView`.
13060    ///
13061    /// Note that all the setters affecting `authorized_view` are
13062    /// mutually exclusive.
13063    ///
13064    /// # Example
13065    /// ```ignore,no_run
13066    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13067    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13068    /// let x = AuthorizedView::new().set_subset_view(SubsetView::default()/* use setters */);
13069    /// assert!(x.subset_view().is_some());
13070    /// ```
13071    pub fn set_subset_view<
13072        T: std::convert::Into<std::boxed::Box<crate::model::authorized_view::SubsetView>>,
13073    >(
13074        mut self,
13075        v: T,
13076    ) -> Self {
13077        self.authorized_view = std::option::Option::Some(
13078            crate::model::authorized_view::AuthorizedView::SubsetView(v.into()),
13079        );
13080        self
13081    }
13082}
13083
13084impl wkt::message::Message for AuthorizedView {
13085    fn typename() -> &'static str {
13086        "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView"
13087    }
13088}
13089
13090/// Defines additional types related to [AuthorizedView].
13091pub mod authorized_view {
13092    #[allow(unused_imports)]
13093    use super::*;
13094
13095    /// Subsets of a column family that are included in this AuthorizedView.
13096    #[derive(Clone, Default, PartialEq)]
13097    #[non_exhaustive]
13098    pub struct FamilySubsets {
13099        /// Individual exact column qualifiers to be included in the AuthorizedView.
13100        pub qualifiers: std::vec::Vec<::bytes::Bytes>,
13101
13102        /// Prefixes for qualifiers to be included in the AuthorizedView. Every
13103        /// qualifier starting with one of these prefixes is included in the
13104        /// AuthorizedView. To provide access to all qualifiers, include the empty
13105        /// string as a prefix
13106        /// ("").
13107        pub qualifier_prefixes: std::vec::Vec<::bytes::Bytes>,
13108
13109        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13110    }
13111
13112    impl FamilySubsets {
13113        pub fn new() -> Self {
13114            std::default::Default::default()
13115        }
13116
13117        /// Sets the value of [qualifiers][crate::model::authorized_view::FamilySubsets::qualifiers].
13118        ///
13119        /// # Example
13120        /// ```ignore,no_run
13121        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13122        /// let b1 = bytes::Bytes::from_static(b"abc");
13123        /// let b2 = bytes::Bytes::from_static(b"xyz");
13124        /// let x = FamilySubsets::new().set_qualifiers([b1, b2]);
13125        /// ```
13126        pub fn set_qualifiers<T, V>(mut self, v: T) -> Self
13127        where
13128            T: std::iter::IntoIterator<Item = V>,
13129            V: std::convert::Into<::bytes::Bytes>,
13130        {
13131            use std::iter::Iterator;
13132            self.qualifiers = v.into_iter().map(|i| i.into()).collect();
13133            self
13134        }
13135
13136        /// Sets the value of [qualifier_prefixes][crate::model::authorized_view::FamilySubsets::qualifier_prefixes].
13137        ///
13138        /// # Example
13139        /// ```ignore,no_run
13140        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13141        /// let b1 = bytes::Bytes::from_static(b"abc");
13142        /// let b2 = bytes::Bytes::from_static(b"xyz");
13143        /// let x = FamilySubsets::new().set_qualifier_prefixes([b1, b2]);
13144        /// ```
13145        pub fn set_qualifier_prefixes<T, V>(mut self, v: T) -> Self
13146        where
13147            T: std::iter::IntoIterator<Item = V>,
13148            V: std::convert::Into<::bytes::Bytes>,
13149        {
13150            use std::iter::Iterator;
13151            self.qualifier_prefixes = v.into_iter().map(|i| i.into()).collect();
13152            self
13153        }
13154    }
13155
13156    impl wkt::message::Message for FamilySubsets {
13157        fn typename() -> &'static str {
13158            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.FamilySubsets"
13159        }
13160    }
13161
13162    /// Defines a simple AuthorizedView that is a subset of the underlying Table.
13163    #[derive(Clone, Default, PartialEq)]
13164    #[non_exhaustive]
13165    pub struct SubsetView {
13166        /// Row prefixes to be included in the AuthorizedView.
13167        /// To provide access to all rows, include the empty string as a prefix ("").
13168        pub row_prefixes: std::vec::Vec<::bytes::Bytes>,
13169
13170        /// Map from column family name to the columns in this family to be included
13171        /// in the AuthorizedView.
13172        pub family_subsets: std::collections::HashMap<
13173            std::string::String,
13174            crate::model::authorized_view::FamilySubsets,
13175        >,
13176
13177        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13178    }
13179
13180    impl SubsetView {
13181        pub fn new() -> Self {
13182            std::default::Default::default()
13183        }
13184
13185        /// Sets the value of [row_prefixes][crate::model::authorized_view::SubsetView::row_prefixes].
13186        ///
13187        /// # Example
13188        /// ```ignore,no_run
13189        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13190        /// let b1 = bytes::Bytes::from_static(b"abc");
13191        /// let b2 = bytes::Bytes::from_static(b"xyz");
13192        /// let x = SubsetView::new().set_row_prefixes([b1, b2]);
13193        /// ```
13194        pub fn set_row_prefixes<T, V>(mut self, v: T) -> Self
13195        where
13196            T: std::iter::IntoIterator<Item = V>,
13197            V: std::convert::Into<::bytes::Bytes>,
13198        {
13199            use std::iter::Iterator;
13200            self.row_prefixes = v.into_iter().map(|i| i.into()).collect();
13201            self
13202        }
13203
13204        /// Sets the value of [family_subsets][crate::model::authorized_view::SubsetView::family_subsets].
13205        ///
13206        /// # Example
13207        /// ```ignore,no_run
13208        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13209        /// use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13210        /// let x = SubsetView::new().set_family_subsets([
13211        ///     ("key0", FamilySubsets::default()/* use setters */),
13212        ///     ("key1", FamilySubsets::default()/* use (different) setters */),
13213        /// ]);
13214        /// ```
13215        pub fn set_family_subsets<T, K, V>(mut self, v: T) -> Self
13216        where
13217            T: std::iter::IntoIterator<Item = (K, V)>,
13218            K: std::convert::Into<std::string::String>,
13219            V: std::convert::Into<crate::model::authorized_view::FamilySubsets>,
13220        {
13221            use std::iter::Iterator;
13222            self.family_subsets = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13223            self
13224        }
13225    }
13226
13227    impl wkt::message::Message for SubsetView {
13228        fn typename() -> &'static str {
13229            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.SubsetView"
13230        }
13231    }
13232
13233    /// Defines a subset of an AuthorizedView's fields.
13234    ///
13235    /// # Working with unknown values
13236    ///
13237    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13238    /// additional enum variants at any time. Adding new variants is not considered
13239    /// a breaking change. Applications should write their code in anticipation of:
13240    ///
13241    /// - New values appearing in future releases of the client library, **and**
13242    /// - New values received dynamically, without application changes.
13243    ///
13244    /// Please consult the [Working with enums] section in the user guide for some
13245    /// guidelines.
13246    ///
13247    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13248    #[derive(Clone, Debug, PartialEq)]
13249    #[non_exhaustive]
13250    pub enum ResponseView {
13251        /// Uses the default view for each method as documented in the request.
13252        Unspecified,
13253        /// Only populates `name`.
13254        NameOnly,
13255        /// Only populates the AuthorizedView's basic metadata. This includes:
13256        /// name, deletion_protection, etag.
13257        Basic,
13258        /// Populates every fields.
13259        Full,
13260        /// If set, the enum was initialized with an unknown value.
13261        ///
13262        /// Applications can examine the value using [ResponseView::value] or
13263        /// [ResponseView::name].
13264        UnknownValue(response_view::UnknownValue),
13265    }
13266
13267    #[doc(hidden)]
13268    pub mod response_view {
13269        #[allow(unused_imports)]
13270        use super::*;
13271        #[derive(Clone, Debug, PartialEq)]
13272        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13273    }
13274
13275    impl ResponseView {
13276        /// Gets the enum value.
13277        ///
13278        /// Returns `None` if the enum contains an unknown value deserialized from
13279        /// the string representation of enums.
13280        pub fn value(&self) -> std::option::Option<i32> {
13281            match self {
13282                Self::Unspecified => std::option::Option::Some(0),
13283                Self::NameOnly => std::option::Option::Some(1),
13284                Self::Basic => std::option::Option::Some(2),
13285                Self::Full => std::option::Option::Some(3),
13286                Self::UnknownValue(u) => u.0.value(),
13287            }
13288        }
13289
13290        /// Gets the enum value as a string.
13291        ///
13292        /// Returns `None` if the enum contains an unknown value deserialized from
13293        /// the integer representation of enums.
13294        pub fn name(&self) -> std::option::Option<&str> {
13295            match self {
13296                Self::Unspecified => std::option::Option::Some("RESPONSE_VIEW_UNSPECIFIED"),
13297                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
13298                Self::Basic => std::option::Option::Some("BASIC"),
13299                Self::Full => std::option::Option::Some("FULL"),
13300                Self::UnknownValue(u) => u.0.name(),
13301            }
13302        }
13303    }
13304
13305    impl std::default::Default for ResponseView {
13306        fn default() -> Self {
13307            use std::convert::From;
13308            Self::from(0)
13309        }
13310    }
13311
13312    impl std::fmt::Display for ResponseView {
13313        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13314            wkt::internal::display_enum(f, self.name(), self.value())
13315        }
13316    }
13317
13318    impl std::convert::From<i32> for ResponseView {
13319        fn from(value: i32) -> Self {
13320            match value {
13321                0 => Self::Unspecified,
13322                1 => Self::NameOnly,
13323                2 => Self::Basic,
13324                3 => Self::Full,
13325                _ => Self::UnknownValue(response_view::UnknownValue(
13326                    wkt::internal::UnknownEnumValue::Integer(value),
13327                )),
13328            }
13329        }
13330    }
13331
13332    impl std::convert::From<&str> for ResponseView {
13333        fn from(value: &str) -> Self {
13334            use std::string::ToString;
13335            match value {
13336                "RESPONSE_VIEW_UNSPECIFIED" => Self::Unspecified,
13337                "NAME_ONLY" => Self::NameOnly,
13338                "BASIC" => Self::Basic,
13339                "FULL" => Self::Full,
13340                _ => Self::UnknownValue(response_view::UnknownValue(
13341                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13342                )),
13343            }
13344        }
13345    }
13346
13347    impl serde::ser::Serialize for ResponseView {
13348        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13349        where
13350            S: serde::Serializer,
13351        {
13352            match self {
13353                Self::Unspecified => serializer.serialize_i32(0),
13354                Self::NameOnly => serializer.serialize_i32(1),
13355                Self::Basic => serializer.serialize_i32(2),
13356                Self::Full => serializer.serialize_i32(3),
13357                Self::UnknownValue(u) => u.0.serialize(serializer),
13358            }
13359        }
13360    }
13361
13362    impl<'de> serde::de::Deserialize<'de> for ResponseView {
13363        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13364        where
13365            D: serde::Deserializer<'de>,
13366        {
13367            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResponseView>::new(
13368                ".google.bigtable.admin.v2.AuthorizedView.ResponseView",
13369            ))
13370        }
13371    }
13372
13373    /// The type of this AuthorizedView.
13374    #[derive(Clone, Debug, PartialEq)]
13375    #[non_exhaustive]
13376    pub enum AuthorizedView {
13377        /// An AuthorizedView permitting access to an explicit subset of a Table.
13378        SubsetView(std::boxed::Box<crate::model::authorized_view::SubsetView>),
13379    }
13380}
13381
13382/// A set of columns within a table which share a common configuration.
13383#[derive(Clone, Default, PartialEq)]
13384#[non_exhaustive]
13385pub struct ColumnFamily {
13386    /// Garbage collection rule specified as a protobuf.
13387    /// Must serialize to at most 500 bytes.
13388    ///
13389    /// NOTE: Garbage collection executes opportunistically in the background, and
13390    /// so it's possible for reads to return a cell even if it matches the active
13391    /// GC expression for its family.
13392    pub gc_rule: std::option::Option<crate::model::GcRule>,
13393
13394    /// The type of data stored in each of this family's cell values, including its
13395    /// full encoding. If omitted, the family only serves raw untyped bytes.
13396    ///
13397    /// For now, only the `Aggregate` type is supported.
13398    ///
13399    /// `Aggregate` can only be set at family creation and is immutable afterwards.
13400    ///
13401    /// If `value_type` is `Aggregate`, written data must be compatible with:
13402    ///
13403    /// * `value_type.input_type` for `AddInput` mutations
13404    pub value_type: std::option::Option<crate::model::Type>,
13405
13406    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13407}
13408
13409impl ColumnFamily {
13410    pub fn new() -> Self {
13411        std::default::Default::default()
13412    }
13413
13414    /// Sets the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13415    ///
13416    /// # Example
13417    /// ```ignore,no_run
13418    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13419    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13420    /// let x = ColumnFamily::new().set_gc_rule(GcRule::default()/* use setters */);
13421    /// ```
13422    pub fn set_gc_rule<T>(mut self, v: T) -> Self
13423    where
13424        T: std::convert::Into<crate::model::GcRule>,
13425    {
13426        self.gc_rule = std::option::Option::Some(v.into());
13427        self
13428    }
13429
13430    /// Sets or clears the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13431    ///
13432    /// # Example
13433    /// ```ignore,no_run
13434    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13435    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13436    /// let x = ColumnFamily::new().set_or_clear_gc_rule(Some(GcRule::default()/* use setters */));
13437    /// let x = ColumnFamily::new().set_or_clear_gc_rule(None::<GcRule>);
13438    /// ```
13439    pub fn set_or_clear_gc_rule<T>(mut self, v: std::option::Option<T>) -> Self
13440    where
13441        T: std::convert::Into<crate::model::GcRule>,
13442    {
13443        self.gc_rule = v.map(|x| x.into());
13444        self
13445    }
13446
13447    /// Sets the value of [value_type][crate::model::ColumnFamily::value_type].
13448    ///
13449    /// # Example
13450    /// ```ignore,no_run
13451    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13452    /// use google_cloud_bigtable_admin_v2::model::Type;
13453    /// let x = ColumnFamily::new().set_value_type(Type::default()/* use setters */);
13454    /// ```
13455    pub fn set_value_type<T>(mut self, v: T) -> Self
13456    where
13457        T: std::convert::Into<crate::model::Type>,
13458    {
13459        self.value_type = std::option::Option::Some(v.into());
13460        self
13461    }
13462
13463    /// Sets or clears the value of [value_type][crate::model::ColumnFamily::value_type].
13464    ///
13465    /// # Example
13466    /// ```ignore,no_run
13467    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13468    /// use google_cloud_bigtable_admin_v2::model::Type;
13469    /// let x = ColumnFamily::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
13470    /// let x = ColumnFamily::new().set_or_clear_value_type(None::<Type>);
13471    /// ```
13472    pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
13473    where
13474        T: std::convert::Into<crate::model::Type>,
13475    {
13476        self.value_type = v.map(|x| x.into());
13477        self
13478    }
13479}
13480
13481impl wkt::message::Message for ColumnFamily {
13482    fn typename() -> &'static str {
13483        "type.googleapis.com/google.bigtable.admin.v2.ColumnFamily"
13484    }
13485}
13486
13487/// Rule for determining which cells to delete during garbage collection.
13488#[derive(Clone, Default, PartialEq)]
13489#[non_exhaustive]
13490pub struct GcRule {
13491    /// Garbage collection rules.
13492    pub rule: std::option::Option<crate::model::gc_rule::Rule>,
13493
13494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13495}
13496
13497impl GcRule {
13498    pub fn new() -> Self {
13499        std::default::Default::default()
13500    }
13501
13502    /// Sets the value of [rule][crate::model::GcRule::rule].
13503    ///
13504    /// Note that all the setters affecting `rule` are mutually
13505    /// exclusive.
13506    ///
13507    /// # Example
13508    /// ```ignore,no_run
13509    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13510    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Rule;
13511    /// let x = GcRule::new().set_rule(Some(Rule::MaxNumVersions(42)));
13512    /// ```
13513    pub fn set_rule<T: std::convert::Into<std::option::Option<crate::model::gc_rule::Rule>>>(
13514        mut self,
13515        v: T,
13516    ) -> Self {
13517        self.rule = v.into();
13518        self
13519    }
13520
13521    /// The value of [rule][crate::model::GcRule::rule]
13522    /// if it holds a `MaxNumVersions`, `None` if the field is not set or
13523    /// holds a different branch.
13524    pub fn max_num_versions(&self) -> std::option::Option<&i32> {
13525        #[allow(unreachable_patterns)]
13526        self.rule.as_ref().and_then(|v| match v {
13527            crate::model::gc_rule::Rule::MaxNumVersions(v) => std::option::Option::Some(v),
13528            _ => std::option::Option::None,
13529        })
13530    }
13531
13532    /// Sets the value of [rule][crate::model::GcRule::rule]
13533    /// to hold a `MaxNumVersions`.
13534    ///
13535    /// Note that all the setters affecting `rule` are
13536    /// mutually exclusive.
13537    ///
13538    /// # Example
13539    /// ```ignore,no_run
13540    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13541    /// let x = GcRule::new().set_max_num_versions(42);
13542    /// assert!(x.max_num_versions().is_some());
13543    /// assert!(x.max_age().is_none());
13544    /// assert!(x.intersection().is_none());
13545    /// assert!(x.union().is_none());
13546    /// ```
13547    pub fn set_max_num_versions<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13548        self.rule =
13549            std::option::Option::Some(crate::model::gc_rule::Rule::MaxNumVersions(v.into()));
13550        self
13551    }
13552
13553    /// The value of [rule][crate::model::GcRule::rule]
13554    /// if it holds a `MaxAge`, `None` if the field is not set or
13555    /// holds a different branch.
13556    pub fn max_age(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
13557        #[allow(unreachable_patterns)]
13558        self.rule.as_ref().and_then(|v| match v {
13559            crate::model::gc_rule::Rule::MaxAge(v) => std::option::Option::Some(v),
13560            _ => std::option::Option::None,
13561        })
13562    }
13563
13564    /// Sets the value of [rule][crate::model::GcRule::rule]
13565    /// to hold a `MaxAge`.
13566    ///
13567    /// Note that all the setters affecting `rule` are
13568    /// mutually exclusive.
13569    ///
13570    /// # Example
13571    /// ```ignore,no_run
13572    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13573    /// use wkt::Duration;
13574    /// let x = GcRule::new().set_max_age(Duration::default()/* use setters */);
13575    /// assert!(x.max_age().is_some());
13576    /// assert!(x.max_num_versions().is_none());
13577    /// assert!(x.intersection().is_none());
13578    /// assert!(x.union().is_none());
13579    /// ```
13580    pub fn set_max_age<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
13581        mut self,
13582        v: T,
13583    ) -> Self {
13584        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::MaxAge(v.into()));
13585        self
13586    }
13587
13588    /// The value of [rule][crate::model::GcRule::rule]
13589    /// if it holds a `Intersection`, `None` if the field is not set or
13590    /// holds a different branch.
13591    pub fn intersection(
13592        &self,
13593    ) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Intersection>> {
13594        #[allow(unreachable_patterns)]
13595        self.rule.as_ref().and_then(|v| match v {
13596            crate::model::gc_rule::Rule::Intersection(v) => std::option::Option::Some(v),
13597            _ => std::option::Option::None,
13598        })
13599    }
13600
13601    /// Sets the value of [rule][crate::model::GcRule::rule]
13602    /// to hold a `Intersection`.
13603    ///
13604    /// Note that all the setters affecting `rule` are
13605    /// mutually exclusive.
13606    ///
13607    /// # Example
13608    /// ```ignore,no_run
13609    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13610    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
13611    /// let x = GcRule::new().set_intersection(Intersection::default()/* use setters */);
13612    /// assert!(x.intersection().is_some());
13613    /// assert!(x.max_num_versions().is_none());
13614    /// assert!(x.max_age().is_none());
13615    /// assert!(x.union().is_none());
13616    /// ```
13617    pub fn set_intersection<
13618        T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Intersection>>,
13619    >(
13620        mut self,
13621        v: T,
13622    ) -> Self {
13623        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Intersection(v.into()));
13624        self
13625    }
13626
13627    /// The value of [rule][crate::model::GcRule::rule]
13628    /// if it holds a `Union`, `None` if the field is not set or
13629    /// holds a different branch.
13630    pub fn union(&self) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Union>> {
13631        #[allow(unreachable_patterns)]
13632        self.rule.as_ref().and_then(|v| match v {
13633            crate::model::gc_rule::Rule::Union(v) => std::option::Option::Some(v),
13634            _ => std::option::Option::None,
13635        })
13636    }
13637
13638    /// Sets the value of [rule][crate::model::GcRule::rule]
13639    /// to hold a `Union`.
13640    ///
13641    /// Note that all the setters affecting `rule` are
13642    /// mutually exclusive.
13643    ///
13644    /// # Example
13645    /// ```ignore,no_run
13646    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13647    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
13648    /// let x = GcRule::new().set_union(Union::default()/* use setters */);
13649    /// assert!(x.union().is_some());
13650    /// assert!(x.max_num_versions().is_none());
13651    /// assert!(x.max_age().is_none());
13652    /// assert!(x.intersection().is_none());
13653    /// ```
13654    pub fn set_union<T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Union>>>(
13655        mut self,
13656        v: T,
13657    ) -> Self {
13658        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Union(v.into()));
13659        self
13660    }
13661}
13662
13663impl wkt::message::Message for GcRule {
13664    fn typename() -> &'static str {
13665        "type.googleapis.com/google.bigtable.admin.v2.GcRule"
13666    }
13667}
13668
13669/// Defines additional types related to [GcRule].
13670pub mod gc_rule {
13671    #[allow(unused_imports)]
13672    use super::*;
13673
13674    /// A GcRule which deletes cells matching all of the given rules.
13675    #[derive(Clone, Default, PartialEq)]
13676    #[non_exhaustive]
13677    pub struct Intersection {
13678        /// Only delete cells which would be deleted by every element of `rules`.
13679        pub rules: std::vec::Vec<crate::model::GcRule>,
13680
13681        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13682    }
13683
13684    impl Intersection {
13685        pub fn new() -> Self {
13686            std::default::Default::default()
13687        }
13688
13689        /// Sets the value of [rules][crate::model::gc_rule::Intersection::rules].
13690        ///
13691        /// # Example
13692        /// ```ignore,no_run
13693        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
13694        /// use google_cloud_bigtable_admin_v2::model::GcRule;
13695        /// let x = Intersection::new()
13696        ///     .set_rules([
13697        ///         GcRule::default()/* use setters */,
13698        ///         GcRule::default()/* use (different) setters */,
13699        ///     ]);
13700        /// ```
13701        pub fn set_rules<T, V>(mut self, v: T) -> Self
13702        where
13703            T: std::iter::IntoIterator<Item = V>,
13704            V: std::convert::Into<crate::model::GcRule>,
13705        {
13706            use std::iter::Iterator;
13707            self.rules = v.into_iter().map(|i| i.into()).collect();
13708            self
13709        }
13710    }
13711
13712    impl wkt::message::Message for Intersection {
13713        fn typename() -> &'static str {
13714            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Intersection"
13715        }
13716    }
13717
13718    /// A GcRule which deletes cells matching any of the given rules.
13719    #[derive(Clone, Default, PartialEq)]
13720    #[non_exhaustive]
13721    pub struct Union {
13722        /// Delete cells which would be deleted by any element of `rules`.
13723        pub rules: std::vec::Vec<crate::model::GcRule>,
13724
13725        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13726    }
13727
13728    impl Union {
13729        pub fn new() -> Self {
13730            std::default::Default::default()
13731        }
13732
13733        /// Sets the value of [rules][crate::model::gc_rule::Union::rules].
13734        ///
13735        /// # Example
13736        /// ```ignore,no_run
13737        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
13738        /// use google_cloud_bigtable_admin_v2::model::GcRule;
13739        /// let x = Union::new()
13740        ///     .set_rules([
13741        ///         GcRule::default()/* use setters */,
13742        ///         GcRule::default()/* use (different) setters */,
13743        ///     ]);
13744        /// ```
13745        pub fn set_rules<T, V>(mut self, v: T) -> Self
13746        where
13747            T: std::iter::IntoIterator<Item = V>,
13748            V: std::convert::Into<crate::model::GcRule>,
13749        {
13750            use std::iter::Iterator;
13751            self.rules = v.into_iter().map(|i| i.into()).collect();
13752            self
13753        }
13754    }
13755
13756    impl wkt::message::Message for Union {
13757        fn typename() -> &'static str {
13758            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Union"
13759        }
13760    }
13761
13762    /// Garbage collection rules.
13763    #[derive(Clone, Debug, PartialEq)]
13764    #[non_exhaustive]
13765    pub enum Rule {
13766        /// Delete all cells in a column except the most recent N.
13767        MaxNumVersions(i32),
13768        /// Delete cells in a column older than the given age.
13769        /// Values must be at least one millisecond, and will be truncated to
13770        /// microsecond granularity.
13771        MaxAge(std::boxed::Box<wkt::Duration>),
13772        /// Delete cells that would be deleted by every nested rule.
13773        Intersection(std::boxed::Box<crate::model::gc_rule::Intersection>),
13774        /// Delete cells that would be deleted by any nested rule.
13775        Union(std::boxed::Box<crate::model::gc_rule::Union>),
13776    }
13777}
13778
13779/// Encryption information for a given resource.
13780/// If this resource is protected with customer managed encryption, the in-use
13781/// Cloud Key Management Service (Cloud KMS) key version is specified along with
13782/// its status.
13783#[derive(Clone, Default, PartialEq)]
13784#[non_exhaustive]
13785pub struct EncryptionInfo {
13786    /// Output only. The type of encryption used to protect this resource.
13787    pub encryption_type: crate::model::encryption_info::EncryptionType,
13788
13789    /// Output only. The status of encrypt/decrypt calls on underlying data for
13790    /// this resource. Regardless of status, the existing data is always encrypted
13791    /// at rest.
13792    pub encryption_status: std::option::Option<google_cloud_rpc::model::Status>,
13793
13794    /// Output only. The version of the Cloud KMS key specified in the parent
13795    /// cluster that is in use for the data underlying this table.
13796    pub kms_key_version: std::string::String,
13797
13798    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13799}
13800
13801impl EncryptionInfo {
13802    pub fn new() -> Self {
13803        std::default::Default::default()
13804    }
13805
13806    /// Sets the value of [encryption_type][crate::model::EncryptionInfo::encryption_type].
13807    ///
13808    /// # Example
13809    /// ```ignore,no_run
13810    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
13811    /// use google_cloud_bigtable_admin_v2::model::encryption_info::EncryptionType;
13812    /// let x0 = EncryptionInfo::new().set_encryption_type(EncryptionType::GoogleDefaultEncryption);
13813    /// let x1 = EncryptionInfo::new().set_encryption_type(EncryptionType::CustomerManagedEncryption);
13814    /// ```
13815    pub fn set_encryption_type<
13816        T: std::convert::Into<crate::model::encryption_info::EncryptionType>,
13817    >(
13818        mut self,
13819        v: T,
13820    ) -> Self {
13821        self.encryption_type = v.into();
13822        self
13823    }
13824
13825    /// Sets the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
13826    ///
13827    /// # Example
13828    /// ```ignore,no_run
13829    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
13830    /// use google_cloud_rpc::model::Status;
13831    /// let x = EncryptionInfo::new().set_encryption_status(Status::default()/* use setters */);
13832    /// ```
13833    pub fn set_encryption_status<T>(mut self, v: T) -> Self
13834    where
13835        T: std::convert::Into<google_cloud_rpc::model::Status>,
13836    {
13837        self.encryption_status = std::option::Option::Some(v.into());
13838        self
13839    }
13840
13841    /// Sets or clears the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
13842    ///
13843    /// # Example
13844    /// ```ignore,no_run
13845    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
13846    /// use google_cloud_rpc::model::Status;
13847    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(Some(Status::default()/* use setters */));
13848    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(None::<Status>);
13849    /// ```
13850    pub fn set_or_clear_encryption_status<T>(mut self, v: std::option::Option<T>) -> Self
13851    where
13852        T: std::convert::Into<google_cloud_rpc::model::Status>,
13853    {
13854        self.encryption_status = v.map(|x| x.into());
13855        self
13856    }
13857
13858    /// Sets the value of [kms_key_version][crate::model::EncryptionInfo::kms_key_version].
13859    ///
13860    /// # Example
13861    /// ```ignore,no_run
13862    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
13863    /// let x = EncryptionInfo::new().set_kms_key_version("example");
13864    /// ```
13865    pub fn set_kms_key_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13866        self.kms_key_version = v.into();
13867        self
13868    }
13869}
13870
13871impl wkt::message::Message for EncryptionInfo {
13872    fn typename() -> &'static str {
13873        "type.googleapis.com/google.bigtable.admin.v2.EncryptionInfo"
13874    }
13875}
13876
13877/// Defines additional types related to [EncryptionInfo].
13878pub mod encryption_info {
13879    #[allow(unused_imports)]
13880    use super::*;
13881
13882    /// Possible encryption types for a resource.
13883    ///
13884    /// # Working with unknown values
13885    ///
13886    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13887    /// additional enum variants at any time. Adding new variants is not considered
13888    /// a breaking change. Applications should write their code in anticipation of:
13889    ///
13890    /// - New values appearing in future releases of the client library, **and**
13891    /// - New values received dynamically, without application changes.
13892    ///
13893    /// Please consult the [Working with enums] section in the user guide for some
13894    /// guidelines.
13895    ///
13896    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13897    #[derive(Clone, Debug, PartialEq)]
13898    #[non_exhaustive]
13899    pub enum EncryptionType {
13900        /// Encryption type was not specified, though data at rest remains encrypted.
13901        Unspecified,
13902        /// The data backing this resource is encrypted at rest with a key that is
13903        /// fully managed by Google. No key version or status will be populated.
13904        /// This is the default state.
13905        GoogleDefaultEncryption,
13906        /// The data backing this resource is encrypted at rest with a key that is
13907        /// managed by the customer.
13908        /// The in-use version of the key and its status are populated for
13909        /// CMEK-protected tables.
13910        /// CMEK-protected backups are pinned to the key version that was in use at
13911        /// the time the backup was taken. This key version is populated but its
13912        /// status is not tracked and is reported as `UNKNOWN`.
13913        CustomerManagedEncryption,
13914        /// If set, the enum was initialized with an unknown value.
13915        ///
13916        /// Applications can examine the value using [EncryptionType::value] or
13917        /// [EncryptionType::name].
13918        UnknownValue(encryption_type::UnknownValue),
13919    }
13920
13921    #[doc(hidden)]
13922    pub mod encryption_type {
13923        #[allow(unused_imports)]
13924        use super::*;
13925        #[derive(Clone, Debug, PartialEq)]
13926        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13927    }
13928
13929    impl EncryptionType {
13930        /// Gets the enum value.
13931        ///
13932        /// Returns `None` if the enum contains an unknown value deserialized from
13933        /// the string representation of enums.
13934        pub fn value(&self) -> std::option::Option<i32> {
13935            match self {
13936                Self::Unspecified => std::option::Option::Some(0),
13937                Self::GoogleDefaultEncryption => std::option::Option::Some(1),
13938                Self::CustomerManagedEncryption => std::option::Option::Some(2),
13939                Self::UnknownValue(u) => u.0.value(),
13940            }
13941        }
13942
13943        /// Gets the enum value as a string.
13944        ///
13945        /// Returns `None` if the enum contains an unknown value deserialized from
13946        /// the integer representation of enums.
13947        pub fn name(&self) -> std::option::Option<&str> {
13948            match self {
13949                Self::Unspecified => std::option::Option::Some("ENCRYPTION_TYPE_UNSPECIFIED"),
13950                Self::GoogleDefaultEncryption => {
13951                    std::option::Option::Some("GOOGLE_DEFAULT_ENCRYPTION")
13952                }
13953                Self::CustomerManagedEncryption => {
13954                    std::option::Option::Some("CUSTOMER_MANAGED_ENCRYPTION")
13955                }
13956                Self::UnknownValue(u) => u.0.name(),
13957            }
13958        }
13959    }
13960
13961    impl std::default::Default for EncryptionType {
13962        fn default() -> Self {
13963            use std::convert::From;
13964            Self::from(0)
13965        }
13966    }
13967
13968    impl std::fmt::Display for EncryptionType {
13969        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13970            wkt::internal::display_enum(f, self.name(), self.value())
13971        }
13972    }
13973
13974    impl std::convert::From<i32> for EncryptionType {
13975        fn from(value: i32) -> Self {
13976            match value {
13977                0 => Self::Unspecified,
13978                1 => Self::GoogleDefaultEncryption,
13979                2 => Self::CustomerManagedEncryption,
13980                _ => Self::UnknownValue(encryption_type::UnknownValue(
13981                    wkt::internal::UnknownEnumValue::Integer(value),
13982                )),
13983            }
13984        }
13985    }
13986
13987    impl std::convert::From<&str> for EncryptionType {
13988        fn from(value: &str) -> Self {
13989            use std::string::ToString;
13990            match value {
13991                "ENCRYPTION_TYPE_UNSPECIFIED" => Self::Unspecified,
13992                "GOOGLE_DEFAULT_ENCRYPTION" => Self::GoogleDefaultEncryption,
13993                "CUSTOMER_MANAGED_ENCRYPTION" => Self::CustomerManagedEncryption,
13994                _ => Self::UnknownValue(encryption_type::UnknownValue(
13995                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13996                )),
13997            }
13998        }
13999    }
14000
14001    impl serde::ser::Serialize for EncryptionType {
14002        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14003        where
14004            S: serde::Serializer,
14005        {
14006            match self {
14007                Self::Unspecified => serializer.serialize_i32(0),
14008                Self::GoogleDefaultEncryption => serializer.serialize_i32(1),
14009                Self::CustomerManagedEncryption => serializer.serialize_i32(2),
14010                Self::UnknownValue(u) => u.0.serialize(serializer),
14011            }
14012        }
14013    }
14014
14015    impl<'de> serde::de::Deserialize<'de> for EncryptionType {
14016        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14017        where
14018            D: serde::Deserializer<'de>,
14019        {
14020            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionType>::new(
14021                ".google.bigtable.admin.v2.EncryptionInfo.EncryptionType",
14022            ))
14023        }
14024    }
14025}
14026
14027/// A snapshot of a table at a particular time. A snapshot can be used as a
14028/// checkpoint for data restoration or a data source for a new table.
14029///
14030/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
14031/// feature is not currently available to most Cloud Bigtable customers. This
14032/// feature might be changed in backward-incompatible ways and is not recommended
14033/// for production use. It is not subject to any SLA or deprecation policy.
14034#[derive(Clone, Default, PartialEq)]
14035#[non_exhaustive]
14036pub struct Snapshot {
14037    /// The unique name of the snapshot.
14038    /// Values are of the form
14039    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
14040    pub name: std::string::String,
14041
14042    /// Output only. The source table at the time the snapshot was taken.
14043    pub source_table: std::option::Option<crate::model::Table>,
14044
14045    /// Output only. The size of the data in the source table at the time the
14046    /// snapshot was taken. In some cases, this value may be computed
14047    /// asynchronously via a background process and a placeholder of 0 will be used
14048    /// in the meantime.
14049    pub data_size_bytes: i64,
14050
14051    /// Output only. The time when the snapshot is created.
14052    pub create_time: std::option::Option<wkt::Timestamp>,
14053
14054    /// The time when the snapshot will be deleted. The maximum amount of time a
14055    /// snapshot can stay active is 365 days. If 'ttl' is not specified,
14056    /// the default maximum of 365 days will be used.
14057    pub delete_time: std::option::Option<wkt::Timestamp>,
14058
14059    /// Output only. The current state of the snapshot.
14060    pub state: crate::model::snapshot::State,
14061
14062    /// Description of the snapshot.
14063    pub description: std::string::String,
14064
14065    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14066}
14067
14068impl Snapshot {
14069    pub fn new() -> Self {
14070        std::default::Default::default()
14071    }
14072
14073    /// Sets the value of [name][crate::model::Snapshot::name].
14074    ///
14075    /// # Example
14076    /// ```ignore,no_run
14077    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14078    /// let x = Snapshot::new().set_name("example");
14079    /// ```
14080    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14081        self.name = v.into();
14082        self
14083    }
14084
14085    /// Sets the value of [source_table][crate::model::Snapshot::source_table].
14086    ///
14087    /// # Example
14088    /// ```ignore,no_run
14089    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14090    /// use google_cloud_bigtable_admin_v2::model::Table;
14091    /// let x = Snapshot::new().set_source_table(Table::default()/* use setters */);
14092    /// ```
14093    pub fn set_source_table<T>(mut self, v: T) -> Self
14094    where
14095        T: std::convert::Into<crate::model::Table>,
14096    {
14097        self.source_table = std::option::Option::Some(v.into());
14098        self
14099    }
14100
14101    /// Sets or clears the value of [source_table][crate::model::Snapshot::source_table].
14102    ///
14103    /// # Example
14104    /// ```ignore,no_run
14105    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14106    /// use google_cloud_bigtable_admin_v2::model::Table;
14107    /// let x = Snapshot::new().set_or_clear_source_table(Some(Table::default()/* use setters */));
14108    /// let x = Snapshot::new().set_or_clear_source_table(None::<Table>);
14109    /// ```
14110    pub fn set_or_clear_source_table<T>(mut self, v: std::option::Option<T>) -> Self
14111    where
14112        T: std::convert::Into<crate::model::Table>,
14113    {
14114        self.source_table = v.map(|x| x.into());
14115        self
14116    }
14117
14118    /// Sets the value of [data_size_bytes][crate::model::Snapshot::data_size_bytes].
14119    ///
14120    /// # Example
14121    /// ```ignore,no_run
14122    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14123    /// let x = Snapshot::new().set_data_size_bytes(42);
14124    /// ```
14125    pub fn set_data_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14126        self.data_size_bytes = v.into();
14127        self
14128    }
14129
14130    /// Sets the value of [create_time][crate::model::Snapshot::create_time].
14131    ///
14132    /// # Example
14133    /// ```ignore,no_run
14134    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14135    /// use wkt::Timestamp;
14136    /// let x = Snapshot::new().set_create_time(Timestamp::default()/* use setters */);
14137    /// ```
14138    pub fn set_create_time<T>(mut self, v: T) -> Self
14139    where
14140        T: std::convert::Into<wkt::Timestamp>,
14141    {
14142        self.create_time = std::option::Option::Some(v.into());
14143        self
14144    }
14145
14146    /// Sets or clears the value of [create_time][crate::model::Snapshot::create_time].
14147    ///
14148    /// # Example
14149    /// ```ignore,no_run
14150    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14151    /// use wkt::Timestamp;
14152    /// let x = Snapshot::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14153    /// let x = Snapshot::new().set_or_clear_create_time(None::<Timestamp>);
14154    /// ```
14155    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14156    where
14157        T: std::convert::Into<wkt::Timestamp>,
14158    {
14159        self.create_time = v.map(|x| x.into());
14160        self
14161    }
14162
14163    /// Sets the value of [delete_time][crate::model::Snapshot::delete_time].
14164    ///
14165    /// # Example
14166    /// ```ignore,no_run
14167    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14168    /// use wkt::Timestamp;
14169    /// let x = Snapshot::new().set_delete_time(Timestamp::default()/* use setters */);
14170    /// ```
14171    pub fn set_delete_time<T>(mut self, v: T) -> Self
14172    where
14173        T: std::convert::Into<wkt::Timestamp>,
14174    {
14175        self.delete_time = std::option::Option::Some(v.into());
14176        self
14177    }
14178
14179    /// Sets or clears the value of [delete_time][crate::model::Snapshot::delete_time].
14180    ///
14181    /// # Example
14182    /// ```ignore,no_run
14183    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14184    /// use wkt::Timestamp;
14185    /// let x = Snapshot::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
14186    /// let x = Snapshot::new().set_or_clear_delete_time(None::<Timestamp>);
14187    /// ```
14188    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
14189    where
14190        T: std::convert::Into<wkt::Timestamp>,
14191    {
14192        self.delete_time = v.map(|x| x.into());
14193        self
14194    }
14195
14196    /// Sets the value of [state][crate::model::Snapshot::state].
14197    ///
14198    /// # Example
14199    /// ```ignore,no_run
14200    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14201    /// use google_cloud_bigtable_admin_v2::model::snapshot::State;
14202    /// let x0 = Snapshot::new().set_state(State::Ready);
14203    /// let x1 = Snapshot::new().set_state(State::Creating);
14204    /// ```
14205    pub fn set_state<T: std::convert::Into<crate::model::snapshot::State>>(mut self, v: T) -> Self {
14206        self.state = v.into();
14207        self
14208    }
14209
14210    /// Sets the value of [description][crate::model::Snapshot::description].
14211    ///
14212    /// # Example
14213    /// ```ignore,no_run
14214    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14215    /// let x = Snapshot::new().set_description("example");
14216    /// ```
14217    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14218        self.description = v.into();
14219        self
14220    }
14221}
14222
14223impl wkt::message::Message for Snapshot {
14224    fn typename() -> &'static str {
14225        "type.googleapis.com/google.bigtable.admin.v2.Snapshot"
14226    }
14227}
14228
14229/// Defines additional types related to [Snapshot].
14230pub mod snapshot {
14231    #[allow(unused_imports)]
14232    use super::*;
14233
14234    /// Possible states of a snapshot.
14235    ///
14236    /// # Working with unknown values
14237    ///
14238    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14239    /// additional enum variants at any time. Adding new variants is not considered
14240    /// a breaking change. Applications should write their code in anticipation of:
14241    ///
14242    /// - New values appearing in future releases of the client library, **and**
14243    /// - New values received dynamically, without application changes.
14244    ///
14245    /// Please consult the [Working with enums] section in the user guide for some
14246    /// guidelines.
14247    ///
14248    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14249    #[derive(Clone, Debug, PartialEq)]
14250    #[non_exhaustive]
14251    pub enum State {
14252        /// The state of the snapshot could not be determined.
14253        NotKnown,
14254        /// The snapshot has been successfully created and can serve all requests.
14255        Ready,
14256        /// The snapshot is currently being created, and may be destroyed if the
14257        /// creation process encounters an error. A snapshot may not be restored to a
14258        /// table while it is being created.
14259        Creating,
14260        /// If set, the enum was initialized with an unknown value.
14261        ///
14262        /// Applications can examine the value using [State::value] or
14263        /// [State::name].
14264        UnknownValue(state::UnknownValue),
14265    }
14266
14267    #[doc(hidden)]
14268    pub mod state {
14269        #[allow(unused_imports)]
14270        use super::*;
14271        #[derive(Clone, Debug, PartialEq)]
14272        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14273    }
14274
14275    impl State {
14276        /// Gets the enum value.
14277        ///
14278        /// Returns `None` if the enum contains an unknown value deserialized from
14279        /// the string representation of enums.
14280        pub fn value(&self) -> std::option::Option<i32> {
14281            match self {
14282                Self::NotKnown => std::option::Option::Some(0),
14283                Self::Ready => std::option::Option::Some(1),
14284                Self::Creating => std::option::Option::Some(2),
14285                Self::UnknownValue(u) => u.0.value(),
14286            }
14287        }
14288
14289        /// Gets the enum value as a string.
14290        ///
14291        /// Returns `None` if the enum contains an unknown value deserialized from
14292        /// the integer representation of enums.
14293        pub fn name(&self) -> std::option::Option<&str> {
14294            match self {
14295                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
14296                Self::Ready => std::option::Option::Some("READY"),
14297                Self::Creating => std::option::Option::Some("CREATING"),
14298                Self::UnknownValue(u) => u.0.name(),
14299            }
14300        }
14301    }
14302
14303    impl std::default::Default for State {
14304        fn default() -> Self {
14305            use std::convert::From;
14306            Self::from(0)
14307        }
14308    }
14309
14310    impl std::fmt::Display for State {
14311        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14312            wkt::internal::display_enum(f, self.name(), self.value())
14313        }
14314    }
14315
14316    impl std::convert::From<i32> for State {
14317        fn from(value: i32) -> Self {
14318            match value {
14319                0 => Self::NotKnown,
14320                1 => Self::Ready,
14321                2 => Self::Creating,
14322                _ => Self::UnknownValue(state::UnknownValue(
14323                    wkt::internal::UnknownEnumValue::Integer(value),
14324                )),
14325            }
14326        }
14327    }
14328
14329    impl std::convert::From<&str> for State {
14330        fn from(value: &str) -> Self {
14331            use std::string::ToString;
14332            match value {
14333                "STATE_NOT_KNOWN" => Self::NotKnown,
14334                "READY" => Self::Ready,
14335                "CREATING" => Self::Creating,
14336                _ => Self::UnknownValue(state::UnknownValue(
14337                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14338                )),
14339            }
14340        }
14341    }
14342
14343    impl serde::ser::Serialize for State {
14344        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14345        where
14346            S: serde::Serializer,
14347        {
14348            match self {
14349                Self::NotKnown => serializer.serialize_i32(0),
14350                Self::Ready => serializer.serialize_i32(1),
14351                Self::Creating => serializer.serialize_i32(2),
14352                Self::UnknownValue(u) => u.0.serialize(serializer),
14353            }
14354        }
14355    }
14356
14357    impl<'de> serde::de::Deserialize<'de> for State {
14358        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14359        where
14360            D: serde::Deserializer<'de>,
14361        {
14362            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14363                ".google.bigtable.admin.v2.Snapshot.State",
14364            ))
14365        }
14366    }
14367}
14368
14369/// A backup of a Cloud Bigtable table.
14370#[derive(Clone, Default, PartialEq)]
14371#[non_exhaustive]
14372pub struct Backup {
14373    /// A globally unique identifier for the backup which cannot be
14374    /// changed. Values are of the form
14375    /// `projects/{project}/instances/{instance}/clusters/{cluster}/
14376    /// backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
14377    /// The final segment of the name must be between 1 and 50 characters
14378    /// in length.
14379    ///
14380    /// The backup is stored in the cluster identified by the prefix of the backup
14381    /// name of the form
14382    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
14383    pub name: std::string::String,
14384
14385    /// Required. Immutable. Name of the table from which this backup was created.
14386    /// This needs to be in the same instance as the backup. Values are of the form
14387    /// `projects/{project}/instances/{instance}/tables/{source_table}`.
14388    pub source_table: std::string::String,
14389
14390    /// Output only. Name of the backup from which this backup was copied. If a
14391    /// backup is not created by copying a backup, this field will be empty. Values
14392    /// are of the form:
14393    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
14394    pub source_backup: std::string::String,
14395
14396    /// Required. The expiration time of the backup.
14397    /// When creating a backup or updating its `expire_time`, the value must be
14398    /// greater than the backup creation time by:
14399    ///
14400    /// - At least 6 hours
14401    /// - At most 90 days
14402    ///
14403    /// Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
14404    pub expire_time: std::option::Option<wkt::Timestamp>,
14405
14406    /// Output only. `start_time` is the time that the backup was started
14407    /// (i.e. approximately the time the
14408    /// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]
14409    /// request is received).  The row data in this backup will be no older than
14410    /// this timestamp.
14411    ///
14412    /// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
14413    pub start_time: std::option::Option<wkt::Timestamp>,
14414
14415    /// Output only. `end_time` is the time that the backup was finished. The row
14416    /// data in the backup will be no newer than this timestamp.
14417    pub end_time: std::option::Option<wkt::Timestamp>,
14418
14419    /// Output only. Size of the backup in bytes.
14420    pub size_bytes: i64,
14421
14422    /// Output only. The current state of the backup.
14423    pub state: crate::model::backup::State,
14424
14425    /// Output only. The encryption information for the backup.
14426    pub encryption_info: std::option::Option<crate::model::EncryptionInfo>,
14427
14428    /// Indicates the backup type of the backup.
14429    pub backup_type: crate::model::backup::BackupType,
14430
14431    /// The time at which the hot backup will be converted to a standard backup.
14432    /// Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
14433    /// hot backup to a standard backup. This value must be greater than the backup
14434    /// creation time by:
14435    ///
14436    /// - At least 24 hours
14437    ///
14438    /// This field only applies for hot backups. When creating or updating a
14439    /// standard backup, attempting to set this field will fail the request.
14440    pub hot_to_standard_time: std::option::Option<wkt::Timestamp>,
14441
14442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14443}
14444
14445impl Backup {
14446    pub fn new() -> Self {
14447        std::default::Default::default()
14448    }
14449
14450    /// Sets the value of [name][crate::model::Backup::name].
14451    ///
14452    /// # Example
14453    /// ```ignore,no_run
14454    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14455    /// let x = Backup::new().set_name("example");
14456    /// ```
14457    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14458        self.name = v.into();
14459        self
14460    }
14461
14462    /// Sets the value of [source_table][crate::model::Backup::source_table].
14463    ///
14464    /// # Example
14465    /// ```ignore,no_run
14466    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14467    /// let x = Backup::new().set_source_table("example");
14468    /// ```
14469    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14470        self.source_table = v.into();
14471        self
14472    }
14473
14474    /// Sets the value of [source_backup][crate::model::Backup::source_backup].
14475    ///
14476    /// # Example
14477    /// ```ignore,no_run
14478    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14479    /// let x = Backup::new().set_source_backup("example");
14480    /// ```
14481    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14482        self.source_backup = v.into();
14483        self
14484    }
14485
14486    /// Sets the value of [expire_time][crate::model::Backup::expire_time].
14487    ///
14488    /// # Example
14489    /// ```ignore,no_run
14490    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14491    /// use wkt::Timestamp;
14492    /// let x = Backup::new().set_expire_time(Timestamp::default()/* use setters */);
14493    /// ```
14494    pub fn set_expire_time<T>(mut self, v: T) -> Self
14495    where
14496        T: std::convert::Into<wkt::Timestamp>,
14497    {
14498        self.expire_time = std::option::Option::Some(v.into());
14499        self
14500    }
14501
14502    /// Sets or clears the value of [expire_time][crate::model::Backup::expire_time].
14503    ///
14504    /// # Example
14505    /// ```ignore,no_run
14506    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14507    /// use wkt::Timestamp;
14508    /// let x = Backup::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
14509    /// let x = Backup::new().set_or_clear_expire_time(None::<Timestamp>);
14510    /// ```
14511    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
14512    where
14513        T: std::convert::Into<wkt::Timestamp>,
14514    {
14515        self.expire_time = v.map(|x| x.into());
14516        self
14517    }
14518
14519    /// Sets the value of [start_time][crate::model::Backup::start_time].
14520    ///
14521    /// # Example
14522    /// ```ignore,no_run
14523    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14524    /// use wkt::Timestamp;
14525    /// let x = Backup::new().set_start_time(Timestamp::default()/* use setters */);
14526    /// ```
14527    pub fn set_start_time<T>(mut self, v: T) -> Self
14528    where
14529        T: std::convert::Into<wkt::Timestamp>,
14530    {
14531        self.start_time = std::option::Option::Some(v.into());
14532        self
14533    }
14534
14535    /// Sets or clears the value of [start_time][crate::model::Backup::start_time].
14536    ///
14537    /// # Example
14538    /// ```ignore,no_run
14539    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14540    /// use wkt::Timestamp;
14541    /// let x = Backup::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
14542    /// let x = Backup::new().set_or_clear_start_time(None::<Timestamp>);
14543    /// ```
14544    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
14545    where
14546        T: std::convert::Into<wkt::Timestamp>,
14547    {
14548        self.start_time = v.map(|x| x.into());
14549        self
14550    }
14551
14552    /// Sets the value of [end_time][crate::model::Backup::end_time].
14553    ///
14554    /// # Example
14555    /// ```ignore,no_run
14556    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14557    /// use wkt::Timestamp;
14558    /// let x = Backup::new().set_end_time(Timestamp::default()/* use setters */);
14559    /// ```
14560    pub fn set_end_time<T>(mut self, v: T) -> Self
14561    where
14562        T: std::convert::Into<wkt::Timestamp>,
14563    {
14564        self.end_time = std::option::Option::Some(v.into());
14565        self
14566    }
14567
14568    /// Sets or clears the value of [end_time][crate::model::Backup::end_time].
14569    ///
14570    /// # Example
14571    /// ```ignore,no_run
14572    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14573    /// use wkt::Timestamp;
14574    /// let x = Backup::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
14575    /// let x = Backup::new().set_or_clear_end_time(None::<Timestamp>);
14576    /// ```
14577    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
14578    where
14579        T: std::convert::Into<wkt::Timestamp>,
14580    {
14581        self.end_time = v.map(|x| x.into());
14582        self
14583    }
14584
14585    /// Sets the value of [size_bytes][crate::model::Backup::size_bytes].
14586    ///
14587    /// # Example
14588    /// ```ignore,no_run
14589    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14590    /// let x = Backup::new().set_size_bytes(42);
14591    /// ```
14592    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14593        self.size_bytes = v.into();
14594        self
14595    }
14596
14597    /// Sets the value of [state][crate::model::Backup::state].
14598    ///
14599    /// # Example
14600    /// ```ignore,no_run
14601    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14602    /// use google_cloud_bigtable_admin_v2::model::backup::State;
14603    /// let x0 = Backup::new().set_state(State::Creating);
14604    /// let x1 = Backup::new().set_state(State::Ready);
14605    /// ```
14606    pub fn set_state<T: std::convert::Into<crate::model::backup::State>>(mut self, v: T) -> Self {
14607        self.state = v.into();
14608        self
14609    }
14610
14611    /// Sets the value of [encryption_info][crate::model::Backup::encryption_info].
14612    ///
14613    /// # Example
14614    /// ```ignore,no_run
14615    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14616    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14617    /// let x = Backup::new().set_encryption_info(EncryptionInfo::default()/* use setters */);
14618    /// ```
14619    pub fn set_encryption_info<T>(mut self, v: T) -> Self
14620    where
14621        T: std::convert::Into<crate::model::EncryptionInfo>,
14622    {
14623        self.encryption_info = std::option::Option::Some(v.into());
14624        self
14625    }
14626
14627    /// Sets or clears the value of [encryption_info][crate::model::Backup::encryption_info].
14628    ///
14629    /// # Example
14630    /// ```ignore,no_run
14631    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14632    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14633    /// let x = Backup::new().set_or_clear_encryption_info(Some(EncryptionInfo::default()/* use setters */));
14634    /// let x = Backup::new().set_or_clear_encryption_info(None::<EncryptionInfo>);
14635    /// ```
14636    pub fn set_or_clear_encryption_info<T>(mut self, v: std::option::Option<T>) -> Self
14637    where
14638        T: std::convert::Into<crate::model::EncryptionInfo>,
14639    {
14640        self.encryption_info = v.map(|x| x.into());
14641        self
14642    }
14643
14644    /// Sets the value of [backup_type][crate::model::Backup::backup_type].
14645    ///
14646    /// # Example
14647    /// ```ignore,no_run
14648    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14649    /// use google_cloud_bigtable_admin_v2::model::backup::BackupType;
14650    /// let x0 = Backup::new().set_backup_type(BackupType::Standard);
14651    /// let x1 = Backup::new().set_backup_type(BackupType::Hot);
14652    /// ```
14653    pub fn set_backup_type<T: std::convert::Into<crate::model::backup::BackupType>>(
14654        mut self,
14655        v: T,
14656    ) -> Self {
14657        self.backup_type = v.into();
14658        self
14659    }
14660
14661    /// Sets the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
14662    ///
14663    /// # Example
14664    /// ```ignore,no_run
14665    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14666    /// use wkt::Timestamp;
14667    /// let x = Backup::new().set_hot_to_standard_time(Timestamp::default()/* use setters */);
14668    /// ```
14669    pub fn set_hot_to_standard_time<T>(mut self, v: T) -> Self
14670    where
14671        T: std::convert::Into<wkt::Timestamp>,
14672    {
14673        self.hot_to_standard_time = std::option::Option::Some(v.into());
14674        self
14675    }
14676
14677    /// Sets or clears the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
14678    ///
14679    /// # Example
14680    /// ```ignore,no_run
14681    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14682    /// use wkt::Timestamp;
14683    /// let x = Backup::new().set_or_clear_hot_to_standard_time(Some(Timestamp::default()/* use setters */));
14684    /// let x = Backup::new().set_or_clear_hot_to_standard_time(None::<Timestamp>);
14685    /// ```
14686    pub fn set_or_clear_hot_to_standard_time<T>(mut self, v: std::option::Option<T>) -> Self
14687    where
14688        T: std::convert::Into<wkt::Timestamp>,
14689    {
14690        self.hot_to_standard_time = v.map(|x| x.into());
14691        self
14692    }
14693}
14694
14695impl wkt::message::Message for Backup {
14696    fn typename() -> &'static str {
14697        "type.googleapis.com/google.bigtable.admin.v2.Backup"
14698    }
14699}
14700
14701/// Defines additional types related to [Backup].
14702pub mod backup {
14703    #[allow(unused_imports)]
14704    use super::*;
14705
14706    /// Indicates the current state of the backup.
14707    ///
14708    /// # Working with unknown values
14709    ///
14710    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14711    /// additional enum variants at any time. Adding new variants is not considered
14712    /// a breaking change. Applications should write their code in anticipation of:
14713    ///
14714    /// - New values appearing in future releases of the client library, **and**
14715    /// - New values received dynamically, without application changes.
14716    ///
14717    /// Please consult the [Working with enums] section in the user guide for some
14718    /// guidelines.
14719    ///
14720    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14721    #[derive(Clone, Debug, PartialEq)]
14722    #[non_exhaustive]
14723    pub enum State {
14724        /// Not specified.
14725        Unspecified,
14726        /// The pending backup is still being created. Operations on the
14727        /// backup may fail with `FAILED_PRECONDITION` in this state.
14728        Creating,
14729        /// The backup is complete and ready for use.
14730        Ready,
14731        /// If set, the enum was initialized with an unknown value.
14732        ///
14733        /// Applications can examine the value using [State::value] or
14734        /// [State::name].
14735        UnknownValue(state::UnknownValue),
14736    }
14737
14738    #[doc(hidden)]
14739    pub mod state {
14740        #[allow(unused_imports)]
14741        use super::*;
14742        #[derive(Clone, Debug, PartialEq)]
14743        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14744    }
14745
14746    impl State {
14747        /// Gets the enum value.
14748        ///
14749        /// Returns `None` if the enum contains an unknown value deserialized from
14750        /// the string representation of enums.
14751        pub fn value(&self) -> std::option::Option<i32> {
14752            match self {
14753                Self::Unspecified => std::option::Option::Some(0),
14754                Self::Creating => std::option::Option::Some(1),
14755                Self::Ready => std::option::Option::Some(2),
14756                Self::UnknownValue(u) => u.0.value(),
14757            }
14758        }
14759
14760        /// Gets the enum value as a string.
14761        ///
14762        /// Returns `None` if the enum contains an unknown value deserialized from
14763        /// the integer representation of enums.
14764        pub fn name(&self) -> std::option::Option<&str> {
14765            match self {
14766                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
14767                Self::Creating => std::option::Option::Some("CREATING"),
14768                Self::Ready => std::option::Option::Some("READY"),
14769                Self::UnknownValue(u) => u.0.name(),
14770            }
14771        }
14772    }
14773
14774    impl std::default::Default for State {
14775        fn default() -> Self {
14776            use std::convert::From;
14777            Self::from(0)
14778        }
14779    }
14780
14781    impl std::fmt::Display for State {
14782        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14783            wkt::internal::display_enum(f, self.name(), self.value())
14784        }
14785    }
14786
14787    impl std::convert::From<i32> for State {
14788        fn from(value: i32) -> Self {
14789            match value {
14790                0 => Self::Unspecified,
14791                1 => Self::Creating,
14792                2 => Self::Ready,
14793                _ => Self::UnknownValue(state::UnknownValue(
14794                    wkt::internal::UnknownEnumValue::Integer(value),
14795                )),
14796            }
14797        }
14798    }
14799
14800    impl std::convert::From<&str> for State {
14801        fn from(value: &str) -> Self {
14802            use std::string::ToString;
14803            match value {
14804                "STATE_UNSPECIFIED" => Self::Unspecified,
14805                "CREATING" => Self::Creating,
14806                "READY" => Self::Ready,
14807                _ => Self::UnknownValue(state::UnknownValue(
14808                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14809                )),
14810            }
14811        }
14812    }
14813
14814    impl serde::ser::Serialize for State {
14815        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14816        where
14817            S: serde::Serializer,
14818        {
14819            match self {
14820                Self::Unspecified => serializer.serialize_i32(0),
14821                Self::Creating => serializer.serialize_i32(1),
14822                Self::Ready => serializer.serialize_i32(2),
14823                Self::UnknownValue(u) => u.0.serialize(serializer),
14824            }
14825        }
14826    }
14827
14828    impl<'de> serde::de::Deserialize<'de> for State {
14829        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14830        where
14831            D: serde::Deserializer<'de>,
14832        {
14833            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14834                ".google.bigtable.admin.v2.Backup.State",
14835            ))
14836        }
14837    }
14838
14839    /// The type of the backup.
14840    ///
14841    /// # Working with unknown values
14842    ///
14843    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14844    /// additional enum variants at any time. Adding new variants is not considered
14845    /// a breaking change. Applications should write their code in anticipation of:
14846    ///
14847    /// - New values appearing in future releases of the client library, **and**
14848    /// - New values received dynamically, without application changes.
14849    ///
14850    /// Please consult the [Working with enums] section in the user guide for some
14851    /// guidelines.
14852    ///
14853    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14854    #[derive(Clone, Debug, PartialEq)]
14855    #[non_exhaustive]
14856    pub enum BackupType {
14857        /// Not specified.
14858        Unspecified,
14859        /// The default type for Cloud Bigtable managed backups. Supported for
14860        /// backups created in both HDD and SSD instances. Requires optimization when
14861        /// restored to a table in an SSD instance.
14862        Standard,
14863        /// A backup type with faster restore to SSD performance. Only supported for
14864        /// backups created in SSD instances. A new SSD table restored from a hot
14865        /// backup reaches production performance more quickly than a standard
14866        /// backup.
14867        Hot,
14868        /// If set, the enum was initialized with an unknown value.
14869        ///
14870        /// Applications can examine the value using [BackupType::value] or
14871        /// [BackupType::name].
14872        UnknownValue(backup_type::UnknownValue),
14873    }
14874
14875    #[doc(hidden)]
14876    pub mod backup_type {
14877        #[allow(unused_imports)]
14878        use super::*;
14879        #[derive(Clone, Debug, PartialEq)]
14880        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14881    }
14882
14883    impl BackupType {
14884        /// Gets the enum value.
14885        ///
14886        /// Returns `None` if the enum contains an unknown value deserialized from
14887        /// the string representation of enums.
14888        pub fn value(&self) -> std::option::Option<i32> {
14889            match self {
14890                Self::Unspecified => std::option::Option::Some(0),
14891                Self::Standard => std::option::Option::Some(1),
14892                Self::Hot => std::option::Option::Some(2),
14893                Self::UnknownValue(u) => u.0.value(),
14894            }
14895        }
14896
14897        /// Gets the enum value as a string.
14898        ///
14899        /// Returns `None` if the enum contains an unknown value deserialized from
14900        /// the integer representation of enums.
14901        pub fn name(&self) -> std::option::Option<&str> {
14902            match self {
14903                Self::Unspecified => std::option::Option::Some("BACKUP_TYPE_UNSPECIFIED"),
14904                Self::Standard => std::option::Option::Some("STANDARD"),
14905                Self::Hot => std::option::Option::Some("HOT"),
14906                Self::UnknownValue(u) => u.0.name(),
14907            }
14908        }
14909    }
14910
14911    impl std::default::Default for BackupType {
14912        fn default() -> Self {
14913            use std::convert::From;
14914            Self::from(0)
14915        }
14916    }
14917
14918    impl std::fmt::Display for BackupType {
14919        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14920            wkt::internal::display_enum(f, self.name(), self.value())
14921        }
14922    }
14923
14924    impl std::convert::From<i32> for BackupType {
14925        fn from(value: i32) -> Self {
14926            match value {
14927                0 => Self::Unspecified,
14928                1 => Self::Standard,
14929                2 => Self::Hot,
14930                _ => Self::UnknownValue(backup_type::UnknownValue(
14931                    wkt::internal::UnknownEnumValue::Integer(value),
14932                )),
14933            }
14934        }
14935    }
14936
14937    impl std::convert::From<&str> for BackupType {
14938        fn from(value: &str) -> Self {
14939            use std::string::ToString;
14940            match value {
14941                "BACKUP_TYPE_UNSPECIFIED" => Self::Unspecified,
14942                "STANDARD" => Self::Standard,
14943                "HOT" => Self::Hot,
14944                _ => Self::UnknownValue(backup_type::UnknownValue(
14945                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14946                )),
14947            }
14948        }
14949    }
14950
14951    impl serde::ser::Serialize for BackupType {
14952        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14953        where
14954            S: serde::Serializer,
14955        {
14956            match self {
14957                Self::Unspecified => serializer.serialize_i32(0),
14958                Self::Standard => serializer.serialize_i32(1),
14959                Self::Hot => serializer.serialize_i32(2),
14960                Self::UnknownValue(u) => u.0.serialize(serializer),
14961            }
14962        }
14963    }
14964
14965    impl<'de> serde::de::Deserialize<'de> for BackupType {
14966        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14967        where
14968            D: serde::Deserializer<'de>,
14969        {
14970            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupType>::new(
14971                ".google.bigtable.admin.v2.Backup.BackupType",
14972            ))
14973        }
14974    }
14975}
14976
14977/// Information about a backup.
14978#[derive(Clone, Default, PartialEq)]
14979#[non_exhaustive]
14980pub struct BackupInfo {
14981    /// Output only. Name of the backup.
14982    pub backup: std::string::String,
14983
14984    /// Output only. The time that the backup was started. Row data in the backup
14985    /// will be no older than this timestamp.
14986    pub start_time: std::option::Option<wkt::Timestamp>,
14987
14988    /// Output only. This time that the backup was finished. Row data in the
14989    /// backup will be no newer than this timestamp.
14990    pub end_time: std::option::Option<wkt::Timestamp>,
14991
14992    /// Output only. Name of the table the backup was created from.
14993    pub source_table: std::string::String,
14994
14995    /// Output only. Name of the backup from which this backup was copied. If a
14996    /// backup is not created by copying a backup, this field will be empty. Values
14997    /// are of the form:
14998    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
14999    pub source_backup: std::string::String,
15000
15001    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15002}
15003
15004impl BackupInfo {
15005    pub fn new() -> Self {
15006        std::default::Default::default()
15007    }
15008
15009    /// Sets the value of [backup][crate::model::BackupInfo::backup].
15010    ///
15011    /// # Example
15012    /// ```ignore,no_run
15013    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15014    /// let x = BackupInfo::new().set_backup("example");
15015    /// ```
15016    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15017        self.backup = v.into();
15018        self
15019    }
15020
15021    /// Sets the value of [start_time][crate::model::BackupInfo::start_time].
15022    ///
15023    /// # Example
15024    /// ```ignore,no_run
15025    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15026    /// use wkt::Timestamp;
15027    /// let x = BackupInfo::new().set_start_time(Timestamp::default()/* use setters */);
15028    /// ```
15029    pub fn set_start_time<T>(mut self, v: T) -> Self
15030    where
15031        T: std::convert::Into<wkt::Timestamp>,
15032    {
15033        self.start_time = std::option::Option::Some(v.into());
15034        self
15035    }
15036
15037    /// Sets or clears the value of [start_time][crate::model::BackupInfo::start_time].
15038    ///
15039    /// # Example
15040    /// ```ignore,no_run
15041    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15042    /// use wkt::Timestamp;
15043    /// let x = BackupInfo::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
15044    /// let x = BackupInfo::new().set_or_clear_start_time(None::<Timestamp>);
15045    /// ```
15046    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
15047    where
15048        T: std::convert::Into<wkt::Timestamp>,
15049    {
15050        self.start_time = v.map(|x| x.into());
15051        self
15052    }
15053
15054    /// Sets the value of [end_time][crate::model::BackupInfo::end_time].
15055    ///
15056    /// # Example
15057    /// ```ignore,no_run
15058    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15059    /// use wkt::Timestamp;
15060    /// let x = BackupInfo::new().set_end_time(Timestamp::default()/* use setters */);
15061    /// ```
15062    pub fn set_end_time<T>(mut self, v: T) -> Self
15063    where
15064        T: std::convert::Into<wkt::Timestamp>,
15065    {
15066        self.end_time = std::option::Option::Some(v.into());
15067        self
15068    }
15069
15070    /// Sets or clears the value of [end_time][crate::model::BackupInfo::end_time].
15071    ///
15072    /// # Example
15073    /// ```ignore,no_run
15074    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15075    /// use wkt::Timestamp;
15076    /// let x = BackupInfo::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15077    /// let x = BackupInfo::new().set_or_clear_end_time(None::<Timestamp>);
15078    /// ```
15079    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15080    where
15081        T: std::convert::Into<wkt::Timestamp>,
15082    {
15083        self.end_time = v.map(|x| x.into());
15084        self
15085    }
15086
15087    /// Sets the value of [source_table][crate::model::BackupInfo::source_table].
15088    ///
15089    /// # Example
15090    /// ```ignore,no_run
15091    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15092    /// let x = BackupInfo::new().set_source_table("example");
15093    /// ```
15094    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15095        self.source_table = v.into();
15096        self
15097    }
15098
15099    /// Sets the value of [source_backup][crate::model::BackupInfo::source_backup].
15100    ///
15101    /// # Example
15102    /// ```ignore,no_run
15103    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15104    /// let x = BackupInfo::new().set_source_backup("example");
15105    /// ```
15106    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15107        self.source_backup = v.into();
15108        self
15109    }
15110}
15111
15112impl wkt::message::Message for BackupInfo {
15113    fn typename() -> &'static str {
15114        "type.googleapis.com/google.bigtable.admin.v2.BackupInfo"
15115    }
15116}
15117
15118/// Config for tiered storage.
15119/// A valid config must have a valid TieredStorageRule. Otherwise the whole
15120/// TieredStorageConfig must be unset.
15121/// By default all data is stored in the SSD tier (only SSD instances can
15122/// configure tiered storage).
15123#[derive(Clone, Default, PartialEq)]
15124#[non_exhaustive]
15125pub struct TieredStorageConfig {
15126    /// Rule to specify what data is stored in the infrequent access(IA) tier.
15127    /// The IA tier allows storing more data per node with reduced performance.
15128    pub infrequent_access: std::option::Option<crate::model::TieredStorageRule>,
15129
15130    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15131}
15132
15133impl TieredStorageConfig {
15134    pub fn new() -> Self {
15135        std::default::Default::default()
15136    }
15137
15138    /// Sets the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
15139    ///
15140    /// # Example
15141    /// ```ignore,no_run
15142    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
15143    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15144    /// let x = TieredStorageConfig::new().set_infrequent_access(TieredStorageRule::default()/* use setters */);
15145    /// ```
15146    pub fn set_infrequent_access<T>(mut self, v: T) -> Self
15147    where
15148        T: std::convert::Into<crate::model::TieredStorageRule>,
15149    {
15150        self.infrequent_access = std::option::Option::Some(v.into());
15151        self
15152    }
15153
15154    /// Sets or clears the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
15155    ///
15156    /// # Example
15157    /// ```ignore,no_run
15158    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
15159    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15160    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(Some(TieredStorageRule::default()/* use setters */));
15161    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(None::<TieredStorageRule>);
15162    /// ```
15163    pub fn set_or_clear_infrequent_access<T>(mut self, v: std::option::Option<T>) -> Self
15164    where
15165        T: std::convert::Into<crate::model::TieredStorageRule>,
15166    {
15167        self.infrequent_access = v.map(|x| x.into());
15168        self
15169    }
15170}
15171
15172impl wkt::message::Message for TieredStorageConfig {
15173    fn typename() -> &'static str {
15174        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageConfig"
15175    }
15176}
15177
15178/// Rule to specify what data is stored in a storage tier.
15179#[derive(Clone, Default, PartialEq)]
15180#[non_exhaustive]
15181pub struct TieredStorageRule {
15182    /// Rules to specify what data is stored in this tier.
15183    pub rule: std::option::Option<crate::model::tiered_storage_rule::Rule>,
15184
15185    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15186}
15187
15188impl TieredStorageRule {
15189    pub fn new() -> Self {
15190        std::default::Default::default()
15191    }
15192
15193    /// Sets the value of [rule][crate::model::TieredStorageRule::rule].
15194    ///
15195    /// Note that all the setters affecting `rule` are mutually
15196    /// exclusive.
15197    ///
15198    /// # Example
15199    /// ```ignore,no_run
15200    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15201    /// use wkt::Duration;
15202    /// let x = TieredStorageRule::new().set_rule(Some(
15203    ///     google_cloud_bigtable_admin_v2::model::tiered_storage_rule::Rule::IncludeIfOlderThan(Duration::default().into())));
15204    /// ```
15205    pub fn set_rule<
15206        T: std::convert::Into<std::option::Option<crate::model::tiered_storage_rule::Rule>>,
15207    >(
15208        mut self,
15209        v: T,
15210    ) -> Self {
15211        self.rule = v.into();
15212        self
15213    }
15214
15215    /// The value of [rule][crate::model::TieredStorageRule::rule]
15216    /// if it holds a `IncludeIfOlderThan`, `None` if the field is not set or
15217    /// holds a different branch.
15218    pub fn include_if_older_than(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
15219        #[allow(unreachable_patterns)]
15220        self.rule.as_ref().and_then(|v| match v {
15221            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v) => {
15222                std::option::Option::Some(v)
15223            }
15224            _ => std::option::Option::None,
15225        })
15226    }
15227
15228    /// Sets the value of [rule][crate::model::TieredStorageRule::rule]
15229    /// to hold a `IncludeIfOlderThan`.
15230    ///
15231    /// Note that all the setters affecting `rule` are
15232    /// mutually exclusive.
15233    ///
15234    /// # Example
15235    /// ```ignore,no_run
15236    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15237    /// use wkt::Duration;
15238    /// let x = TieredStorageRule::new().set_include_if_older_than(Duration::default()/* use setters */);
15239    /// assert!(x.include_if_older_than().is_some());
15240    /// ```
15241    pub fn set_include_if_older_than<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
15242        mut self,
15243        v: T,
15244    ) -> Self {
15245        self.rule = std::option::Option::Some(
15246            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v.into()),
15247        );
15248        self
15249    }
15250}
15251
15252impl wkt::message::Message for TieredStorageRule {
15253    fn typename() -> &'static str {
15254        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageRule"
15255    }
15256}
15257
15258/// Defines additional types related to [TieredStorageRule].
15259pub mod tiered_storage_rule {
15260    #[allow(unused_imports)]
15261    use super::*;
15262
15263    /// Rules to specify what data is stored in this tier.
15264    #[derive(Clone, Debug, PartialEq)]
15265    #[non_exhaustive]
15266    pub enum Rule {
15267        /// Include cells older than the given age.
15268        /// For the infrequent access tier, this value must be at least 30 days.
15269        IncludeIfOlderThan(std::boxed::Box<wkt::Duration>),
15270    }
15271}
15272
15273/// Represents a protobuf schema.
15274#[derive(Clone, Default, PartialEq)]
15275#[non_exhaustive]
15276pub struct ProtoSchema {
15277    /// Required. Contains a protobuf-serialized
15278    /// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
15279    /// which could include multiple proto files.
15280    /// To generate it, [install](https://grpc.io/docs/protoc-installation/) and
15281    /// run `protoc` with
15282    /// `--include_imports` and `--descriptor_set_out`. For example, to generate
15283    /// for moon/shot/app.proto, run
15284    ///
15285    /// ```norust
15286    /// $protoc  --proto_path=/app_path --proto_path=/lib_path \
15287    ///          --include_imports \
15288    ///          --descriptor_set_out=descriptors.pb \
15289    ///          moon/shot/app.proto
15290    /// ```
15291    ///
15292    /// For more details, see protobuffer [self
15293    /// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
15294    pub proto_descriptors: ::bytes::Bytes,
15295
15296    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15297}
15298
15299impl ProtoSchema {
15300    pub fn new() -> Self {
15301        std::default::Default::default()
15302    }
15303
15304    /// Sets the value of [proto_descriptors][crate::model::ProtoSchema::proto_descriptors].
15305    ///
15306    /// # Example
15307    /// ```ignore,no_run
15308    /// # use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15309    /// let x = ProtoSchema::new().set_proto_descriptors(bytes::Bytes::from_static(b"example"));
15310    /// ```
15311    pub fn set_proto_descriptors<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
15312        self.proto_descriptors = v.into();
15313        self
15314    }
15315}
15316
15317impl wkt::message::Message for ProtoSchema {
15318    fn typename() -> &'static str {
15319        "type.googleapis.com/google.bigtable.admin.v2.ProtoSchema"
15320    }
15321}
15322
15323/// A named collection of related schemas.
15324#[derive(Clone, Default, PartialEq)]
15325#[non_exhaustive]
15326pub struct SchemaBundle {
15327    /// Identifier. The unique name identifying this schema bundle.
15328    /// Values are of the form
15329    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
15330    pub name: std::string::String,
15331
15332    /// Optional. The etag for this schema bundle.
15333    /// This may be sent on update and delete requests to ensure the
15334    /// client has an up-to-date value before proceeding. The server
15335    /// returns an ABORTED error on a mismatched etag.
15336    pub etag: std::string::String,
15337
15338    /// The type of this schema bundle. The oneof case cannot change after
15339    /// creation.
15340    pub r#type: std::option::Option<crate::model::schema_bundle::Type>,
15341
15342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15343}
15344
15345impl SchemaBundle {
15346    pub fn new() -> Self {
15347        std::default::Default::default()
15348    }
15349
15350    /// Sets the value of [name][crate::model::SchemaBundle::name].
15351    ///
15352    /// # Example
15353    /// ```ignore,no_run
15354    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15355    /// let x = SchemaBundle::new().set_name("example");
15356    /// ```
15357    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15358        self.name = v.into();
15359        self
15360    }
15361
15362    /// Sets the value of [etag][crate::model::SchemaBundle::etag].
15363    ///
15364    /// # Example
15365    /// ```ignore,no_run
15366    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15367    /// let x = SchemaBundle::new().set_etag("example");
15368    /// ```
15369    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15370        self.etag = v.into();
15371        self
15372    }
15373
15374    /// Sets the value of [r#type][crate::model::SchemaBundle::type].
15375    ///
15376    /// Note that all the setters affecting `r#type` are mutually
15377    /// exclusive.
15378    ///
15379    /// # Example
15380    /// ```ignore,no_run
15381    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15382    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15383    /// let x = SchemaBundle::new().set_type(Some(
15384    ///     google_cloud_bigtable_admin_v2::model::schema_bundle::Type::ProtoSchema(ProtoSchema::default().into())));
15385    /// ```
15386    pub fn set_type<
15387        T: std::convert::Into<std::option::Option<crate::model::schema_bundle::Type>>,
15388    >(
15389        mut self,
15390        v: T,
15391    ) -> Self {
15392        self.r#type = v.into();
15393        self
15394    }
15395
15396    /// The value of [r#type][crate::model::SchemaBundle::r#type]
15397    /// if it holds a `ProtoSchema`, `None` if the field is not set or
15398    /// holds a different branch.
15399    pub fn proto_schema(&self) -> std::option::Option<&std::boxed::Box<crate::model::ProtoSchema>> {
15400        #[allow(unreachable_patterns)]
15401        self.r#type.as_ref().and_then(|v| match v {
15402            crate::model::schema_bundle::Type::ProtoSchema(v) => std::option::Option::Some(v),
15403            _ => std::option::Option::None,
15404        })
15405    }
15406
15407    /// Sets the value of [r#type][crate::model::SchemaBundle::r#type]
15408    /// to hold a `ProtoSchema`.
15409    ///
15410    /// Note that all the setters affecting `r#type` are
15411    /// mutually exclusive.
15412    ///
15413    /// # Example
15414    /// ```ignore,no_run
15415    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15416    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15417    /// let x = SchemaBundle::new().set_proto_schema(ProtoSchema::default()/* use setters */);
15418    /// assert!(x.proto_schema().is_some());
15419    /// ```
15420    pub fn set_proto_schema<T: std::convert::Into<std::boxed::Box<crate::model::ProtoSchema>>>(
15421        mut self,
15422        v: T,
15423    ) -> Self {
15424        self.r#type =
15425            std::option::Option::Some(crate::model::schema_bundle::Type::ProtoSchema(v.into()));
15426        self
15427    }
15428}
15429
15430impl wkt::message::Message for SchemaBundle {
15431    fn typename() -> &'static str {
15432        "type.googleapis.com/google.bigtable.admin.v2.SchemaBundle"
15433    }
15434}
15435
15436/// Defines additional types related to [SchemaBundle].
15437pub mod schema_bundle {
15438    #[allow(unused_imports)]
15439    use super::*;
15440
15441    /// The type of this schema bundle. The oneof case cannot change after
15442    /// creation.
15443    #[derive(Clone, Debug, PartialEq)]
15444    #[non_exhaustive]
15445    pub enum Type {
15446        /// Schema for Protobufs.
15447        ProtoSchema(std::boxed::Box<crate::model::ProtoSchema>),
15448    }
15449}
15450
15451/// `Type` represents the type of data that is written to, read from, or stored
15452/// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
15453/// familiarity and consistency across products and features.
15454///
15455/// For compatibility with Bigtable's existing untyped APIs, each `Type` includes
15456/// an `Encoding` which describes how to convert to or from the underlying data.
15457///
15458/// Each encoding can operate in one of two modes:
15459///
15460/// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)`
15461///   if and only if `X <= Y`. This is useful anywhere sort order is important,
15462///   for example when encoding keys.
15463/// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then
15464///   `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For
15465///   example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}"
15466///   are valid encodings of the same JSON value.
15467///
15468/// The API clearly documents which mode is used wherever an encoding can be
15469/// configured. Each encoding also documents which values are supported in which
15470/// modes. For example, when encoding INT64 as a numeric STRING, negative numbers
15471/// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but
15472/// `STRING("-00001") > STRING("00001")`.
15473#[derive(Clone, Default, PartialEq)]
15474#[non_exhaustive]
15475pub struct Type {
15476    /// The kind of type that this represents.
15477    pub kind: std::option::Option<crate::model::r#type::Kind>,
15478
15479    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15480}
15481
15482impl Type {
15483    pub fn new() -> Self {
15484        std::default::Default::default()
15485    }
15486
15487    /// Sets the value of [kind][crate::model::Type::kind].
15488    ///
15489    /// Note that all the setters affecting `kind` are mutually
15490    /// exclusive.
15491    ///
15492    /// # Example
15493    /// ```ignore,no_run
15494    /// # use google_cloud_bigtable_admin_v2::model::Type;
15495    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
15496    /// let x = Type::new().set_kind(Some(
15497    ///     google_cloud_bigtable_admin_v2::model::r#type::Kind::BytesType(Bytes::default().into())));
15498    /// ```
15499    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::r#type::Kind>>>(
15500        mut self,
15501        v: T,
15502    ) -> Self {
15503        self.kind = v.into();
15504        self
15505    }
15506
15507    /// The value of [kind][crate::model::Type::kind]
15508    /// if it holds a `BytesType`, `None` if the field is not set or
15509    /// holds a different branch.
15510    pub fn bytes_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bytes>> {
15511        #[allow(unreachable_patterns)]
15512        self.kind.as_ref().and_then(|v| match v {
15513            crate::model::r#type::Kind::BytesType(v) => std::option::Option::Some(v),
15514            _ => std::option::Option::None,
15515        })
15516    }
15517
15518    /// Sets the value of [kind][crate::model::Type::kind]
15519    /// to hold a `BytesType`.
15520    ///
15521    /// Note that all the setters affecting `kind` are
15522    /// mutually exclusive.
15523    ///
15524    /// # Example
15525    /// ```ignore,no_run
15526    /// # use google_cloud_bigtable_admin_v2::model::Type;
15527    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
15528    /// let x = Type::new().set_bytes_type(Bytes::default()/* use setters */);
15529    /// assert!(x.bytes_type().is_some());
15530    /// assert!(x.string_type().is_none());
15531    /// assert!(x.int64_type().is_none());
15532    /// assert!(x.float32_type().is_none());
15533    /// assert!(x.float64_type().is_none());
15534    /// assert!(x.bool_type().is_none());
15535    /// assert!(x.timestamp_type().is_none());
15536    /// assert!(x.date_type().is_none());
15537    /// assert!(x.aggregate_type().is_none());
15538    /// assert!(x.struct_type().is_none());
15539    /// assert!(x.array_type().is_none());
15540    /// assert!(x.map_type().is_none());
15541    /// assert!(x.proto_type().is_none());
15542    /// assert!(x.enum_type().is_none());
15543    /// ```
15544    pub fn set_bytes_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bytes>>>(
15545        mut self,
15546        v: T,
15547    ) -> Self {
15548        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BytesType(v.into()));
15549        self
15550    }
15551
15552    /// The value of [kind][crate::model::Type::kind]
15553    /// if it holds a `StringType`, `None` if the field is not set or
15554    /// holds a different branch.
15555    pub fn string_type(
15556        &self,
15557    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::String>> {
15558        #[allow(unreachable_patterns)]
15559        self.kind.as_ref().and_then(|v| match v {
15560            crate::model::r#type::Kind::StringType(v) => std::option::Option::Some(v),
15561            _ => std::option::Option::None,
15562        })
15563    }
15564
15565    /// Sets the value of [kind][crate::model::Type::kind]
15566    /// to hold a `StringType`.
15567    ///
15568    /// Note that all the setters affecting `kind` are
15569    /// mutually exclusive.
15570    ///
15571    /// # Example
15572    /// ```ignore,no_run
15573    /// # use google_cloud_bigtable_admin_v2::model::Type;
15574    /// use google_cloud_bigtable_admin_v2::model::r#type::String;
15575    /// let x = Type::new().set_string_type(String::default()/* use setters */);
15576    /// assert!(x.string_type().is_some());
15577    /// assert!(x.bytes_type().is_none());
15578    /// assert!(x.int64_type().is_none());
15579    /// assert!(x.float32_type().is_none());
15580    /// assert!(x.float64_type().is_none());
15581    /// assert!(x.bool_type().is_none());
15582    /// assert!(x.timestamp_type().is_none());
15583    /// assert!(x.date_type().is_none());
15584    /// assert!(x.aggregate_type().is_none());
15585    /// assert!(x.struct_type().is_none());
15586    /// assert!(x.array_type().is_none());
15587    /// assert!(x.map_type().is_none());
15588    /// assert!(x.proto_type().is_none());
15589    /// assert!(x.enum_type().is_none());
15590    /// ```
15591    pub fn set_string_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::String>>>(
15592        mut self,
15593        v: T,
15594    ) -> Self {
15595        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StringType(v.into()));
15596        self
15597    }
15598
15599    /// The value of [kind][crate::model::Type::kind]
15600    /// if it holds a `Int64Type`, `None` if the field is not set or
15601    /// holds a different branch.
15602    pub fn int64_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Int64>> {
15603        #[allow(unreachable_patterns)]
15604        self.kind.as_ref().and_then(|v| match v {
15605            crate::model::r#type::Kind::Int64Type(v) => std::option::Option::Some(v),
15606            _ => std::option::Option::None,
15607        })
15608    }
15609
15610    /// Sets the value of [kind][crate::model::Type::kind]
15611    /// to hold a `Int64Type`.
15612    ///
15613    /// Note that all the setters affecting `kind` are
15614    /// mutually exclusive.
15615    ///
15616    /// # Example
15617    /// ```ignore,no_run
15618    /// # use google_cloud_bigtable_admin_v2::model::Type;
15619    /// use google_cloud_bigtable_admin_v2::model::r#type::Int64;
15620    /// let x = Type::new().set_int64_type(Int64::default()/* use setters */);
15621    /// assert!(x.int64_type().is_some());
15622    /// assert!(x.bytes_type().is_none());
15623    /// assert!(x.string_type().is_none());
15624    /// assert!(x.float32_type().is_none());
15625    /// assert!(x.float64_type().is_none());
15626    /// assert!(x.bool_type().is_none());
15627    /// assert!(x.timestamp_type().is_none());
15628    /// assert!(x.date_type().is_none());
15629    /// assert!(x.aggregate_type().is_none());
15630    /// assert!(x.struct_type().is_none());
15631    /// assert!(x.array_type().is_none());
15632    /// assert!(x.map_type().is_none());
15633    /// assert!(x.proto_type().is_none());
15634    /// assert!(x.enum_type().is_none());
15635    /// ```
15636    pub fn set_int64_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Int64>>>(
15637        mut self,
15638        v: T,
15639    ) -> Self {
15640        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Int64Type(v.into()));
15641        self
15642    }
15643
15644    /// The value of [kind][crate::model::Type::kind]
15645    /// if it holds a `Float32Type`, `None` if the field is not set or
15646    /// holds a different branch.
15647    pub fn float32_type(
15648        &self,
15649    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float32>> {
15650        #[allow(unreachable_patterns)]
15651        self.kind.as_ref().and_then(|v| match v {
15652            crate::model::r#type::Kind::Float32Type(v) => std::option::Option::Some(v),
15653            _ => std::option::Option::None,
15654        })
15655    }
15656
15657    /// Sets the value of [kind][crate::model::Type::kind]
15658    /// to hold a `Float32Type`.
15659    ///
15660    /// Note that all the setters affecting `kind` are
15661    /// mutually exclusive.
15662    ///
15663    /// # Example
15664    /// ```ignore,no_run
15665    /// # use google_cloud_bigtable_admin_v2::model::Type;
15666    /// use google_cloud_bigtable_admin_v2::model::r#type::Float32;
15667    /// let x = Type::new().set_float32_type(Float32::default()/* use setters */);
15668    /// assert!(x.float32_type().is_some());
15669    /// assert!(x.bytes_type().is_none());
15670    /// assert!(x.string_type().is_none());
15671    /// assert!(x.int64_type().is_none());
15672    /// assert!(x.float64_type().is_none());
15673    /// assert!(x.bool_type().is_none());
15674    /// assert!(x.timestamp_type().is_none());
15675    /// assert!(x.date_type().is_none());
15676    /// assert!(x.aggregate_type().is_none());
15677    /// assert!(x.struct_type().is_none());
15678    /// assert!(x.array_type().is_none());
15679    /// assert!(x.map_type().is_none());
15680    /// assert!(x.proto_type().is_none());
15681    /// assert!(x.enum_type().is_none());
15682    /// ```
15683    pub fn set_float32_type<
15684        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float32>>,
15685    >(
15686        mut self,
15687        v: T,
15688    ) -> Self {
15689        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float32Type(v.into()));
15690        self
15691    }
15692
15693    /// The value of [kind][crate::model::Type::kind]
15694    /// if it holds a `Float64Type`, `None` if the field is not set or
15695    /// holds a different branch.
15696    pub fn float64_type(
15697        &self,
15698    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float64>> {
15699        #[allow(unreachable_patterns)]
15700        self.kind.as_ref().and_then(|v| match v {
15701            crate::model::r#type::Kind::Float64Type(v) => std::option::Option::Some(v),
15702            _ => std::option::Option::None,
15703        })
15704    }
15705
15706    /// Sets the value of [kind][crate::model::Type::kind]
15707    /// to hold a `Float64Type`.
15708    ///
15709    /// Note that all the setters affecting `kind` are
15710    /// mutually exclusive.
15711    ///
15712    /// # Example
15713    /// ```ignore,no_run
15714    /// # use google_cloud_bigtable_admin_v2::model::Type;
15715    /// use google_cloud_bigtable_admin_v2::model::r#type::Float64;
15716    /// let x = Type::new().set_float64_type(Float64::default()/* use setters */);
15717    /// assert!(x.float64_type().is_some());
15718    /// assert!(x.bytes_type().is_none());
15719    /// assert!(x.string_type().is_none());
15720    /// assert!(x.int64_type().is_none());
15721    /// assert!(x.float32_type().is_none());
15722    /// assert!(x.bool_type().is_none());
15723    /// assert!(x.timestamp_type().is_none());
15724    /// assert!(x.date_type().is_none());
15725    /// assert!(x.aggregate_type().is_none());
15726    /// assert!(x.struct_type().is_none());
15727    /// assert!(x.array_type().is_none());
15728    /// assert!(x.map_type().is_none());
15729    /// assert!(x.proto_type().is_none());
15730    /// assert!(x.enum_type().is_none());
15731    /// ```
15732    pub fn set_float64_type<
15733        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float64>>,
15734    >(
15735        mut self,
15736        v: T,
15737    ) -> Self {
15738        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float64Type(v.into()));
15739        self
15740    }
15741
15742    /// The value of [kind][crate::model::Type::kind]
15743    /// if it holds a `BoolType`, `None` if the field is not set or
15744    /// holds a different branch.
15745    pub fn bool_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bool>> {
15746        #[allow(unreachable_patterns)]
15747        self.kind.as_ref().and_then(|v| match v {
15748            crate::model::r#type::Kind::BoolType(v) => std::option::Option::Some(v),
15749            _ => std::option::Option::None,
15750        })
15751    }
15752
15753    /// Sets the value of [kind][crate::model::Type::kind]
15754    /// to hold a `BoolType`.
15755    ///
15756    /// Note that all the setters affecting `kind` are
15757    /// mutually exclusive.
15758    ///
15759    /// # Example
15760    /// ```ignore,no_run
15761    /// # use google_cloud_bigtable_admin_v2::model::Type;
15762    /// use google_cloud_bigtable_admin_v2::model::r#type::Bool;
15763    /// let x = Type::new().set_bool_type(Bool::default()/* use setters */);
15764    /// assert!(x.bool_type().is_some());
15765    /// assert!(x.bytes_type().is_none());
15766    /// assert!(x.string_type().is_none());
15767    /// assert!(x.int64_type().is_none());
15768    /// assert!(x.float32_type().is_none());
15769    /// assert!(x.float64_type().is_none());
15770    /// assert!(x.timestamp_type().is_none());
15771    /// assert!(x.date_type().is_none());
15772    /// assert!(x.aggregate_type().is_none());
15773    /// assert!(x.struct_type().is_none());
15774    /// assert!(x.array_type().is_none());
15775    /// assert!(x.map_type().is_none());
15776    /// assert!(x.proto_type().is_none());
15777    /// assert!(x.enum_type().is_none());
15778    /// ```
15779    pub fn set_bool_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bool>>>(
15780        mut self,
15781        v: T,
15782    ) -> Self {
15783        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BoolType(v.into()));
15784        self
15785    }
15786
15787    /// The value of [kind][crate::model::Type::kind]
15788    /// if it holds a `TimestampType`, `None` if the field is not set or
15789    /// holds a different branch.
15790    pub fn timestamp_type(
15791        &self,
15792    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Timestamp>> {
15793        #[allow(unreachable_patterns)]
15794        self.kind.as_ref().and_then(|v| match v {
15795            crate::model::r#type::Kind::TimestampType(v) => std::option::Option::Some(v),
15796            _ => std::option::Option::None,
15797        })
15798    }
15799
15800    /// Sets the value of [kind][crate::model::Type::kind]
15801    /// to hold a `TimestampType`.
15802    ///
15803    /// Note that all the setters affecting `kind` are
15804    /// mutually exclusive.
15805    ///
15806    /// # Example
15807    /// ```ignore,no_run
15808    /// # use google_cloud_bigtable_admin_v2::model::Type;
15809    /// use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
15810    /// let x = Type::new().set_timestamp_type(Timestamp::default()/* use setters */);
15811    /// assert!(x.timestamp_type().is_some());
15812    /// assert!(x.bytes_type().is_none());
15813    /// assert!(x.string_type().is_none());
15814    /// assert!(x.int64_type().is_none());
15815    /// assert!(x.float32_type().is_none());
15816    /// assert!(x.float64_type().is_none());
15817    /// assert!(x.bool_type().is_none());
15818    /// assert!(x.date_type().is_none());
15819    /// assert!(x.aggregate_type().is_none());
15820    /// assert!(x.struct_type().is_none());
15821    /// assert!(x.array_type().is_none());
15822    /// assert!(x.map_type().is_none());
15823    /// assert!(x.proto_type().is_none());
15824    /// assert!(x.enum_type().is_none());
15825    /// ```
15826    pub fn set_timestamp_type<
15827        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Timestamp>>,
15828    >(
15829        mut self,
15830        v: T,
15831    ) -> Self {
15832        self.kind = std::option::Option::Some(crate::model::r#type::Kind::TimestampType(v.into()));
15833        self
15834    }
15835
15836    /// The value of [kind][crate::model::Type::kind]
15837    /// if it holds a `DateType`, `None` if the field is not set or
15838    /// holds a different branch.
15839    pub fn date_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Date>> {
15840        #[allow(unreachable_patterns)]
15841        self.kind.as_ref().and_then(|v| match v {
15842            crate::model::r#type::Kind::DateType(v) => std::option::Option::Some(v),
15843            _ => std::option::Option::None,
15844        })
15845    }
15846
15847    /// Sets the value of [kind][crate::model::Type::kind]
15848    /// to hold a `DateType`.
15849    ///
15850    /// Note that all the setters affecting `kind` are
15851    /// mutually exclusive.
15852    ///
15853    /// # Example
15854    /// ```ignore,no_run
15855    /// # use google_cloud_bigtable_admin_v2::model::Type;
15856    /// use google_cloud_bigtable_admin_v2::model::r#type::Date;
15857    /// let x = Type::new().set_date_type(Date::default()/* use setters */);
15858    /// assert!(x.date_type().is_some());
15859    /// assert!(x.bytes_type().is_none());
15860    /// assert!(x.string_type().is_none());
15861    /// assert!(x.int64_type().is_none());
15862    /// assert!(x.float32_type().is_none());
15863    /// assert!(x.float64_type().is_none());
15864    /// assert!(x.bool_type().is_none());
15865    /// assert!(x.timestamp_type().is_none());
15866    /// assert!(x.aggregate_type().is_none());
15867    /// assert!(x.struct_type().is_none());
15868    /// assert!(x.array_type().is_none());
15869    /// assert!(x.map_type().is_none());
15870    /// assert!(x.proto_type().is_none());
15871    /// assert!(x.enum_type().is_none());
15872    /// ```
15873    pub fn set_date_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Date>>>(
15874        mut self,
15875        v: T,
15876    ) -> Self {
15877        self.kind = std::option::Option::Some(crate::model::r#type::Kind::DateType(v.into()));
15878        self
15879    }
15880
15881    /// The value of [kind][crate::model::Type::kind]
15882    /// if it holds a `AggregateType`, `None` if the field is not set or
15883    /// holds a different branch.
15884    pub fn aggregate_type(
15885        &self,
15886    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Aggregate>> {
15887        #[allow(unreachable_patterns)]
15888        self.kind.as_ref().and_then(|v| match v {
15889            crate::model::r#type::Kind::AggregateType(v) => std::option::Option::Some(v),
15890            _ => std::option::Option::None,
15891        })
15892    }
15893
15894    /// Sets the value of [kind][crate::model::Type::kind]
15895    /// to hold a `AggregateType`.
15896    ///
15897    /// Note that all the setters affecting `kind` are
15898    /// mutually exclusive.
15899    ///
15900    /// # Example
15901    /// ```ignore,no_run
15902    /// # use google_cloud_bigtable_admin_v2::model::Type;
15903    /// use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
15904    /// let x = Type::new().set_aggregate_type(Aggregate::default()/* use setters */);
15905    /// assert!(x.aggregate_type().is_some());
15906    /// assert!(x.bytes_type().is_none());
15907    /// assert!(x.string_type().is_none());
15908    /// assert!(x.int64_type().is_none());
15909    /// assert!(x.float32_type().is_none());
15910    /// assert!(x.float64_type().is_none());
15911    /// assert!(x.bool_type().is_none());
15912    /// assert!(x.timestamp_type().is_none());
15913    /// assert!(x.date_type().is_none());
15914    /// assert!(x.struct_type().is_none());
15915    /// assert!(x.array_type().is_none());
15916    /// assert!(x.map_type().is_none());
15917    /// assert!(x.proto_type().is_none());
15918    /// assert!(x.enum_type().is_none());
15919    /// ```
15920    pub fn set_aggregate_type<
15921        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Aggregate>>,
15922    >(
15923        mut self,
15924        v: T,
15925    ) -> Self {
15926        self.kind = std::option::Option::Some(crate::model::r#type::Kind::AggregateType(v.into()));
15927        self
15928    }
15929
15930    /// The value of [kind][crate::model::Type::kind]
15931    /// if it holds a `StructType`, `None` if the field is not set or
15932    /// holds a different branch.
15933    pub fn struct_type(
15934        &self,
15935    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Struct>> {
15936        #[allow(unreachable_patterns)]
15937        self.kind.as_ref().and_then(|v| match v {
15938            crate::model::r#type::Kind::StructType(v) => std::option::Option::Some(v),
15939            _ => std::option::Option::None,
15940        })
15941    }
15942
15943    /// Sets the value of [kind][crate::model::Type::kind]
15944    /// to hold a `StructType`.
15945    ///
15946    /// Note that all the setters affecting `kind` are
15947    /// mutually exclusive.
15948    ///
15949    /// # Example
15950    /// ```ignore,no_run
15951    /// # use google_cloud_bigtable_admin_v2::model::Type;
15952    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
15953    /// let x = Type::new().set_struct_type(Struct::default()/* use setters */);
15954    /// assert!(x.struct_type().is_some());
15955    /// assert!(x.bytes_type().is_none());
15956    /// assert!(x.string_type().is_none());
15957    /// assert!(x.int64_type().is_none());
15958    /// assert!(x.float32_type().is_none());
15959    /// assert!(x.float64_type().is_none());
15960    /// assert!(x.bool_type().is_none());
15961    /// assert!(x.timestamp_type().is_none());
15962    /// assert!(x.date_type().is_none());
15963    /// assert!(x.aggregate_type().is_none());
15964    /// assert!(x.array_type().is_none());
15965    /// assert!(x.map_type().is_none());
15966    /// assert!(x.proto_type().is_none());
15967    /// assert!(x.enum_type().is_none());
15968    /// ```
15969    pub fn set_struct_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Struct>>>(
15970        mut self,
15971        v: T,
15972    ) -> Self {
15973        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StructType(v.into()));
15974        self
15975    }
15976
15977    /// The value of [kind][crate::model::Type::kind]
15978    /// if it holds a `ArrayType`, `None` if the field is not set or
15979    /// holds a different branch.
15980    pub fn array_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Array>> {
15981        #[allow(unreachable_patterns)]
15982        self.kind.as_ref().and_then(|v| match v {
15983            crate::model::r#type::Kind::ArrayType(v) => std::option::Option::Some(v),
15984            _ => std::option::Option::None,
15985        })
15986    }
15987
15988    /// Sets the value of [kind][crate::model::Type::kind]
15989    /// to hold a `ArrayType`.
15990    ///
15991    /// Note that all the setters affecting `kind` are
15992    /// mutually exclusive.
15993    ///
15994    /// # Example
15995    /// ```ignore,no_run
15996    /// # use google_cloud_bigtable_admin_v2::model::Type;
15997    /// use google_cloud_bigtable_admin_v2::model::r#type::Array;
15998    /// let x = Type::new().set_array_type(Array::default()/* use setters */);
15999    /// assert!(x.array_type().is_some());
16000    /// assert!(x.bytes_type().is_none());
16001    /// assert!(x.string_type().is_none());
16002    /// assert!(x.int64_type().is_none());
16003    /// assert!(x.float32_type().is_none());
16004    /// assert!(x.float64_type().is_none());
16005    /// assert!(x.bool_type().is_none());
16006    /// assert!(x.timestamp_type().is_none());
16007    /// assert!(x.date_type().is_none());
16008    /// assert!(x.aggregate_type().is_none());
16009    /// assert!(x.struct_type().is_none());
16010    /// assert!(x.map_type().is_none());
16011    /// assert!(x.proto_type().is_none());
16012    /// assert!(x.enum_type().is_none());
16013    /// ```
16014    pub fn set_array_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Array>>>(
16015        mut self,
16016        v: T,
16017    ) -> Self {
16018        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ArrayType(v.into()));
16019        self
16020    }
16021
16022    /// The value of [kind][crate::model::Type::kind]
16023    /// if it holds a `MapType`, `None` if the field is not set or
16024    /// holds a different branch.
16025    pub fn map_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Map>> {
16026        #[allow(unreachable_patterns)]
16027        self.kind.as_ref().and_then(|v| match v {
16028            crate::model::r#type::Kind::MapType(v) => std::option::Option::Some(v),
16029            _ => std::option::Option::None,
16030        })
16031    }
16032
16033    /// Sets the value of [kind][crate::model::Type::kind]
16034    /// to hold a `MapType`.
16035    ///
16036    /// Note that all the setters affecting `kind` are
16037    /// mutually exclusive.
16038    ///
16039    /// # Example
16040    /// ```ignore,no_run
16041    /// # use google_cloud_bigtable_admin_v2::model::Type;
16042    /// use google_cloud_bigtable_admin_v2::model::r#type::Map;
16043    /// let x = Type::new().set_map_type(Map::default()/* use setters */);
16044    /// assert!(x.map_type().is_some());
16045    /// assert!(x.bytes_type().is_none());
16046    /// assert!(x.string_type().is_none());
16047    /// assert!(x.int64_type().is_none());
16048    /// assert!(x.float32_type().is_none());
16049    /// assert!(x.float64_type().is_none());
16050    /// assert!(x.bool_type().is_none());
16051    /// assert!(x.timestamp_type().is_none());
16052    /// assert!(x.date_type().is_none());
16053    /// assert!(x.aggregate_type().is_none());
16054    /// assert!(x.struct_type().is_none());
16055    /// assert!(x.array_type().is_none());
16056    /// assert!(x.proto_type().is_none());
16057    /// assert!(x.enum_type().is_none());
16058    /// ```
16059    pub fn set_map_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Map>>>(
16060        mut self,
16061        v: T,
16062    ) -> Self {
16063        self.kind = std::option::Option::Some(crate::model::r#type::Kind::MapType(v.into()));
16064        self
16065    }
16066
16067    /// The value of [kind][crate::model::Type::kind]
16068    /// if it holds a `ProtoType`, `None` if the field is not set or
16069    /// holds a different branch.
16070    pub fn proto_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Proto>> {
16071        #[allow(unreachable_patterns)]
16072        self.kind.as_ref().and_then(|v| match v {
16073            crate::model::r#type::Kind::ProtoType(v) => std::option::Option::Some(v),
16074            _ => std::option::Option::None,
16075        })
16076    }
16077
16078    /// Sets the value of [kind][crate::model::Type::kind]
16079    /// to hold a `ProtoType`.
16080    ///
16081    /// Note that all the setters affecting `kind` are
16082    /// mutually exclusive.
16083    ///
16084    /// # Example
16085    /// ```ignore,no_run
16086    /// # use google_cloud_bigtable_admin_v2::model::Type;
16087    /// use google_cloud_bigtable_admin_v2::model::r#type::Proto;
16088    /// let x = Type::new().set_proto_type(Proto::default()/* use setters */);
16089    /// assert!(x.proto_type().is_some());
16090    /// assert!(x.bytes_type().is_none());
16091    /// assert!(x.string_type().is_none());
16092    /// assert!(x.int64_type().is_none());
16093    /// assert!(x.float32_type().is_none());
16094    /// assert!(x.float64_type().is_none());
16095    /// assert!(x.bool_type().is_none());
16096    /// assert!(x.timestamp_type().is_none());
16097    /// assert!(x.date_type().is_none());
16098    /// assert!(x.aggregate_type().is_none());
16099    /// assert!(x.struct_type().is_none());
16100    /// assert!(x.array_type().is_none());
16101    /// assert!(x.map_type().is_none());
16102    /// assert!(x.enum_type().is_none());
16103    /// ```
16104    pub fn set_proto_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Proto>>>(
16105        mut self,
16106        v: T,
16107    ) -> Self {
16108        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ProtoType(v.into()));
16109        self
16110    }
16111
16112    /// The value of [kind][crate::model::Type::kind]
16113    /// if it holds a `EnumType`, `None` if the field is not set or
16114    /// holds a different branch.
16115    pub fn enum_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Enum>> {
16116        #[allow(unreachable_patterns)]
16117        self.kind.as_ref().and_then(|v| match v {
16118            crate::model::r#type::Kind::EnumType(v) => std::option::Option::Some(v),
16119            _ => std::option::Option::None,
16120        })
16121    }
16122
16123    /// Sets the value of [kind][crate::model::Type::kind]
16124    /// to hold a `EnumType`.
16125    ///
16126    /// Note that all the setters affecting `kind` are
16127    /// mutually exclusive.
16128    ///
16129    /// # Example
16130    /// ```ignore,no_run
16131    /// # use google_cloud_bigtable_admin_v2::model::Type;
16132    /// use google_cloud_bigtable_admin_v2::model::r#type::Enum;
16133    /// let x = Type::new().set_enum_type(Enum::default()/* use setters */);
16134    /// assert!(x.enum_type().is_some());
16135    /// assert!(x.bytes_type().is_none());
16136    /// assert!(x.string_type().is_none());
16137    /// assert!(x.int64_type().is_none());
16138    /// assert!(x.float32_type().is_none());
16139    /// assert!(x.float64_type().is_none());
16140    /// assert!(x.bool_type().is_none());
16141    /// assert!(x.timestamp_type().is_none());
16142    /// assert!(x.date_type().is_none());
16143    /// assert!(x.aggregate_type().is_none());
16144    /// assert!(x.struct_type().is_none());
16145    /// assert!(x.array_type().is_none());
16146    /// assert!(x.map_type().is_none());
16147    /// assert!(x.proto_type().is_none());
16148    /// ```
16149    pub fn set_enum_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Enum>>>(
16150        mut self,
16151        v: T,
16152    ) -> Self {
16153        self.kind = std::option::Option::Some(crate::model::r#type::Kind::EnumType(v.into()));
16154        self
16155    }
16156}
16157
16158impl wkt::message::Message for Type {
16159    fn typename() -> &'static str {
16160        "type.googleapis.com/google.bigtable.admin.v2.Type"
16161    }
16162}
16163
16164/// Defines additional types related to [Type].
16165pub mod r#type {
16166    #[allow(unused_imports)]
16167    use super::*;
16168
16169    /// Bytes
16170    /// Values of type `Bytes` are stored in `Value.bytes_value`.
16171    #[derive(Clone, Default, PartialEq)]
16172    #[non_exhaustive]
16173    pub struct Bytes {
16174        /// The encoding to use when converting to or from lower level types.
16175        pub encoding: std::option::Option<crate::model::r#type::bytes::Encoding>,
16176
16177        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16178    }
16179
16180    impl Bytes {
16181        pub fn new() -> Self {
16182            std::default::Default::default()
16183        }
16184
16185        /// Sets the value of [encoding][crate::model::r#type::Bytes::encoding].
16186        ///
16187        /// # Example
16188        /// ```ignore,no_run
16189        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16190        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16191        /// let x = Bytes::new().set_encoding(Encoding::default()/* use setters */);
16192        /// ```
16193        pub fn set_encoding<T>(mut self, v: T) -> Self
16194        where
16195            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
16196        {
16197            self.encoding = std::option::Option::Some(v.into());
16198            self
16199        }
16200
16201        /// Sets or clears the value of [encoding][crate::model::r#type::Bytes::encoding].
16202        ///
16203        /// # Example
16204        /// ```ignore,no_run
16205        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16206        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16207        /// let x = Bytes::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16208        /// let x = Bytes::new().set_or_clear_encoding(None::<Encoding>);
16209        /// ```
16210        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16211        where
16212            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
16213        {
16214            self.encoding = v.map(|x| x.into());
16215            self
16216        }
16217    }
16218
16219    impl wkt::message::Message for Bytes {
16220        fn typename() -> &'static str {
16221            "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes"
16222        }
16223    }
16224
16225    /// Defines additional types related to [Bytes].
16226    pub mod bytes {
16227        #[allow(unused_imports)]
16228        use super::*;
16229
16230        /// Rules used to convert to or from lower level types.
16231        #[derive(Clone, Default, PartialEq)]
16232        #[non_exhaustive]
16233        pub struct Encoding {
16234            /// Which encoding to use.
16235            pub encoding: std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16236
16237            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16238        }
16239
16240        impl Encoding {
16241            pub fn new() -> Self {
16242                std::default::Default::default()
16243            }
16244
16245            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding].
16246            ///
16247            /// Note that all the setters affecting `encoding` are mutually
16248            /// exclusive.
16249            ///
16250            /// # Example
16251            /// ```ignore,no_run
16252            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16253            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16254            /// let x = Encoding::new().set_encoding(Some(
16255            ///     google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Encoding::Raw(Raw::default().into())));
16256            /// ```
16257            pub fn set_encoding<
16258                T: std::convert::Into<
16259                        std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16260                    >,
16261            >(
16262                mut self,
16263                v: T,
16264            ) -> Self {
16265                self.encoding = v.into();
16266                self
16267            }
16268
16269            /// The value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16270            /// if it holds a `Raw`, `None` if the field is not set or
16271            /// holds a different branch.
16272            pub fn raw(
16273                &self,
16274            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>
16275            {
16276                #[allow(unreachable_patterns)]
16277                self.encoding.as_ref().and_then(|v| match v {
16278                    crate::model::r#type::bytes::encoding::Encoding::Raw(v) => {
16279                        std::option::Option::Some(v)
16280                    }
16281                    _ => std::option::Option::None,
16282                })
16283            }
16284
16285            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16286            /// to hold a `Raw`.
16287            ///
16288            /// Note that all the setters affecting `encoding` are
16289            /// mutually exclusive.
16290            ///
16291            /// # Example
16292            /// ```ignore,no_run
16293            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16294            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16295            /// let x = Encoding::new().set_raw(Raw::default()/* use setters */);
16296            /// assert!(x.raw().is_some());
16297            /// ```
16298            pub fn set_raw<
16299                T: std::convert::Into<std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>,
16300            >(
16301                mut self,
16302                v: T,
16303            ) -> Self {
16304                self.encoding = std::option::Option::Some(
16305                    crate::model::r#type::bytes::encoding::Encoding::Raw(v.into()),
16306                );
16307                self
16308            }
16309        }
16310
16311        impl wkt::message::Message for Encoding {
16312            fn typename() -> &'static str {
16313                "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding"
16314            }
16315        }
16316
16317        /// Defines additional types related to [Encoding].
16318        pub mod encoding {
16319            #[allow(unused_imports)]
16320            use super::*;
16321
16322            /// Leaves the value as-is.
16323            ///
16324            /// Sorted mode: all values are supported.
16325            ///
16326            /// Distinct mode: all values are supported.
16327            #[derive(Clone, Default, PartialEq)]
16328            #[non_exhaustive]
16329            pub struct Raw {
16330                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16331            }
16332
16333            impl Raw {
16334                pub fn new() -> Self {
16335                    std::default::Default::default()
16336                }
16337            }
16338
16339            impl wkt::message::Message for Raw {
16340                fn typename() -> &'static str {
16341                    "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding.Raw"
16342                }
16343            }
16344
16345            /// Which encoding to use.
16346            #[derive(Clone, Debug, PartialEq)]
16347            #[non_exhaustive]
16348            pub enum Encoding {
16349                /// Use `Raw` encoding.
16350                Raw(std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>),
16351            }
16352        }
16353    }
16354
16355    /// String
16356    /// Values of type `String` are stored in `Value.string_value`.
16357    #[derive(Clone, Default, PartialEq)]
16358    #[non_exhaustive]
16359    pub struct String {
16360        /// The encoding to use when converting to or from lower level types.
16361        pub encoding: std::option::Option<crate::model::r#type::string::Encoding>,
16362
16363        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16364    }
16365
16366    impl String {
16367        pub fn new() -> Self {
16368            std::default::Default::default()
16369        }
16370
16371        /// Sets the value of [encoding][crate::model::r#type::String::encoding].
16372        ///
16373        /// # Example
16374        /// ```ignore,no_run
16375        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16376        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16377        /// let x = String::new().set_encoding(Encoding::default()/* use setters */);
16378        /// ```
16379        pub fn set_encoding<T>(mut self, v: T) -> Self
16380        where
16381            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16382        {
16383            self.encoding = std::option::Option::Some(v.into());
16384            self
16385        }
16386
16387        /// Sets or clears the value of [encoding][crate::model::r#type::String::encoding].
16388        ///
16389        /// # Example
16390        /// ```ignore,no_run
16391        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16392        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16393        /// let x = String::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16394        /// let x = String::new().set_or_clear_encoding(None::<Encoding>);
16395        /// ```
16396        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16397        where
16398            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16399        {
16400            self.encoding = v.map(|x| x.into());
16401            self
16402        }
16403    }
16404
16405    impl wkt::message::Message for String {
16406        fn typename() -> &'static str {
16407            "type.googleapis.com/google.bigtable.admin.v2.Type.String"
16408        }
16409    }
16410
16411    /// Defines additional types related to [String].
16412    pub mod string {
16413        #[allow(unused_imports)]
16414        use super::*;
16415
16416        /// Rules used to convert to or from lower level types.
16417        #[derive(Clone, Default, PartialEq)]
16418        #[non_exhaustive]
16419        pub struct Encoding {
16420            /// Which encoding to use.
16421            pub encoding: std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16422
16423            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16424        }
16425
16426        impl Encoding {
16427            pub fn new() -> Self {
16428                std::default::Default::default()
16429            }
16430
16431            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding].
16432            ///
16433            /// Note that all the setters affecting `encoding` are mutually
16434            /// exclusive.
16435            ///
16436            /// # Example
16437            /// ```ignore,no_run
16438            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16439            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
16440            /// let x = Encoding::new().set_encoding(Some(
16441            ///     google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Encoding::Utf8Bytes(Utf8Bytes::default().into())));
16442            /// ```
16443            pub fn set_encoding<
16444                T: std::convert::Into<
16445                        std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16446                    >,
16447            >(
16448                mut self,
16449                v: T,
16450            ) -> Self {
16451                self.encoding = v.into();
16452                self
16453            }
16454
16455            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
16456            /// if it holds a `Utf8Raw`, `None` if the field is not set or
16457            /// holds a different branch.
16458            #[deprecated]
16459            pub fn utf8_raw(
16460                &self,
16461            ) -> std::option::Option<
16462                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
16463            > {
16464                #[allow(unreachable_patterns)]
16465                self.encoding.as_ref().and_then(|v| match v {
16466                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v) => {
16467                        std::option::Option::Some(v)
16468                    }
16469                    _ => std::option::Option::None,
16470                })
16471            }
16472
16473            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
16474            /// to hold a `Utf8Raw`.
16475            ///
16476            /// Note that all the setters affecting `encoding` are
16477            /// mutually exclusive.
16478            ///
16479            /// # Example
16480            /// ```ignore,no_run
16481            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16482            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Raw;
16483            /// let x = Encoding::new().set_utf8_raw(Utf8Raw::default()/* use setters */);
16484            /// assert!(x.utf8_raw().is_some());
16485            /// assert!(x.utf8_bytes().is_none());
16486            /// ```
16487            #[deprecated]
16488            pub fn set_utf8_raw<
16489                T: std::convert::Into<
16490                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
16491                    >,
16492            >(
16493                mut self,
16494                v: T,
16495            ) -> Self {
16496                self.encoding = std::option::Option::Some(
16497                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v.into()),
16498                );
16499                self
16500            }
16501
16502            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
16503            /// if it holds a `Utf8Bytes`, `None` if the field is not set or
16504            /// holds a different branch.
16505            pub fn utf8_bytes(
16506                &self,
16507            ) -> std::option::Option<
16508                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
16509            > {
16510                #[allow(unreachable_patterns)]
16511                self.encoding.as_ref().and_then(|v| match v {
16512                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v) => {
16513                        std::option::Option::Some(v)
16514                    }
16515                    _ => std::option::Option::None,
16516                })
16517            }
16518
16519            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
16520            /// to hold a `Utf8Bytes`.
16521            ///
16522            /// Note that all the setters affecting `encoding` are
16523            /// mutually exclusive.
16524            ///
16525            /// # Example
16526            /// ```ignore,no_run
16527            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16528            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
16529            /// let x = Encoding::new().set_utf8_bytes(Utf8Bytes::default()/* use setters */);
16530            /// assert!(x.utf8_bytes().is_some());
16531            /// assert!(x.utf8_raw().is_none());
16532            /// ```
16533            pub fn set_utf8_bytes<
16534                T: std::convert::Into<
16535                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
16536                    >,
16537            >(
16538                mut self,
16539                v: T,
16540            ) -> Self {
16541                self.encoding = std::option::Option::Some(
16542                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v.into()),
16543                );
16544                self
16545            }
16546        }
16547
16548        impl wkt::message::Message for Encoding {
16549            fn typename() -> &'static str {
16550                "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding"
16551            }
16552        }
16553
16554        /// Defines additional types related to [Encoding].
16555        pub mod encoding {
16556            #[allow(unused_imports)]
16557            use super::*;
16558
16559            /// Deprecated: prefer the equivalent `Utf8Bytes`.
16560            #[derive(Clone, Default, PartialEq)]
16561            #[non_exhaustive]
16562            #[deprecated]
16563            pub struct Utf8Raw {
16564                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16565            }
16566
16567            impl Utf8Raw {
16568                pub fn new() -> Self {
16569                    std::default::Default::default()
16570                }
16571            }
16572
16573            impl wkt::message::Message for Utf8Raw {
16574                fn typename() -> &'static str {
16575                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw"
16576                }
16577            }
16578
16579            /// UTF-8 encoding.
16580            ///
16581            /// Sorted mode:
16582            ///
16583            /// - All values are supported.
16584            /// - Code point order is preserved.
16585            ///
16586            /// Distinct mode: all values are supported.
16587            ///
16588            /// Compatible with:
16589            ///
16590            /// - BigQuery `TEXT` encoding
16591            /// - HBase `Bytes.toBytes`
16592            /// - Java `String#getBytes(StandardCharsets.UTF_8)`
16593            #[derive(Clone, Default, PartialEq)]
16594            #[non_exhaustive]
16595            pub struct Utf8Bytes {
16596                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16597            }
16598
16599            impl Utf8Bytes {
16600                pub fn new() -> Self {
16601                    std::default::Default::default()
16602                }
16603            }
16604
16605            impl wkt::message::Message for Utf8Bytes {
16606                fn typename() -> &'static str {
16607                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes"
16608                }
16609            }
16610
16611            /// Which encoding to use.
16612            #[derive(Clone, Debug, PartialEq)]
16613            #[non_exhaustive]
16614            pub enum Encoding {
16615                /// Deprecated: if set, converts to an empty `utf8_bytes`.
16616                #[deprecated]
16617                Utf8Raw(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>),
16618                /// Use `Utf8Bytes` encoding.
16619                Utf8Bytes(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>),
16620            }
16621        }
16622    }
16623
16624    /// Int64
16625    /// Values of type `Int64` are stored in `Value.int_value`.
16626    #[derive(Clone, Default, PartialEq)]
16627    #[non_exhaustive]
16628    pub struct Int64 {
16629        /// The encoding to use when converting to or from lower level types.
16630        pub encoding: std::option::Option<crate::model::r#type::int_64::Encoding>,
16631
16632        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16633    }
16634
16635    impl Int64 {
16636        pub fn new() -> Self {
16637            std::default::Default::default()
16638        }
16639
16640        /// Sets the value of [encoding][crate::model::r#type::Int64::encoding].
16641        ///
16642        /// # Example
16643        /// ```ignore,no_run
16644        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
16645        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16646        /// let x = Int64::new().set_encoding(Encoding::default()/* use setters */);
16647        /// ```
16648        pub fn set_encoding<T>(mut self, v: T) -> Self
16649        where
16650            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
16651        {
16652            self.encoding = std::option::Option::Some(v.into());
16653            self
16654        }
16655
16656        /// Sets or clears the value of [encoding][crate::model::r#type::Int64::encoding].
16657        ///
16658        /// # Example
16659        /// ```ignore,no_run
16660        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
16661        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16662        /// let x = Int64::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16663        /// let x = Int64::new().set_or_clear_encoding(None::<Encoding>);
16664        /// ```
16665        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16666        where
16667            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
16668        {
16669            self.encoding = v.map(|x| x.into());
16670            self
16671        }
16672    }
16673
16674    impl wkt::message::Message for Int64 {
16675        fn typename() -> &'static str {
16676            "type.googleapis.com/google.bigtable.admin.v2.Type.Int64"
16677        }
16678    }
16679
16680    /// Defines additional types related to [Int64].
16681    pub mod int_64 {
16682        #[allow(unused_imports)]
16683        use super::*;
16684
16685        /// Rules used to convert to or from lower level types.
16686        #[derive(Clone, Default, PartialEq)]
16687        #[non_exhaustive]
16688        pub struct Encoding {
16689            /// Which encoding to use.
16690            pub encoding: std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
16691
16692            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16693        }
16694
16695        impl Encoding {
16696            pub fn new() -> Self {
16697                std::default::Default::default()
16698            }
16699
16700            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding].
16701            ///
16702            /// Note that all the setters affecting `encoding` are mutually
16703            /// exclusive.
16704            ///
16705            /// # Example
16706            /// ```ignore,no_run
16707            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16708            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
16709            /// let x = Encoding::new().set_encoding(Some(
16710            ///     google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::Encoding::BigEndianBytes(BigEndianBytes::default().into())));
16711            /// ```
16712            pub fn set_encoding<
16713                T: std::convert::Into<
16714                        std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
16715                    >,
16716            >(
16717                mut self,
16718                v: T,
16719            ) -> Self {
16720                self.encoding = v.into();
16721                self
16722            }
16723
16724            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
16725            /// if it holds a `BigEndianBytes`, `None` if the field is not set or
16726            /// holds a different branch.
16727            pub fn big_endian_bytes(
16728                &self,
16729            ) -> std::option::Option<
16730                &std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
16731            > {
16732                #[allow(unreachable_patterns)]
16733                self.encoding.as_ref().and_then(|v| match v {
16734                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v) => {
16735                        std::option::Option::Some(v)
16736                    }
16737                    _ => std::option::Option::None,
16738                })
16739            }
16740
16741            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
16742            /// to hold a `BigEndianBytes`.
16743            ///
16744            /// Note that all the setters affecting `encoding` are
16745            /// mutually exclusive.
16746            ///
16747            /// # Example
16748            /// ```ignore,no_run
16749            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16750            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
16751            /// let x = Encoding::new().set_big_endian_bytes(BigEndianBytes::default()/* use setters */);
16752            /// assert!(x.big_endian_bytes().is_some());
16753            /// assert!(x.ordered_code_bytes().is_none());
16754            /// ```
16755            pub fn set_big_endian_bytes<
16756                T: std::convert::Into<
16757                        std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
16758                    >,
16759            >(
16760                mut self,
16761                v: T,
16762            ) -> Self {
16763                self.encoding = std::option::Option::Some(
16764                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v.into()),
16765                );
16766                self
16767            }
16768
16769            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
16770            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
16771            /// holds a different branch.
16772            pub fn ordered_code_bytes(
16773                &self,
16774            ) -> std::option::Option<
16775                &std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
16776            > {
16777                #[allow(unreachable_patterns)]
16778                self.encoding.as_ref().and_then(|v| match v {
16779                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v) => {
16780                        std::option::Option::Some(v)
16781                    }
16782                    _ => std::option::Option::None,
16783                })
16784            }
16785
16786            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
16787            /// to hold a `OrderedCodeBytes`.
16788            ///
16789            /// Note that all the setters affecting `encoding` are
16790            /// mutually exclusive.
16791            ///
16792            /// # Example
16793            /// ```ignore,no_run
16794            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16795            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::OrderedCodeBytes;
16796            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
16797            /// assert!(x.ordered_code_bytes().is_some());
16798            /// assert!(x.big_endian_bytes().is_none());
16799            /// ```
16800            pub fn set_ordered_code_bytes<
16801                T: std::convert::Into<
16802                        std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
16803                    >,
16804            >(
16805                mut self,
16806                v: T,
16807            ) -> Self {
16808                self.encoding = std::option::Option::Some(
16809                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v.into()),
16810                );
16811                self
16812            }
16813        }
16814
16815        impl wkt::message::Message for Encoding {
16816            fn typename() -> &'static str {
16817                "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding"
16818            }
16819        }
16820
16821        /// Defines additional types related to [Encoding].
16822        pub mod encoding {
16823            #[allow(unused_imports)]
16824            use super::*;
16825
16826            /// Encodes the value as an 8-byte big-endian two's complement value.
16827            ///
16828            /// Sorted mode: non-negative values are supported.
16829            ///
16830            /// Distinct mode: all values are supported.
16831            ///
16832            /// Compatible with:
16833            ///
16834            /// - BigQuery `BINARY` encoding
16835            /// - HBase `Bytes.toBytes`
16836            /// - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
16837            #[derive(Clone, Default, PartialEq)]
16838            #[non_exhaustive]
16839            pub struct BigEndianBytes {
16840                /// Deprecated: ignored if set.
16841                #[deprecated]
16842                pub bytes_type: std::option::Option<crate::model::r#type::Bytes>,
16843
16844                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16845            }
16846
16847            impl BigEndianBytes {
16848                pub fn new() -> Self {
16849                    std::default::Default::default()
16850                }
16851
16852                /// Sets the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
16853                ///
16854                /// # Example
16855                /// ```ignore,no_run
16856                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
16857                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16858                /// let x = BigEndianBytes::new().set_bytes_type(Bytes::default()/* use setters */);
16859                /// ```
16860                #[deprecated]
16861                pub fn set_bytes_type<T>(mut self, v: T) -> Self
16862                where
16863                    T: std::convert::Into<crate::model::r#type::Bytes>,
16864                {
16865                    self.bytes_type = std::option::Option::Some(v.into());
16866                    self
16867                }
16868
16869                /// Sets or clears the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
16870                ///
16871                /// # Example
16872                /// ```ignore,no_run
16873                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
16874                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16875                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(Some(Bytes::default()/* use setters */));
16876                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(None::<Bytes>);
16877                /// ```
16878                #[deprecated]
16879                pub fn set_or_clear_bytes_type<T>(mut self, v: std::option::Option<T>) -> Self
16880                where
16881                    T: std::convert::Into<crate::model::r#type::Bytes>,
16882                {
16883                    self.bytes_type = v.map(|x| x.into());
16884                    self
16885                }
16886            }
16887
16888            impl wkt::message::Message for BigEndianBytes {
16889                fn typename() -> &'static str {
16890                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes"
16891                }
16892            }
16893
16894            /// Encodes the value in a variable length binary format of up to 10 bytes.
16895            /// Values that are closer to zero use fewer bytes.
16896            ///
16897            /// Sorted mode: all values are supported.
16898            ///
16899            /// Distinct mode: all values are supported.
16900            #[derive(Clone, Default, PartialEq)]
16901            #[non_exhaustive]
16902            pub struct OrderedCodeBytes {
16903                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16904            }
16905
16906            impl OrderedCodeBytes {
16907                pub fn new() -> Self {
16908                    std::default::Default::default()
16909                }
16910            }
16911
16912            impl wkt::message::Message for OrderedCodeBytes {
16913                fn typename() -> &'static str {
16914                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes"
16915                }
16916            }
16917
16918            /// Which encoding to use.
16919            #[derive(Clone, Debug, PartialEq)]
16920            #[non_exhaustive]
16921            pub enum Encoding {
16922                /// Use `BigEndianBytes` encoding.
16923                BigEndianBytes(
16924                    std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
16925                ),
16926                /// Use `OrderedCodeBytes` encoding.
16927                OrderedCodeBytes(
16928                    std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
16929                ),
16930            }
16931        }
16932    }
16933
16934    /// bool
16935    /// Values of type `Bool` are stored in `Value.bool_value`.
16936    #[derive(Clone, Default, PartialEq)]
16937    #[non_exhaustive]
16938    pub struct Bool {
16939        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16940    }
16941
16942    impl Bool {
16943        pub fn new() -> Self {
16944            std::default::Default::default()
16945        }
16946    }
16947
16948    impl wkt::message::Message for Bool {
16949        fn typename() -> &'static str {
16950            "type.googleapis.com/google.bigtable.admin.v2.Type.Bool"
16951        }
16952    }
16953
16954    /// Float32
16955    /// Values of type `Float32` are stored in `Value.float_value`.
16956    #[derive(Clone, Default, PartialEq)]
16957    #[non_exhaustive]
16958    pub struct Float32 {
16959        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16960    }
16961
16962    impl Float32 {
16963        pub fn new() -> Self {
16964            std::default::Default::default()
16965        }
16966    }
16967
16968    impl wkt::message::Message for Float32 {
16969        fn typename() -> &'static str {
16970            "type.googleapis.com/google.bigtable.admin.v2.Type.Float32"
16971        }
16972    }
16973
16974    /// Float64
16975    /// Values of type `Float64` are stored in `Value.float_value`.
16976    #[derive(Clone, Default, PartialEq)]
16977    #[non_exhaustive]
16978    pub struct Float64 {
16979        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16980    }
16981
16982    impl Float64 {
16983        pub fn new() -> Self {
16984            std::default::Default::default()
16985        }
16986    }
16987
16988    impl wkt::message::Message for Float64 {
16989        fn typename() -> &'static str {
16990            "type.googleapis.com/google.bigtable.admin.v2.Type.Float64"
16991        }
16992    }
16993
16994    /// Timestamp
16995    /// Values of type `Timestamp` are stored in `Value.timestamp_value`.
16996    #[derive(Clone, Default, PartialEq)]
16997    #[non_exhaustive]
16998    pub struct Timestamp {
16999        /// The encoding to use when converting to or from lower level types.
17000        pub encoding: std::option::Option<crate::model::r#type::timestamp::Encoding>,
17001
17002        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17003    }
17004
17005    impl Timestamp {
17006        pub fn new() -> Self {
17007            std::default::Default::default()
17008        }
17009
17010        /// Sets the value of [encoding][crate::model::r#type::Timestamp::encoding].
17011        ///
17012        /// # Example
17013        /// ```ignore,no_run
17014        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17015        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17016        /// let x = Timestamp::new().set_encoding(Encoding::default()/* use setters */);
17017        /// ```
17018        pub fn set_encoding<T>(mut self, v: T) -> Self
17019        where
17020            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
17021        {
17022            self.encoding = std::option::Option::Some(v.into());
17023            self
17024        }
17025
17026        /// Sets or clears the value of [encoding][crate::model::r#type::Timestamp::encoding].
17027        ///
17028        /// # Example
17029        /// ```ignore,no_run
17030        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17031        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17032        /// let x = Timestamp::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17033        /// let x = Timestamp::new().set_or_clear_encoding(None::<Encoding>);
17034        /// ```
17035        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17036        where
17037            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
17038        {
17039            self.encoding = v.map(|x| x.into());
17040            self
17041        }
17042    }
17043
17044    impl wkt::message::Message for Timestamp {
17045        fn typename() -> &'static str {
17046            "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp"
17047        }
17048    }
17049
17050    /// Defines additional types related to [Timestamp].
17051    pub mod timestamp {
17052        #[allow(unused_imports)]
17053        use super::*;
17054
17055        /// Rules used to convert to or from lower level types.
17056        #[derive(Clone, Default, PartialEq)]
17057        #[non_exhaustive]
17058        pub struct Encoding {
17059            /// Which encoding to use.
17060            pub encoding: std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
17061
17062            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17063        }
17064
17065        impl Encoding {
17066            pub fn new() -> Self {
17067                std::default::Default::default()
17068            }
17069
17070            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding].
17071            ///
17072            /// Note that all the setters affecting `encoding` are mutually
17073            /// exclusive.
17074            ///
17075            /// # Example
17076            /// ```ignore,no_run
17077            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17078            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
17079            /// let x = Encoding::new().set_encoding(Some(
17080            ///     google_cloud_bigtable_admin_v2::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(UnixMicrosInt64::default().into())));
17081            /// ```
17082            pub fn set_encoding<
17083                T: std::convert::Into<
17084                        std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
17085                    >,
17086            >(
17087                mut self,
17088                v: T,
17089            ) -> Self {
17090                self.encoding = v.into();
17091                self
17092            }
17093
17094            /// The value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
17095            /// if it holds a `UnixMicrosInt64`, `None` if the field is not set or
17096            /// holds a different branch.
17097            pub fn unix_micros_int64(
17098                &self,
17099            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::int_64::Encoding>>
17100            {
17101                #[allow(unreachable_patterns)]
17102                self.encoding.as_ref().and_then(|v| match v {
17103                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v) => {
17104                        std::option::Option::Some(v)
17105                    }
17106                    _ => std::option::Option::None,
17107                })
17108            }
17109
17110            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
17111            /// to hold a `UnixMicrosInt64`.
17112            ///
17113            /// Note that all the setters affecting `encoding` are
17114            /// mutually exclusive.
17115            ///
17116            /// # Example
17117            /// ```ignore,no_run
17118            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17119            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
17120            /// let x = Encoding::new().set_unix_micros_int64(UnixMicrosInt64::default()/* use setters */);
17121            /// assert!(x.unix_micros_int64().is_some());
17122            /// ```
17123            pub fn set_unix_micros_int64<
17124                T: std::convert::Into<std::boxed::Box<crate::model::r#type::int_64::Encoding>>,
17125            >(
17126                mut self,
17127                v: T,
17128            ) -> Self {
17129                self.encoding = std::option::Option::Some(
17130                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v.into()),
17131                );
17132                self
17133            }
17134        }
17135
17136        impl wkt::message::Message for Encoding {
17137            fn typename() -> &'static str {
17138                "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp.Encoding"
17139            }
17140        }
17141
17142        /// Defines additional types related to [Encoding].
17143        pub mod encoding {
17144            #[allow(unused_imports)]
17145            use super::*;
17146
17147            /// Which encoding to use.
17148            #[derive(Clone, Debug, PartialEq)]
17149            #[non_exhaustive]
17150            pub enum Encoding {
17151                /// Encodes the number of microseconds since the Unix epoch using the
17152                /// given `Int64` encoding. Values must be microsecond-aligned.
17153                ///
17154                /// Compatible with:
17155                ///
17156                /// - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
17157                UnixMicrosInt64(std::boxed::Box<crate::model::r#type::int_64::Encoding>),
17158            }
17159        }
17160    }
17161
17162    /// Date
17163    /// Values of type `Date` are stored in `Value.date_value`.
17164    #[derive(Clone, Default, PartialEq)]
17165    #[non_exhaustive]
17166    pub struct Date {
17167        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17168    }
17169
17170    impl Date {
17171        pub fn new() -> Self {
17172            std::default::Default::default()
17173        }
17174    }
17175
17176    impl wkt::message::Message for Date {
17177        fn typename() -> &'static str {
17178            "type.googleapis.com/google.bigtable.admin.v2.Type.Date"
17179        }
17180    }
17181
17182    /// A structured data value, consisting of fields which map to dynamically
17183    /// typed values.
17184    /// Values of type `Struct` are stored in `Value.array_value` where entries are
17185    /// in the same order and number as `field_types`.
17186    #[derive(Clone, Default, PartialEq)]
17187    #[non_exhaustive]
17188    pub struct Struct {
17189        /// The names and types of the fields in this struct.
17190        pub fields: std::vec::Vec<crate::model::r#type::r#struct::Field>,
17191
17192        /// The encoding to use when converting to or from lower level types.
17193        pub encoding: std::option::Option<crate::model::r#type::r#struct::Encoding>,
17194
17195        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17196    }
17197
17198    impl Struct {
17199        pub fn new() -> Self {
17200            std::default::Default::default()
17201        }
17202
17203        /// Sets the value of [fields][crate::model::r#type::Struct::fields].
17204        ///
17205        /// # Example
17206        /// ```ignore,no_run
17207        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17208        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17209        /// let x = Struct::new()
17210        ///     .set_fields([
17211        ///         Field::default()/* use setters */,
17212        ///         Field::default()/* use (different) setters */,
17213        ///     ]);
17214        /// ```
17215        pub fn set_fields<T, V>(mut self, v: T) -> Self
17216        where
17217            T: std::iter::IntoIterator<Item = V>,
17218            V: std::convert::Into<crate::model::r#type::r#struct::Field>,
17219        {
17220            use std::iter::Iterator;
17221            self.fields = v.into_iter().map(|i| i.into()).collect();
17222            self
17223        }
17224
17225        /// Sets the value of [encoding][crate::model::r#type::Struct::encoding].
17226        ///
17227        /// # Example
17228        /// ```ignore,no_run
17229        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17230        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17231        /// let x = Struct::new().set_encoding(Encoding::default()/* use setters */);
17232        /// ```
17233        pub fn set_encoding<T>(mut self, v: T) -> Self
17234        where
17235            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17236        {
17237            self.encoding = std::option::Option::Some(v.into());
17238            self
17239        }
17240
17241        /// Sets or clears the value of [encoding][crate::model::r#type::Struct::encoding].
17242        ///
17243        /// # Example
17244        /// ```ignore,no_run
17245        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17246        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17247        /// let x = Struct::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17248        /// let x = Struct::new().set_or_clear_encoding(None::<Encoding>);
17249        /// ```
17250        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17251        where
17252            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17253        {
17254            self.encoding = v.map(|x| x.into());
17255            self
17256        }
17257    }
17258
17259    impl wkt::message::Message for Struct {
17260        fn typename() -> &'static str {
17261            "type.googleapis.com/google.bigtable.admin.v2.Type.Struct"
17262        }
17263    }
17264
17265    /// Defines additional types related to [Struct].
17266    pub mod r#struct {
17267        #[allow(unused_imports)]
17268        use super::*;
17269
17270        /// A struct field and its type.
17271        #[derive(Clone, Default, PartialEq)]
17272        #[non_exhaustive]
17273        pub struct Field {
17274            /// The field name (optional). Fields without a `field_name` are considered
17275            /// anonymous and cannot be referenced by name.
17276            pub field_name: std::string::String,
17277
17278            /// The type of values in this field.
17279            pub r#type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17280
17281            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17282        }
17283
17284        impl Field {
17285            pub fn new() -> Self {
17286                std::default::Default::default()
17287            }
17288
17289            /// Sets the value of [field_name][crate::model::r#type::r#struct::Field::field_name].
17290            ///
17291            /// # Example
17292            /// ```ignore,no_run
17293            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17294            /// let x = Field::new().set_field_name("example");
17295            /// ```
17296            pub fn set_field_name<T: std::convert::Into<std::string::String>>(
17297                mut self,
17298                v: T,
17299            ) -> Self {
17300                self.field_name = v.into();
17301                self
17302            }
17303
17304            /// Sets the value of [r#type][crate::model::r#type::r#struct::Field::type].
17305            ///
17306            /// # Example
17307            /// ```ignore,no_run
17308            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17309            /// use google_cloud_bigtable_admin_v2::model::Type;
17310            /// let x = Field::new().set_type(Type::default()/* use setters */);
17311            /// ```
17312            pub fn set_type<T>(mut self, v: T) -> Self
17313            where
17314                T: std::convert::Into<crate::model::Type>,
17315            {
17316                self.r#type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17317                self
17318            }
17319
17320            /// Sets or clears the value of [r#type][crate::model::r#type::r#struct::Field::type].
17321            ///
17322            /// # Example
17323            /// ```ignore,no_run
17324            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17325            /// use google_cloud_bigtable_admin_v2::model::Type;
17326            /// let x = Field::new().set_or_clear_type(Some(Type::default()/* use setters */));
17327            /// let x = Field::new().set_or_clear_type(None::<Type>);
17328            /// ```
17329            pub fn set_or_clear_type<T>(mut self, v: std::option::Option<T>) -> Self
17330            where
17331                T: std::convert::Into<crate::model::Type>,
17332            {
17333                self.r#type = v.map(|x| std::boxed::Box::new(x.into()));
17334                self
17335            }
17336        }
17337
17338        impl wkt::message::Message for Field {
17339            fn typename() -> &'static str {
17340                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Field"
17341            }
17342        }
17343
17344        /// Rules used to convert to or from lower level types.
17345        #[derive(Clone, Default, PartialEq)]
17346        #[non_exhaustive]
17347        pub struct Encoding {
17348            /// Which encoding to use.
17349            pub encoding: std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17350
17351            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17352        }
17353
17354        impl Encoding {
17355            pub fn new() -> Self {
17356                std::default::Default::default()
17357            }
17358
17359            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding].
17360            ///
17361            /// Note that all the setters affecting `encoding` are mutually
17362            /// exclusive.
17363            ///
17364            /// # Example
17365            /// ```ignore,no_run
17366            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17367            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17368            /// let x = Encoding::new().set_encoding(Some(
17369            ///     google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Encoding::Singleton(Singleton::default().into())));
17370            /// ```
17371            pub fn set_encoding<
17372                T: std::convert::Into<
17373                        std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17374                    >,
17375            >(
17376                mut self,
17377                v: T,
17378            ) -> Self {
17379                self.encoding = v.into();
17380                self
17381            }
17382
17383            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17384            /// if it holds a `Singleton`, `None` if the field is not set or
17385            /// holds a different branch.
17386            pub fn singleton(
17387                &self,
17388            ) -> std::option::Option<
17389                &std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17390            > {
17391                #[allow(unreachable_patterns)]
17392                self.encoding.as_ref().and_then(|v| match v {
17393                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v) => {
17394                        std::option::Option::Some(v)
17395                    }
17396                    _ => std::option::Option::None,
17397                })
17398            }
17399
17400            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17401            /// to hold a `Singleton`.
17402            ///
17403            /// Note that all the setters affecting `encoding` are
17404            /// mutually exclusive.
17405            ///
17406            /// # Example
17407            /// ```ignore,no_run
17408            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17409            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17410            /// let x = Encoding::new().set_singleton(Singleton::default()/* use setters */);
17411            /// assert!(x.singleton().is_some());
17412            /// assert!(x.delimited_bytes().is_none());
17413            /// assert!(x.ordered_code_bytes().is_none());
17414            /// ```
17415            pub fn set_singleton<
17416                T: std::convert::Into<
17417                        std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17418                    >,
17419            >(
17420                mut self,
17421                v: T,
17422            ) -> Self {
17423                self.encoding = std::option::Option::Some(
17424                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v.into()),
17425                );
17426                self
17427            }
17428
17429            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17430            /// if it holds a `DelimitedBytes`, `None` if the field is not set or
17431            /// holds a different branch.
17432            pub fn delimited_bytes(
17433                &self,
17434            ) -> std::option::Option<
17435                &std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17436            > {
17437                #[allow(unreachable_patterns)]
17438                self.encoding.as_ref().and_then(|v| match v {
17439                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v) => {
17440                        std::option::Option::Some(v)
17441                    }
17442                    _ => std::option::Option::None,
17443                })
17444            }
17445
17446            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17447            /// to hold a `DelimitedBytes`.
17448            ///
17449            /// Note that all the setters affecting `encoding` are
17450            /// mutually exclusive.
17451            ///
17452            /// # Example
17453            /// ```ignore,no_run
17454            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17455            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
17456            /// let x = Encoding::new().set_delimited_bytes(DelimitedBytes::default()/* use setters */);
17457            /// assert!(x.delimited_bytes().is_some());
17458            /// assert!(x.singleton().is_none());
17459            /// assert!(x.ordered_code_bytes().is_none());
17460            /// ```
17461            pub fn set_delimited_bytes<
17462                T: std::convert::Into<
17463                        std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17464                    >,
17465            >(
17466                mut self,
17467                v: T,
17468            ) -> Self {
17469                self.encoding = std::option::Option::Some(
17470                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v.into()),
17471                );
17472                self
17473            }
17474
17475            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17476            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
17477            /// holds a different branch.
17478            pub fn ordered_code_bytes(
17479                &self,
17480            ) -> std::option::Option<
17481                &std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
17482            > {
17483                #[allow(unreachable_patterns)]
17484                self.encoding.as_ref().and_then(|v| match v {
17485                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v) => {
17486                        std::option::Option::Some(v)
17487                    }
17488                    _ => std::option::Option::None,
17489                })
17490            }
17491
17492            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17493            /// to hold a `OrderedCodeBytes`.
17494            ///
17495            /// Note that all the setters affecting `encoding` are
17496            /// mutually exclusive.
17497            ///
17498            /// # Example
17499            /// ```ignore,no_run
17500            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17501            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::OrderedCodeBytes;
17502            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
17503            /// assert!(x.ordered_code_bytes().is_some());
17504            /// assert!(x.singleton().is_none());
17505            /// assert!(x.delimited_bytes().is_none());
17506            /// ```
17507            pub fn set_ordered_code_bytes<
17508                T: std::convert::Into<
17509                        std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
17510                    >,
17511            >(
17512                mut self,
17513                v: T,
17514            ) -> Self {
17515                self.encoding = std::option::Option::Some(
17516                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v.into()),
17517                );
17518                self
17519            }
17520        }
17521
17522        impl wkt::message::Message for Encoding {
17523            fn typename() -> &'static str {
17524                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding"
17525            }
17526        }
17527
17528        /// Defines additional types related to [Encoding].
17529        pub mod encoding {
17530            #[allow(unused_imports)]
17531            use super::*;
17532
17533            /// Uses the encoding of `fields[0].type` as-is.
17534            /// Only valid if `fields.size == 1`.
17535            #[derive(Clone, Default, PartialEq)]
17536            #[non_exhaustive]
17537            pub struct Singleton {
17538                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17539            }
17540
17541            impl Singleton {
17542                pub fn new() -> Self {
17543                    std::default::Default::default()
17544                }
17545            }
17546
17547            impl wkt::message::Message for Singleton {
17548                fn typename() -> &'static str {
17549                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.Singleton"
17550                }
17551            }
17552
17553            /// Fields are encoded independently and concatenated with a configurable
17554            /// `delimiter` in between.
17555            ///
17556            /// A struct with no fields defined is encoded as a single `delimiter`.
17557            ///
17558            /// Sorted mode:
17559            ///
17560            /// - Fields are encoded in sorted mode.
17561            /// - Encoded field values must not contain any bytes <= `delimiter[0]`
17562            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
17563            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
17564            ///
17565            /// Distinct mode:
17566            ///
17567            /// - Fields are encoded in distinct mode.
17568            /// - Encoded field values must not contain `delimiter[0]`.
17569            #[derive(Clone, Default, PartialEq)]
17570            #[non_exhaustive]
17571            pub struct DelimitedBytes {
17572                /// Byte sequence used to delimit concatenated fields. The delimiter must
17573                /// contain at least 1 character and at most 50 characters.
17574                pub delimiter: ::bytes::Bytes,
17575
17576                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17577            }
17578
17579            impl DelimitedBytes {
17580                pub fn new() -> Self {
17581                    std::default::Default::default()
17582                }
17583
17584                /// Sets the value of [delimiter][crate::model::r#type::r#struct::encoding::DelimitedBytes::delimiter].
17585                ///
17586                /// # Example
17587                /// ```ignore,no_run
17588                /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
17589                /// let x = DelimitedBytes::new().set_delimiter(bytes::Bytes::from_static(b"example"));
17590                /// ```
17591                pub fn set_delimiter<T: std::convert::Into<::bytes::Bytes>>(
17592                    mut self,
17593                    v: T,
17594                ) -> Self {
17595                    self.delimiter = v.into();
17596                    self
17597                }
17598            }
17599
17600            impl wkt::message::Message for DelimitedBytes {
17601                fn typename() -> &'static str {
17602                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes"
17603                }
17604            }
17605
17606            /// Fields are encoded independently and concatenated with the fixed byte
17607            /// pair {0x00, 0x01} in between.
17608            ///
17609            /// Any null (0x00) byte in an encoded field is replaced by the fixed byte
17610            /// pair {0x00, 0xFF}.
17611            ///
17612            /// Fields that encode to the empty string "" have special handling:
17613            ///
17614            /// - If *every* field encodes to "", or if the STRUCT has no fields
17615            ///   defined, then the STRUCT is encoded as the fixed byte pair
17616            ///   {0x00, 0x00}.
17617            /// - Otherwise, the STRUCT only encodes until the last non-empty field,
17618            ///   omitting any trailing empty fields. Any empty fields that aren't
17619            ///   omitted are replaced with the fixed byte pair {0x00, 0x00}.
17620            ///
17621            /// Examples:
17622            ///
17623            /// - STRUCT()             -> "\00\00"
17624            /// - STRUCT("")           -> "\00\00"
17625            /// - STRUCT("", "")       -> "\00\00"
17626            /// - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
17627            /// - STRUCT("A", "")      -> "A"
17628            /// - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
17629            /// - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
17630            ///
17631            /// Since null bytes are always escaped, this encoding can cause size
17632            /// blowup for encodings like `Int64.BigEndianBytes` that are likely to
17633            /// produce many such bytes.
17634            ///
17635            /// Sorted mode:
17636            ///
17637            /// - Fields are encoded in sorted mode.
17638            /// - All values supported by the field encodings are allowed
17639            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
17640            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
17641            ///
17642            /// Distinct mode:
17643            ///
17644            /// - Fields are encoded in distinct mode.
17645            /// - All values supported by the field encodings are allowed.
17646            #[derive(Clone, Default, PartialEq)]
17647            #[non_exhaustive]
17648            pub struct OrderedCodeBytes {
17649                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17650            }
17651
17652            impl OrderedCodeBytes {
17653                pub fn new() -> Self {
17654                    std::default::Default::default()
17655                }
17656            }
17657
17658            impl wkt::message::Message for OrderedCodeBytes {
17659                fn typename() -> &'static str {
17660                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes"
17661                }
17662            }
17663
17664            /// Which encoding to use.
17665            #[derive(Clone, Debug, PartialEq)]
17666            #[non_exhaustive]
17667            pub enum Encoding {
17668                /// Use `Singleton` encoding.
17669                Singleton(std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>),
17670                /// Use `DelimitedBytes` encoding.
17671                DelimitedBytes(
17672                    std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17673                ),
17674                /// User `OrderedCodeBytes` encoding.
17675                OrderedCodeBytes(
17676                    std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
17677                ),
17678            }
17679        }
17680    }
17681
17682    /// A protobuf message type.
17683    /// Values of type `Proto` are stored in `Value.bytes_value`.
17684    #[derive(Clone, Default, PartialEq)]
17685    #[non_exhaustive]
17686    pub struct Proto {
17687        /// The ID of the schema bundle that this proto is defined in.
17688        pub schema_bundle_id: std::string::String,
17689
17690        /// The fully qualified name of the protobuf message, including package. In
17691        /// the format of "foo.bar.Message".
17692        pub message_name: std::string::String,
17693
17694        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17695    }
17696
17697    impl Proto {
17698        pub fn new() -> Self {
17699            std::default::Default::default()
17700        }
17701
17702        /// Sets the value of [schema_bundle_id][crate::model::r#type::Proto::schema_bundle_id].
17703        ///
17704        /// # Example
17705        /// ```ignore,no_run
17706        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
17707        /// let x = Proto::new().set_schema_bundle_id("example");
17708        /// ```
17709        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
17710            mut self,
17711            v: T,
17712        ) -> Self {
17713            self.schema_bundle_id = v.into();
17714            self
17715        }
17716
17717        /// Sets the value of [message_name][crate::model::r#type::Proto::message_name].
17718        ///
17719        /// # Example
17720        /// ```ignore,no_run
17721        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
17722        /// let x = Proto::new().set_message_name("example");
17723        /// ```
17724        pub fn set_message_name<T: std::convert::Into<std::string::String>>(
17725            mut self,
17726            v: T,
17727        ) -> Self {
17728            self.message_name = v.into();
17729            self
17730        }
17731    }
17732
17733    impl wkt::message::Message for Proto {
17734        fn typename() -> &'static str {
17735            "type.googleapis.com/google.bigtable.admin.v2.Type.Proto"
17736        }
17737    }
17738
17739    /// A protobuf enum type.
17740    /// Values of type `Enum` are stored in `Value.int_value`.
17741    #[derive(Clone, Default, PartialEq)]
17742    #[non_exhaustive]
17743    pub struct Enum {
17744        /// The ID of the schema bundle that this enum is defined in.
17745        pub schema_bundle_id: std::string::String,
17746
17747        /// The fully qualified name of the protobuf enum message, including package.
17748        /// In the format of "foo.bar.EnumMessage".
17749        pub enum_name: std::string::String,
17750
17751        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17752    }
17753
17754    impl Enum {
17755        pub fn new() -> Self {
17756            std::default::Default::default()
17757        }
17758
17759        /// Sets the value of [schema_bundle_id][crate::model::r#type::Enum::schema_bundle_id].
17760        ///
17761        /// # Example
17762        /// ```ignore,no_run
17763        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
17764        /// let x = Enum::new().set_schema_bundle_id("example");
17765        /// ```
17766        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
17767            mut self,
17768            v: T,
17769        ) -> Self {
17770            self.schema_bundle_id = v.into();
17771            self
17772        }
17773
17774        /// Sets the value of [enum_name][crate::model::r#type::Enum::enum_name].
17775        ///
17776        /// # Example
17777        /// ```ignore,no_run
17778        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
17779        /// let x = Enum::new().set_enum_name("example");
17780        /// ```
17781        pub fn set_enum_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17782            self.enum_name = v.into();
17783            self
17784        }
17785    }
17786
17787    impl wkt::message::Message for Enum {
17788        fn typename() -> &'static str {
17789            "type.googleapis.com/google.bigtable.admin.v2.Type.Enum"
17790        }
17791    }
17792
17793    /// An ordered list of elements of a given type.
17794    /// Values of type `Array` are stored in `Value.array_value`.
17795    #[derive(Clone, Default, PartialEq)]
17796    #[non_exhaustive]
17797    pub struct Array {
17798        /// The type of the elements in the array. This must not be `Array`.
17799        pub element_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17800
17801        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17802    }
17803
17804    impl Array {
17805        pub fn new() -> Self {
17806            std::default::Default::default()
17807        }
17808
17809        /// Sets the value of [element_type][crate::model::r#type::Array::element_type].
17810        ///
17811        /// # Example
17812        /// ```ignore,no_run
17813        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
17814        /// use google_cloud_bigtable_admin_v2::model::Type;
17815        /// let x = Array::new().set_element_type(Type::default()/* use setters */);
17816        /// ```
17817        pub fn set_element_type<T>(mut self, v: T) -> Self
17818        where
17819            T: std::convert::Into<crate::model::Type>,
17820        {
17821            self.element_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17822            self
17823        }
17824
17825        /// Sets or clears the value of [element_type][crate::model::r#type::Array::element_type].
17826        ///
17827        /// # Example
17828        /// ```ignore,no_run
17829        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
17830        /// use google_cloud_bigtable_admin_v2::model::Type;
17831        /// let x = Array::new().set_or_clear_element_type(Some(Type::default()/* use setters */));
17832        /// let x = Array::new().set_or_clear_element_type(None::<Type>);
17833        /// ```
17834        pub fn set_or_clear_element_type<T>(mut self, v: std::option::Option<T>) -> Self
17835        where
17836            T: std::convert::Into<crate::model::Type>,
17837        {
17838            self.element_type = v.map(|x| std::boxed::Box::new(x.into()));
17839            self
17840        }
17841    }
17842
17843    impl wkt::message::Message for Array {
17844        fn typename() -> &'static str {
17845            "type.googleapis.com/google.bigtable.admin.v2.Type.Array"
17846        }
17847    }
17848
17849    /// A mapping of keys to values of a given type.
17850    /// Values of type `Map` are stored in a `Value.array_value` where each entry
17851    /// is another `Value.array_value` with two elements (the key and the value,
17852    /// in that order).
17853    /// Normally encoded Map values won't have repeated keys, however, clients are
17854    /// expected to handle the case in which they do. If the same key appears
17855    /// multiple times, the _last_ value takes precedence.
17856    #[derive(Clone, Default, PartialEq)]
17857    #[non_exhaustive]
17858    pub struct Map {
17859        /// The type of a map key.
17860        /// Only `Bytes`, `String`, and `Int64` are allowed as key types.
17861        pub key_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17862
17863        /// The type of the values in a map.
17864        pub value_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17865
17866        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17867    }
17868
17869    impl Map {
17870        pub fn new() -> Self {
17871            std::default::Default::default()
17872        }
17873
17874        /// Sets the value of [key_type][crate::model::r#type::Map::key_type].
17875        ///
17876        /// # Example
17877        /// ```ignore,no_run
17878        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
17879        /// use google_cloud_bigtable_admin_v2::model::Type;
17880        /// let x = Map::new().set_key_type(Type::default()/* use setters */);
17881        /// ```
17882        pub fn set_key_type<T>(mut self, v: T) -> Self
17883        where
17884            T: std::convert::Into<crate::model::Type>,
17885        {
17886            self.key_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17887            self
17888        }
17889
17890        /// Sets or clears the value of [key_type][crate::model::r#type::Map::key_type].
17891        ///
17892        /// # Example
17893        /// ```ignore,no_run
17894        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
17895        /// use google_cloud_bigtable_admin_v2::model::Type;
17896        /// let x = Map::new().set_or_clear_key_type(Some(Type::default()/* use setters */));
17897        /// let x = Map::new().set_or_clear_key_type(None::<Type>);
17898        /// ```
17899        pub fn set_or_clear_key_type<T>(mut self, v: std::option::Option<T>) -> Self
17900        where
17901            T: std::convert::Into<crate::model::Type>,
17902        {
17903            self.key_type = v.map(|x| std::boxed::Box::new(x.into()));
17904            self
17905        }
17906
17907        /// Sets the value of [value_type][crate::model::r#type::Map::value_type].
17908        ///
17909        /// # Example
17910        /// ```ignore,no_run
17911        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
17912        /// use google_cloud_bigtable_admin_v2::model::Type;
17913        /// let x = Map::new().set_value_type(Type::default()/* use setters */);
17914        /// ```
17915        pub fn set_value_type<T>(mut self, v: T) -> Self
17916        where
17917            T: std::convert::Into<crate::model::Type>,
17918        {
17919            self.value_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17920            self
17921        }
17922
17923        /// Sets or clears the value of [value_type][crate::model::r#type::Map::value_type].
17924        ///
17925        /// # Example
17926        /// ```ignore,no_run
17927        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
17928        /// use google_cloud_bigtable_admin_v2::model::Type;
17929        /// let x = Map::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
17930        /// let x = Map::new().set_or_clear_value_type(None::<Type>);
17931        /// ```
17932        pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
17933        where
17934            T: std::convert::Into<crate::model::Type>,
17935        {
17936            self.value_type = v.map(|x| std::boxed::Box::new(x.into()));
17937            self
17938        }
17939    }
17940
17941    impl wkt::message::Message for Map {
17942        fn typename() -> &'static str {
17943            "type.googleapis.com/google.bigtable.admin.v2.Type.Map"
17944        }
17945    }
17946
17947    /// A value that combines incremental updates into a summarized value.
17948    ///
17949    /// Data is never directly written or read using type `Aggregate`. Writes will
17950    /// provide either the `input_type` or `state_type`, and reads will always
17951    /// return the `state_type` .
17952    #[derive(Clone, Default, PartialEq)]
17953    #[non_exhaustive]
17954    pub struct Aggregate {
17955        /// Type of the inputs that are accumulated by this `Aggregate`, which must
17956        /// specify a full encoding.
17957        /// Use `AddInput` mutations to accumulate new inputs.
17958        pub input_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17959
17960        /// Output only. Type that holds the internal accumulator state for the
17961        /// `Aggregate`. This is a function of the `input_type` and `aggregator`
17962        /// chosen, and will always specify a full encoding.
17963        pub state_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17964
17965        /// Which aggregator function to use. The configured types must match.
17966        pub aggregator: std::option::Option<crate::model::r#type::aggregate::Aggregator>,
17967
17968        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17969    }
17970
17971    impl Aggregate {
17972        pub fn new() -> Self {
17973            std::default::Default::default()
17974        }
17975
17976        /// Sets the value of [input_type][crate::model::r#type::Aggregate::input_type].
17977        ///
17978        /// # Example
17979        /// ```ignore,no_run
17980        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17981        /// use google_cloud_bigtable_admin_v2::model::Type;
17982        /// let x = Aggregate::new().set_input_type(Type::default()/* use setters */);
17983        /// ```
17984        pub fn set_input_type<T>(mut self, v: T) -> Self
17985        where
17986            T: std::convert::Into<crate::model::Type>,
17987        {
17988            self.input_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17989            self
17990        }
17991
17992        /// Sets or clears the value of [input_type][crate::model::r#type::Aggregate::input_type].
17993        ///
17994        /// # Example
17995        /// ```ignore,no_run
17996        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
17997        /// use google_cloud_bigtable_admin_v2::model::Type;
17998        /// let x = Aggregate::new().set_or_clear_input_type(Some(Type::default()/* use setters */));
17999        /// let x = Aggregate::new().set_or_clear_input_type(None::<Type>);
18000        /// ```
18001        pub fn set_or_clear_input_type<T>(mut self, v: std::option::Option<T>) -> Self
18002        where
18003            T: std::convert::Into<crate::model::Type>,
18004        {
18005            self.input_type = v.map(|x| std::boxed::Box::new(x.into()));
18006            self
18007        }
18008
18009        /// Sets the value of [state_type][crate::model::r#type::Aggregate::state_type].
18010        ///
18011        /// # Example
18012        /// ```ignore,no_run
18013        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18014        /// use google_cloud_bigtable_admin_v2::model::Type;
18015        /// let x = Aggregate::new().set_state_type(Type::default()/* use setters */);
18016        /// ```
18017        pub fn set_state_type<T>(mut self, v: T) -> Self
18018        where
18019            T: std::convert::Into<crate::model::Type>,
18020        {
18021            self.state_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18022            self
18023        }
18024
18025        /// Sets or clears the value of [state_type][crate::model::r#type::Aggregate::state_type].
18026        ///
18027        /// # Example
18028        /// ```ignore,no_run
18029        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18030        /// use google_cloud_bigtable_admin_v2::model::Type;
18031        /// let x = Aggregate::new().set_or_clear_state_type(Some(Type::default()/* use setters */));
18032        /// let x = Aggregate::new().set_or_clear_state_type(None::<Type>);
18033        /// ```
18034        pub fn set_or_clear_state_type<T>(mut self, v: std::option::Option<T>) -> Self
18035        where
18036            T: std::convert::Into<crate::model::Type>,
18037        {
18038            self.state_type = v.map(|x| std::boxed::Box::new(x.into()));
18039            self
18040        }
18041
18042        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator].
18043        ///
18044        /// Note that all the setters affecting `aggregator` are mutually
18045        /// exclusive.
18046        ///
18047        /// # Example
18048        /// ```ignore,no_run
18049        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18050        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
18051        /// let x = Aggregate::new().set_aggregator(Some(
18052        ///     google_cloud_bigtable_admin_v2::model::r#type::aggregate::Aggregator::Sum(Sum::default().into())));
18053        /// ```
18054        pub fn set_aggregator<
18055            T: std::convert::Into<std::option::Option<crate::model::r#type::aggregate::Aggregator>>,
18056        >(
18057            mut self,
18058            v: T,
18059        ) -> Self {
18060            self.aggregator = v.into();
18061            self
18062        }
18063
18064        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18065        /// if it holds a `Sum`, `None` if the field is not set or
18066        /// holds a different branch.
18067        pub fn sum(
18068            &self,
18069        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Sum>> {
18070            #[allow(unreachable_patterns)]
18071            self.aggregator.as_ref().and_then(|v| match v {
18072                crate::model::r#type::aggregate::Aggregator::Sum(v) => std::option::Option::Some(v),
18073                _ => std::option::Option::None,
18074            })
18075        }
18076
18077        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18078        /// to hold a `Sum`.
18079        ///
18080        /// Note that all the setters affecting `aggregator` are
18081        /// mutually exclusive.
18082        ///
18083        /// # Example
18084        /// ```ignore,no_run
18085        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18086        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
18087        /// let x = Aggregate::new().set_sum(Sum::default()/* use setters */);
18088        /// assert!(x.sum().is_some());
18089        /// assert!(x.hllpp_unique_count().is_none());
18090        /// assert!(x.max().is_none());
18091        /// assert!(x.min().is_none());
18092        /// ```
18093        pub fn set_sum<
18094            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Sum>>,
18095        >(
18096            mut self,
18097            v: T,
18098        ) -> Self {
18099            self.aggregator = std::option::Option::Some(
18100                crate::model::r#type::aggregate::Aggregator::Sum(v.into()),
18101            );
18102            self
18103        }
18104
18105        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18106        /// if it holds a `HllppUniqueCount`, `None` if the field is not set or
18107        /// holds a different branch.
18108        pub fn hllpp_unique_count(
18109            &self,
18110        ) -> std::option::Option<
18111            &std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18112        > {
18113            #[allow(unreachable_patterns)]
18114            self.aggregator.as_ref().and_then(|v| match v {
18115                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v) => {
18116                    std::option::Option::Some(v)
18117                }
18118                _ => std::option::Option::None,
18119            })
18120        }
18121
18122        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18123        /// to hold a `HllppUniqueCount`.
18124        ///
18125        /// Note that all the setters affecting `aggregator` are
18126        /// mutually exclusive.
18127        ///
18128        /// # Example
18129        /// ```ignore,no_run
18130        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18131        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount;
18132        /// let x = Aggregate::new().set_hllpp_unique_count(HyperLogLogPlusPlusUniqueCount::default()/* use setters */);
18133        /// assert!(x.hllpp_unique_count().is_some());
18134        /// assert!(x.sum().is_none());
18135        /// assert!(x.max().is_none());
18136        /// assert!(x.min().is_none());
18137        /// ```
18138        pub fn set_hllpp_unique_count<
18139            T: std::convert::Into<
18140                    std::boxed::Box<
18141                        crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount,
18142                    >,
18143                >,
18144        >(
18145            mut self,
18146            v: T,
18147        ) -> Self {
18148            self.aggregator = std::option::Option::Some(
18149                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v.into()),
18150            );
18151            self
18152        }
18153
18154        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18155        /// if it holds a `Max`, `None` if the field is not set or
18156        /// holds a different branch.
18157        pub fn max(
18158            &self,
18159        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Max>> {
18160            #[allow(unreachable_patterns)]
18161            self.aggregator.as_ref().and_then(|v| match v {
18162                crate::model::r#type::aggregate::Aggregator::Max(v) => std::option::Option::Some(v),
18163                _ => std::option::Option::None,
18164            })
18165        }
18166
18167        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18168        /// to hold a `Max`.
18169        ///
18170        /// Note that all the setters affecting `aggregator` are
18171        /// mutually exclusive.
18172        ///
18173        /// # Example
18174        /// ```ignore,no_run
18175        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18176        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Max;
18177        /// let x = Aggregate::new().set_max(Max::default()/* use setters */);
18178        /// assert!(x.max().is_some());
18179        /// assert!(x.sum().is_none());
18180        /// assert!(x.hllpp_unique_count().is_none());
18181        /// assert!(x.min().is_none());
18182        /// ```
18183        pub fn set_max<
18184            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Max>>,
18185        >(
18186            mut self,
18187            v: T,
18188        ) -> Self {
18189            self.aggregator = std::option::Option::Some(
18190                crate::model::r#type::aggregate::Aggregator::Max(v.into()),
18191            );
18192            self
18193        }
18194
18195        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18196        /// if it holds a `Min`, `None` if the field is not set or
18197        /// holds a different branch.
18198        pub fn min(
18199            &self,
18200        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Min>> {
18201            #[allow(unreachable_patterns)]
18202            self.aggregator.as_ref().and_then(|v| match v {
18203                crate::model::r#type::aggregate::Aggregator::Min(v) => std::option::Option::Some(v),
18204                _ => std::option::Option::None,
18205            })
18206        }
18207
18208        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18209        /// to hold a `Min`.
18210        ///
18211        /// Note that all the setters affecting `aggregator` are
18212        /// mutually exclusive.
18213        ///
18214        /// # Example
18215        /// ```ignore,no_run
18216        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18217        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Min;
18218        /// let x = Aggregate::new().set_min(Min::default()/* use setters */);
18219        /// assert!(x.min().is_some());
18220        /// assert!(x.sum().is_none());
18221        /// assert!(x.hllpp_unique_count().is_none());
18222        /// assert!(x.max().is_none());
18223        /// ```
18224        pub fn set_min<
18225            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Min>>,
18226        >(
18227            mut self,
18228            v: T,
18229        ) -> Self {
18230            self.aggregator = std::option::Option::Some(
18231                crate::model::r#type::aggregate::Aggregator::Min(v.into()),
18232            );
18233            self
18234        }
18235    }
18236
18237    impl wkt::message::Message for Aggregate {
18238        fn typename() -> &'static str {
18239            "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate"
18240        }
18241    }
18242
18243    /// Defines additional types related to [Aggregate].
18244    pub mod aggregate {
18245        #[allow(unused_imports)]
18246        use super::*;
18247
18248        /// Computes the sum of the input values.
18249        /// Allowed input: `Int64`
18250        /// State: same as input
18251        #[derive(Clone, Default, PartialEq)]
18252        #[non_exhaustive]
18253        pub struct Sum {
18254            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18255        }
18256
18257        impl Sum {
18258            pub fn new() -> Self {
18259                std::default::Default::default()
18260            }
18261        }
18262
18263        impl wkt::message::Message for Sum {
18264            fn typename() -> &'static str {
18265                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Sum"
18266            }
18267        }
18268
18269        /// Computes the max of the input values.
18270        /// Allowed input: `Int64`
18271        /// State: same as input
18272        #[derive(Clone, Default, PartialEq)]
18273        #[non_exhaustive]
18274        pub struct Max {
18275            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18276        }
18277
18278        impl Max {
18279            pub fn new() -> Self {
18280                std::default::Default::default()
18281            }
18282        }
18283
18284        impl wkt::message::Message for Max {
18285            fn typename() -> &'static str {
18286                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Max"
18287            }
18288        }
18289
18290        /// Computes the min of the input values.
18291        /// Allowed input: `Int64`
18292        /// State: same as input
18293        #[derive(Clone, Default, PartialEq)]
18294        #[non_exhaustive]
18295        pub struct Min {
18296            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18297        }
18298
18299        impl Min {
18300            pub fn new() -> Self {
18301                std::default::Default::default()
18302            }
18303        }
18304
18305        impl wkt::message::Message for Min {
18306            fn typename() -> &'static str {
18307                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Min"
18308            }
18309        }
18310
18311        /// Computes an approximate unique count over the input values. When using
18312        /// raw data as input, be careful to use a consistent encoding. Otherwise
18313        /// the same value encoded differently could count more than once, or two
18314        /// distinct values could count as identical.
18315        /// Input: Any, or omit for Raw
18316        /// State: TBD
18317        /// Special state conversions: `Int64` (the unique count estimate)
18318        #[derive(Clone, Default, PartialEq)]
18319        #[non_exhaustive]
18320        pub struct HyperLogLogPlusPlusUniqueCount {
18321            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18322        }
18323
18324        impl HyperLogLogPlusPlusUniqueCount {
18325            pub fn new() -> Self {
18326                std::default::Default::default()
18327            }
18328        }
18329
18330        impl wkt::message::Message for HyperLogLogPlusPlusUniqueCount {
18331            fn typename() -> &'static str {
18332                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount"
18333            }
18334        }
18335
18336        /// Which aggregator function to use. The configured types must match.
18337        #[derive(Clone, Debug, PartialEq)]
18338        #[non_exhaustive]
18339        pub enum Aggregator {
18340            /// Sum aggregator.
18341            Sum(std::boxed::Box<crate::model::r#type::aggregate::Sum>),
18342            /// HyperLogLogPlusPlusUniqueCount aggregator.
18343            HllppUniqueCount(
18344                std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18345            ),
18346            /// Max aggregator.
18347            Max(std::boxed::Box<crate::model::r#type::aggregate::Max>),
18348            /// Min aggregator.
18349            Min(std::boxed::Box<crate::model::r#type::aggregate::Min>),
18350        }
18351    }
18352
18353    /// The kind of type that this represents.
18354    #[derive(Clone, Debug, PartialEq)]
18355    #[non_exhaustive]
18356    pub enum Kind {
18357        /// Bytes
18358        BytesType(std::boxed::Box<crate::model::r#type::Bytes>),
18359        /// String
18360        StringType(std::boxed::Box<crate::model::r#type::String>),
18361        /// Int64
18362        Int64Type(std::boxed::Box<crate::model::r#type::Int64>),
18363        /// Float32
18364        Float32Type(std::boxed::Box<crate::model::r#type::Float32>),
18365        /// Float64
18366        Float64Type(std::boxed::Box<crate::model::r#type::Float64>),
18367        /// Bool
18368        BoolType(std::boxed::Box<crate::model::r#type::Bool>),
18369        /// Timestamp
18370        TimestampType(std::boxed::Box<crate::model::r#type::Timestamp>),
18371        /// Date
18372        DateType(std::boxed::Box<crate::model::r#type::Date>),
18373        /// Aggregate
18374        AggregateType(std::boxed::Box<crate::model::r#type::Aggregate>),
18375        /// Struct
18376        StructType(std::boxed::Box<crate::model::r#type::Struct>),
18377        /// Array
18378        ArrayType(std::boxed::Box<crate::model::r#type::Array>),
18379        /// Map
18380        MapType(std::boxed::Box<crate::model::r#type::Map>),
18381        /// Proto
18382        ProtoType(std::boxed::Box<crate::model::r#type::Proto>),
18383        /// Enum
18384        EnumType(std::boxed::Box<crate::model::r#type::Enum>),
18385    }
18386}
18387
18388/// Storage media types for persisting Bigtable data.
18389///
18390/// # Working with unknown values
18391///
18392/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18393/// additional enum variants at any time. Adding new variants is not considered
18394/// a breaking change. Applications should write their code in anticipation of:
18395///
18396/// - New values appearing in future releases of the client library, **and**
18397/// - New values received dynamically, without application changes.
18398///
18399/// Please consult the [Working with enums] section in the user guide for some
18400/// guidelines.
18401///
18402/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18403#[derive(Clone, Debug, PartialEq)]
18404#[non_exhaustive]
18405pub enum StorageType {
18406    /// The user did not specify a storage type.
18407    Unspecified,
18408    /// Flash (SSD) storage should be used.
18409    Ssd,
18410    /// Magnetic drive (HDD) storage should be used.
18411    Hdd,
18412    /// If set, the enum was initialized with an unknown value.
18413    ///
18414    /// Applications can examine the value using [StorageType::value] or
18415    /// [StorageType::name].
18416    UnknownValue(storage_type::UnknownValue),
18417}
18418
18419#[doc(hidden)]
18420pub mod storage_type {
18421    #[allow(unused_imports)]
18422    use super::*;
18423    #[derive(Clone, Debug, PartialEq)]
18424    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18425}
18426
18427impl StorageType {
18428    /// Gets the enum value.
18429    ///
18430    /// Returns `None` if the enum contains an unknown value deserialized from
18431    /// the string representation of enums.
18432    pub fn value(&self) -> std::option::Option<i32> {
18433        match self {
18434            Self::Unspecified => std::option::Option::Some(0),
18435            Self::Ssd => std::option::Option::Some(1),
18436            Self::Hdd => std::option::Option::Some(2),
18437            Self::UnknownValue(u) => u.0.value(),
18438        }
18439    }
18440
18441    /// Gets the enum value as a string.
18442    ///
18443    /// Returns `None` if the enum contains an unknown value deserialized from
18444    /// the integer representation of enums.
18445    pub fn name(&self) -> std::option::Option<&str> {
18446        match self {
18447            Self::Unspecified => std::option::Option::Some("STORAGE_TYPE_UNSPECIFIED"),
18448            Self::Ssd => std::option::Option::Some("SSD"),
18449            Self::Hdd => std::option::Option::Some("HDD"),
18450            Self::UnknownValue(u) => u.0.name(),
18451        }
18452    }
18453}
18454
18455impl std::default::Default for StorageType {
18456    fn default() -> Self {
18457        use std::convert::From;
18458        Self::from(0)
18459    }
18460}
18461
18462impl std::fmt::Display for StorageType {
18463    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18464        wkt::internal::display_enum(f, self.name(), self.value())
18465    }
18466}
18467
18468impl std::convert::From<i32> for StorageType {
18469    fn from(value: i32) -> Self {
18470        match value {
18471            0 => Self::Unspecified,
18472            1 => Self::Ssd,
18473            2 => Self::Hdd,
18474            _ => Self::UnknownValue(storage_type::UnknownValue(
18475                wkt::internal::UnknownEnumValue::Integer(value),
18476            )),
18477        }
18478    }
18479}
18480
18481impl std::convert::From<&str> for StorageType {
18482    fn from(value: &str) -> Self {
18483        use std::string::ToString;
18484        match value {
18485            "STORAGE_TYPE_UNSPECIFIED" => Self::Unspecified,
18486            "SSD" => Self::Ssd,
18487            "HDD" => Self::Hdd,
18488            _ => Self::UnknownValue(storage_type::UnknownValue(
18489                wkt::internal::UnknownEnumValue::String(value.to_string()),
18490            )),
18491        }
18492    }
18493}
18494
18495impl serde::ser::Serialize for StorageType {
18496    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18497    where
18498        S: serde::Serializer,
18499    {
18500        match self {
18501            Self::Unspecified => serializer.serialize_i32(0),
18502            Self::Ssd => serializer.serialize_i32(1),
18503            Self::Hdd => serializer.serialize_i32(2),
18504            Self::UnknownValue(u) => u.0.serialize(serializer),
18505        }
18506    }
18507}
18508
18509impl<'de> serde::de::Deserialize<'de> for StorageType {
18510    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18511    where
18512        D: serde::Deserializer<'de>,
18513    {
18514        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageType>::new(
18515            ".google.bigtable.admin.v2.StorageType",
18516        ))
18517    }
18518}
18519
18520/// Indicates the type of the restore source.
18521///
18522/// # Working with unknown values
18523///
18524/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18525/// additional enum variants at any time. Adding new variants is not considered
18526/// a breaking change. Applications should write their code in anticipation of:
18527///
18528/// - New values appearing in future releases of the client library, **and**
18529/// - New values received dynamically, without application changes.
18530///
18531/// Please consult the [Working with enums] section in the user guide for some
18532/// guidelines.
18533///
18534/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18535#[derive(Clone, Debug, PartialEq)]
18536#[non_exhaustive]
18537pub enum RestoreSourceType {
18538    /// No restore associated.
18539    Unspecified,
18540    /// A backup was used as the source of the restore.
18541    Backup,
18542    /// If set, the enum was initialized with an unknown value.
18543    ///
18544    /// Applications can examine the value using [RestoreSourceType::value] or
18545    /// [RestoreSourceType::name].
18546    UnknownValue(restore_source_type::UnknownValue),
18547}
18548
18549#[doc(hidden)]
18550pub mod restore_source_type {
18551    #[allow(unused_imports)]
18552    use super::*;
18553    #[derive(Clone, Debug, PartialEq)]
18554    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18555}
18556
18557impl RestoreSourceType {
18558    /// Gets the enum value.
18559    ///
18560    /// Returns `None` if the enum contains an unknown value deserialized from
18561    /// the string representation of enums.
18562    pub fn value(&self) -> std::option::Option<i32> {
18563        match self {
18564            Self::Unspecified => std::option::Option::Some(0),
18565            Self::Backup => std::option::Option::Some(1),
18566            Self::UnknownValue(u) => u.0.value(),
18567        }
18568    }
18569
18570    /// Gets the enum value as a string.
18571    ///
18572    /// Returns `None` if the enum contains an unknown value deserialized from
18573    /// the integer representation of enums.
18574    pub fn name(&self) -> std::option::Option<&str> {
18575        match self {
18576            Self::Unspecified => std::option::Option::Some("RESTORE_SOURCE_TYPE_UNSPECIFIED"),
18577            Self::Backup => std::option::Option::Some("BACKUP"),
18578            Self::UnknownValue(u) => u.0.name(),
18579        }
18580    }
18581}
18582
18583impl std::default::Default for RestoreSourceType {
18584    fn default() -> Self {
18585        use std::convert::From;
18586        Self::from(0)
18587    }
18588}
18589
18590impl std::fmt::Display for RestoreSourceType {
18591    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18592        wkt::internal::display_enum(f, self.name(), self.value())
18593    }
18594}
18595
18596impl std::convert::From<i32> for RestoreSourceType {
18597    fn from(value: i32) -> Self {
18598        match value {
18599            0 => Self::Unspecified,
18600            1 => Self::Backup,
18601            _ => Self::UnknownValue(restore_source_type::UnknownValue(
18602                wkt::internal::UnknownEnumValue::Integer(value),
18603            )),
18604        }
18605    }
18606}
18607
18608impl std::convert::From<&str> for RestoreSourceType {
18609    fn from(value: &str) -> Self {
18610        use std::string::ToString;
18611        match value {
18612            "RESTORE_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
18613            "BACKUP" => Self::Backup,
18614            _ => Self::UnknownValue(restore_source_type::UnknownValue(
18615                wkt::internal::UnknownEnumValue::String(value.to_string()),
18616            )),
18617        }
18618    }
18619}
18620
18621impl serde::ser::Serialize for RestoreSourceType {
18622    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18623    where
18624        S: serde::Serializer,
18625    {
18626        match self {
18627            Self::Unspecified => serializer.serialize_i32(0),
18628            Self::Backup => serializer.serialize_i32(1),
18629            Self::UnknownValue(u) => u.0.serialize(serializer),
18630        }
18631    }
18632}
18633
18634impl<'de> serde::de::Deserialize<'de> for RestoreSourceType {
18635    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18636    where
18637        D: serde::Deserializer<'de>,
18638    {
18639        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RestoreSourceType>::new(
18640            ".google.bigtable.admin.v2.RestoreSourceType",
18641        ))
18642    }
18643}