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    /// Creates a new default instance.
67    pub fn new() -> Self {
68        std::default::Default::default()
69    }
70
71    /// Sets the value of [parent][crate::model::CreateInstanceRequest::parent].
72    ///
73    /// # Example
74    /// ```ignore,no_run
75    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
76    /// let x = CreateInstanceRequest::new().set_parent("example");
77    /// ```
78    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
79        self.parent = v.into();
80        self
81    }
82
83    /// Sets the value of [instance_id][crate::model::CreateInstanceRequest::instance_id].
84    ///
85    /// # Example
86    /// ```ignore,no_run
87    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
88    /// let x = CreateInstanceRequest::new().set_instance_id("example");
89    /// ```
90    pub fn set_instance_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
91        self.instance_id = v.into();
92        self
93    }
94
95    /// Sets the value of [instance][crate::model::CreateInstanceRequest::instance].
96    ///
97    /// # Example
98    /// ```ignore,no_run
99    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
100    /// use google_cloud_bigtable_admin_v2::model::Instance;
101    /// let x = CreateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
102    /// ```
103    pub fn set_instance<T>(mut self, v: T) -> Self
104    where
105        T: std::convert::Into<crate::model::Instance>,
106    {
107        self.instance = std::option::Option::Some(v.into());
108        self
109    }
110
111    /// Sets or clears the value of [instance][crate::model::CreateInstanceRequest::instance].
112    ///
113    /// # Example
114    /// ```ignore,no_run
115    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
116    /// use google_cloud_bigtable_admin_v2::model::Instance;
117    /// let x = CreateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
118    /// let x = CreateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
119    /// ```
120    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
121    where
122        T: std::convert::Into<crate::model::Instance>,
123    {
124        self.instance = v.map(|x| x.into());
125        self
126    }
127
128    /// Sets the value of [clusters][crate::model::CreateInstanceRequest::clusters].
129    ///
130    /// # Example
131    /// ```ignore,no_run
132    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
133    /// use google_cloud_bigtable_admin_v2::model::Cluster;
134    /// let x = CreateInstanceRequest::new().set_clusters([
135    ///     ("key0", Cluster::default()/* use setters */),
136    ///     ("key1", Cluster::default()/* use (different) setters */),
137    /// ]);
138    /// ```
139    pub fn set_clusters<T, K, V>(mut self, v: T) -> Self
140    where
141        T: std::iter::IntoIterator<Item = (K, V)>,
142        K: std::convert::Into<std::string::String>,
143        V: std::convert::Into<crate::model::Cluster>,
144    {
145        use std::iter::Iterator;
146        self.clusters = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
147        self
148    }
149}
150
151impl wkt::message::Message for CreateInstanceRequest {
152    fn typename() -> &'static str {
153        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceRequest"
154    }
155}
156
157/// Request message for BigtableInstanceAdmin.GetInstance.
158#[derive(Clone, Default, PartialEq)]
159#[non_exhaustive]
160pub struct GetInstanceRequest {
161    /// Required. The unique name of the requested instance. Values are of the form
162    /// `projects/{project}/instances/{instance}`.
163    pub name: std::string::String,
164
165    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
166}
167
168impl GetInstanceRequest {
169    /// Creates a new default instance.
170    pub fn new() -> Self {
171        std::default::Default::default()
172    }
173
174    /// Sets the value of [name][crate::model::GetInstanceRequest::name].
175    ///
176    /// # Example
177    /// ```ignore,no_run
178    /// # use google_cloud_bigtable_admin_v2::model::GetInstanceRequest;
179    /// let x = GetInstanceRequest::new().set_name("example");
180    /// ```
181    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
182        self.name = v.into();
183        self
184    }
185}
186
187impl wkt::message::Message for GetInstanceRequest {
188    fn typename() -> &'static str {
189        "type.googleapis.com/google.bigtable.admin.v2.GetInstanceRequest"
190    }
191}
192
193/// Request message for BigtableInstanceAdmin.ListInstances.
194#[derive(Clone, Default, PartialEq)]
195#[non_exhaustive]
196pub struct ListInstancesRequest {
197    /// Required. The unique name of the project for which a list of instances is
198    /// requested. Values are of the form `projects/{project}`.
199    pub parent: std::string::String,
200
201    /// DEPRECATED: This field is unused and ignored.
202    pub page_token: std::string::String,
203
204    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
205}
206
207impl ListInstancesRequest {
208    /// Creates a new default instance.
209    pub fn new() -> Self {
210        std::default::Default::default()
211    }
212
213    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
214    ///
215    /// # Example
216    /// ```ignore,no_run
217    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
218    /// let x = ListInstancesRequest::new().set_parent("example");
219    /// ```
220    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
221        self.parent = v.into();
222        self
223    }
224
225    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
226    ///
227    /// # Example
228    /// ```ignore,no_run
229    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
230    /// let x = ListInstancesRequest::new().set_page_token("example");
231    /// ```
232    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
233        self.page_token = v.into();
234        self
235    }
236}
237
238impl wkt::message::Message for ListInstancesRequest {
239    fn typename() -> &'static str {
240        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesRequest"
241    }
242}
243
244/// Response message for BigtableInstanceAdmin.ListInstances.
245#[derive(Clone, Default, PartialEq)]
246#[non_exhaustive]
247pub struct ListInstancesResponse {
248    /// The list of requested instances.
249    pub instances: std::vec::Vec<crate::model::Instance>,
250
251    /// Locations from which Instance information could not be retrieved,
252    /// due to an outage or some other transient condition.
253    /// Instances whose Clusters are all in one of the failed locations
254    /// may be missing from `instances`, and Instances with at least one
255    /// Cluster in a failed location may only have partial information returned.
256    /// Values are of the form `projects/<project>/locations/<zone_id>`
257    pub failed_locations: std::vec::Vec<std::string::String>,
258
259    /// DEPRECATED: This field is unused and ignored.
260    pub next_page_token: std::string::String,
261
262    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
263}
264
265impl ListInstancesResponse {
266    /// Creates a new default instance.
267    pub fn new() -> Self {
268        std::default::Default::default()
269    }
270
271    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
272    ///
273    /// # Example
274    /// ```ignore,no_run
275    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
276    /// use google_cloud_bigtable_admin_v2::model::Instance;
277    /// let x = ListInstancesResponse::new()
278    ///     .set_instances([
279    ///         Instance::default()/* use setters */,
280    ///         Instance::default()/* use (different) setters */,
281    ///     ]);
282    /// ```
283    pub fn set_instances<T, V>(mut self, v: T) -> Self
284    where
285        T: std::iter::IntoIterator<Item = V>,
286        V: std::convert::Into<crate::model::Instance>,
287    {
288        use std::iter::Iterator;
289        self.instances = v.into_iter().map(|i| i.into()).collect();
290        self
291    }
292
293    /// Sets the value of [failed_locations][crate::model::ListInstancesResponse::failed_locations].
294    ///
295    /// # Example
296    /// ```ignore,no_run
297    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
298    /// let x = ListInstancesResponse::new().set_failed_locations(["a", "b", "c"]);
299    /// ```
300    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
301    where
302        T: std::iter::IntoIterator<Item = V>,
303        V: std::convert::Into<std::string::String>,
304    {
305        use std::iter::Iterator;
306        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
307        self
308    }
309
310    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
311    ///
312    /// # Example
313    /// ```ignore,no_run
314    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
315    /// let x = ListInstancesResponse::new().set_next_page_token("example");
316    /// ```
317    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
318        self.next_page_token = v.into();
319        self
320    }
321}
322
323impl wkt::message::Message for ListInstancesResponse {
324    fn typename() -> &'static str {
325        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesResponse"
326    }
327}
328
329/// Request message for BigtableInstanceAdmin.PartialUpdateInstance.
330#[derive(Clone, Default, PartialEq)]
331#[non_exhaustive]
332pub struct PartialUpdateInstanceRequest {
333    /// Required. The Instance which will (partially) replace the current value.
334    pub instance: std::option::Option<crate::model::Instance>,
335
336    /// Required. The subset of Instance fields which should be replaced.
337    /// Must be explicitly set.
338    pub update_mask: std::option::Option<wkt::FieldMask>,
339
340    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
341}
342
343impl PartialUpdateInstanceRequest {
344    /// Creates a new default instance.
345    pub fn new() -> Self {
346        std::default::Default::default()
347    }
348
349    /// Sets the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
350    ///
351    /// # Example
352    /// ```ignore,no_run
353    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
354    /// use google_cloud_bigtable_admin_v2::model::Instance;
355    /// let x = PartialUpdateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
356    /// ```
357    pub fn set_instance<T>(mut self, v: T) -> Self
358    where
359        T: std::convert::Into<crate::model::Instance>,
360    {
361        self.instance = std::option::Option::Some(v.into());
362        self
363    }
364
365    /// Sets or clears the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
366    ///
367    /// # Example
368    /// ```ignore,no_run
369    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
370    /// use google_cloud_bigtable_admin_v2::model::Instance;
371    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
372    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
373    /// ```
374    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
375    where
376        T: std::convert::Into<crate::model::Instance>,
377    {
378        self.instance = v.map(|x| x.into());
379        self
380    }
381
382    /// Sets the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
383    ///
384    /// # Example
385    /// ```ignore,no_run
386    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
387    /// use wkt::FieldMask;
388    /// let x = PartialUpdateInstanceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
389    /// ```
390    pub fn set_update_mask<T>(mut self, v: T) -> Self
391    where
392        T: std::convert::Into<wkt::FieldMask>,
393    {
394        self.update_mask = std::option::Option::Some(v.into());
395        self
396    }
397
398    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
399    ///
400    /// # Example
401    /// ```ignore,no_run
402    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
403    /// use wkt::FieldMask;
404    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
405    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
406    /// ```
407    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
408    where
409        T: std::convert::Into<wkt::FieldMask>,
410    {
411        self.update_mask = v.map(|x| x.into());
412        self
413    }
414}
415
416impl wkt::message::Message for PartialUpdateInstanceRequest {
417    fn typename() -> &'static str {
418        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateInstanceRequest"
419    }
420}
421
422/// Request message for BigtableInstanceAdmin.DeleteInstance.
423#[derive(Clone, Default, PartialEq)]
424#[non_exhaustive]
425pub struct DeleteInstanceRequest {
426    /// Required. The unique name of the instance to be deleted.
427    /// Values are of the form `projects/{project}/instances/{instance}`.
428    pub name: std::string::String,
429
430    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
431}
432
433impl DeleteInstanceRequest {
434    /// Creates a new default instance.
435    pub fn new() -> Self {
436        std::default::Default::default()
437    }
438
439    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
440    ///
441    /// # Example
442    /// ```ignore,no_run
443    /// # use google_cloud_bigtable_admin_v2::model::DeleteInstanceRequest;
444    /// let x = DeleteInstanceRequest::new().set_name("example");
445    /// ```
446    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
447        self.name = v.into();
448        self
449    }
450}
451
452impl wkt::message::Message for DeleteInstanceRequest {
453    fn typename() -> &'static str {
454        "type.googleapis.com/google.bigtable.admin.v2.DeleteInstanceRequest"
455    }
456}
457
458/// Request message for BigtableInstanceAdmin.CreateCluster.
459#[derive(Clone, Default, PartialEq)]
460#[non_exhaustive]
461pub struct CreateClusterRequest {
462    /// Required. The unique name of the instance in which to create the new
463    /// cluster. Values are of the form `projects/{project}/instances/{instance}`.
464    pub parent: std::string::String,
465
466    /// Required. The ID to be used when referring to the new cluster within its
467    /// instance, e.g., just `mycluster` rather than
468    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
469    pub cluster_id: std::string::String,
470
471    /// Required. The cluster to be created.
472    /// Fields marked `OutputOnly` must be left blank.
473    pub cluster: std::option::Option<crate::model::Cluster>,
474
475    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
476}
477
478impl CreateClusterRequest {
479    /// Creates a new default instance.
480    pub fn new() -> Self {
481        std::default::Default::default()
482    }
483
484    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
485    ///
486    /// # Example
487    /// ```ignore,no_run
488    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
489    /// let x = CreateClusterRequest::new().set_parent("example");
490    /// ```
491    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
492        self.parent = v.into();
493        self
494    }
495
496    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
497    ///
498    /// # Example
499    /// ```ignore,no_run
500    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
501    /// let x = CreateClusterRequest::new().set_cluster_id("example");
502    /// ```
503    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
504        self.cluster_id = v.into();
505        self
506    }
507
508    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
509    ///
510    /// # Example
511    /// ```ignore,no_run
512    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
513    /// use google_cloud_bigtable_admin_v2::model::Cluster;
514    /// let x = CreateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
515    /// ```
516    pub fn set_cluster<T>(mut self, v: T) -> Self
517    where
518        T: std::convert::Into<crate::model::Cluster>,
519    {
520        self.cluster = std::option::Option::Some(v.into());
521        self
522    }
523
524    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
525    ///
526    /// # Example
527    /// ```ignore,no_run
528    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
529    /// use google_cloud_bigtable_admin_v2::model::Cluster;
530    /// let x = CreateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
531    /// let x = CreateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
532    /// ```
533    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
534    where
535        T: std::convert::Into<crate::model::Cluster>,
536    {
537        self.cluster = v.map(|x| x.into());
538        self
539    }
540}
541
542impl wkt::message::Message for CreateClusterRequest {
543    fn typename() -> &'static str {
544        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterRequest"
545    }
546}
547
548/// Request message for BigtableInstanceAdmin.GetCluster.
549#[derive(Clone, Default, PartialEq)]
550#[non_exhaustive]
551pub struct GetClusterRequest {
552    /// Required. The unique name of the requested cluster. Values are of the form
553    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
554    pub name: std::string::String,
555
556    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
557}
558
559impl GetClusterRequest {
560    /// Creates a new default instance.
561    pub fn new() -> Self {
562        std::default::Default::default()
563    }
564
565    /// Sets the value of [name][crate::model::GetClusterRequest::name].
566    ///
567    /// # Example
568    /// ```ignore,no_run
569    /// # use google_cloud_bigtable_admin_v2::model::GetClusterRequest;
570    /// let x = GetClusterRequest::new().set_name("example");
571    /// ```
572    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
573        self.name = v.into();
574        self
575    }
576}
577
578impl wkt::message::Message for GetClusterRequest {
579    fn typename() -> &'static str {
580        "type.googleapis.com/google.bigtable.admin.v2.GetClusterRequest"
581    }
582}
583
584/// Request message for BigtableInstanceAdmin.ListClusters.
585#[derive(Clone, Default, PartialEq)]
586#[non_exhaustive]
587pub struct ListClustersRequest {
588    /// Required. The unique name of the instance for which a list of clusters is
589    /// requested. Values are of the form
590    /// `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list
591    /// Clusters for all Instances in a project, e.g.,
592    /// `projects/myproject/instances/-`.
593    pub parent: std::string::String,
594
595    /// DEPRECATED: This field is unused and ignored.
596    pub page_token: std::string::String,
597
598    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
599}
600
601impl ListClustersRequest {
602    /// Creates a new default instance.
603    pub fn new() -> Self {
604        std::default::Default::default()
605    }
606
607    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
608    ///
609    /// # Example
610    /// ```ignore,no_run
611    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
612    /// let x = ListClustersRequest::new().set_parent("example");
613    /// ```
614    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
615        self.parent = v.into();
616        self
617    }
618
619    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
620    ///
621    /// # Example
622    /// ```ignore,no_run
623    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
624    /// let x = ListClustersRequest::new().set_page_token("example");
625    /// ```
626    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
627        self.page_token = v.into();
628        self
629    }
630}
631
632impl wkt::message::Message for ListClustersRequest {
633    fn typename() -> &'static str {
634        "type.googleapis.com/google.bigtable.admin.v2.ListClustersRequest"
635    }
636}
637
638/// Response message for BigtableInstanceAdmin.ListClusters.
639#[derive(Clone, Default, PartialEq)]
640#[non_exhaustive]
641pub struct ListClustersResponse {
642    /// The list of requested clusters.
643    pub clusters: std::vec::Vec<crate::model::Cluster>,
644
645    /// Locations from which Cluster information could not be retrieved,
646    /// due to an outage or some other transient condition.
647    /// Clusters from these locations may be missing from `clusters`,
648    /// or may only have partial information returned.
649    /// Values are of the form `projects/<project>/locations/<zone_id>`
650    pub failed_locations: std::vec::Vec<std::string::String>,
651
652    /// DEPRECATED: This field is unused and ignored.
653    pub next_page_token: std::string::String,
654
655    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
656}
657
658impl ListClustersResponse {
659    /// Creates a new default instance.
660    pub fn new() -> Self {
661        std::default::Default::default()
662    }
663
664    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
665    ///
666    /// # Example
667    /// ```ignore,no_run
668    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
669    /// use google_cloud_bigtable_admin_v2::model::Cluster;
670    /// let x = ListClustersResponse::new()
671    ///     .set_clusters([
672    ///         Cluster::default()/* use setters */,
673    ///         Cluster::default()/* use (different) setters */,
674    ///     ]);
675    /// ```
676    pub fn set_clusters<T, V>(mut self, v: T) -> Self
677    where
678        T: std::iter::IntoIterator<Item = V>,
679        V: std::convert::Into<crate::model::Cluster>,
680    {
681        use std::iter::Iterator;
682        self.clusters = v.into_iter().map(|i| i.into()).collect();
683        self
684    }
685
686    /// Sets the value of [failed_locations][crate::model::ListClustersResponse::failed_locations].
687    ///
688    /// # Example
689    /// ```ignore,no_run
690    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
691    /// let x = ListClustersResponse::new().set_failed_locations(["a", "b", "c"]);
692    /// ```
693    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
694    where
695        T: std::iter::IntoIterator<Item = V>,
696        V: std::convert::Into<std::string::String>,
697    {
698        use std::iter::Iterator;
699        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
700        self
701    }
702
703    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
704    ///
705    /// # Example
706    /// ```ignore,no_run
707    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
708    /// let x = ListClustersResponse::new().set_next_page_token("example");
709    /// ```
710    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
711        self.next_page_token = v.into();
712        self
713    }
714}
715
716impl wkt::message::Message for ListClustersResponse {
717    fn typename() -> &'static str {
718        "type.googleapis.com/google.bigtable.admin.v2.ListClustersResponse"
719    }
720}
721
722/// Request message for BigtableInstanceAdmin.DeleteCluster.
723#[derive(Clone, Default, PartialEq)]
724#[non_exhaustive]
725pub struct DeleteClusterRequest {
726    /// Required. The unique name of the cluster to be deleted. Values are of the
727    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
728    pub name: std::string::String,
729
730    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
731}
732
733impl DeleteClusterRequest {
734    /// Creates a new default instance.
735    pub fn new() -> Self {
736        std::default::Default::default()
737    }
738
739    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
740    ///
741    /// # Example
742    /// ```ignore,no_run
743    /// # use google_cloud_bigtable_admin_v2::model::DeleteClusterRequest;
744    /// let x = DeleteClusterRequest::new().set_name("example");
745    /// ```
746    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
747        self.name = v.into();
748        self
749    }
750}
751
752impl wkt::message::Message for DeleteClusterRequest {
753    fn typename() -> &'static str {
754        "type.googleapis.com/google.bigtable.admin.v2.DeleteClusterRequest"
755    }
756}
757
758/// The metadata for the Operation returned by CreateInstance.
759#[derive(Clone, Default, PartialEq)]
760#[non_exhaustive]
761pub struct CreateInstanceMetadata {
762    /// The request that prompted the initiation of this CreateInstance operation.
763    pub original_request: std::option::Option<crate::model::CreateInstanceRequest>,
764
765    /// The time at which the original request was received.
766    pub request_time: std::option::Option<wkt::Timestamp>,
767
768    /// The time at which the operation failed or was completed successfully.
769    pub finish_time: std::option::Option<wkt::Timestamp>,
770
771    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
772}
773
774impl CreateInstanceMetadata {
775    /// Creates a new default instance.
776    pub fn new() -> Self {
777        std::default::Default::default()
778    }
779
780    /// Sets the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
781    ///
782    /// # Example
783    /// ```ignore,no_run
784    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
785    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
786    /// let x = CreateInstanceMetadata::new().set_original_request(CreateInstanceRequest::default()/* use setters */);
787    /// ```
788    pub fn set_original_request<T>(mut self, v: T) -> Self
789    where
790        T: std::convert::Into<crate::model::CreateInstanceRequest>,
791    {
792        self.original_request = std::option::Option::Some(v.into());
793        self
794    }
795
796    /// Sets or clears the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
797    ///
798    /// # Example
799    /// ```ignore,no_run
800    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
801    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
802    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(Some(CreateInstanceRequest::default()/* use setters */));
803    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(None::<CreateInstanceRequest>);
804    /// ```
805    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
806    where
807        T: std::convert::Into<crate::model::CreateInstanceRequest>,
808    {
809        self.original_request = v.map(|x| x.into());
810        self
811    }
812
813    /// Sets the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
814    ///
815    /// # Example
816    /// ```ignore,no_run
817    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
818    /// use wkt::Timestamp;
819    /// let x = CreateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
820    /// ```
821    pub fn set_request_time<T>(mut self, v: T) -> Self
822    where
823        T: std::convert::Into<wkt::Timestamp>,
824    {
825        self.request_time = std::option::Option::Some(v.into());
826        self
827    }
828
829    /// Sets or clears the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
830    ///
831    /// # Example
832    /// ```ignore,no_run
833    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
834    /// use wkt::Timestamp;
835    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
836    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
837    /// ```
838    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
839    where
840        T: std::convert::Into<wkt::Timestamp>,
841    {
842        self.request_time = v.map(|x| x.into());
843        self
844    }
845
846    /// Sets the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
847    ///
848    /// # Example
849    /// ```ignore,no_run
850    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
851    /// use wkt::Timestamp;
852    /// let x = CreateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
853    /// ```
854    pub fn set_finish_time<T>(mut self, v: T) -> Self
855    where
856        T: std::convert::Into<wkt::Timestamp>,
857    {
858        self.finish_time = std::option::Option::Some(v.into());
859        self
860    }
861
862    /// Sets or clears the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
863    ///
864    /// # Example
865    /// ```ignore,no_run
866    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
867    /// use wkt::Timestamp;
868    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
869    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
870    /// ```
871    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
872    where
873        T: std::convert::Into<wkt::Timestamp>,
874    {
875        self.finish_time = v.map(|x| x.into());
876        self
877    }
878}
879
880impl wkt::message::Message for CreateInstanceMetadata {
881    fn typename() -> &'static str {
882        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceMetadata"
883    }
884}
885
886/// The metadata for the Operation returned by UpdateInstance.
887#[derive(Clone, Default, PartialEq)]
888#[non_exhaustive]
889pub struct UpdateInstanceMetadata {
890    /// The request that prompted the initiation of this UpdateInstance operation.
891    pub original_request: std::option::Option<crate::model::PartialUpdateInstanceRequest>,
892
893    /// The time at which the original request was received.
894    pub request_time: std::option::Option<wkt::Timestamp>,
895
896    /// The time at which the operation failed or was completed successfully.
897    pub finish_time: std::option::Option<wkt::Timestamp>,
898
899    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
900}
901
902impl UpdateInstanceMetadata {
903    /// Creates a new default instance.
904    pub fn new() -> Self {
905        std::default::Default::default()
906    }
907
908    /// Sets the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
909    ///
910    /// # Example
911    /// ```ignore,no_run
912    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
913    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
914    /// let x = UpdateInstanceMetadata::new().set_original_request(PartialUpdateInstanceRequest::default()/* use setters */);
915    /// ```
916    pub fn set_original_request<T>(mut self, v: T) -> Self
917    where
918        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
919    {
920        self.original_request = std::option::Option::Some(v.into());
921        self
922    }
923
924    /// Sets or clears the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
925    ///
926    /// # Example
927    /// ```ignore,no_run
928    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
929    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
930    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(Some(PartialUpdateInstanceRequest::default()/* use setters */));
931    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(None::<PartialUpdateInstanceRequest>);
932    /// ```
933    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
934    where
935        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
936    {
937        self.original_request = v.map(|x| x.into());
938        self
939    }
940
941    /// Sets the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
942    ///
943    /// # Example
944    /// ```ignore,no_run
945    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
946    /// use wkt::Timestamp;
947    /// let x = UpdateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
948    /// ```
949    pub fn set_request_time<T>(mut self, v: T) -> Self
950    where
951        T: std::convert::Into<wkt::Timestamp>,
952    {
953        self.request_time = std::option::Option::Some(v.into());
954        self
955    }
956
957    /// Sets or clears the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
958    ///
959    /// # Example
960    /// ```ignore,no_run
961    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
962    /// use wkt::Timestamp;
963    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
964    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
965    /// ```
966    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
967    where
968        T: std::convert::Into<wkt::Timestamp>,
969    {
970        self.request_time = v.map(|x| x.into());
971        self
972    }
973
974    /// Sets the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
975    ///
976    /// # Example
977    /// ```ignore,no_run
978    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
979    /// use wkt::Timestamp;
980    /// let x = UpdateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
981    /// ```
982    pub fn set_finish_time<T>(mut self, v: T) -> Self
983    where
984        T: std::convert::Into<wkt::Timestamp>,
985    {
986        self.finish_time = std::option::Option::Some(v.into());
987        self
988    }
989
990    /// Sets or clears the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
991    ///
992    /// # Example
993    /// ```ignore,no_run
994    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
995    /// use wkt::Timestamp;
996    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
997    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
998    /// ```
999    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1000    where
1001        T: std::convert::Into<wkt::Timestamp>,
1002    {
1003        self.finish_time = v.map(|x| x.into());
1004        self
1005    }
1006}
1007
1008impl wkt::message::Message for UpdateInstanceMetadata {
1009    fn typename() -> &'static str {
1010        "type.googleapis.com/google.bigtable.admin.v2.UpdateInstanceMetadata"
1011    }
1012}
1013
1014/// The metadata for the Operation returned by CreateCluster.
1015#[derive(Clone, Default, PartialEq)]
1016#[non_exhaustive]
1017pub struct CreateClusterMetadata {
1018    /// The request that prompted the initiation of this CreateCluster operation.
1019    pub original_request: std::option::Option<crate::model::CreateClusterRequest>,
1020
1021    /// The time at which the original request was received.
1022    pub request_time: std::option::Option<wkt::Timestamp>,
1023
1024    /// The time at which the operation failed or was completed successfully.
1025    pub finish_time: std::option::Option<wkt::Timestamp>,
1026
1027    /// Keys: the full `name` of each table that existed in the instance when
1028    /// CreateCluster was first called, i.e.
1029    /// `projects/<project>/instances/<instance>/tables/<table>`. Any table added
1030    /// to the instance by a later API call will be created in the new cluster by
1031    /// that API call, not this one.
1032    ///
1033    /// Values: information on how much of a table's data has been copied to the
1034    /// newly-created cluster so far.
1035    pub tables: std::collections::HashMap<
1036        std::string::String,
1037        crate::model::create_cluster_metadata::TableProgress,
1038    >,
1039
1040    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1041}
1042
1043impl CreateClusterMetadata {
1044    /// Creates a new default instance.
1045    pub fn new() -> Self {
1046        std::default::Default::default()
1047    }
1048
1049    /// Sets the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1050    ///
1051    /// # Example
1052    /// ```ignore,no_run
1053    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1054    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1055    /// let x = CreateClusterMetadata::new().set_original_request(CreateClusterRequest::default()/* use setters */);
1056    /// ```
1057    pub fn set_original_request<T>(mut self, v: T) -> Self
1058    where
1059        T: std::convert::Into<crate::model::CreateClusterRequest>,
1060    {
1061        self.original_request = std::option::Option::Some(v.into());
1062        self
1063    }
1064
1065    /// Sets or clears the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1066    ///
1067    /// # Example
1068    /// ```ignore,no_run
1069    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1070    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1071    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(Some(CreateClusterRequest::default()/* use setters */));
1072    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(None::<CreateClusterRequest>);
1073    /// ```
1074    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1075    where
1076        T: std::convert::Into<crate::model::CreateClusterRequest>,
1077    {
1078        self.original_request = v.map(|x| x.into());
1079        self
1080    }
1081
1082    /// Sets the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1083    ///
1084    /// # Example
1085    /// ```ignore,no_run
1086    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1087    /// use wkt::Timestamp;
1088    /// let x = CreateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1089    /// ```
1090    pub fn set_request_time<T>(mut self, v: T) -> Self
1091    where
1092        T: std::convert::Into<wkt::Timestamp>,
1093    {
1094        self.request_time = std::option::Option::Some(v.into());
1095        self
1096    }
1097
1098    /// Sets or clears the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1099    ///
1100    /// # Example
1101    /// ```ignore,no_run
1102    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1103    /// use wkt::Timestamp;
1104    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1105    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1106    /// ```
1107    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1108    where
1109        T: std::convert::Into<wkt::Timestamp>,
1110    {
1111        self.request_time = v.map(|x| x.into());
1112        self
1113    }
1114
1115    /// Sets the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1116    ///
1117    /// # Example
1118    /// ```ignore,no_run
1119    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1120    /// use wkt::Timestamp;
1121    /// let x = CreateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1122    /// ```
1123    pub fn set_finish_time<T>(mut self, v: T) -> Self
1124    where
1125        T: std::convert::Into<wkt::Timestamp>,
1126    {
1127        self.finish_time = std::option::Option::Some(v.into());
1128        self
1129    }
1130
1131    /// Sets or clears the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1132    ///
1133    /// # Example
1134    /// ```ignore,no_run
1135    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1136    /// use wkt::Timestamp;
1137    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1138    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1139    /// ```
1140    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1141    where
1142        T: std::convert::Into<wkt::Timestamp>,
1143    {
1144        self.finish_time = v.map(|x| x.into());
1145        self
1146    }
1147
1148    /// Sets the value of [tables][crate::model::CreateClusterMetadata::tables].
1149    ///
1150    /// # Example
1151    /// ```ignore,no_run
1152    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1153    /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1154    /// let x = CreateClusterMetadata::new().set_tables([
1155    ///     ("key0", TableProgress::default()/* use setters */),
1156    ///     ("key1", TableProgress::default()/* use (different) setters */),
1157    /// ]);
1158    /// ```
1159    pub fn set_tables<T, K, V>(mut self, v: T) -> Self
1160    where
1161        T: std::iter::IntoIterator<Item = (K, V)>,
1162        K: std::convert::Into<std::string::String>,
1163        V: std::convert::Into<crate::model::create_cluster_metadata::TableProgress>,
1164    {
1165        use std::iter::Iterator;
1166        self.tables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1167        self
1168    }
1169}
1170
1171impl wkt::message::Message for CreateClusterMetadata {
1172    fn typename() -> &'static str {
1173        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata"
1174    }
1175}
1176
1177/// Defines additional types related to [CreateClusterMetadata].
1178pub mod create_cluster_metadata {
1179    #[allow(unused_imports)]
1180    use super::*;
1181
1182    /// Progress info for copying a table's data to the new cluster.
1183    #[derive(Clone, Default, PartialEq)]
1184    #[non_exhaustive]
1185    pub struct TableProgress {
1186        /// Estimate of the size of the table to be copied.
1187        pub estimated_size_bytes: i64,
1188
1189        /// Estimate of the number of bytes copied so far for this table.
1190        /// This will eventually reach 'estimated_size_bytes' unless the table copy
1191        /// is CANCELLED.
1192        pub estimated_copied_bytes: i64,
1193
1194        #[allow(missing_docs)]
1195        pub state: crate::model::create_cluster_metadata::table_progress::State,
1196
1197        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1198    }
1199
1200    impl TableProgress {
1201        /// Creates a new default instance.
1202        pub fn new() -> Self {
1203            std::default::Default::default()
1204        }
1205
1206        /// Sets the value of [estimated_size_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_size_bytes].
1207        ///
1208        /// # Example
1209        /// ```ignore,no_run
1210        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1211        /// let x = TableProgress::new().set_estimated_size_bytes(42);
1212        /// ```
1213        pub fn set_estimated_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1214            self.estimated_size_bytes = v.into();
1215            self
1216        }
1217
1218        /// Sets the value of [estimated_copied_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_copied_bytes].
1219        ///
1220        /// # Example
1221        /// ```ignore,no_run
1222        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1223        /// let x = TableProgress::new().set_estimated_copied_bytes(42);
1224        /// ```
1225        pub fn set_estimated_copied_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1226            self.estimated_copied_bytes = v.into();
1227            self
1228        }
1229
1230        /// Sets the value of [state][crate::model::create_cluster_metadata::TableProgress::state].
1231        ///
1232        /// # Example
1233        /// ```ignore,no_run
1234        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1235        /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::table_progress::State;
1236        /// let x0 = TableProgress::new().set_state(State::Pending);
1237        /// let x1 = TableProgress::new().set_state(State::Copying);
1238        /// let x2 = TableProgress::new().set_state(State::Completed);
1239        /// ```
1240        pub fn set_state<
1241            T: std::convert::Into<crate::model::create_cluster_metadata::table_progress::State>,
1242        >(
1243            mut self,
1244            v: T,
1245        ) -> Self {
1246            self.state = v.into();
1247            self
1248        }
1249    }
1250
1251    impl wkt::message::Message for TableProgress {
1252        fn typename() -> &'static str {
1253            "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata.TableProgress"
1254        }
1255    }
1256
1257    /// Defines additional types related to [TableProgress].
1258    pub mod table_progress {
1259        #[allow(unused_imports)]
1260        use super::*;
1261
1262        /// Enum for [State].
1263        ///
1264        /// # Working with unknown values
1265        ///
1266        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1267        /// additional enum variants at any time. Adding new variants is not considered
1268        /// a breaking change. Applications should write their code in anticipation of:
1269        ///
1270        /// - New values appearing in future releases of the client library, **and**
1271        /// - New values received dynamically, without application changes.
1272        ///
1273        /// Please consult the [Working with enums] section in the user guide for some
1274        /// guidelines.
1275        ///
1276        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1277        #[derive(Clone, Debug, PartialEq)]
1278        #[non_exhaustive]
1279        pub enum State {
1280            #[allow(missing_docs)]
1281            Unspecified,
1282            /// The table has not yet begun copying to the new cluster.
1283            Pending,
1284            /// The table is actively being copied to the new cluster.
1285            Copying,
1286            /// The table has been fully copied to the new cluster.
1287            Completed,
1288            /// The table was deleted before it finished copying to the new cluster.
1289            /// Note that tables deleted after completion will stay marked as
1290            /// COMPLETED, not CANCELLED.
1291            Cancelled,
1292            /// If set, the enum was initialized with an unknown value.
1293            ///
1294            /// Applications can examine the value using [State::value] or
1295            /// [State::name].
1296            UnknownValue(state::UnknownValue),
1297        }
1298
1299        #[doc(hidden)]
1300        pub mod state {
1301            #[allow(unused_imports)]
1302            use super::*;
1303            #[derive(Clone, Debug, PartialEq)]
1304            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1305        }
1306
1307        impl State {
1308            /// Gets the enum value.
1309            ///
1310            /// Returns `None` if the enum contains an unknown value deserialized from
1311            /// the string representation of enums.
1312            pub fn value(&self) -> std::option::Option<i32> {
1313                match self {
1314                    Self::Unspecified => std::option::Option::Some(0),
1315                    Self::Pending => std::option::Option::Some(1),
1316                    Self::Copying => std::option::Option::Some(2),
1317                    Self::Completed => std::option::Option::Some(3),
1318                    Self::Cancelled => std::option::Option::Some(4),
1319                    Self::UnknownValue(u) => u.0.value(),
1320                }
1321            }
1322
1323            /// Gets the enum value as a string.
1324            ///
1325            /// Returns `None` if the enum contains an unknown value deserialized from
1326            /// the integer representation of enums.
1327            pub fn name(&self) -> std::option::Option<&str> {
1328                match self {
1329                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1330                    Self::Pending => std::option::Option::Some("PENDING"),
1331                    Self::Copying => std::option::Option::Some("COPYING"),
1332                    Self::Completed => std::option::Option::Some("COMPLETED"),
1333                    Self::Cancelled => std::option::Option::Some("CANCELLED"),
1334                    Self::UnknownValue(u) => u.0.name(),
1335                }
1336            }
1337        }
1338
1339        impl std::default::Default for State {
1340            fn default() -> Self {
1341                use std::convert::From;
1342                Self::from(0)
1343            }
1344        }
1345
1346        impl std::fmt::Display for State {
1347            fn fmt(
1348                &self,
1349                f: &mut std::fmt::Formatter<'_>,
1350            ) -> std::result::Result<(), std::fmt::Error> {
1351                wkt::internal::display_enum(f, self.name(), self.value())
1352            }
1353        }
1354
1355        impl std::convert::From<i32> for State {
1356            fn from(value: i32) -> Self {
1357                match value {
1358                    0 => Self::Unspecified,
1359                    1 => Self::Pending,
1360                    2 => Self::Copying,
1361                    3 => Self::Completed,
1362                    4 => Self::Cancelled,
1363                    _ => Self::UnknownValue(state::UnknownValue(
1364                        wkt::internal::UnknownEnumValue::Integer(value),
1365                    )),
1366                }
1367            }
1368        }
1369
1370        impl std::convert::From<&str> for State {
1371            fn from(value: &str) -> Self {
1372                use std::string::ToString;
1373                match value {
1374                    "STATE_UNSPECIFIED" => Self::Unspecified,
1375                    "PENDING" => Self::Pending,
1376                    "COPYING" => Self::Copying,
1377                    "COMPLETED" => Self::Completed,
1378                    "CANCELLED" => Self::Cancelled,
1379                    _ => Self::UnknownValue(state::UnknownValue(
1380                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1381                    )),
1382                }
1383            }
1384        }
1385
1386        impl serde::ser::Serialize for State {
1387            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1388            where
1389                S: serde::Serializer,
1390            {
1391                match self {
1392                    Self::Unspecified => serializer.serialize_i32(0),
1393                    Self::Pending => serializer.serialize_i32(1),
1394                    Self::Copying => serializer.serialize_i32(2),
1395                    Self::Completed => serializer.serialize_i32(3),
1396                    Self::Cancelled => serializer.serialize_i32(4),
1397                    Self::UnknownValue(u) => u.0.serialize(serializer),
1398                }
1399            }
1400        }
1401
1402        impl<'de> serde::de::Deserialize<'de> for State {
1403            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1404            where
1405                D: serde::Deserializer<'de>,
1406            {
1407                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1408                    ".google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State",
1409                ))
1410            }
1411        }
1412    }
1413}
1414
1415/// The metadata for the Operation returned by UpdateCluster.
1416#[derive(Clone, Default, PartialEq)]
1417#[non_exhaustive]
1418pub struct UpdateClusterMetadata {
1419    /// The request that prompted the initiation of this UpdateCluster operation.
1420    pub original_request: std::option::Option<crate::model::Cluster>,
1421
1422    /// The time at which the original request was received.
1423    pub request_time: std::option::Option<wkt::Timestamp>,
1424
1425    /// The time at which the operation failed or was completed successfully.
1426    pub finish_time: std::option::Option<wkt::Timestamp>,
1427
1428    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1429}
1430
1431impl UpdateClusterMetadata {
1432    /// Creates a new default instance.
1433    pub fn new() -> Self {
1434        std::default::Default::default()
1435    }
1436
1437    /// Sets the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1438    ///
1439    /// # Example
1440    /// ```ignore,no_run
1441    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1442    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1443    /// let x = UpdateClusterMetadata::new().set_original_request(Cluster::default()/* use setters */);
1444    /// ```
1445    pub fn set_original_request<T>(mut self, v: T) -> Self
1446    where
1447        T: std::convert::Into<crate::model::Cluster>,
1448    {
1449        self.original_request = std::option::Option::Some(v.into());
1450        self
1451    }
1452
1453    /// Sets or clears the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1454    ///
1455    /// # Example
1456    /// ```ignore,no_run
1457    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1458    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1459    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(Some(Cluster::default()/* use setters */));
1460    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(None::<Cluster>);
1461    /// ```
1462    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1463    where
1464        T: std::convert::Into<crate::model::Cluster>,
1465    {
1466        self.original_request = v.map(|x| x.into());
1467        self
1468    }
1469
1470    /// Sets the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1471    ///
1472    /// # Example
1473    /// ```ignore,no_run
1474    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1475    /// use wkt::Timestamp;
1476    /// let x = UpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1477    /// ```
1478    pub fn set_request_time<T>(mut self, v: T) -> Self
1479    where
1480        T: std::convert::Into<wkt::Timestamp>,
1481    {
1482        self.request_time = std::option::Option::Some(v.into());
1483        self
1484    }
1485
1486    /// Sets or clears the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1487    ///
1488    /// # Example
1489    /// ```ignore,no_run
1490    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1491    /// use wkt::Timestamp;
1492    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1493    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1494    /// ```
1495    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1496    where
1497        T: std::convert::Into<wkt::Timestamp>,
1498    {
1499        self.request_time = v.map(|x| x.into());
1500        self
1501    }
1502
1503    /// Sets the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1504    ///
1505    /// # Example
1506    /// ```ignore,no_run
1507    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1508    /// use wkt::Timestamp;
1509    /// let x = UpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1510    /// ```
1511    pub fn set_finish_time<T>(mut self, v: T) -> Self
1512    where
1513        T: std::convert::Into<wkt::Timestamp>,
1514    {
1515        self.finish_time = std::option::Option::Some(v.into());
1516        self
1517    }
1518
1519    /// Sets or clears the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1520    ///
1521    /// # Example
1522    /// ```ignore,no_run
1523    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1524    /// use wkt::Timestamp;
1525    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1526    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1527    /// ```
1528    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1529    where
1530        T: std::convert::Into<wkt::Timestamp>,
1531    {
1532        self.finish_time = v.map(|x| x.into());
1533        self
1534    }
1535}
1536
1537impl wkt::message::Message for UpdateClusterMetadata {
1538    fn typename() -> &'static str {
1539        "type.googleapis.com/google.bigtable.admin.v2.UpdateClusterMetadata"
1540    }
1541}
1542
1543/// The metadata for the Operation returned by PartialUpdateCluster.
1544#[derive(Clone, Default, PartialEq)]
1545#[non_exhaustive]
1546pub struct PartialUpdateClusterMetadata {
1547    /// The time at which the original request was received.
1548    pub request_time: std::option::Option<wkt::Timestamp>,
1549
1550    /// The time at which the operation failed or was completed successfully.
1551    pub finish_time: std::option::Option<wkt::Timestamp>,
1552
1553    /// The original request for PartialUpdateCluster.
1554    pub original_request: std::option::Option<crate::model::PartialUpdateClusterRequest>,
1555
1556    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1557}
1558
1559impl PartialUpdateClusterMetadata {
1560    /// Creates a new default instance.
1561    pub fn new() -> Self {
1562        std::default::Default::default()
1563    }
1564
1565    /// Sets the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1566    ///
1567    /// # Example
1568    /// ```ignore,no_run
1569    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1570    /// use wkt::Timestamp;
1571    /// let x = PartialUpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1572    /// ```
1573    pub fn set_request_time<T>(mut self, v: T) -> Self
1574    where
1575        T: std::convert::Into<wkt::Timestamp>,
1576    {
1577        self.request_time = std::option::Option::Some(v.into());
1578        self
1579    }
1580
1581    /// Sets or clears the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1582    ///
1583    /// # Example
1584    /// ```ignore,no_run
1585    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1586    /// use wkt::Timestamp;
1587    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1588    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1589    /// ```
1590    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1591    where
1592        T: std::convert::Into<wkt::Timestamp>,
1593    {
1594        self.request_time = v.map(|x| x.into());
1595        self
1596    }
1597
1598    /// Sets the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1599    ///
1600    /// # Example
1601    /// ```ignore,no_run
1602    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1603    /// use wkt::Timestamp;
1604    /// let x = PartialUpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1605    /// ```
1606    pub fn set_finish_time<T>(mut self, v: T) -> Self
1607    where
1608        T: std::convert::Into<wkt::Timestamp>,
1609    {
1610        self.finish_time = std::option::Option::Some(v.into());
1611        self
1612    }
1613
1614    /// Sets or clears the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1615    ///
1616    /// # Example
1617    /// ```ignore,no_run
1618    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1619    /// use wkt::Timestamp;
1620    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1621    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1622    /// ```
1623    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1624    where
1625        T: std::convert::Into<wkt::Timestamp>,
1626    {
1627        self.finish_time = v.map(|x| x.into());
1628        self
1629    }
1630
1631    /// Sets the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1632    ///
1633    /// # Example
1634    /// ```ignore,no_run
1635    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1636    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1637    /// let x = PartialUpdateClusterMetadata::new().set_original_request(PartialUpdateClusterRequest::default()/* use setters */);
1638    /// ```
1639    pub fn set_original_request<T>(mut self, v: T) -> Self
1640    where
1641        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1642    {
1643        self.original_request = std::option::Option::Some(v.into());
1644        self
1645    }
1646
1647    /// Sets or clears the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1648    ///
1649    /// # Example
1650    /// ```ignore,no_run
1651    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1652    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1653    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(Some(PartialUpdateClusterRequest::default()/* use setters */));
1654    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(None::<PartialUpdateClusterRequest>);
1655    /// ```
1656    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1657    where
1658        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1659    {
1660        self.original_request = v.map(|x| x.into());
1661        self
1662    }
1663}
1664
1665impl wkt::message::Message for PartialUpdateClusterMetadata {
1666    fn typename() -> &'static str {
1667        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterMetadata"
1668    }
1669}
1670
1671/// Request message for BigtableInstanceAdmin.PartialUpdateCluster.
1672#[derive(Clone, Default, PartialEq)]
1673#[non_exhaustive]
1674pub struct PartialUpdateClusterRequest {
1675    /// Required. The Cluster which contains the partial updates to be applied,
1676    /// subject to the update_mask.
1677    pub cluster: std::option::Option<crate::model::Cluster>,
1678
1679    /// Required. The subset of Cluster fields which should be replaced.
1680    pub update_mask: std::option::Option<wkt::FieldMask>,
1681
1682    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1683}
1684
1685impl PartialUpdateClusterRequest {
1686    /// Creates a new default instance.
1687    pub fn new() -> Self {
1688        std::default::Default::default()
1689    }
1690
1691    /// Sets the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1692    ///
1693    /// # Example
1694    /// ```ignore,no_run
1695    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1696    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1697    /// let x = PartialUpdateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
1698    /// ```
1699    pub fn set_cluster<T>(mut self, v: T) -> Self
1700    where
1701        T: std::convert::Into<crate::model::Cluster>,
1702    {
1703        self.cluster = std::option::Option::Some(v.into());
1704        self
1705    }
1706
1707    /// Sets or clears the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1708    ///
1709    /// # Example
1710    /// ```ignore,no_run
1711    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1712    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1713    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
1714    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
1715    /// ```
1716    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1717    where
1718        T: std::convert::Into<crate::model::Cluster>,
1719    {
1720        self.cluster = v.map(|x| x.into());
1721        self
1722    }
1723
1724    /// Sets the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1725    ///
1726    /// # Example
1727    /// ```ignore,no_run
1728    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1729    /// use wkt::FieldMask;
1730    /// let x = PartialUpdateClusterRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1731    /// ```
1732    pub fn set_update_mask<T>(mut self, v: T) -> Self
1733    where
1734        T: std::convert::Into<wkt::FieldMask>,
1735    {
1736        self.update_mask = std::option::Option::Some(v.into());
1737        self
1738    }
1739
1740    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1741    ///
1742    /// # Example
1743    /// ```ignore,no_run
1744    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1745    /// use wkt::FieldMask;
1746    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1747    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1748    /// ```
1749    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1750    where
1751        T: std::convert::Into<wkt::FieldMask>,
1752    {
1753        self.update_mask = v.map(|x| x.into());
1754        self
1755    }
1756}
1757
1758impl wkt::message::Message for PartialUpdateClusterRequest {
1759    fn typename() -> &'static str {
1760        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterRequest"
1761    }
1762}
1763
1764/// Request message for BigtableInstanceAdmin.CreateAppProfile.
1765#[derive(Clone, Default, PartialEq)]
1766#[non_exhaustive]
1767pub struct CreateAppProfileRequest {
1768    /// Required. The unique name of the instance in which to create the new app
1769    /// profile. Values are of the form `projects/{project}/instances/{instance}`.
1770    pub parent: std::string::String,
1771
1772    /// Required. The ID to be used when referring to the new app profile within
1773    /// its instance, e.g., just `myprofile` rather than
1774    /// `projects/myproject/instances/myinstance/appProfiles/myprofile`.
1775    pub app_profile_id: std::string::String,
1776
1777    /// Required. The app profile to be created.
1778    /// Fields marked `OutputOnly` will be ignored.
1779    pub app_profile: std::option::Option<crate::model::AppProfile>,
1780
1781    /// If true, ignore safety checks when creating the app profile.
1782    pub ignore_warnings: bool,
1783
1784    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1785}
1786
1787impl CreateAppProfileRequest {
1788    /// Creates a new default instance.
1789    pub fn new() -> Self {
1790        std::default::Default::default()
1791    }
1792
1793    /// Sets the value of [parent][crate::model::CreateAppProfileRequest::parent].
1794    ///
1795    /// # Example
1796    /// ```ignore,no_run
1797    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1798    /// let x = CreateAppProfileRequest::new().set_parent("example");
1799    /// ```
1800    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1801        self.parent = v.into();
1802        self
1803    }
1804
1805    /// Sets the value of [app_profile_id][crate::model::CreateAppProfileRequest::app_profile_id].
1806    ///
1807    /// # Example
1808    /// ```ignore,no_run
1809    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1810    /// let x = CreateAppProfileRequest::new().set_app_profile_id("example");
1811    /// ```
1812    pub fn set_app_profile_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1813        self.app_profile_id = v.into();
1814        self
1815    }
1816
1817    /// Sets the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1818    ///
1819    /// # Example
1820    /// ```ignore,no_run
1821    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1822    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1823    /// let x = CreateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
1824    /// ```
1825    pub fn set_app_profile<T>(mut self, v: T) -> Self
1826    where
1827        T: std::convert::Into<crate::model::AppProfile>,
1828    {
1829        self.app_profile = std::option::Option::Some(v.into());
1830        self
1831    }
1832
1833    /// Sets or clears the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1834    ///
1835    /// # Example
1836    /// ```ignore,no_run
1837    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1838    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1839    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
1840    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
1841    /// ```
1842    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1843    where
1844        T: std::convert::Into<crate::model::AppProfile>,
1845    {
1846        self.app_profile = v.map(|x| x.into());
1847        self
1848    }
1849
1850    /// Sets the value of [ignore_warnings][crate::model::CreateAppProfileRequest::ignore_warnings].
1851    ///
1852    /// # Example
1853    /// ```ignore,no_run
1854    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1855    /// let x = CreateAppProfileRequest::new().set_ignore_warnings(true);
1856    /// ```
1857    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1858        self.ignore_warnings = v.into();
1859        self
1860    }
1861}
1862
1863impl wkt::message::Message for CreateAppProfileRequest {
1864    fn typename() -> &'static str {
1865        "type.googleapis.com/google.bigtable.admin.v2.CreateAppProfileRequest"
1866    }
1867}
1868
1869/// Request message for BigtableInstanceAdmin.GetAppProfile.
1870#[derive(Clone, Default, PartialEq)]
1871#[non_exhaustive]
1872pub struct GetAppProfileRequest {
1873    /// Required. The unique name of the requested app profile. Values are of the
1874    /// form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
1875    pub name: std::string::String,
1876
1877    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1878}
1879
1880impl GetAppProfileRequest {
1881    /// Creates a new default instance.
1882    pub fn new() -> Self {
1883        std::default::Default::default()
1884    }
1885
1886    /// Sets the value of [name][crate::model::GetAppProfileRequest::name].
1887    ///
1888    /// # Example
1889    /// ```ignore,no_run
1890    /// # use google_cloud_bigtable_admin_v2::model::GetAppProfileRequest;
1891    /// let x = GetAppProfileRequest::new().set_name("example");
1892    /// ```
1893    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1894        self.name = v.into();
1895        self
1896    }
1897}
1898
1899impl wkt::message::Message for GetAppProfileRequest {
1900    fn typename() -> &'static str {
1901        "type.googleapis.com/google.bigtable.admin.v2.GetAppProfileRequest"
1902    }
1903}
1904
1905/// Request message for BigtableInstanceAdmin.ListAppProfiles.
1906#[derive(Clone, Default, PartialEq)]
1907#[non_exhaustive]
1908pub struct ListAppProfilesRequest {
1909    /// Required. The unique name of the instance for which a list of app profiles
1910    /// is requested. Values are of the form
1911    /// `projects/{project}/instances/{instance}`.
1912    /// Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
1913    /// e.g., `projects/myproject/instances/-`.
1914    pub parent: std::string::String,
1915
1916    /// Maximum number of results per page.
1917    ///
1918    /// A page_size of zero lets the server choose the number of items to return.
1919    /// A page_size which is strictly positive will return at most that many items.
1920    /// A negative page_size will cause an error.
1921    ///
1922    /// Following the first request, subsequent paginated calls are not required
1923    /// to pass a page_size. If a page_size is set in subsequent calls, it must
1924    /// match the page_size given in the first request.
1925    pub page_size: i32,
1926
1927    /// The value of `next_page_token` returned by a previous call.
1928    pub page_token: std::string::String,
1929
1930    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1931}
1932
1933impl ListAppProfilesRequest {
1934    /// Creates a new default instance.
1935    pub fn new() -> Self {
1936        std::default::Default::default()
1937    }
1938
1939    /// Sets the value of [parent][crate::model::ListAppProfilesRequest::parent].
1940    ///
1941    /// # Example
1942    /// ```ignore,no_run
1943    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1944    /// let x = ListAppProfilesRequest::new().set_parent("example");
1945    /// ```
1946    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1947        self.parent = v.into();
1948        self
1949    }
1950
1951    /// Sets the value of [page_size][crate::model::ListAppProfilesRequest::page_size].
1952    ///
1953    /// # Example
1954    /// ```ignore,no_run
1955    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1956    /// let x = ListAppProfilesRequest::new().set_page_size(42);
1957    /// ```
1958    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1959        self.page_size = v.into();
1960        self
1961    }
1962
1963    /// Sets the value of [page_token][crate::model::ListAppProfilesRequest::page_token].
1964    ///
1965    /// # Example
1966    /// ```ignore,no_run
1967    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1968    /// let x = ListAppProfilesRequest::new().set_page_token("example");
1969    /// ```
1970    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1971        self.page_token = v.into();
1972        self
1973    }
1974}
1975
1976impl wkt::message::Message for ListAppProfilesRequest {
1977    fn typename() -> &'static str {
1978        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesRequest"
1979    }
1980}
1981
1982/// Response message for BigtableInstanceAdmin.ListAppProfiles.
1983#[derive(Clone, Default, PartialEq)]
1984#[non_exhaustive]
1985pub struct ListAppProfilesResponse {
1986    /// The list of requested app profiles.
1987    pub app_profiles: std::vec::Vec<crate::model::AppProfile>,
1988
1989    /// Set if not all app profiles could be returned in a single response.
1990    /// Pass this value to `page_token` in another request to get the next
1991    /// page of results.
1992    pub next_page_token: std::string::String,
1993
1994    /// Locations from which AppProfile information could not be retrieved,
1995    /// due to an outage or some other transient condition.
1996    /// AppProfiles from these locations may be missing from `app_profiles`.
1997    /// Values are of the form `projects/<project>/locations/<zone_id>`
1998    pub failed_locations: std::vec::Vec<std::string::String>,
1999
2000    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2001}
2002
2003impl ListAppProfilesResponse {
2004    /// Creates a new default instance.
2005    pub fn new() -> Self {
2006        std::default::Default::default()
2007    }
2008
2009    /// Sets the value of [app_profiles][crate::model::ListAppProfilesResponse::app_profiles].
2010    ///
2011    /// # Example
2012    /// ```ignore,no_run
2013    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2014    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2015    /// let x = ListAppProfilesResponse::new()
2016    ///     .set_app_profiles([
2017    ///         AppProfile::default()/* use setters */,
2018    ///         AppProfile::default()/* use (different) setters */,
2019    ///     ]);
2020    /// ```
2021    pub fn set_app_profiles<T, V>(mut self, v: T) -> Self
2022    where
2023        T: std::iter::IntoIterator<Item = V>,
2024        V: std::convert::Into<crate::model::AppProfile>,
2025    {
2026        use std::iter::Iterator;
2027        self.app_profiles = v.into_iter().map(|i| i.into()).collect();
2028        self
2029    }
2030
2031    /// Sets the value of [next_page_token][crate::model::ListAppProfilesResponse::next_page_token].
2032    ///
2033    /// # Example
2034    /// ```ignore,no_run
2035    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2036    /// let x = ListAppProfilesResponse::new().set_next_page_token("example");
2037    /// ```
2038    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2039        self.next_page_token = v.into();
2040        self
2041    }
2042
2043    /// Sets the value of [failed_locations][crate::model::ListAppProfilesResponse::failed_locations].
2044    ///
2045    /// # Example
2046    /// ```ignore,no_run
2047    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2048    /// let x = ListAppProfilesResponse::new().set_failed_locations(["a", "b", "c"]);
2049    /// ```
2050    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
2051    where
2052        T: std::iter::IntoIterator<Item = V>,
2053        V: std::convert::Into<std::string::String>,
2054    {
2055        use std::iter::Iterator;
2056        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
2057        self
2058    }
2059}
2060
2061impl wkt::message::Message for ListAppProfilesResponse {
2062    fn typename() -> &'static str {
2063        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesResponse"
2064    }
2065}
2066
2067#[doc(hidden)]
2068impl google_cloud_gax::paginator::internal::PageableResponse for ListAppProfilesResponse {
2069    type PageItem = crate::model::AppProfile;
2070
2071    fn items(self) -> std::vec::Vec<Self::PageItem> {
2072        self.app_profiles
2073    }
2074
2075    fn next_page_token(&self) -> std::string::String {
2076        use std::clone::Clone;
2077        self.next_page_token.clone()
2078    }
2079}
2080
2081/// Request message for BigtableInstanceAdmin.UpdateAppProfile.
2082#[derive(Clone, Default, PartialEq)]
2083#[non_exhaustive]
2084pub struct UpdateAppProfileRequest {
2085    /// Required. The app profile which will (partially) replace the current value.
2086    pub app_profile: std::option::Option<crate::model::AppProfile>,
2087
2088    /// Required. The subset of app profile fields which should be replaced.
2089    /// If unset, all fields will be replaced.
2090    pub update_mask: std::option::Option<wkt::FieldMask>,
2091
2092    /// If true, ignore safety checks when updating the app profile.
2093    pub ignore_warnings: bool,
2094
2095    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2096}
2097
2098impl UpdateAppProfileRequest {
2099    /// Creates a new default instance.
2100    pub fn new() -> Self {
2101        std::default::Default::default()
2102    }
2103
2104    /// Sets the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2105    ///
2106    /// # Example
2107    /// ```ignore,no_run
2108    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2109    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2110    /// let x = UpdateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
2111    /// ```
2112    pub fn set_app_profile<T>(mut self, v: T) -> Self
2113    where
2114        T: std::convert::Into<crate::model::AppProfile>,
2115    {
2116        self.app_profile = std::option::Option::Some(v.into());
2117        self
2118    }
2119
2120    /// Sets or clears the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2121    ///
2122    /// # Example
2123    /// ```ignore,no_run
2124    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2125    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2126    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
2127    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
2128    /// ```
2129    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
2130    where
2131        T: std::convert::Into<crate::model::AppProfile>,
2132    {
2133        self.app_profile = v.map(|x| x.into());
2134        self
2135    }
2136
2137    /// Sets the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2138    ///
2139    /// # Example
2140    /// ```ignore,no_run
2141    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2142    /// use wkt::FieldMask;
2143    /// let x = UpdateAppProfileRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2144    /// ```
2145    pub fn set_update_mask<T>(mut self, v: T) -> Self
2146    where
2147        T: std::convert::Into<wkt::FieldMask>,
2148    {
2149        self.update_mask = std::option::Option::Some(v.into());
2150        self
2151    }
2152
2153    /// Sets or clears the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2154    ///
2155    /// # Example
2156    /// ```ignore,no_run
2157    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2158    /// use wkt::FieldMask;
2159    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2160    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2161    /// ```
2162    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2163    where
2164        T: std::convert::Into<wkt::FieldMask>,
2165    {
2166        self.update_mask = v.map(|x| x.into());
2167        self
2168    }
2169
2170    /// Sets the value of [ignore_warnings][crate::model::UpdateAppProfileRequest::ignore_warnings].
2171    ///
2172    /// # Example
2173    /// ```ignore,no_run
2174    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2175    /// let x = UpdateAppProfileRequest::new().set_ignore_warnings(true);
2176    /// ```
2177    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2178        self.ignore_warnings = v.into();
2179        self
2180    }
2181}
2182
2183impl wkt::message::Message for UpdateAppProfileRequest {
2184    fn typename() -> &'static str {
2185        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileRequest"
2186    }
2187}
2188
2189/// Request message for BigtableInstanceAdmin.DeleteAppProfile.
2190#[derive(Clone, Default, PartialEq)]
2191#[non_exhaustive]
2192pub struct DeleteAppProfileRequest {
2193    /// Required. The unique name of the app profile to be deleted. Values are of
2194    /// the form
2195    /// `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
2196    pub name: std::string::String,
2197
2198    /// Required. If true, ignore safety checks when deleting the app profile.
2199    pub ignore_warnings: bool,
2200
2201    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2202}
2203
2204impl DeleteAppProfileRequest {
2205    /// Creates a new default instance.
2206    pub fn new() -> Self {
2207        std::default::Default::default()
2208    }
2209
2210    /// Sets the value of [name][crate::model::DeleteAppProfileRequest::name].
2211    ///
2212    /// # Example
2213    /// ```ignore,no_run
2214    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2215    /// let x = DeleteAppProfileRequest::new().set_name("example");
2216    /// ```
2217    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2218        self.name = v.into();
2219        self
2220    }
2221
2222    /// Sets the value of [ignore_warnings][crate::model::DeleteAppProfileRequest::ignore_warnings].
2223    ///
2224    /// # Example
2225    /// ```ignore,no_run
2226    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2227    /// let x = DeleteAppProfileRequest::new().set_ignore_warnings(true);
2228    /// ```
2229    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2230        self.ignore_warnings = v.into();
2231        self
2232    }
2233}
2234
2235impl wkt::message::Message for DeleteAppProfileRequest {
2236    fn typename() -> &'static str {
2237        "type.googleapis.com/google.bigtable.admin.v2.DeleteAppProfileRequest"
2238    }
2239}
2240
2241/// The metadata for the Operation returned by UpdateAppProfile.
2242#[derive(Clone, Default, PartialEq)]
2243#[non_exhaustive]
2244pub struct UpdateAppProfileMetadata {
2245    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2246}
2247
2248impl UpdateAppProfileMetadata {
2249    /// Creates a new default instance.
2250    pub fn new() -> Self {
2251        std::default::Default::default()
2252    }
2253}
2254
2255impl wkt::message::Message for UpdateAppProfileMetadata {
2256    fn typename() -> &'static str {
2257        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileMetadata"
2258    }
2259}
2260
2261/// Request message for BigtableInstanceAdmin.ListHotTablets.
2262#[derive(Clone, Default, PartialEq)]
2263#[non_exhaustive]
2264pub struct ListHotTabletsRequest {
2265    /// Required. The cluster name to list hot tablets.
2266    /// Value is in the following form:
2267    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
2268    pub parent: std::string::String,
2269
2270    /// The start time to list hot tablets. The hot tablets in the response will
2271    /// have start times between the requested start time and end time. Start time
2272    /// defaults to Now if it is unset, and end time defaults to Now - 24 hours if
2273    /// it is unset. The start time should be less than the end time, and the
2274    /// maximum allowed time range between start time and end time is 48 hours.
2275    /// Start time and end time should have values between Now and Now - 14 days.
2276    pub start_time: std::option::Option<wkt::Timestamp>,
2277
2278    /// The end time to list hot tablets.
2279    pub end_time: std::option::Option<wkt::Timestamp>,
2280
2281    /// Maximum number of results per page.
2282    ///
2283    /// A page_size that is empty or zero lets the server choose the number of
2284    /// items to return. A page_size which is strictly positive will return at most
2285    /// that many items. A negative page_size will cause an error.
2286    ///
2287    /// Following the first request, subsequent paginated calls do not need a
2288    /// page_size field. If a page_size is set in subsequent calls, it must match
2289    /// the page_size given in the first request.
2290    pub page_size: i32,
2291
2292    /// The value of `next_page_token` returned by a previous call.
2293    pub page_token: std::string::String,
2294
2295    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2296}
2297
2298impl ListHotTabletsRequest {
2299    /// Creates a new default instance.
2300    pub fn new() -> Self {
2301        std::default::Default::default()
2302    }
2303
2304    /// Sets the value of [parent][crate::model::ListHotTabletsRequest::parent].
2305    ///
2306    /// # Example
2307    /// ```ignore,no_run
2308    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2309    /// let x = ListHotTabletsRequest::new().set_parent("example");
2310    /// ```
2311    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2312        self.parent = v.into();
2313        self
2314    }
2315
2316    /// Sets the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2317    ///
2318    /// # Example
2319    /// ```ignore,no_run
2320    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2321    /// use wkt::Timestamp;
2322    /// let x = ListHotTabletsRequest::new().set_start_time(Timestamp::default()/* use setters */);
2323    /// ```
2324    pub fn set_start_time<T>(mut self, v: T) -> Self
2325    where
2326        T: std::convert::Into<wkt::Timestamp>,
2327    {
2328        self.start_time = std::option::Option::Some(v.into());
2329        self
2330    }
2331
2332    /// Sets or clears the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2333    ///
2334    /// # Example
2335    /// ```ignore,no_run
2336    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2337    /// use wkt::Timestamp;
2338    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2339    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(None::<Timestamp>);
2340    /// ```
2341    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2342    where
2343        T: std::convert::Into<wkt::Timestamp>,
2344    {
2345        self.start_time = v.map(|x| x.into());
2346        self
2347    }
2348
2349    /// Sets the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2350    ///
2351    /// # Example
2352    /// ```ignore,no_run
2353    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2354    /// use wkt::Timestamp;
2355    /// let x = ListHotTabletsRequest::new().set_end_time(Timestamp::default()/* use setters */);
2356    /// ```
2357    pub fn set_end_time<T>(mut self, v: T) -> Self
2358    where
2359        T: std::convert::Into<wkt::Timestamp>,
2360    {
2361        self.end_time = std::option::Option::Some(v.into());
2362        self
2363    }
2364
2365    /// Sets or clears the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2366    ///
2367    /// # Example
2368    /// ```ignore,no_run
2369    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2370    /// use wkt::Timestamp;
2371    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2372    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(None::<Timestamp>);
2373    /// ```
2374    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2375    where
2376        T: std::convert::Into<wkt::Timestamp>,
2377    {
2378        self.end_time = v.map(|x| x.into());
2379        self
2380    }
2381
2382    /// Sets the value of [page_size][crate::model::ListHotTabletsRequest::page_size].
2383    ///
2384    /// # Example
2385    /// ```ignore,no_run
2386    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2387    /// let x = ListHotTabletsRequest::new().set_page_size(42);
2388    /// ```
2389    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2390        self.page_size = v.into();
2391        self
2392    }
2393
2394    /// Sets the value of [page_token][crate::model::ListHotTabletsRequest::page_token].
2395    ///
2396    /// # Example
2397    /// ```ignore,no_run
2398    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2399    /// let x = ListHotTabletsRequest::new().set_page_token("example");
2400    /// ```
2401    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2402        self.page_token = v.into();
2403        self
2404    }
2405}
2406
2407impl wkt::message::Message for ListHotTabletsRequest {
2408    fn typename() -> &'static str {
2409        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsRequest"
2410    }
2411}
2412
2413/// Response message for BigtableInstanceAdmin.ListHotTablets.
2414#[derive(Clone, Default, PartialEq)]
2415#[non_exhaustive]
2416pub struct ListHotTabletsResponse {
2417    /// List of hot tablets in the tables of the requested cluster that fall
2418    /// within the requested time range. Hot tablets are ordered by node cpu usage
2419    /// percent. If there are multiple hot tablets that correspond to the same
2420    /// tablet within a 15-minute interval, only the hot tablet with the highest
2421    /// node cpu usage will be included in the response.
2422    pub hot_tablets: std::vec::Vec<crate::model::HotTablet>,
2423
2424    /// Set if not all hot tablets could be returned in a single response.
2425    /// Pass this value to `page_token` in another request to get the next
2426    /// page of results.
2427    pub next_page_token: std::string::String,
2428
2429    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2430}
2431
2432impl ListHotTabletsResponse {
2433    /// Creates a new default instance.
2434    pub fn new() -> Self {
2435        std::default::Default::default()
2436    }
2437
2438    /// Sets the value of [hot_tablets][crate::model::ListHotTabletsResponse::hot_tablets].
2439    ///
2440    /// # Example
2441    /// ```ignore,no_run
2442    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2443    /// use google_cloud_bigtable_admin_v2::model::HotTablet;
2444    /// let x = ListHotTabletsResponse::new()
2445    ///     .set_hot_tablets([
2446    ///         HotTablet::default()/* use setters */,
2447    ///         HotTablet::default()/* use (different) setters */,
2448    ///     ]);
2449    /// ```
2450    pub fn set_hot_tablets<T, V>(mut self, v: T) -> Self
2451    where
2452        T: std::iter::IntoIterator<Item = V>,
2453        V: std::convert::Into<crate::model::HotTablet>,
2454    {
2455        use std::iter::Iterator;
2456        self.hot_tablets = v.into_iter().map(|i| i.into()).collect();
2457        self
2458    }
2459
2460    /// Sets the value of [next_page_token][crate::model::ListHotTabletsResponse::next_page_token].
2461    ///
2462    /// # Example
2463    /// ```ignore,no_run
2464    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2465    /// let x = ListHotTabletsResponse::new().set_next_page_token("example");
2466    /// ```
2467    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2468        self.next_page_token = v.into();
2469        self
2470    }
2471}
2472
2473impl wkt::message::Message for ListHotTabletsResponse {
2474    fn typename() -> &'static str {
2475        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsResponse"
2476    }
2477}
2478
2479#[doc(hidden)]
2480impl google_cloud_gax::paginator::internal::PageableResponse for ListHotTabletsResponse {
2481    type PageItem = crate::model::HotTablet;
2482
2483    fn items(self) -> std::vec::Vec<Self::PageItem> {
2484        self.hot_tablets
2485    }
2486
2487    fn next_page_token(&self) -> std::string::String {
2488        use std::clone::Clone;
2489        self.next_page_token.clone()
2490    }
2491}
2492
2493/// Request message for BigtableInstanceAdmin.CreateLogicalView.
2494#[derive(Clone, Default, PartialEq)]
2495#[non_exhaustive]
2496pub struct CreateLogicalViewRequest {
2497    /// Required. The parent instance where this logical view will be created.
2498    /// Format: `projects/{project}/instances/{instance}`.
2499    pub parent: std::string::String,
2500
2501    /// Required. The ID to use for the logical view, which will become the final
2502    /// component of the logical view's resource name.
2503    pub logical_view_id: std::string::String,
2504
2505    /// Required. The logical view to create.
2506    pub logical_view: std::option::Option<crate::model::LogicalView>,
2507
2508    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2509}
2510
2511impl CreateLogicalViewRequest {
2512    /// Creates a new default instance.
2513    pub fn new() -> Self {
2514        std::default::Default::default()
2515    }
2516
2517    /// Sets the value of [parent][crate::model::CreateLogicalViewRequest::parent].
2518    ///
2519    /// # Example
2520    /// ```ignore,no_run
2521    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2522    /// let x = CreateLogicalViewRequest::new().set_parent("example");
2523    /// ```
2524    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2525        self.parent = v.into();
2526        self
2527    }
2528
2529    /// Sets the value of [logical_view_id][crate::model::CreateLogicalViewRequest::logical_view_id].
2530    ///
2531    /// # Example
2532    /// ```ignore,no_run
2533    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2534    /// let x = CreateLogicalViewRequest::new().set_logical_view_id("example");
2535    /// ```
2536    pub fn set_logical_view_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2537        self.logical_view_id = v.into();
2538        self
2539    }
2540
2541    /// Sets the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2542    ///
2543    /// # Example
2544    /// ```ignore,no_run
2545    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2546    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2547    /// let x = CreateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
2548    /// ```
2549    pub fn set_logical_view<T>(mut self, v: T) -> Self
2550    where
2551        T: std::convert::Into<crate::model::LogicalView>,
2552    {
2553        self.logical_view = std::option::Option::Some(v.into());
2554        self
2555    }
2556
2557    /// Sets or clears the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2558    ///
2559    /// # Example
2560    /// ```ignore,no_run
2561    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2562    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2563    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
2564    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
2565    /// ```
2566    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2567    where
2568        T: std::convert::Into<crate::model::LogicalView>,
2569    {
2570        self.logical_view = v.map(|x| x.into());
2571        self
2572    }
2573}
2574
2575impl wkt::message::Message for CreateLogicalViewRequest {
2576    fn typename() -> &'static str {
2577        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewRequest"
2578    }
2579}
2580
2581/// The metadata for the Operation returned by CreateLogicalView.
2582#[derive(Clone, Default, PartialEq)]
2583#[non_exhaustive]
2584pub struct CreateLogicalViewMetadata {
2585    /// The request that prompted the initiation of this CreateLogicalView
2586    /// operation.
2587    pub original_request: std::option::Option<crate::model::CreateLogicalViewRequest>,
2588
2589    /// The time at which this operation started.
2590    pub start_time: std::option::Option<wkt::Timestamp>,
2591
2592    /// If set, the time at which this operation finished or was canceled.
2593    pub end_time: std::option::Option<wkt::Timestamp>,
2594
2595    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2596}
2597
2598impl CreateLogicalViewMetadata {
2599    /// Creates a new default instance.
2600    pub fn new() -> Self {
2601        std::default::Default::default()
2602    }
2603
2604    /// Sets the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
2605    ///
2606    /// # Example
2607    /// ```ignore,no_run
2608    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2609    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2610    /// let x = CreateLogicalViewMetadata::new().set_original_request(CreateLogicalViewRequest::default()/* use setters */);
2611    /// ```
2612    pub fn set_original_request<T>(mut self, v: T) -> Self
2613    where
2614        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
2615    {
2616        self.original_request = std::option::Option::Some(v.into());
2617        self
2618    }
2619
2620    /// Sets or clears the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
2621    ///
2622    /// # Example
2623    /// ```ignore,no_run
2624    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2625    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2626    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(Some(CreateLogicalViewRequest::default()/* use setters */));
2627    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(None::<CreateLogicalViewRequest>);
2628    /// ```
2629    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
2630    where
2631        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
2632    {
2633        self.original_request = v.map(|x| x.into());
2634        self
2635    }
2636
2637    /// Sets the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
2638    ///
2639    /// # Example
2640    /// ```ignore,no_run
2641    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2642    /// use wkt::Timestamp;
2643    /// let x = CreateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
2644    /// ```
2645    pub fn set_start_time<T>(mut self, v: T) -> Self
2646    where
2647        T: std::convert::Into<wkt::Timestamp>,
2648    {
2649        self.start_time = std::option::Option::Some(v.into());
2650        self
2651    }
2652
2653    /// Sets or clears the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
2654    ///
2655    /// # Example
2656    /// ```ignore,no_run
2657    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2658    /// use wkt::Timestamp;
2659    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2660    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
2661    /// ```
2662    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2663    where
2664        T: std::convert::Into<wkt::Timestamp>,
2665    {
2666        self.start_time = v.map(|x| x.into());
2667        self
2668    }
2669
2670    /// Sets the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
2671    ///
2672    /// # Example
2673    /// ```ignore,no_run
2674    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2675    /// use wkt::Timestamp;
2676    /// let x = CreateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
2677    /// ```
2678    pub fn set_end_time<T>(mut self, v: T) -> Self
2679    where
2680        T: std::convert::Into<wkt::Timestamp>,
2681    {
2682        self.end_time = std::option::Option::Some(v.into());
2683        self
2684    }
2685
2686    /// Sets or clears the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
2687    ///
2688    /// # Example
2689    /// ```ignore,no_run
2690    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2691    /// use wkt::Timestamp;
2692    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2693    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
2694    /// ```
2695    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2696    where
2697        T: std::convert::Into<wkt::Timestamp>,
2698    {
2699        self.end_time = v.map(|x| x.into());
2700        self
2701    }
2702}
2703
2704impl wkt::message::Message for CreateLogicalViewMetadata {
2705    fn typename() -> &'static str {
2706        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewMetadata"
2707    }
2708}
2709
2710/// Request message for BigtableInstanceAdmin.GetLogicalView.
2711#[derive(Clone, Default, PartialEq)]
2712#[non_exhaustive]
2713pub struct GetLogicalViewRequest {
2714    /// Required. The unique name of the requested logical view. Values are of the
2715    /// form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2716    pub name: std::string::String,
2717
2718    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2719}
2720
2721impl GetLogicalViewRequest {
2722    /// Creates a new default instance.
2723    pub fn new() -> Self {
2724        std::default::Default::default()
2725    }
2726
2727    /// Sets the value of [name][crate::model::GetLogicalViewRequest::name].
2728    ///
2729    /// # Example
2730    /// ```ignore,no_run
2731    /// # use google_cloud_bigtable_admin_v2::model::GetLogicalViewRequest;
2732    /// let x = GetLogicalViewRequest::new().set_name("example");
2733    /// ```
2734    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2735        self.name = v.into();
2736        self
2737    }
2738}
2739
2740impl wkt::message::Message for GetLogicalViewRequest {
2741    fn typename() -> &'static str {
2742        "type.googleapis.com/google.bigtable.admin.v2.GetLogicalViewRequest"
2743    }
2744}
2745
2746/// Request message for BigtableInstanceAdmin.ListLogicalViews.
2747#[derive(Clone, Default, PartialEq)]
2748#[non_exhaustive]
2749pub struct ListLogicalViewsRequest {
2750    /// Required. The unique name of the instance for which the list of logical
2751    /// views is requested. Values are of the form
2752    /// `projects/{project}/instances/{instance}`.
2753    pub parent: std::string::String,
2754
2755    /// Optional. The maximum number of logical views to return. The service may
2756    /// return fewer than this value
2757    pub page_size: i32,
2758
2759    /// Optional. A page token, received from a previous `ListLogicalViews` call.
2760    /// Provide this to retrieve the subsequent page.
2761    ///
2762    /// When paginating, all other parameters provided to `ListLogicalViews` must
2763    /// match the call that provided the page token.
2764    pub page_token: std::string::String,
2765
2766    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2767}
2768
2769impl ListLogicalViewsRequest {
2770    /// Creates a new default instance.
2771    pub fn new() -> Self {
2772        std::default::Default::default()
2773    }
2774
2775    /// Sets the value of [parent][crate::model::ListLogicalViewsRequest::parent].
2776    ///
2777    /// # Example
2778    /// ```ignore,no_run
2779    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2780    /// let x = ListLogicalViewsRequest::new().set_parent("example");
2781    /// ```
2782    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2783        self.parent = v.into();
2784        self
2785    }
2786
2787    /// Sets the value of [page_size][crate::model::ListLogicalViewsRequest::page_size].
2788    ///
2789    /// # Example
2790    /// ```ignore,no_run
2791    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2792    /// let x = ListLogicalViewsRequest::new().set_page_size(42);
2793    /// ```
2794    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2795        self.page_size = v.into();
2796        self
2797    }
2798
2799    /// Sets the value of [page_token][crate::model::ListLogicalViewsRequest::page_token].
2800    ///
2801    /// # Example
2802    /// ```ignore,no_run
2803    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2804    /// let x = ListLogicalViewsRequest::new().set_page_token("example");
2805    /// ```
2806    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2807        self.page_token = v.into();
2808        self
2809    }
2810}
2811
2812impl wkt::message::Message for ListLogicalViewsRequest {
2813    fn typename() -> &'static str {
2814        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsRequest"
2815    }
2816}
2817
2818/// Response message for BigtableInstanceAdmin.ListLogicalViews.
2819#[derive(Clone, Default, PartialEq)]
2820#[non_exhaustive]
2821pub struct ListLogicalViewsResponse {
2822    /// The list of requested logical views.
2823    pub logical_views: std::vec::Vec<crate::model::LogicalView>,
2824
2825    /// A token, which can be sent as `page_token` to retrieve the next page.
2826    /// If this field is omitted, there are no subsequent pages.
2827    pub next_page_token: std::string::String,
2828
2829    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2830}
2831
2832impl ListLogicalViewsResponse {
2833    /// Creates a new default instance.
2834    pub fn new() -> Self {
2835        std::default::Default::default()
2836    }
2837
2838    /// Sets the value of [logical_views][crate::model::ListLogicalViewsResponse::logical_views].
2839    ///
2840    /// # Example
2841    /// ```ignore,no_run
2842    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
2843    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2844    /// let x = ListLogicalViewsResponse::new()
2845    ///     .set_logical_views([
2846    ///         LogicalView::default()/* use setters */,
2847    ///         LogicalView::default()/* use (different) setters */,
2848    ///     ]);
2849    /// ```
2850    pub fn set_logical_views<T, V>(mut self, v: T) -> Self
2851    where
2852        T: std::iter::IntoIterator<Item = V>,
2853        V: std::convert::Into<crate::model::LogicalView>,
2854    {
2855        use std::iter::Iterator;
2856        self.logical_views = v.into_iter().map(|i| i.into()).collect();
2857        self
2858    }
2859
2860    /// Sets the value of [next_page_token][crate::model::ListLogicalViewsResponse::next_page_token].
2861    ///
2862    /// # Example
2863    /// ```ignore,no_run
2864    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
2865    /// let x = ListLogicalViewsResponse::new().set_next_page_token("example");
2866    /// ```
2867    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2868        self.next_page_token = v.into();
2869        self
2870    }
2871}
2872
2873impl wkt::message::Message for ListLogicalViewsResponse {
2874    fn typename() -> &'static str {
2875        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsResponse"
2876    }
2877}
2878
2879#[doc(hidden)]
2880impl google_cloud_gax::paginator::internal::PageableResponse for ListLogicalViewsResponse {
2881    type PageItem = crate::model::LogicalView;
2882
2883    fn items(self) -> std::vec::Vec<Self::PageItem> {
2884        self.logical_views
2885    }
2886
2887    fn next_page_token(&self) -> std::string::String {
2888        use std::clone::Clone;
2889        self.next_page_token.clone()
2890    }
2891}
2892
2893/// Request message for BigtableInstanceAdmin.UpdateLogicalView.
2894#[derive(Clone, Default, PartialEq)]
2895#[non_exhaustive]
2896pub struct UpdateLogicalViewRequest {
2897    /// Required. The logical view to update.
2898    ///
2899    /// The logical view's `name` field is used to identify the view to update.
2900    /// Format:
2901    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2902    pub logical_view: std::option::Option<crate::model::LogicalView>,
2903
2904    /// Optional. The list of fields to update.
2905    pub update_mask: std::option::Option<wkt::FieldMask>,
2906
2907    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2908}
2909
2910impl UpdateLogicalViewRequest {
2911    /// Creates a new default instance.
2912    pub fn new() -> Self {
2913        std::default::Default::default()
2914    }
2915
2916    /// Sets the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2917    ///
2918    /// # Example
2919    /// ```ignore,no_run
2920    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2921    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2922    /// let x = UpdateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
2923    /// ```
2924    pub fn set_logical_view<T>(mut self, v: T) -> Self
2925    where
2926        T: std::convert::Into<crate::model::LogicalView>,
2927    {
2928        self.logical_view = std::option::Option::Some(v.into());
2929        self
2930    }
2931
2932    /// Sets or clears the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2933    ///
2934    /// # Example
2935    /// ```ignore,no_run
2936    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2937    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2938    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
2939    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
2940    /// ```
2941    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2942    where
2943        T: std::convert::Into<crate::model::LogicalView>,
2944    {
2945        self.logical_view = v.map(|x| x.into());
2946        self
2947    }
2948
2949    /// Sets the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
2950    ///
2951    /// # Example
2952    /// ```ignore,no_run
2953    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2954    /// use wkt::FieldMask;
2955    /// let x = UpdateLogicalViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2956    /// ```
2957    pub fn set_update_mask<T>(mut self, v: T) -> Self
2958    where
2959        T: std::convert::Into<wkt::FieldMask>,
2960    {
2961        self.update_mask = std::option::Option::Some(v.into());
2962        self
2963    }
2964
2965    /// Sets or clears the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
2966    ///
2967    /// # Example
2968    /// ```ignore,no_run
2969    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2970    /// use wkt::FieldMask;
2971    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2972    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2973    /// ```
2974    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2975    where
2976        T: std::convert::Into<wkt::FieldMask>,
2977    {
2978        self.update_mask = v.map(|x| x.into());
2979        self
2980    }
2981}
2982
2983impl wkt::message::Message for UpdateLogicalViewRequest {
2984    fn typename() -> &'static str {
2985        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewRequest"
2986    }
2987}
2988
2989/// The metadata for the Operation returned by UpdateLogicalView.
2990#[derive(Clone, Default, PartialEq)]
2991#[non_exhaustive]
2992pub struct UpdateLogicalViewMetadata {
2993    /// The request that prompted the initiation of this UpdateLogicalView
2994    /// operation.
2995    pub original_request: std::option::Option<crate::model::UpdateLogicalViewRequest>,
2996
2997    /// The time at which this operation was started.
2998    pub start_time: std::option::Option<wkt::Timestamp>,
2999
3000    /// If set, the time at which this operation finished or was canceled.
3001    pub end_time: std::option::Option<wkt::Timestamp>,
3002
3003    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3004}
3005
3006impl UpdateLogicalViewMetadata {
3007    /// Creates a new default instance.
3008    pub fn new() -> Self {
3009        std::default::Default::default()
3010    }
3011
3012    /// Sets the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
3013    ///
3014    /// # Example
3015    /// ```ignore,no_run
3016    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3017    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3018    /// let x = UpdateLogicalViewMetadata::new().set_original_request(UpdateLogicalViewRequest::default()/* use setters */);
3019    /// ```
3020    pub fn set_original_request<T>(mut self, v: T) -> Self
3021    where
3022        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
3023    {
3024        self.original_request = std::option::Option::Some(v.into());
3025        self
3026    }
3027
3028    /// Sets or clears the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
3029    ///
3030    /// # Example
3031    /// ```ignore,no_run
3032    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3033    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3034    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(Some(UpdateLogicalViewRequest::default()/* use setters */));
3035    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(None::<UpdateLogicalViewRequest>);
3036    /// ```
3037    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3038    where
3039        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
3040    {
3041        self.original_request = v.map(|x| x.into());
3042        self
3043    }
3044
3045    /// Sets the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3046    ///
3047    /// # Example
3048    /// ```ignore,no_run
3049    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3050    /// use wkt::Timestamp;
3051    /// let x = UpdateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3052    /// ```
3053    pub fn set_start_time<T>(mut self, v: T) -> Self
3054    where
3055        T: std::convert::Into<wkt::Timestamp>,
3056    {
3057        self.start_time = std::option::Option::Some(v.into());
3058        self
3059    }
3060
3061    /// Sets or clears the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3062    ///
3063    /// # Example
3064    /// ```ignore,no_run
3065    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3066    /// use wkt::Timestamp;
3067    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3068    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3069    /// ```
3070    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3071    where
3072        T: std::convert::Into<wkt::Timestamp>,
3073    {
3074        self.start_time = v.map(|x| x.into());
3075        self
3076    }
3077
3078    /// Sets the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3079    ///
3080    /// # Example
3081    /// ```ignore,no_run
3082    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3083    /// use wkt::Timestamp;
3084    /// let x = UpdateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3085    /// ```
3086    pub fn set_end_time<T>(mut self, v: T) -> Self
3087    where
3088        T: std::convert::Into<wkt::Timestamp>,
3089    {
3090        self.end_time = std::option::Option::Some(v.into());
3091        self
3092    }
3093
3094    /// Sets or clears the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3095    ///
3096    /// # Example
3097    /// ```ignore,no_run
3098    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3099    /// use wkt::Timestamp;
3100    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3101    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3102    /// ```
3103    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3104    where
3105        T: std::convert::Into<wkt::Timestamp>,
3106    {
3107        self.end_time = v.map(|x| x.into());
3108        self
3109    }
3110}
3111
3112impl wkt::message::Message for UpdateLogicalViewMetadata {
3113    fn typename() -> &'static str {
3114        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewMetadata"
3115    }
3116}
3117
3118/// Request message for BigtableInstanceAdmin.DeleteLogicalView.
3119#[derive(Clone, Default, PartialEq)]
3120#[non_exhaustive]
3121pub struct DeleteLogicalViewRequest {
3122    /// Required. The unique name of the logical view to be deleted.
3123    /// Format:
3124    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
3125    pub name: std::string::String,
3126
3127    /// Optional. The current etag of the logical view.
3128    /// If an etag is provided and does not match the current etag of the
3129    /// logical view, deletion will be blocked and an ABORTED error will be
3130    /// returned.
3131    pub etag: std::string::String,
3132
3133    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3134}
3135
3136impl DeleteLogicalViewRequest {
3137    /// Creates a new default instance.
3138    pub fn new() -> Self {
3139        std::default::Default::default()
3140    }
3141
3142    /// Sets the value of [name][crate::model::DeleteLogicalViewRequest::name].
3143    ///
3144    /// # Example
3145    /// ```ignore,no_run
3146    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3147    /// let x = DeleteLogicalViewRequest::new().set_name("example");
3148    /// ```
3149    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3150        self.name = v.into();
3151        self
3152    }
3153
3154    /// Sets the value of [etag][crate::model::DeleteLogicalViewRequest::etag].
3155    ///
3156    /// # Example
3157    /// ```ignore,no_run
3158    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3159    /// let x = DeleteLogicalViewRequest::new().set_etag("example");
3160    /// ```
3161    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3162        self.etag = v.into();
3163        self
3164    }
3165}
3166
3167impl wkt::message::Message for DeleteLogicalViewRequest {
3168    fn typename() -> &'static str {
3169        "type.googleapis.com/google.bigtable.admin.v2.DeleteLogicalViewRequest"
3170    }
3171}
3172
3173/// Request message for BigtableInstanceAdmin.CreateMaterializedView.
3174#[derive(Clone, Default, PartialEq)]
3175#[non_exhaustive]
3176pub struct CreateMaterializedViewRequest {
3177    /// Required. The parent instance where this materialized view will be created.
3178    /// Format: `projects/{project}/instances/{instance}`.
3179    pub parent: std::string::String,
3180
3181    /// Required. The ID to use for the materialized view, which will become the
3182    /// final component of the materialized view's resource name.
3183    pub materialized_view_id: std::string::String,
3184
3185    /// Required. The materialized view to create.
3186    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3187
3188    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3189}
3190
3191impl CreateMaterializedViewRequest {
3192    /// Creates a new default instance.
3193    pub fn new() -> Self {
3194        std::default::Default::default()
3195    }
3196
3197    /// Sets the value of [parent][crate::model::CreateMaterializedViewRequest::parent].
3198    ///
3199    /// # Example
3200    /// ```ignore,no_run
3201    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3202    /// let x = CreateMaterializedViewRequest::new().set_parent("example");
3203    /// ```
3204    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3205        self.parent = v.into();
3206        self
3207    }
3208
3209    /// Sets the value of [materialized_view_id][crate::model::CreateMaterializedViewRequest::materialized_view_id].
3210    ///
3211    /// # Example
3212    /// ```ignore,no_run
3213    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3214    /// let x = CreateMaterializedViewRequest::new().set_materialized_view_id("example");
3215    /// ```
3216    pub fn set_materialized_view_id<T: std::convert::Into<std::string::String>>(
3217        mut self,
3218        v: T,
3219    ) -> Self {
3220        self.materialized_view_id = v.into();
3221        self
3222    }
3223
3224    /// Sets the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3225    ///
3226    /// # Example
3227    /// ```ignore,no_run
3228    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3229    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3230    /// let x = CreateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3231    /// ```
3232    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3233    where
3234        T: std::convert::Into<crate::model::MaterializedView>,
3235    {
3236        self.materialized_view = std::option::Option::Some(v.into());
3237        self
3238    }
3239
3240    /// Sets or clears the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3241    ///
3242    /// # Example
3243    /// ```ignore,no_run
3244    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3245    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3246    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3247    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3248    /// ```
3249    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3250    where
3251        T: std::convert::Into<crate::model::MaterializedView>,
3252    {
3253        self.materialized_view = v.map(|x| x.into());
3254        self
3255    }
3256}
3257
3258impl wkt::message::Message for CreateMaterializedViewRequest {
3259    fn typename() -> &'static str {
3260        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewRequest"
3261    }
3262}
3263
3264/// The metadata for the Operation returned by CreateMaterializedView.
3265#[derive(Clone, Default, PartialEq)]
3266#[non_exhaustive]
3267pub struct CreateMaterializedViewMetadata {
3268    /// The request that prompted the initiation of this CreateMaterializedView
3269    /// operation.
3270    pub original_request: std::option::Option<crate::model::CreateMaterializedViewRequest>,
3271
3272    /// The time at which this operation started.
3273    pub start_time: std::option::Option<wkt::Timestamp>,
3274
3275    /// If set, the time at which this operation finished or was canceled.
3276    pub end_time: std::option::Option<wkt::Timestamp>,
3277
3278    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3279}
3280
3281impl CreateMaterializedViewMetadata {
3282    /// Creates a new default instance.
3283    pub fn new() -> Self {
3284        std::default::Default::default()
3285    }
3286
3287    /// Sets the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3288    ///
3289    /// # Example
3290    /// ```ignore,no_run
3291    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3292    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3293    /// let x = CreateMaterializedViewMetadata::new().set_original_request(CreateMaterializedViewRequest::default()/* use setters */);
3294    /// ```
3295    pub fn set_original_request<T>(mut self, v: T) -> Self
3296    where
3297        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3298    {
3299        self.original_request = std::option::Option::Some(v.into());
3300        self
3301    }
3302
3303    /// Sets or clears the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3304    ///
3305    /// # Example
3306    /// ```ignore,no_run
3307    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3308    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3309    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(Some(CreateMaterializedViewRequest::default()/* use setters */));
3310    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(None::<CreateMaterializedViewRequest>);
3311    /// ```
3312    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3313    where
3314        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3315    {
3316        self.original_request = v.map(|x| x.into());
3317        self
3318    }
3319
3320    /// Sets the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3321    ///
3322    /// # Example
3323    /// ```ignore,no_run
3324    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3325    /// use wkt::Timestamp;
3326    /// let x = CreateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3327    /// ```
3328    pub fn set_start_time<T>(mut self, v: T) -> Self
3329    where
3330        T: std::convert::Into<wkt::Timestamp>,
3331    {
3332        self.start_time = std::option::Option::Some(v.into());
3333        self
3334    }
3335
3336    /// Sets or clears the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3337    ///
3338    /// # Example
3339    /// ```ignore,no_run
3340    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3341    /// use wkt::Timestamp;
3342    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3343    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3344    /// ```
3345    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3346    where
3347        T: std::convert::Into<wkt::Timestamp>,
3348    {
3349        self.start_time = v.map(|x| x.into());
3350        self
3351    }
3352
3353    /// Sets the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3354    ///
3355    /// # Example
3356    /// ```ignore,no_run
3357    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3358    /// use wkt::Timestamp;
3359    /// let x = CreateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3360    /// ```
3361    pub fn set_end_time<T>(mut self, v: T) -> Self
3362    where
3363        T: std::convert::Into<wkt::Timestamp>,
3364    {
3365        self.end_time = std::option::Option::Some(v.into());
3366        self
3367    }
3368
3369    /// Sets or clears the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3370    ///
3371    /// # Example
3372    /// ```ignore,no_run
3373    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3374    /// use wkt::Timestamp;
3375    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3376    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3377    /// ```
3378    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3379    where
3380        T: std::convert::Into<wkt::Timestamp>,
3381    {
3382        self.end_time = v.map(|x| x.into());
3383        self
3384    }
3385}
3386
3387impl wkt::message::Message for CreateMaterializedViewMetadata {
3388    fn typename() -> &'static str {
3389        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewMetadata"
3390    }
3391}
3392
3393/// Request message for BigtableInstanceAdmin.GetMaterializedView.
3394#[derive(Clone, Default, PartialEq)]
3395#[non_exhaustive]
3396pub struct GetMaterializedViewRequest {
3397    /// Required. The unique name of the requested materialized view. Values are of
3398    /// the form
3399    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3400    pub name: std::string::String,
3401
3402    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3403}
3404
3405impl GetMaterializedViewRequest {
3406    /// Creates a new default instance.
3407    pub fn new() -> Self {
3408        std::default::Default::default()
3409    }
3410
3411    /// Sets the value of [name][crate::model::GetMaterializedViewRequest::name].
3412    ///
3413    /// # Example
3414    /// ```ignore,no_run
3415    /// # use google_cloud_bigtable_admin_v2::model::GetMaterializedViewRequest;
3416    /// let x = GetMaterializedViewRequest::new().set_name("example");
3417    /// ```
3418    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3419        self.name = v.into();
3420        self
3421    }
3422}
3423
3424impl wkt::message::Message for GetMaterializedViewRequest {
3425    fn typename() -> &'static str {
3426        "type.googleapis.com/google.bigtable.admin.v2.GetMaterializedViewRequest"
3427    }
3428}
3429
3430/// Request message for BigtableInstanceAdmin.ListMaterializedViews.
3431#[derive(Clone, Default, PartialEq)]
3432#[non_exhaustive]
3433pub struct ListMaterializedViewsRequest {
3434    /// Required. The unique name of the instance for which the list of
3435    /// materialized views is requested. Values are of the form
3436    /// `projects/{project}/instances/{instance}`.
3437    pub parent: std::string::String,
3438
3439    /// Optional. The maximum number of materialized views to return. The service
3440    /// may return fewer than this value
3441    pub page_size: i32,
3442
3443    /// Optional. A page token, received from a previous `ListMaterializedViews`
3444    /// call. Provide this to retrieve the subsequent page.
3445    ///
3446    /// When paginating, all other parameters provided to `ListMaterializedViews`
3447    /// must match the call that provided the page token.
3448    pub page_token: std::string::String,
3449
3450    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3451}
3452
3453impl ListMaterializedViewsRequest {
3454    /// Creates a new default instance.
3455    pub fn new() -> Self {
3456        std::default::Default::default()
3457    }
3458
3459    /// Sets the value of [parent][crate::model::ListMaterializedViewsRequest::parent].
3460    ///
3461    /// # Example
3462    /// ```ignore,no_run
3463    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3464    /// let x = ListMaterializedViewsRequest::new().set_parent("example");
3465    /// ```
3466    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3467        self.parent = v.into();
3468        self
3469    }
3470
3471    /// Sets the value of [page_size][crate::model::ListMaterializedViewsRequest::page_size].
3472    ///
3473    /// # Example
3474    /// ```ignore,no_run
3475    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3476    /// let x = ListMaterializedViewsRequest::new().set_page_size(42);
3477    /// ```
3478    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3479        self.page_size = v.into();
3480        self
3481    }
3482
3483    /// Sets the value of [page_token][crate::model::ListMaterializedViewsRequest::page_token].
3484    ///
3485    /// # Example
3486    /// ```ignore,no_run
3487    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3488    /// let x = ListMaterializedViewsRequest::new().set_page_token("example");
3489    /// ```
3490    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3491        self.page_token = v.into();
3492        self
3493    }
3494}
3495
3496impl wkt::message::Message for ListMaterializedViewsRequest {
3497    fn typename() -> &'static str {
3498        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsRequest"
3499    }
3500}
3501
3502/// Response message for BigtableInstanceAdmin.ListMaterializedViews.
3503#[derive(Clone, Default, PartialEq)]
3504#[non_exhaustive]
3505pub struct ListMaterializedViewsResponse {
3506    /// The list of requested materialized views.
3507    pub materialized_views: std::vec::Vec<crate::model::MaterializedView>,
3508
3509    /// A token, which can be sent as `page_token` to retrieve the next page.
3510    /// If this field is omitted, there are no subsequent pages.
3511    pub next_page_token: std::string::String,
3512
3513    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3514}
3515
3516impl ListMaterializedViewsResponse {
3517    /// Creates a new default instance.
3518    pub fn new() -> Self {
3519        std::default::Default::default()
3520    }
3521
3522    /// Sets the value of [materialized_views][crate::model::ListMaterializedViewsResponse::materialized_views].
3523    ///
3524    /// # Example
3525    /// ```ignore,no_run
3526    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
3527    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3528    /// let x = ListMaterializedViewsResponse::new()
3529    ///     .set_materialized_views([
3530    ///         MaterializedView::default()/* use setters */,
3531    ///         MaterializedView::default()/* use (different) setters */,
3532    ///     ]);
3533    /// ```
3534    pub fn set_materialized_views<T, V>(mut self, v: T) -> Self
3535    where
3536        T: std::iter::IntoIterator<Item = V>,
3537        V: std::convert::Into<crate::model::MaterializedView>,
3538    {
3539        use std::iter::Iterator;
3540        self.materialized_views = v.into_iter().map(|i| i.into()).collect();
3541        self
3542    }
3543
3544    /// Sets the value of [next_page_token][crate::model::ListMaterializedViewsResponse::next_page_token].
3545    ///
3546    /// # Example
3547    /// ```ignore,no_run
3548    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
3549    /// let x = ListMaterializedViewsResponse::new().set_next_page_token("example");
3550    /// ```
3551    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3552        self.next_page_token = v.into();
3553        self
3554    }
3555}
3556
3557impl wkt::message::Message for ListMaterializedViewsResponse {
3558    fn typename() -> &'static str {
3559        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsResponse"
3560    }
3561}
3562
3563#[doc(hidden)]
3564impl google_cloud_gax::paginator::internal::PageableResponse for ListMaterializedViewsResponse {
3565    type PageItem = crate::model::MaterializedView;
3566
3567    fn items(self) -> std::vec::Vec<Self::PageItem> {
3568        self.materialized_views
3569    }
3570
3571    fn next_page_token(&self) -> std::string::String {
3572        use std::clone::Clone;
3573        self.next_page_token.clone()
3574    }
3575}
3576
3577/// Request message for BigtableInstanceAdmin.UpdateMaterializedView.
3578#[derive(Clone, Default, PartialEq)]
3579#[non_exhaustive]
3580pub struct UpdateMaterializedViewRequest {
3581    /// Required. The materialized view to update.
3582    ///
3583    /// The materialized view's `name` field is used to identify the view to
3584    /// update. Format:
3585    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3586    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3587
3588    /// Optional. The list of fields to update.
3589    pub update_mask: std::option::Option<wkt::FieldMask>,
3590
3591    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3592}
3593
3594impl UpdateMaterializedViewRequest {
3595    /// Creates a new default instance.
3596    pub fn new() -> Self {
3597        std::default::Default::default()
3598    }
3599
3600    /// Sets the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3601    ///
3602    /// # Example
3603    /// ```ignore,no_run
3604    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3605    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3606    /// let x = UpdateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3607    /// ```
3608    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3609    where
3610        T: std::convert::Into<crate::model::MaterializedView>,
3611    {
3612        self.materialized_view = std::option::Option::Some(v.into());
3613        self
3614    }
3615
3616    /// Sets or clears the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3617    ///
3618    /// # Example
3619    /// ```ignore,no_run
3620    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3621    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3622    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3623    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3624    /// ```
3625    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3626    where
3627        T: std::convert::Into<crate::model::MaterializedView>,
3628    {
3629        self.materialized_view = v.map(|x| x.into());
3630        self
3631    }
3632
3633    /// Sets the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3634    ///
3635    /// # Example
3636    /// ```ignore,no_run
3637    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3638    /// use wkt::FieldMask;
3639    /// let x = UpdateMaterializedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3640    /// ```
3641    pub fn set_update_mask<T>(mut self, v: T) -> Self
3642    where
3643        T: std::convert::Into<wkt::FieldMask>,
3644    {
3645        self.update_mask = std::option::Option::Some(v.into());
3646        self
3647    }
3648
3649    /// Sets or clears the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3650    ///
3651    /// # Example
3652    /// ```ignore,no_run
3653    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3654    /// use wkt::FieldMask;
3655    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3656    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3657    /// ```
3658    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3659    where
3660        T: std::convert::Into<wkt::FieldMask>,
3661    {
3662        self.update_mask = v.map(|x| x.into());
3663        self
3664    }
3665}
3666
3667impl wkt::message::Message for UpdateMaterializedViewRequest {
3668    fn typename() -> &'static str {
3669        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewRequest"
3670    }
3671}
3672
3673/// The metadata for the Operation returned by UpdateMaterializedView.
3674#[derive(Clone, Default, PartialEq)]
3675#[non_exhaustive]
3676pub struct UpdateMaterializedViewMetadata {
3677    /// The request that prompted the initiation of this UpdateMaterializedView
3678    /// operation.
3679    pub original_request: std::option::Option<crate::model::UpdateMaterializedViewRequest>,
3680
3681    /// The time at which this operation was started.
3682    pub start_time: std::option::Option<wkt::Timestamp>,
3683
3684    /// If set, the time at which this operation finished or was canceled.
3685    pub end_time: std::option::Option<wkt::Timestamp>,
3686
3687    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3688}
3689
3690impl UpdateMaterializedViewMetadata {
3691    /// Creates a new default instance.
3692    pub fn new() -> Self {
3693        std::default::Default::default()
3694    }
3695
3696    /// Sets the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
3697    ///
3698    /// # Example
3699    /// ```ignore,no_run
3700    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3701    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3702    /// let x = UpdateMaterializedViewMetadata::new().set_original_request(UpdateMaterializedViewRequest::default()/* use setters */);
3703    /// ```
3704    pub fn set_original_request<T>(mut self, v: T) -> Self
3705    where
3706        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
3707    {
3708        self.original_request = std::option::Option::Some(v.into());
3709        self
3710    }
3711
3712    /// Sets or clears the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
3713    ///
3714    /// # Example
3715    /// ```ignore,no_run
3716    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3717    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3718    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(Some(UpdateMaterializedViewRequest::default()/* use setters */));
3719    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(None::<UpdateMaterializedViewRequest>);
3720    /// ```
3721    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3722    where
3723        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
3724    {
3725        self.original_request = v.map(|x| x.into());
3726        self
3727    }
3728
3729    /// Sets the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
3730    ///
3731    /// # Example
3732    /// ```ignore,no_run
3733    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3734    /// use wkt::Timestamp;
3735    /// let x = UpdateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3736    /// ```
3737    pub fn set_start_time<T>(mut self, v: T) -> Self
3738    where
3739        T: std::convert::Into<wkt::Timestamp>,
3740    {
3741        self.start_time = std::option::Option::Some(v.into());
3742        self
3743    }
3744
3745    /// Sets or clears the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
3746    ///
3747    /// # Example
3748    /// ```ignore,no_run
3749    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3750    /// use wkt::Timestamp;
3751    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3752    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3753    /// ```
3754    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3755    where
3756        T: std::convert::Into<wkt::Timestamp>,
3757    {
3758        self.start_time = v.map(|x| x.into());
3759        self
3760    }
3761
3762    /// Sets the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
3763    ///
3764    /// # Example
3765    /// ```ignore,no_run
3766    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3767    /// use wkt::Timestamp;
3768    /// let x = UpdateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3769    /// ```
3770    pub fn set_end_time<T>(mut self, v: T) -> Self
3771    where
3772        T: std::convert::Into<wkt::Timestamp>,
3773    {
3774        self.end_time = std::option::Option::Some(v.into());
3775        self
3776    }
3777
3778    /// Sets or clears the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
3779    ///
3780    /// # Example
3781    /// ```ignore,no_run
3782    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3783    /// use wkt::Timestamp;
3784    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3785    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3786    /// ```
3787    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3788    where
3789        T: std::convert::Into<wkt::Timestamp>,
3790    {
3791        self.end_time = v.map(|x| x.into());
3792        self
3793    }
3794}
3795
3796impl wkt::message::Message for UpdateMaterializedViewMetadata {
3797    fn typename() -> &'static str {
3798        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewMetadata"
3799    }
3800}
3801
3802/// Request message for BigtableInstanceAdmin.DeleteMaterializedView.
3803#[derive(Clone, Default, PartialEq)]
3804#[non_exhaustive]
3805pub struct DeleteMaterializedViewRequest {
3806    /// Required. The unique name of the materialized view to be deleted.
3807    /// Format:
3808    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3809    pub name: std::string::String,
3810
3811    /// Optional. The current etag of the materialized view.
3812    /// If an etag is provided and does not match the current etag of the
3813    /// materialized view, deletion will be blocked and an ABORTED error will be
3814    /// returned.
3815    pub etag: std::string::String,
3816
3817    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3818}
3819
3820impl DeleteMaterializedViewRequest {
3821    /// Creates a new default instance.
3822    pub fn new() -> Self {
3823        std::default::Default::default()
3824    }
3825
3826    /// Sets the value of [name][crate::model::DeleteMaterializedViewRequest::name].
3827    ///
3828    /// # Example
3829    /// ```ignore,no_run
3830    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
3831    /// let x = DeleteMaterializedViewRequest::new().set_name("example");
3832    /// ```
3833    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3834        self.name = v.into();
3835        self
3836    }
3837
3838    /// Sets the value of [etag][crate::model::DeleteMaterializedViewRequest::etag].
3839    ///
3840    /// # Example
3841    /// ```ignore,no_run
3842    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
3843    /// let x = DeleteMaterializedViewRequest::new().set_etag("example");
3844    /// ```
3845    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3846        self.etag = v.into();
3847        self
3848    }
3849}
3850
3851impl wkt::message::Message for DeleteMaterializedViewRequest {
3852    fn typename() -> &'static str {
3853        "type.googleapis.com/google.bigtable.admin.v2.DeleteMaterializedViewRequest"
3854    }
3855}
3856
3857/// The request for
3858/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
3859///
3860/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
3861#[derive(Clone, Default, PartialEq)]
3862#[non_exhaustive]
3863pub struct RestoreTableRequest {
3864    /// Required. The name of the instance in which to create the restored
3865    /// table. Values are of the form `projects/<project>/instances/<instance>`.
3866    pub parent: std::string::String,
3867
3868    /// Required. The id of the table to create and restore to. This
3869    /// table must not already exist. The `table_id` appended to
3870    /// `parent` forms the full table name of the form
3871    /// `projects/<project>/instances/<instance>/tables/<table_id>`.
3872    pub table_id: std::string::String,
3873
3874    /// Required. The source from which to restore.
3875    pub source: std::option::Option<crate::model::restore_table_request::Source>,
3876
3877    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3878}
3879
3880impl RestoreTableRequest {
3881    /// Creates a new default instance.
3882    pub fn new() -> Self {
3883        std::default::Default::default()
3884    }
3885
3886    /// Sets the value of [parent][crate::model::RestoreTableRequest::parent].
3887    ///
3888    /// # Example
3889    /// ```ignore,no_run
3890    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3891    /// let x = RestoreTableRequest::new().set_parent("example");
3892    /// ```
3893    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3894        self.parent = v.into();
3895        self
3896    }
3897
3898    /// Sets the value of [table_id][crate::model::RestoreTableRequest::table_id].
3899    ///
3900    /// # Example
3901    /// ```ignore,no_run
3902    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3903    /// let x = RestoreTableRequest::new().set_table_id("example");
3904    /// ```
3905    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3906        self.table_id = v.into();
3907        self
3908    }
3909
3910    /// Sets the value of [source][crate::model::RestoreTableRequest::source].
3911    ///
3912    /// Note that all the setters affecting `source` are mutually
3913    /// exclusive.
3914    ///
3915    /// # Example
3916    /// ```ignore,no_run
3917    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3918    /// use google_cloud_bigtable_admin_v2::model::restore_table_request::Source;
3919    /// let x = RestoreTableRequest::new().set_source(Some(Source::Backup("example".to_string())));
3920    /// ```
3921    pub fn set_source<
3922        T: std::convert::Into<std::option::Option<crate::model::restore_table_request::Source>>,
3923    >(
3924        mut self,
3925        v: T,
3926    ) -> Self {
3927        self.source = v.into();
3928        self
3929    }
3930
3931    /// The value of [source][crate::model::RestoreTableRequest::source]
3932    /// if it holds a `Backup`, `None` if the field is not set or
3933    /// holds a different branch.
3934    pub fn backup(&self) -> std::option::Option<&std::string::String> {
3935        #[allow(unreachable_patterns)]
3936        self.source.as_ref().and_then(|v| match v {
3937            crate::model::restore_table_request::Source::Backup(v) => std::option::Option::Some(v),
3938            _ => std::option::Option::None,
3939        })
3940    }
3941
3942    /// Sets the value of [source][crate::model::RestoreTableRequest::source]
3943    /// to hold a `Backup`.
3944    ///
3945    /// Note that all the setters affecting `source` are
3946    /// mutually exclusive.
3947    ///
3948    /// # Example
3949    /// ```ignore,no_run
3950    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3951    /// let x = RestoreTableRequest::new().set_backup("example");
3952    /// assert!(x.backup().is_some());
3953    /// ```
3954    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3955        self.source = std::option::Option::Some(
3956            crate::model::restore_table_request::Source::Backup(v.into()),
3957        );
3958        self
3959    }
3960}
3961
3962impl wkt::message::Message for RestoreTableRequest {
3963    fn typename() -> &'static str {
3964        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableRequest"
3965    }
3966}
3967
3968/// Defines additional types related to [RestoreTableRequest].
3969pub mod restore_table_request {
3970    #[allow(unused_imports)]
3971    use super::*;
3972
3973    /// Required. The source from which to restore.
3974    #[derive(Clone, Debug, PartialEq)]
3975    #[non_exhaustive]
3976    pub enum Source {
3977        /// Name of the backup from which to restore.  Values are of the form
3978        /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
3979        Backup(std::string::String),
3980    }
3981}
3982
3983/// Metadata type for the long-running operation returned by
3984/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
3985///
3986/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
3987#[derive(Clone, Default, PartialEq)]
3988#[non_exhaustive]
3989pub struct RestoreTableMetadata {
3990    /// Name of the table being created and restored to.
3991    pub name: std::string::String,
3992
3993    /// The type of the restore source.
3994    pub source_type: crate::model::RestoreSourceType,
3995
3996    /// If exists, the name of the long-running operation that will be used to
3997    /// track the post-restore optimization process to optimize the performance of
3998    /// the restored table. The metadata type of the long-running operation is
3999    /// [OptimizeRestoreTableMetadata][]. The response type is
4000    /// [Empty][google.protobuf.Empty]. This long-running operation may be
4001    /// automatically created by the system if applicable after the
4002    /// RestoreTable long-running operation completes successfully. This operation
4003    /// may not be created if the table is already optimized or the restore was
4004    /// not successful.
4005    ///
4006    /// [google.protobuf.Empty]: wkt::Empty
4007    pub optimize_table_operation_name: std::string::String,
4008
4009    /// The progress of the
4010    /// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]
4011    /// operation.
4012    ///
4013    /// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
4014    pub progress: std::option::Option<crate::model::OperationProgress>,
4015
4016    /// Information about the source used to restore the table, as specified by
4017    /// `source` in
4018    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
4019    ///
4020    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
4021    pub source_info: std::option::Option<crate::model::restore_table_metadata::SourceInfo>,
4022
4023    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4024}
4025
4026impl RestoreTableMetadata {
4027    /// Creates a new default instance.
4028    pub fn new() -> Self {
4029        std::default::Default::default()
4030    }
4031
4032    /// Sets the value of [name][crate::model::RestoreTableMetadata::name].
4033    ///
4034    /// # Example
4035    /// ```ignore,no_run
4036    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4037    /// let x = RestoreTableMetadata::new().set_name("example");
4038    /// ```
4039    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4040        self.name = v.into();
4041        self
4042    }
4043
4044    /// Sets the value of [source_type][crate::model::RestoreTableMetadata::source_type].
4045    ///
4046    /// # Example
4047    /// ```ignore,no_run
4048    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4049    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
4050    /// let x0 = RestoreTableMetadata::new().set_source_type(RestoreSourceType::Backup);
4051    /// ```
4052    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
4053        mut self,
4054        v: T,
4055    ) -> Self {
4056        self.source_type = v.into();
4057        self
4058    }
4059
4060    /// Sets the value of [optimize_table_operation_name][crate::model::RestoreTableMetadata::optimize_table_operation_name].
4061    ///
4062    /// # Example
4063    /// ```ignore,no_run
4064    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4065    /// let x = RestoreTableMetadata::new().set_optimize_table_operation_name("example");
4066    /// ```
4067    pub fn set_optimize_table_operation_name<T: std::convert::Into<std::string::String>>(
4068        mut self,
4069        v: T,
4070    ) -> Self {
4071        self.optimize_table_operation_name = v.into();
4072        self
4073    }
4074
4075    /// Sets the value of [progress][crate::model::RestoreTableMetadata::progress].
4076    ///
4077    /// # Example
4078    /// ```ignore,no_run
4079    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4080    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4081    /// let x = RestoreTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4082    /// ```
4083    pub fn set_progress<T>(mut self, v: T) -> Self
4084    where
4085        T: std::convert::Into<crate::model::OperationProgress>,
4086    {
4087        self.progress = std::option::Option::Some(v.into());
4088        self
4089    }
4090
4091    /// Sets or clears the value of [progress][crate::model::RestoreTableMetadata::progress].
4092    ///
4093    /// # Example
4094    /// ```ignore,no_run
4095    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4096    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4097    /// let x = RestoreTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4098    /// let x = RestoreTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4099    /// ```
4100    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4101    where
4102        T: std::convert::Into<crate::model::OperationProgress>,
4103    {
4104        self.progress = v.map(|x| x.into());
4105        self
4106    }
4107
4108    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info].
4109    ///
4110    /// Note that all the setters affecting `source_info` are mutually
4111    /// exclusive.
4112    ///
4113    /// # Example
4114    /// ```ignore,no_run
4115    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4116    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4117    /// let x = RestoreTableMetadata::new().set_source_info(Some(
4118    ///     google_cloud_bigtable_admin_v2::model::restore_table_metadata::SourceInfo::BackupInfo(BackupInfo::default().into())));
4119    /// ```
4120    pub fn set_source_info<
4121        T: std::convert::Into<std::option::Option<crate::model::restore_table_metadata::SourceInfo>>,
4122    >(
4123        mut self,
4124        v: T,
4125    ) -> Self {
4126        self.source_info = v.into();
4127        self
4128    }
4129
4130    /// The value of [source_info][crate::model::RestoreTableMetadata::source_info]
4131    /// if it holds a `BackupInfo`, `None` if the field is not set or
4132    /// holds a different branch.
4133    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
4134        #[allow(unreachable_patterns)]
4135        self.source_info.as_ref().and_then(|v| match v {
4136            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v) => {
4137                std::option::Option::Some(v)
4138            }
4139            _ => std::option::Option::None,
4140        })
4141    }
4142
4143    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info]
4144    /// to hold a `BackupInfo`.
4145    ///
4146    /// Note that all the setters affecting `source_info` are
4147    /// mutually exclusive.
4148    ///
4149    /// # Example
4150    /// ```ignore,no_run
4151    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4152    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4153    /// let x = RestoreTableMetadata::new().set_backup_info(BackupInfo::default()/* use setters */);
4154    /// assert!(x.backup_info().is_some());
4155    /// ```
4156    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
4157        mut self,
4158        v: T,
4159    ) -> Self {
4160        self.source_info = std::option::Option::Some(
4161            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v.into()),
4162        );
4163        self
4164    }
4165}
4166
4167impl wkt::message::Message for RestoreTableMetadata {
4168    fn typename() -> &'static str {
4169        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableMetadata"
4170    }
4171}
4172
4173/// Defines additional types related to [RestoreTableMetadata].
4174pub mod restore_table_metadata {
4175    #[allow(unused_imports)]
4176    use super::*;
4177
4178    /// Information about the source used to restore the table, as specified by
4179    /// `source` in
4180    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
4181    ///
4182    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
4183    #[derive(Clone, Debug, PartialEq)]
4184    #[non_exhaustive]
4185    pub enum SourceInfo {
4186        #[allow(missing_docs)]
4187        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
4188    }
4189}
4190
4191/// Metadata type for the long-running operation used to track the progress
4192/// of optimizations performed on a newly restored table. This long-running
4193/// operation is automatically created by the system after the successful
4194/// completion of a table restore, and cannot be cancelled.
4195#[derive(Clone, Default, PartialEq)]
4196#[non_exhaustive]
4197pub struct OptimizeRestoredTableMetadata {
4198    /// Name of the restored table being optimized.
4199    pub name: std::string::String,
4200
4201    /// The progress of the post-restore optimizations.
4202    pub progress: std::option::Option<crate::model::OperationProgress>,
4203
4204    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4205}
4206
4207impl OptimizeRestoredTableMetadata {
4208    /// Creates a new default instance.
4209    pub fn new() -> Self {
4210        std::default::Default::default()
4211    }
4212
4213    /// Sets the value of [name][crate::model::OptimizeRestoredTableMetadata::name].
4214    ///
4215    /// # Example
4216    /// ```ignore,no_run
4217    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4218    /// let x = OptimizeRestoredTableMetadata::new().set_name("example");
4219    /// ```
4220    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4221        self.name = v.into();
4222        self
4223    }
4224
4225    /// Sets the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4226    ///
4227    /// # Example
4228    /// ```ignore,no_run
4229    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4230    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4231    /// let x = OptimizeRestoredTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4232    /// ```
4233    pub fn set_progress<T>(mut self, v: T) -> Self
4234    where
4235        T: std::convert::Into<crate::model::OperationProgress>,
4236    {
4237        self.progress = std::option::Option::Some(v.into());
4238        self
4239    }
4240
4241    /// Sets or clears the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4242    ///
4243    /// # Example
4244    /// ```ignore,no_run
4245    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4246    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4247    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4248    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4249    /// ```
4250    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4251    where
4252        T: std::convert::Into<crate::model::OperationProgress>,
4253    {
4254        self.progress = v.map(|x| x.into());
4255        self
4256    }
4257}
4258
4259impl wkt::message::Message for OptimizeRestoredTableMetadata {
4260    fn typename() -> &'static str {
4261        "type.googleapis.com/google.bigtable.admin.v2.OptimizeRestoredTableMetadata"
4262    }
4263}
4264
4265/// Request message for
4266/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
4267///
4268/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]: crate::client::BigtableTableAdmin::create_table
4269#[derive(Clone, Default, PartialEq)]
4270#[non_exhaustive]
4271pub struct CreateTableRequest {
4272    /// Required. The unique name of the instance in which to create the table.
4273    /// Values are of the form `projects/{project}/instances/{instance}`.
4274    pub parent: std::string::String,
4275
4276    /// Required. The name by which the new table should be referred to within the
4277    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4278    /// Maximum 50 characters.
4279    pub table_id: std::string::String,
4280
4281    /// Required. The Table to create.
4282    pub table: std::option::Option<crate::model::Table>,
4283
4284    /// The optional list of row keys that will be used to initially split the
4285    /// table into several tablets (tablets are similar to HBase regions).
4286    /// Given two split keys, `s1` and `s2`, three tablets will be created,
4287    /// spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
4288    ///
4289    /// Example:
4290    ///
4291    /// * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
4292    ///   `"other", "zz"]`
4293    /// * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
4294    /// * Key assignment:
4295    ///   - Tablet 1 `[, apple)                => {"a"}.`
4296    ///   - Tablet 2 `[apple, customer_1)      => {"apple", "custom"}.`
4297    ///   - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
4298    ///   - Tablet 4 `[customer_2, other)      => {"customer_2"}.`
4299    ///   - Tablet 5 `[other, )                => {"other", "zz"}.`
4300    pub initial_splits: std::vec::Vec<crate::model::create_table_request::Split>,
4301
4302    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4303}
4304
4305impl CreateTableRequest {
4306    /// Creates a new default instance.
4307    pub fn new() -> Self {
4308        std::default::Default::default()
4309    }
4310
4311    /// Sets the value of [parent][crate::model::CreateTableRequest::parent].
4312    ///
4313    /// # Example
4314    /// ```ignore,no_run
4315    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4316    /// let x = CreateTableRequest::new().set_parent("example");
4317    /// ```
4318    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4319        self.parent = v.into();
4320        self
4321    }
4322
4323    /// Sets the value of [table_id][crate::model::CreateTableRequest::table_id].
4324    ///
4325    /// # Example
4326    /// ```ignore,no_run
4327    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4328    /// let x = CreateTableRequest::new().set_table_id("example");
4329    /// ```
4330    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4331        self.table_id = v.into();
4332        self
4333    }
4334
4335    /// Sets the value of [table][crate::model::CreateTableRequest::table].
4336    ///
4337    /// # Example
4338    /// ```ignore,no_run
4339    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4340    /// use google_cloud_bigtable_admin_v2::model::Table;
4341    /// let x = CreateTableRequest::new().set_table(Table::default()/* use setters */);
4342    /// ```
4343    pub fn set_table<T>(mut self, v: T) -> Self
4344    where
4345        T: std::convert::Into<crate::model::Table>,
4346    {
4347        self.table = std::option::Option::Some(v.into());
4348        self
4349    }
4350
4351    /// Sets or clears the value of [table][crate::model::CreateTableRequest::table].
4352    ///
4353    /// # Example
4354    /// ```ignore,no_run
4355    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4356    /// use google_cloud_bigtable_admin_v2::model::Table;
4357    /// let x = CreateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
4358    /// let x = CreateTableRequest::new().set_or_clear_table(None::<Table>);
4359    /// ```
4360    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4361    where
4362        T: std::convert::Into<crate::model::Table>,
4363    {
4364        self.table = v.map(|x| x.into());
4365        self
4366    }
4367
4368    /// Sets the value of [initial_splits][crate::model::CreateTableRequest::initial_splits].
4369    ///
4370    /// # Example
4371    /// ```ignore,no_run
4372    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4373    /// use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4374    /// let x = CreateTableRequest::new()
4375    ///     .set_initial_splits([
4376    ///         Split::default()/* use setters */,
4377    ///         Split::default()/* use (different) setters */,
4378    ///     ]);
4379    /// ```
4380    pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
4381    where
4382        T: std::iter::IntoIterator<Item = V>,
4383        V: std::convert::Into<crate::model::create_table_request::Split>,
4384    {
4385        use std::iter::Iterator;
4386        self.initial_splits = v.into_iter().map(|i| i.into()).collect();
4387        self
4388    }
4389}
4390
4391impl wkt::message::Message for CreateTableRequest {
4392    fn typename() -> &'static str {
4393        "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest"
4394    }
4395}
4396
4397/// Defines additional types related to [CreateTableRequest].
4398pub mod create_table_request {
4399    #[allow(unused_imports)]
4400    use super::*;
4401
4402    /// An initial split point for a newly created table.
4403    #[derive(Clone, Default, PartialEq)]
4404    #[non_exhaustive]
4405    pub struct Split {
4406        /// Row key to use as an initial tablet boundary.
4407        pub key: ::bytes::Bytes,
4408
4409        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4410    }
4411
4412    impl Split {
4413        /// Creates a new default instance.
4414        pub fn new() -> Self {
4415            std::default::Default::default()
4416        }
4417
4418        /// Sets the value of [key][crate::model::create_table_request::Split::key].
4419        ///
4420        /// # Example
4421        /// ```ignore,no_run
4422        /// # use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4423        /// let x = Split::new().set_key(bytes::Bytes::from_static(b"example"));
4424        /// ```
4425        pub fn set_key<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4426            self.key = v.into();
4427            self
4428        }
4429    }
4430
4431    impl wkt::message::Message for Split {
4432        fn typename() -> &'static str {
4433            "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest.Split"
4434        }
4435    }
4436}
4437
4438/// Request message for
4439/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
4440///
4441/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4442/// feature is not currently available to most Cloud Bigtable customers. This
4443/// feature might be changed in backward-incompatible ways and is not recommended
4444/// for production use. It is not subject to any SLA or deprecation policy.
4445///
4446/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]: crate::client::BigtableTableAdmin::create_table_from_snapshot
4447#[derive(Clone, Default, PartialEq)]
4448#[non_exhaustive]
4449pub struct CreateTableFromSnapshotRequest {
4450    /// Required. The unique name of the instance in which to create the table.
4451    /// Values are of the form `projects/{project}/instances/{instance}`.
4452    pub parent: std::string::String,
4453
4454    /// Required. The name by which the new table should be referred to within the
4455    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4456    pub table_id: std::string::String,
4457
4458    /// Required. The unique name of the snapshot from which to restore the table.
4459    /// The snapshot and the table must be in the same instance. Values are of the
4460    /// form
4461    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
4462    pub source_snapshot: std::string::String,
4463
4464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4465}
4466
4467impl CreateTableFromSnapshotRequest {
4468    /// Creates a new default instance.
4469    pub fn new() -> Self {
4470        std::default::Default::default()
4471    }
4472
4473    /// Sets the value of [parent][crate::model::CreateTableFromSnapshotRequest::parent].
4474    ///
4475    /// # Example
4476    /// ```ignore,no_run
4477    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4478    /// let x = CreateTableFromSnapshotRequest::new().set_parent("example");
4479    /// ```
4480    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4481        self.parent = v.into();
4482        self
4483    }
4484
4485    /// Sets the value of [table_id][crate::model::CreateTableFromSnapshotRequest::table_id].
4486    ///
4487    /// # Example
4488    /// ```ignore,no_run
4489    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4490    /// let x = CreateTableFromSnapshotRequest::new().set_table_id("example");
4491    /// ```
4492    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4493        self.table_id = v.into();
4494        self
4495    }
4496
4497    /// Sets the value of [source_snapshot][crate::model::CreateTableFromSnapshotRequest::source_snapshot].
4498    ///
4499    /// # Example
4500    /// ```ignore,no_run
4501    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4502    /// let x = CreateTableFromSnapshotRequest::new().set_source_snapshot("example");
4503    /// ```
4504    pub fn set_source_snapshot<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4505        self.source_snapshot = v.into();
4506        self
4507    }
4508}
4509
4510impl wkt::message::Message for CreateTableFromSnapshotRequest {
4511    fn typename() -> &'static str {
4512        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotRequest"
4513    }
4514}
4515
4516/// Request message for
4517/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
4518///
4519/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]: crate::client::BigtableTableAdmin::drop_row_range
4520#[derive(Clone, Default, PartialEq)]
4521#[non_exhaustive]
4522pub struct DropRowRangeRequest {
4523    /// Required. The unique name of the table on which to drop a range of rows.
4524    /// Values are of the form
4525    /// `projects/{project}/instances/{instance}/tables/{table}`.
4526    pub name: std::string::String,
4527
4528    /// Delete all rows or by prefix.
4529    pub target: std::option::Option<crate::model::drop_row_range_request::Target>,
4530
4531    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4532}
4533
4534impl DropRowRangeRequest {
4535    /// Creates a new default instance.
4536    pub fn new() -> Self {
4537        std::default::Default::default()
4538    }
4539
4540    /// Sets the value of [name][crate::model::DropRowRangeRequest::name].
4541    ///
4542    /// # Example
4543    /// ```ignore,no_run
4544    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4545    /// let x = DropRowRangeRequest::new().set_name("example");
4546    /// ```
4547    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4548        self.name = v.into();
4549        self
4550    }
4551
4552    /// Sets the value of [target][crate::model::DropRowRangeRequest::target].
4553    ///
4554    /// Note that all the setters affecting `target` are mutually
4555    /// exclusive.
4556    ///
4557    /// # Example
4558    /// ```ignore,no_run
4559    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4560    /// use google_cloud_bigtable_admin_v2::model::drop_row_range_request::Target;
4561    /// let x = DropRowRangeRequest::new().set_target(Some(Target::RowKeyPrefix(bytes::Bytes::from_static(b"example"))));
4562    /// ```
4563    pub fn set_target<
4564        T: std::convert::Into<std::option::Option<crate::model::drop_row_range_request::Target>>,
4565    >(
4566        mut self,
4567        v: T,
4568    ) -> Self {
4569        self.target = v.into();
4570        self
4571    }
4572
4573    /// The value of [target][crate::model::DropRowRangeRequest::target]
4574    /// if it holds a `RowKeyPrefix`, `None` if the field is not set or
4575    /// holds a different branch.
4576    pub fn row_key_prefix(&self) -> std::option::Option<&::bytes::Bytes> {
4577        #[allow(unreachable_patterns)]
4578        self.target.as_ref().and_then(|v| match v {
4579            crate::model::drop_row_range_request::Target::RowKeyPrefix(v) => {
4580                std::option::Option::Some(v)
4581            }
4582            _ => std::option::Option::None,
4583        })
4584    }
4585
4586    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
4587    /// to hold a `RowKeyPrefix`.
4588    ///
4589    /// Note that all the setters affecting `target` are
4590    /// mutually exclusive.
4591    ///
4592    /// # Example
4593    /// ```ignore,no_run
4594    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4595    /// let x = DropRowRangeRequest::new().set_row_key_prefix(bytes::Bytes::from_static(b"example"));
4596    /// assert!(x.row_key_prefix().is_some());
4597    /// assert!(x.delete_all_data_from_table().is_none());
4598    /// ```
4599    pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4600        self.target = std::option::Option::Some(
4601            crate::model::drop_row_range_request::Target::RowKeyPrefix(v.into()),
4602        );
4603        self
4604    }
4605
4606    /// The value of [target][crate::model::DropRowRangeRequest::target]
4607    /// if it holds a `DeleteAllDataFromTable`, `None` if the field is not set or
4608    /// holds a different branch.
4609    pub fn delete_all_data_from_table(&self) -> std::option::Option<&bool> {
4610        #[allow(unreachable_patterns)]
4611        self.target.as_ref().and_then(|v| match v {
4612            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v) => {
4613                std::option::Option::Some(v)
4614            }
4615            _ => std::option::Option::None,
4616        })
4617    }
4618
4619    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
4620    /// to hold a `DeleteAllDataFromTable`.
4621    ///
4622    /// Note that all the setters affecting `target` are
4623    /// mutually exclusive.
4624    ///
4625    /// # Example
4626    /// ```ignore,no_run
4627    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4628    /// let x = DropRowRangeRequest::new().set_delete_all_data_from_table(true);
4629    /// assert!(x.delete_all_data_from_table().is_some());
4630    /// assert!(x.row_key_prefix().is_none());
4631    /// ```
4632    pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4633        self.target = std::option::Option::Some(
4634            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v.into()),
4635        );
4636        self
4637    }
4638}
4639
4640impl wkt::message::Message for DropRowRangeRequest {
4641    fn typename() -> &'static str {
4642        "type.googleapis.com/google.bigtable.admin.v2.DropRowRangeRequest"
4643    }
4644}
4645
4646/// Defines additional types related to [DropRowRangeRequest].
4647pub mod drop_row_range_request {
4648    #[allow(unused_imports)]
4649    use super::*;
4650
4651    /// Delete all rows or by prefix.
4652    #[derive(Clone, Debug, PartialEq)]
4653    #[non_exhaustive]
4654    pub enum Target {
4655        /// Delete all rows that start with this row key prefix. Prefix cannot be
4656        /// zero length.
4657        RowKeyPrefix(::bytes::Bytes),
4658        /// Delete all rows in the table. Setting this to false is a no-op.
4659        DeleteAllDataFromTable(bool),
4660    }
4661}
4662
4663/// Request message for
4664/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
4665///
4666/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
4667#[derive(Clone, Default, PartialEq)]
4668#[non_exhaustive]
4669pub struct ListTablesRequest {
4670    /// Required. The unique name of the instance for which tables should be
4671    /// listed. Values are of the form `projects/{project}/instances/{instance}`.
4672    pub parent: std::string::String,
4673
4674    /// The view to be applied to the returned tables' fields.
4675    /// NAME_ONLY view (default) and REPLICATION_VIEW are supported.
4676    pub view: crate::model::table::View,
4677
4678    /// Maximum number of results per page.
4679    ///
4680    /// A page_size of zero lets the server choose the number of items to return.
4681    /// A page_size which is strictly positive will return at most that many items.
4682    /// A negative page_size will cause an error.
4683    ///
4684    /// Following the first request, subsequent paginated calls are not required
4685    /// to pass a page_size. If a page_size is set in subsequent calls, it must
4686    /// match the page_size given in the first request.
4687    pub page_size: i32,
4688
4689    /// The value of `next_page_token` returned by a previous call.
4690    pub page_token: std::string::String,
4691
4692    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4693}
4694
4695impl ListTablesRequest {
4696    /// Creates a new default instance.
4697    pub fn new() -> Self {
4698        std::default::Default::default()
4699    }
4700
4701    /// Sets the value of [parent][crate::model::ListTablesRequest::parent].
4702    ///
4703    /// # Example
4704    /// ```ignore,no_run
4705    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4706    /// let x = ListTablesRequest::new().set_parent("example");
4707    /// ```
4708    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4709        self.parent = v.into();
4710        self
4711    }
4712
4713    /// Sets the value of [view][crate::model::ListTablesRequest::view].
4714    ///
4715    /// # Example
4716    /// ```ignore,no_run
4717    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4718    /// use google_cloud_bigtable_admin_v2::model::table::View;
4719    /// let x0 = ListTablesRequest::new().set_view(View::NameOnly);
4720    /// let x1 = ListTablesRequest::new().set_view(View::SchemaView);
4721    /// let x2 = ListTablesRequest::new().set_view(View::ReplicationView);
4722    /// ```
4723    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
4724        self.view = v.into();
4725        self
4726    }
4727
4728    /// Sets the value of [page_size][crate::model::ListTablesRequest::page_size].
4729    ///
4730    /// # Example
4731    /// ```ignore,no_run
4732    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4733    /// let x = ListTablesRequest::new().set_page_size(42);
4734    /// ```
4735    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4736        self.page_size = v.into();
4737        self
4738    }
4739
4740    /// Sets the value of [page_token][crate::model::ListTablesRequest::page_token].
4741    ///
4742    /// # Example
4743    /// ```ignore,no_run
4744    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4745    /// let x = ListTablesRequest::new().set_page_token("example");
4746    /// ```
4747    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4748        self.page_token = v.into();
4749        self
4750    }
4751}
4752
4753impl wkt::message::Message for ListTablesRequest {
4754    fn typename() -> &'static str {
4755        "type.googleapis.com/google.bigtable.admin.v2.ListTablesRequest"
4756    }
4757}
4758
4759/// Response message for
4760/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
4761///
4762/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
4763#[derive(Clone, Default, PartialEq)]
4764#[non_exhaustive]
4765pub struct ListTablesResponse {
4766    /// The tables present in the requested instance.
4767    pub tables: std::vec::Vec<crate::model::Table>,
4768
4769    /// Set if not all tables could be returned in a single response.
4770    /// Pass this value to `page_token` in another request to get the next
4771    /// page of results.
4772    pub next_page_token: std::string::String,
4773
4774    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4775}
4776
4777impl ListTablesResponse {
4778    /// Creates a new default instance.
4779    pub fn new() -> Self {
4780        std::default::Default::default()
4781    }
4782
4783    /// Sets the value of [tables][crate::model::ListTablesResponse::tables].
4784    ///
4785    /// # Example
4786    /// ```ignore,no_run
4787    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
4788    /// use google_cloud_bigtable_admin_v2::model::Table;
4789    /// let x = ListTablesResponse::new()
4790    ///     .set_tables([
4791    ///         Table::default()/* use setters */,
4792    ///         Table::default()/* use (different) setters */,
4793    ///     ]);
4794    /// ```
4795    pub fn set_tables<T, V>(mut self, v: T) -> Self
4796    where
4797        T: std::iter::IntoIterator<Item = V>,
4798        V: std::convert::Into<crate::model::Table>,
4799    {
4800        use std::iter::Iterator;
4801        self.tables = v.into_iter().map(|i| i.into()).collect();
4802        self
4803    }
4804
4805    /// Sets the value of [next_page_token][crate::model::ListTablesResponse::next_page_token].
4806    ///
4807    /// # Example
4808    /// ```ignore,no_run
4809    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
4810    /// let x = ListTablesResponse::new().set_next_page_token("example");
4811    /// ```
4812    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4813        self.next_page_token = v.into();
4814        self
4815    }
4816}
4817
4818impl wkt::message::Message for ListTablesResponse {
4819    fn typename() -> &'static str {
4820        "type.googleapis.com/google.bigtable.admin.v2.ListTablesResponse"
4821    }
4822}
4823
4824#[doc(hidden)]
4825impl google_cloud_gax::paginator::internal::PageableResponse for ListTablesResponse {
4826    type PageItem = crate::model::Table;
4827
4828    fn items(self) -> std::vec::Vec<Self::PageItem> {
4829        self.tables
4830    }
4831
4832    fn next_page_token(&self) -> std::string::String {
4833        use std::clone::Clone;
4834        self.next_page_token.clone()
4835    }
4836}
4837
4838/// Request message for
4839/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
4840///
4841/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable]: crate::client::BigtableTableAdmin::get_table
4842#[derive(Clone, Default, PartialEq)]
4843#[non_exhaustive]
4844pub struct GetTableRequest {
4845    /// Required. The unique name of the requested table.
4846    /// Values are of the form
4847    /// `projects/{project}/instances/{instance}/tables/{table}`.
4848    pub name: std::string::String,
4849
4850    /// The view to be applied to the returned table's fields.
4851    /// Defaults to `SCHEMA_VIEW` if unspecified.
4852    pub view: crate::model::table::View,
4853
4854    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4855}
4856
4857impl GetTableRequest {
4858    /// Creates a new default instance.
4859    pub fn new() -> Self {
4860        std::default::Default::default()
4861    }
4862
4863    /// Sets the value of [name][crate::model::GetTableRequest::name].
4864    ///
4865    /// # Example
4866    /// ```ignore,no_run
4867    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
4868    /// let x = GetTableRequest::new().set_name("example");
4869    /// ```
4870    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4871        self.name = v.into();
4872        self
4873    }
4874
4875    /// Sets the value of [view][crate::model::GetTableRequest::view].
4876    ///
4877    /// # Example
4878    /// ```ignore,no_run
4879    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
4880    /// use google_cloud_bigtable_admin_v2::model::table::View;
4881    /// let x0 = GetTableRequest::new().set_view(View::NameOnly);
4882    /// let x1 = GetTableRequest::new().set_view(View::SchemaView);
4883    /// let x2 = GetTableRequest::new().set_view(View::ReplicationView);
4884    /// ```
4885    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
4886        self.view = v.into();
4887        self
4888    }
4889}
4890
4891impl wkt::message::Message for GetTableRequest {
4892    fn typename() -> &'static str {
4893        "type.googleapis.com/google.bigtable.admin.v2.GetTableRequest"
4894    }
4895}
4896
4897/// The request for
4898/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
4899///
4900/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
4901#[derive(Clone, Default, PartialEq)]
4902#[non_exhaustive]
4903pub struct UpdateTableRequest {
4904    /// Required. The table to update.
4905    /// The table's `name` field is used to identify the table to update.
4906    pub table: std::option::Option<crate::model::Table>,
4907
4908    /// Required. The list of fields to update.
4909    /// A mask specifying which fields (e.g. `change_stream_config`) in the `table`
4910    /// field should be updated. This mask is relative to the `table` field, not to
4911    /// the request message. The wildcard (*) path is currently not supported.
4912    /// Currently UpdateTable is only supported for the following fields:
4913    ///
4914    /// * `change_stream_config`
4915    /// * `change_stream_config.retention_period`
4916    /// * `deletion_protection`
4917    /// * `row_key_schema`
4918    ///
4919    /// If `column_families` is set in `update_mask`, it will return an
4920    /// UNIMPLEMENTED error.
4921    pub update_mask: std::option::Option<wkt::FieldMask>,
4922
4923    /// Optional. If true, ignore safety checks when updating the table.
4924    pub ignore_warnings: bool,
4925
4926    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4927}
4928
4929impl UpdateTableRequest {
4930    /// Creates a new default instance.
4931    pub fn new() -> Self {
4932        std::default::Default::default()
4933    }
4934
4935    /// Sets the value of [table][crate::model::UpdateTableRequest::table].
4936    ///
4937    /// # Example
4938    /// ```ignore,no_run
4939    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4940    /// use google_cloud_bigtable_admin_v2::model::Table;
4941    /// let x = UpdateTableRequest::new().set_table(Table::default()/* use setters */);
4942    /// ```
4943    pub fn set_table<T>(mut self, v: T) -> Self
4944    where
4945        T: std::convert::Into<crate::model::Table>,
4946    {
4947        self.table = std::option::Option::Some(v.into());
4948        self
4949    }
4950
4951    /// Sets or clears the value of [table][crate::model::UpdateTableRequest::table].
4952    ///
4953    /// # Example
4954    /// ```ignore,no_run
4955    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4956    /// use google_cloud_bigtable_admin_v2::model::Table;
4957    /// let x = UpdateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
4958    /// let x = UpdateTableRequest::new().set_or_clear_table(None::<Table>);
4959    /// ```
4960    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4961    where
4962        T: std::convert::Into<crate::model::Table>,
4963    {
4964        self.table = v.map(|x| x.into());
4965        self
4966    }
4967
4968    /// Sets the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
4969    ///
4970    /// # Example
4971    /// ```ignore,no_run
4972    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4973    /// use wkt::FieldMask;
4974    /// let x = UpdateTableRequest::new().set_update_mask(FieldMask::default()/* use setters */);
4975    /// ```
4976    pub fn set_update_mask<T>(mut self, v: T) -> Self
4977    where
4978        T: std::convert::Into<wkt::FieldMask>,
4979    {
4980        self.update_mask = std::option::Option::Some(v.into());
4981        self
4982    }
4983
4984    /// Sets or clears the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
4985    ///
4986    /// # Example
4987    /// ```ignore,no_run
4988    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
4989    /// use wkt::FieldMask;
4990    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
4991    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(None::<FieldMask>);
4992    /// ```
4993    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4994    where
4995        T: std::convert::Into<wkt::FieldMask>,
4996    {
4997        self.update_mask = v.map(|x| x.into());
4998        self
4999    }
5000
5001    /// Sets the value of [ignore_warnings][crate::model::UpdateTableRequest::ignore_warnings].
5002    ///
5003    /// # Example
5004    /// ```ignore,no_run
5005    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5006    /// let x = UpdateTableRequest::new().set_ignore_warnings(true);
5007    /// ```
5008    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5009        self.ignore_warnings = v.into();
5010        self
5011    }
5012}
5013
5014impl wkt::message::Message for UpdateTableRequest {
5015    fn typename() -> &'static str {
5016        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableRequest"
5017    }
5018}
5019
5020/// Metadata type for the operation returned by
5021/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
5022///
5023/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
5024#[derive(Clone, Default, PartialEq)]
5025#[non_exhaustive]
5026pub struct UpdateTableMetadata {
5027    /// The name of the table being updated.
5028    pub name: std::string::String,
5029
5030    /// The time at which this operation started.
5031    pub start_time: std::option::Option<wkt::Timestamp>,
5032
5033    /// If set, the time at which this operation finished or was canceled.
5034    pub end_time: std::option::Option<wkt::Timestamp>,
5035
5036    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5037}
5038
5039impl UpdateTableMetadata {
5040    /// Creates a new default instance.
5041    pub fn new() -> Self {
5042        std::default::Default::default()
5043    }
5044
5045    /// Sets the value of [name][crate::model::UpdateTableMetadata::name].
5046    ///
5047    /// # Example
5048    /// ```ignore,no_run
5049    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5050    /// let x = UpdateTableMetadata::new().set_name("example");
5051    /// ```
5052    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5053        self.name = v.into();
5054        self
5055    }
5056
5057    /// Sets the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5058    ///
5059    /// # Example
5060    /// ```ignore,no_run
5061    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5062    /// use wkt::Timestamp;
5063    /// let x = UpdateTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5064    /// ```
5065    pub fn set_start_time<T>(mut self, v: T) -> Self
5066    where
5067        T: std::convert::Into<wkt::Timestamp>,
5068    {
5069        self.start_time = std::option::Option::Some(v.into());
5070        self
5071    }
5072
5073    /// Sets or clears the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5074    ///
5075    /// # Example
5076    /// ```ignore,no_run
5077    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5078    /// use wkt::Timestamp;
5079    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5080    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5081    /// ```
5082    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5083    where
5084        T: std::convert::Into<wkt::Timestamp>,
5085    {
5086        self.start_time = v.map(|x| x.into());
5087        self
5088    }
5089
5090    /// Sets the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5091    ///
5092    /// # Example
5093    /// ```ignore,no_run
5094    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5095    /// use wkt::Timestamp;
5096    /// let x = UpdateTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5097    /// ```
5098    pub fn set_end_time<T>(mut self, v: T) -> Self
5099    where
5100        T: std::convert::Into<wkt::Timestamp>,
5101    {
5102        self.end_time = std::option::Option::Some(v.into());
5103        self
5104    }
5105
5106    /// Sets or clears the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5107    ///
5108    /// # Example
5109    /// ```ignore,no_run
5110    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5111    /// use wkt::Timestamp;
5112    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5113    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5114    /// ```
5115    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5116    where
5117        T: std::convert::Into<wkt::Timestamp>,
5118    {
5119        self.end_time = v.map(|x| x.into());
5120        self
5121    }
5122}
5123
5124impl wkt::message::Message for UpdateTableMetadata {
5125    fn typename() -> &'static str {
5126        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableMetadata"
5127    }
5128}
5129
5130/// Request message for
5131/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
5132///
5133/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]: crate::client::BigtableTableAdmin::delete_table
5134#[derive(Clone, Default, PartialEq)]
5135#[non_exhaustive]
5136pub struct DeleteTableRequest {
5137    /// Required. The unique name of the table to be deleted.
5138    /// Values are of the form
5139    /// `projects/{project}/instances/{instance}/tables/{table}`.
5140    pub name: std::string::String,
5141
5142    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5143}
5144
5145impl DeleteTableRequest {
5146    /// Creates a new default instance.
5147    pub fn new() -> Self {
5148        std::default::Default::default()
5149    }
5150
5151    /// Sets the value of [name][crate::model::DeleteTableRequest::name].
5152    ///
5153    /// # Example
5154    /// ```ignore,no_run
5155    /// # use google_cloud_bigtable_admin_v2::model::DeleteTableRequest;
5156    /// let x = DeleteTableRequest::new().set_name("example");
5157    /// ```
5158    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5159        self.name = v.into();
5160        self
5161    }
5162}
5163
5164impl wkt::message::Message for DeleteTableRequest {
5165    fn typename() -> &'static str {
5166        "type.googleapis.com/google.bigtable.admin.v2.DeleteTableRequest"
5167    }
5168}
5169
5170/// Request message for
5171/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
5172///
5173/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5174#[derive(Clone, Default, PartialEq)]
5175#[non_exhaustive]
5176pub struct UndeleteTableRequest {
5177    /// Required. The unique name of the table to be restored.
5178    /// Values are of the form
5179    /// `projects/{project}/instances/{instance}/tables/{table}`.
5180    pub name: std::string::String,
5181
5182    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5183}
5184
5185impl UndeleteTableRequest {
5186    /// Creates a new default instance.
5187    pub fn new() -> Self {
5188        std::default::Default::default()
5189    }
5190
5191    /// Sets the value of [name][crate::model::UndeleteTableRequest::name].
5192    ///
5193    /// # Example
5194    /// ```ignore,no_run
5195    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableRequest;
5196    /// let x = UndeleteTableRequest::new().set_name("example");
5197    /// ```
5198    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5199        self.name = v.into();
5200        self
5201    }
5202}
5203
5204impl wkt::message::Message for UndeleteTableRequest {
5205    fn typename() -> &'static str {
5206        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableRequest"
5207    }
5208}
5209
5210/// Metadata type for the operation returned by
5211/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
5212///
5213/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5214#[derive(Clone, Default, PartialEq)]
5215#[non_exhaustive]
5216pub struct UndeleteTableMetadata {
5217    /// The name of the table being restored.
5218    pub name: std::string::String,
5219
5220    /// The time at which this operation started.
5221    pub start_time: std::option::Option<wkt::Timestamp>,
5222
5223    /// If set, the time at which this operation finished or was cancelled.
5224    pub end_time: std::option::Option<wkt::Timestamp>,
5225
5226    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5227}
5228
5229impl UndeleteTableMetadata {
5230    /// Creates a new default instance.
5231    pub fn new() -> Self {
5232        std::default::Default::default()
5233    }
5234
5235    /// Sets the value of [name][crate::model::UndeleteTableMetadata::name].
5236    ///
5237    /// # Example
5238    /// ```ignore,no_run
5239    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5240    /// let x = UndeleteTableMetadata::new().set_name("example");
5241    /// ```
5242    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5243        self.name = v.into();
5244        self
5245    }
5246
5247    /// Sets the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5248    ///
5249    /// # Example
5250    /// ```ignore,no_run
5251    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5252    /// use wkt::Timestamp;
5253    /// let x = UndeleteTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5254    /// ```
5255    pub fn set_start_time<T>(mut self, v: T) -> Self
5256    where
5257        T: std::convert::Into<wkt::Timestamp>,
5258    {
5259        self.start_time = std::option::Option::Some(v.into());
5260        self
5261    }
5262
5263    /// Sets or clears the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5264    ///
5265    /// # Example
5266    /// ```ignore,no_run
5267    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5268    /// use wkt::Timestamp;
5269    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5270    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5271    /// ```
5272    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5273    where
5274        T: std::convert::Into<wkt::Timestamp>,
5275    {
5276        self.start_time = v.map(|x| x.into());
5277        self
5278    }
5279
5280    /// Sets the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5281    ///
5282    /// # Example
5283    /// ```ignore,no_run
5284    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5285    /// use wkt::Timestamp;
5286    /// let x = UndeleteTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5287    /// ```
5288    pub fn set_end_time<T>(mut self, v: T) -> Self
5289    where
5290        T: std::convert::Into<wkt::Timestamp>,
5291    {
5292        self.end_time = std::option::Option::Some(v.into());
5293        self
5294    }
5295
5296    /// Sets or clears the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5297    ///
5298    /// # Example
5299    /// ```ignore,no_run
5300    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5301    /// use wkt::Timestamp;
5302    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5303    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5304    /// ```
5305    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5306    where
5307        T: std::convert::Into<wkt::Timestamp>,
5308    {
5309        self.end_time = v.map(|x| x.into());
5310        self
5311    }
5312}
5313
5314impl wkt::message::Message for UndeleteTableMetadata {
5315    fn typename() -> &'static str {
5316        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableMetadata"
5317    }
5318}
5319
5320/// Request message for
5321/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
5322///
5323/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]: crate::client::BigtableTableAdmin::modify_column_families
5324#[derive(Clone, Default, PartialEq)]
5325#[non_exhaustive]
5326pub struct ModifyColumnFamiliesRequest {
5327    /// Required. The unique name of the table whose families should be modified.
5328    /// Values are of the form
5329    /// `projects/{project}/instances/{instance}/tables/{table}`.
5330    pub name: std::string::String,
5331
5332    /// Required. Modifications to be atomically applied to the specified table's
5333    /// families. Entries are applied in order, meaning that earlier modifications
5334    /// can be masked by later ones (in the case of repeated updates to the same
5335    /// family, for example).
5336    pub modifications: std::vec::Vec<crate::model::modify_column_families_request::Modification>,
5337
5338    /// Optional. If true, ignore safety checks when modifying the column families.
5339    pub ignore_warnings: bool,
5340
5341    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5342}
5343
5344impl ModifyColumnFamiliesRequest {
5345    /// Creates a new default instance.
5346    pub fn new() -> Self {
5347        std::default::Default::default()
5348    }
5349
5350    /// Sets the value of [name][crate::model::ModifyColumnFamiliesRequest::name].
5351    ///
5352    /// # Example
5353    /// ```ignore,no_run
5354    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5355    /// let x = ModifyColumnFamiliesRequest::new().set_name("example");
5356    /// ```
5357    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5358        self.name = v.into();
5359        self
5360    }
5361
5362    /// Sets the value of [modifications][crate::model::ModifyColumnFamiliesRequest::modifications].
5363    ///
5364    /// # Example
5365    /// ```ignore,no_run
5366    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5367    /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5368    /// let x = ModifyColumnFamiliesRequest::new()
5369    ///     .set_modifications([
5370    ///         Modification::default()/* use setters */,
5371    ///         Modification::default()/* use (different) setters */,
5372    ///     ]);
5373    /// ```
5374    pub fn set_modifications<T, V>(mut self, v: T) -> Self
5375    where
5376        T: std::iter::IntoIterator<Item = V>,
5377        V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
5378    {
5379        use std::iter::Iterator;
5380        self.modifications = v.into_iter().map(|i| i.into()).collect();
5381        self
5382    }
5383
5384    /// Sets the value of [ignore_warnings][crate::model::ModifyColumnFamiliesRequest::ignore_warnings].
5385    ///
5386    /// # Example
5387    /// ```ignore,no_run
5388    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5389    /// let x = ModifyColumnFamiliesRequest::new().set_ignore_warnings(true);
5390    /// ```
5391    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5392        self.ignore_warnings = v.into();
5393        self
5394    }
5395}
5396
5397impl wkt::message::Message for ModifyColumnFamiliesRequest {
5398    fn typename() -> &'static str {
5399        "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest"
5400    }
5401}
5402
5403/// Defines additional types related to [ModifyColumnFamiliesRequest].
5404pub mod modify_column_families_request {
5405    #[allow(unused_imports)]
5406    use super::*;
5407
5408    /// A create, update, or delete of a particular column family.
5409    #[derive(Clone, Default, PartialEq)]
5410    #[non_exhaustive]
5411    pub struct Modification {
5412        /// The ID of the column family to be modified.
5413        pub id: std::string::String,
5414
5415        /// Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update`
5416        /// mod should be updated, ignored for other modification types. If unset or
5417        /// empty, we treat it as updating `gc_rule` to be backward compatible.
5418        pub update_mask: std::option::Option<wkt::FieldMask>,
5419
5420        /// Column family modifications.
5421        pub r#mod:
5422            std::option::Option<crate::model::modify_column_families_request::modification::Mod>,
5423
5424        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5425    }
5426
5427    impl Modification {
5428        /// Creates a new default instance.
5429        pub fn new() -> Self {
5430            std::default::Default::default()
5431        }
5432
5433        /// Sets the value of [id][crate::model::modify_column_families_request::Modification::id].
5434        ///
5435        /// # Example
5436        /// ```ignore,no_run
5437        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5438        /// let x = Modification::new().set_id("example");
5439        /// ```
5440        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5441            self.id = v.into();
5442            self
5443        }
5444
5445        /// Sets the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5446        ///
5447        /// # Example
5448        /// ```ignore,no_run
5449        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5450        /// use wkt::FieldMask;
5451        /// let x = Modification::new().set_update_mask(FieldMask::default()/* use setters */);
5452        /// ```
5453        pub fn set_update_mask<T>(mut self, v: T) -> Self
5454        where
5455            T: std::convert::Into<wkt::FieldMask>,
5456        {
5457            self.update_mask = std::option::Option::Some(v.into());
5458            self
5459        }
5460
5461        /// Sets or clears the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5462        ///
5463        /// # Example
5464        /// ```ignore,no_run
5465        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5466        /// use wkt::FieldMask;
5467        /// let x = Modification::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5468        /// let x = Modification::new().set_or_clear_update_mask(None::<FieldMask>);
5469        /// ```
5470        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5471        where
5472            T: std::convert::Into<wkt::FieldMask>,
5473        {
5474            self.update_mask = v.map(|x| x.into());
5475            self
5476        }
5477
5478        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::mod].
5479        ///
5480        /// Note that all the setters affecting `r#mod` are mutually
5481        /// exclusive.
5482        ///
5483        /// # Example
5484        /// ```ignore,no_run
5485        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5486        /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::modification::Mod;
5487        /// let x = Modification::new().set_mod(Some(Mod::Drop(true)));
5488        /// ```
5489        pub fn set_mod<
5490            T: std::convert::Into<
5491                    std::option::Option<
5492                        crate::model::modify_column_families_request::modification::Mod,
5493                    >,
5494                >,
5495        >(
5496            mut self,
5497            v: T,
5498        ) -> Self {
5499            self.r#mod = v.into();
5500            self
5501        }
5502
5503        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5504        /// if it holds a `Create`, `None` if the field is not set or
5505        /// holds a different branch.
5506        pub fn create(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
5507            #[allow(unreachable_patterns)]
5508            self.r#mod.as_ref().and_then(|v| match v {
5509                crate::model::modify_column_families_request::modification::Mod::Create(v) => {
5510                    std::option::Option::Some(v)
5511                }
5512                _ => std::option::Option::None,
5513            })
5514        }
5515
5516        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5517        /// to hold a `Create`.
5518        ///
5519        /// Note that all the setters affecting `r#mod` are
5520        /// mutually exclusive.
5521        ///
5522        /// # Example
5523        /// ```ignore,no_run
5524        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5525        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
5526        /// let x = Modification::new().set_create(ColumnFamily::default()/* use setters */);
5527        /// assert!(x.create().is_some());
5528        /// assert!(x.update().is_none());
5529        /// assert!(x.drop().is_none());
5530        /// ```
5531        pub fn set_create<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
5532            mut self,
5533            v: T,
5534        ) -> Self {
5535            self.r#mod = std::option::Option::Some(
5536                crate::model::modify_column_families_request::modification::Mod::Create(v.into()),
5537            );
5538            self
5539        }
5540
5541        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5542        /// if it holds a `Update`, `None` if the field is not set or
5543        /// holds a different branch.
5544        pub fn update(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
5545            #[allow(unreachable_patterns)]
5546            self.r#mod.as_ref().and_then(|v| match v {
5547                crate::model::modify_column_families_request::modification::Mod::Update(v) => {
5548                    std::option::Option::Some(v)
5549                }
5550                _ => std::option::Option::None,
5551            })
5552        }
5553
5554        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5555        /// to hold a `Update`.
5556        ///
5557        /// Note that all the setters affecting `r#mod` are
5558        /// mutually exclusive.
5559        ///
5560        /// # Example
5561        /// ```ignore,no_run
5562        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5563        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
5564        /// let x = Modification::new().set_update(ColumnFamily::default()/* use setters */);
5565        /// assert!(x.update().is_some());
5566        /// assert!(x.create().is_none());
5567        /// assert!(x.drop().is_none());
5568        /// ```
5569        pub fn set_update<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
5570            mut self,
5571            v: T,
5572        ) -> Self {
5573            self.r#mod = std::option::Option::Some(
5574                crate::model::modify_column_families_request::modification::Mod::Update(v.into()),
5575            );
5576            self
5577        }
5578
5579        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5580        /// if it holds a `Drop`, `None` if the field is not set or
5581        /// holds a different branch.
5582        pub fn drop(&self) -> std::option::Option<&bool> {
5583            #[allow(unreachable_patterns)]
5584            self.r#mod.as_ref().and_then(|v| match v {
5585                crate::model::modify_column_families_request::modification::Mod::Drop(v) => {
5586                    std::option::Option::Some(v)
5587                }
5588                _ => std::option::Option::None,
5589            })
5590        }
5591
5592        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5593        /// to hold a `Drop`.
5594        ///
5595        /// Note that all the setters affecting `r#mod` are
5596        /// mutually exclusive.
5597        ///
5598        /// # Example
5599        /// ```ignore,no_run
5600        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5601        /// let x = Modification::new().set_drop(true);
5602        /// assert!(x.drop().is_some());
5603        /// assert!(x.create().is_none());
5604        /// assert!(x.update().is_none());
5605        /// ```
5606        pub fn set_drop<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5607            self.r#mod = std::option::Option::Some(
5608                crate::model::modify_column_families_request::modification::Mod::Drop(v.into()),
5609            );
5610            self
5611        }
5612    }
5613
5614    impl wkt::message::Message for Modification {
5615        fn typename() -> &'static str {
5616            "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification"
5617        }
5618    }
5619
5620    /// Defines additional types related to [Modification].
5621    pub mod modification {
5622        #[allow(unused_imports)]
5623        use super::*;
5624
5625        /// Column family modifications.
5626        #[derive(Clone, Debug, PartialEq)]
5627        #[non_exhaustive]
5628        pub enum Mod {
5629            /// Create a new column family with the specified schema, or fail if
5630            /// one already exists with the given ID.
5631            Create(std::boxed::Box<crate::model::ColumnFamily>),
5632            /// Update an existing column family to the specified schema, or fail
5633            /// if no column family exists with the given ID.
5634            Update(std::boxed::Box<crate::model::ColumnFamily>),
5635            /// Drop (delete) the column family with the given ID, or fail if no such
5636            /// family exists.
5637            Drop(bool),
5638        }
5639    }
5640}
5641
5642/// Request message for
5643/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
5644///
5645/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
5646#[derive(Clone, Default, PartialEq)]
5647#[non_exhaustive]
5648pub struct GenerateConsistencyTokenRequest {
5649    /// Required. The unique name of the Table for which to create a consistency
5650    /// token. Values are of the form
5651    /// `projects/{project}/instances/{instance}/tables/{table}`.
5652    pub name: std::string::String,
5653
5654    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5655}
5656
5657impl GenerateConsistencyTokenRequest {
5658    /// Creates a new default instance.
5659    pub fn new() -> Self {
5660        std::default::Default::default()
5661    }
5662
5663    /// Sets the value of [name][crate::model::GenerateConsistencyTokenRequest::name].
5664    ///
5665    /// # Example
5666    /// ```ignore,no_run
5667    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenRequest;
5668    /// let x = GenerateConsistencyTokenRequest::new().set_name("example");
5669    /// ```
5670    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5671        self.name = v.into();
5672        self
5673    }
5674}
5675
5676impl wkt::message::Message for GenerateConsistencyTokenRequest {
5677    fn typename() -> &'static str {
5678        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenRequest"
5679    }
5680}
5681
5682/// Response message for
5683/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
5684///
5685/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
5686#[derive(Clone, Default, PartialEq)]
5687#[non_exhaustive]
5688pub struct GenerateConsistencyTokenResponse {
5689    /// The generated consistency token.
5690    pub consistency_token: std::string::String,
5691
5692    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5693}
5694
5695impl GenerateConsistencyTokenResponse {
5696    /// Creates a new default instance.
5697    pub fn new() -> Self {
5698        std::default::Default::default()
5699    }
5700
5701    /// Sets the value of [consistency_token][crate::model::GenerateConsistencyTokenResponse::consistency_token].
5702    ///
5703    /// # Example
5704    /// ```ignore,no_run
5705    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenResponse;
5706    /// let x = GenerateConsistencyTokenResponse::new().set_consistency_token("example");
5707    /// ```
5708    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
5709        mut self,
5710        v: T,
5711    ) -> Self {
5712        self.consistency_token = v.into();
5713        self
5714    }
5715}
5716
5717impl wkt::message::Message for GenerateConsistencyTokenResponse {
5718    fn typename() -> &'static str {
5719        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenResponse"
5720    }
5721}
5722
5723/// Request message for
5724/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
5725///
5726/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
5727#[derive(Clone, Default, PartialEq)]
5728#[non_exhaustive]
5729pub struct CheckConsistencyRequest {
5730    /// Required. The unique name of the Table for which to check replication
5731    /// consistency. Values are of the form
5732    /// `projects/{project}/instances/{instance}/tables/{table}`.
5733    pub name: std::string::String,
5734
5735    /// Required. The token created using GenerateConsistencyToken for the Table.
5736    pub consistency_token: std::string::String,
5737
5738    /// Which type of read needs to consistently observe which type of write?
5739    /// Default: `standard_read_remote_writes`
5740    pub mode: std::option::Option<crate::model::check_consistency_request::Mode>,
5741
5742    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5743}
5744
5745impl CheckConsistencyRequest {
5746    /// Creates a new default instance.
5747    pub fn new() -> Self {
5748        std::default::Default::default()
5749    }
5750
5751    /// Sets the value of [name][crate::model::CheckConsistencyRequest::name].
5752    ///
5753    /// # Example
5754    /// ```ignore,no_run
5755    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5756    /// let x = CheckConsistencyRequest::new().set_name("example");
5757    /// ```
5758    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5759        self.name = v.into();
5760        self
5761    }
5762
5763    /// Sets the value of [consistency_token][crate::model::CheckConsistencyRequest::consistency_token].
5764    ///
5765    /// # Example
5766    /// ```ignore,no_run
5767    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5768    /// let x = CheckConsistencyRequest::new().set_consistency_token("example");
5769    /// ```
5770    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
5771        mut self,
5772        v: T,
5773    ) -> Self {
5774        self.consistency_token = v.into();
5775        self
5776    }
5777
5778    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode].
5779    ///
5780    /// Note that all the setters affecting `mode` are mutually
5781    /// exclusive.
5782    ///
5783    /// # Example
5784    /// ```ignore,no_run
5785    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5786    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
5787    /// let x = CheckConsistencyRequest::new().set_mode(Some(
5788    ///     google_cloud_bigtable_admin_v2::model::check_consistency_request::Mode::StandardReadRemoteWrites(StandardReadRemoteWrites::default().into())));
5789    /// ```
5790    pub fn set_mode<
5791        T: std::convert::Into<std::option::Option<crate::model::check_consistency_request::Mode>>,
5792    >(
5793        mut self,
5794        v: T,
5795    ) -> Self {
5796        self.mode = v.into();
5797        self
5798    }
5799
5800    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
5801    /// if it holds a `StandardReadRemoteWrites`, `None` if the field is not set or
5802    /// holds a different branch.
5803    pub fn standard_read_remote_writes(
5804        &self,
5805    ) -> std::option::Option<&std::boxed::Box<crate::model::StandardReadRemoteWrites>> {
5806        #[allow(unreachable_patterns)]
5807        self.mode.as_ref().and_then(|v| match v {
5808            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v) => {
5809                std::option::Option::Some(v)
5810            }
5811            _ => std::option::Option::None,
5812        })
5813    }
5814
5815    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5816    /// to hold a `StandardReadRemoteWrites`.
5817    ///
5818    /// Note that all the setters affecting `mode` are
5819    /// mutually exclusive.
5820    ///
5821    /// # Example
5822    /// ```ignore,no_run
5823    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5824    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
5825    /// let x = CheckConsistencyRequest::new().set_standard_read_remote_writes(StandardReadRemoteWrites::default()/* use setters */);
5826    /// assert!(x.standard_read_remote_writes().is_some());
5827    /// assert!(x.data_boost_read_local_writes().is_none());
5828    /// ```
5829    pub fn set_standard_read_remote_writes<
5830        T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
5831    >(
5832        mut self,
5833        v: T,
5834    ) -> Self {
5835        self.mode = std::option::Option::Some(
5836            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v.into()),
5837        );
5838        self
5839    }
5840
5841    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
5842    /// if it holds a `DataBoostReadLocalWrites`, `None` if the field is not set or
5843    /// holds a different branch.
5844    pub fn data_boost_read_local_writes(
5845        &self,
5846    ) -> std::option::Option<&std::boxed::Box<crate::model::DataBoostReadLocalWrites>> {
5847        #[allow(unreachable_patterns)]
5848        self.mode.as_ref().and_then(|v| match v {
5849            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v) => {
5850                std::option::Option::Some(v)
5851            }
5852            _ => std::option::Option::None,
5853        })
5854    }
5855
5856    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5857    /// to hold a `DataBoostReadLocalWrites`.
5858    ///
5859    /// Note that all the setters affecting `mode` are
5860    /// mutually exclusive.
5861    ///
5862    /// # Example
5863    /// ```ignore,no_run
5864    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5865    /// use google_cloud_bigtable_admin_v2::model::DataBoostReadLocalWrites;
5866    /// let x = CheckConsistencyRequest::new().set_data_boost_read_local_writes(DataBoostReadLocalWrites::default()/* use setters */);
5867    /// assert!(x.data_boost_read_local_writes().is_some());
5868    /// assert!(x.standard_read_remote_writes().is_none());
5869    /// ```
5870    pub fn set_data_boost_read_local_writes<
5871        T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
5872    >(
5873        mut self,
5874        v: T,
5875    ) -> Self {
5876        self.mode = std::option::Option::Some(
5877            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v.into()),
5878        );
5879        self
5880    }
5881}
5882
5883impl wkt::message::Message for CheckConsistencyRequest {
5884    fn typename() -> &'static str {
5885        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyRequest"
5886    }
5887}
5888
5889/// Defines additional types related to [CheckConsistencyRequest].
5890pub mod check_consistency_request {
5891    #[allow(unused_imports)]
5892    use super::*;
5893
5894    /// Which type of read needs to consistently observe which type of write?
5895    /// Default: `standard_read_remote_writes`
5896    #[derive(Clone, Debug, PartialEq)]
5897    #[non_exhaustive]
5898    pub enum Mode {
5899        /// Checks that reads using an app profile with `StandardIsolation` can
5900        /// see all writes committed before the token was created, even if the
5901        /// read and write target different clusters.
5902        StandardReadRemoteWrites(std::boxed::Box<crate::model::StandardReadRemoteWrites>),
5903        /// Checks that reads using an app profile with `DataBoostIsolationReadOnly`
5904        /// can see all writes committed before the token was created, but only if
5905        /// the read and write target the same cluster.
5906        DataBoostReadLocalWrites(std::boxed::Box<crate::model::DataBoostReadLocalWrites>),
5907    }
5908}
5909
5910/// Checks that all writes before the consistency token was generated are
5911/// replicated in every cluster and readable.
5912#[derive(Clone, Default, PartialEq)]
5913#[non_exhaustive]
5914pub struct StandardReadRemoteWrites {
5915    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5916}
5917
5918impl StandardReadRemoteWrites {
5919    /// Creates a new default instance.
5920    pub fn new() -> Self {
5921        std::default::Default::default()
5922    }
5923}
5924
5925impl wkt::message::Message for StandardReadRemoteWrites {
5926    fn typename() -> &'static str {
5927        "type.googleapis.com/google.bigtable.admin.v2.StandardReadRemoteWrites"
5928    }
5929}
5930
5931/// Checks that all writes before the consistency token was generated in the same
5932/// cluster are readable by Databoost.
5933#[derive(Clone, Default, PartialEq)]
5934#[non_exhaustive]
5935pub struct DataBoostReadLocalWrites {
5936    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5937}
5938
5939impl DataBoostReadLocalWrites {
5940    /// Creates a new default instance.
5941    pub fn new() -> Self {
5942        std::default::Default::default()
5943    }
5944}
5945
5946impl wkt::message::Message for DataBoostReadLocalWrites {
5947    fn typename() -> &'static str {
5948        "type.googleapis.com/google.bigtable.admin.v2.DataBoostReadLocalWrites"
5949    }
5950}
5951
5952/// Response message for
5953/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
5954///
5955/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
5956#[derive(Clone, Default, PartialEq)]
5957#[non_exhaustive]
5958pub struct CheckConsistencyResponse {
5959    /// True only if the token is consistent. A token is consistent if replication
5960    /// has caught up with the restrictions specified in the request.
5961    pub consistent: bool,
5962
5963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5964}
5965
5966impl CheckConsistencyResponse {
5967    /// Creates a new default instance.
5968    pub fn new() -> Self {
5969        std::default::Default::default()
5970    }
5971
5972    /// Sets the value of [consistent][crate::model::CheckConsistencyResponse::consistent].
5973    ///
5974    /// # Example
5975    /// ```ignore,no_run
5976    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyResponse;
5977    /// let x = CheckConsistencyResponse::new().set_consistent(true);
5978    /// ```
5979    pub fn set_consistent<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5980        self.consistent = v.into();
5981        self
5982    }
5983}
5984
5985impl wkt::message::Message for CheckConsistencyResponse {
5986    fn typename() -> &'static str {
5987        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyResponse"
5988    }
5989}
5990
5991/// Request message for
5992/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
5993///
5994/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
5995/// feature is not currently available to most Cloud Bigtable customers. This
5996/// feature might be changed in backward-incompatible ways and is not recommended
5997/// for production use. It is not subject to any SLA or deprecation policy.
5998///
5999/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]: crate::client::BigtableTableAdmin::snapshot_table
6000#[derive(Clone, Default, PartialEq)]
6001#[non_exhaustive]
6002pub struct SnapshotTableRequest {
6003    /// Required. The unique name of the table to have the snapshot taken.
6004    /// Values are of the form
6005    /// `projects/{project}/instances/{instance}/tables/{table}`.
6006    pub name: std::string::String,
6007
6008    /// Required. The name of the cluster where the snapshot will be created in.
6009    /// Values are of the form
6010    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
6011    pub cluster: std::string::String,
6012
6013    /// Required. The ID by which the new snapshot should be referred to within the
6014    /// parent cluster, e.g., `mysnapshot` of the form:
6015    /// `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than
6016    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
6017    pub snapshot_id: std::string::String,
6018
6019    /// The amount of time that the new snapshot can stay active after it is
6020    /// created. Once 'ttl' expires, the snapshot will get deleted. The maximum
6021    /// amount of time a snapshot can stay active is 7 days. If 'ttl' is not
6022    /// specified, the default value of 24 hours will be used.
6023    pub ttl: std::option::Option<wkt::Duration>,
6024
6025    /// Description of the snapshot.
6026    pub description: std::string::String,
6027
6028    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6029}
6030
6031impl SnapshotTableRequest {
6032    /// Creates a new default instance.
6033    pub fn new() -> Self {
6034        std::default::Default::default()
6035    }
6036
6037    /// Sets the value of [name][crate::model::SnapshotTableRequest::name].
6038    ///
6039    /// # Example
6040    /// ```ignore,no_run
6041    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6042    /// let x = SnapshotTableRequest::new().set_name("example");
6043    /// ```
6044    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6045        self.name = v.into();
6046        self
6047    }
6048
6049    /// Sets the value of [cluster][crate::model::SnapshotTableRequest::cluster].
6050    ///
6051    /// # Example
6052    /// ```ignore,no_run
6053    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6054    /// let x = SnapshotTableRequest::new().set_cluster("example");
6055    /// ```
6056    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6057        self.cluster = v.into();
6058        self
6059    }
6060
6061    /// Sets the value of [snapshot_id][crate::model::SnapshotTableRequest::snapshot_id].
6062    ///
6063    /// # Example
6064    /// ```ignore,no_run
6065    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6066    /// let x = SnapshotTableRequest::new().set_snapshot_id("example");
6067    /// ```
6068    pub fn set_snapshot_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6069        self.snapshot_id = v.into();
6070        self
6071    }
6072
6073    /// Sets the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6074    ///
6075    /// # Example
6076    /// ```ignore,no_run
6077    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6078    /// use wkt::Duration;
6079    /// let x = SnapshotTableRequest::new().set_ttl(Duration::default()/* use setters */);
6080    /// ```
6081    pub fn set_ttl<T>(mut self, v: T) -> Self
6082    where
6083        T: std::convert::Into<wkt::Duration>,
6084    {
6085        self.ttl = std::option::Option::Some(v.into());
6086        self
6087    }
6088
6089    /// Sets or clears the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6090    ///
6091    /// # Example
6092    /// ```ignore,no_run
6093    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6094    /// use wkt::Duration;
6095    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(Some(Duration::default()/* use setters */));
6096    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(None::<Duration>);
6097    /// ```
6098    pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
6099    where
6100        T: std::convert::Into<wkt::Duration>,
6101    {
6102        self.ttl = v.map(|x| x.into());
6103        self
6104    }
6105
6106    /// Sets the value of [description][crate::model::SnapshotTableRequest::description].
6107    ///
6108    /// # Example
6109    /// ```ignore,no_run
6110    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6111    /// let x = SnapshotTableRequest::new().set_description("example");
6112    /// ```
6113    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6114        self.description = v.into();
6115        self
6116    }
6117}
6118
6119impl wkt::message::Message for SnapshotTableRequest {
6120    fn typename() -> &'static str {
6121        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableRequest"
6122    }
6123}
6124
6125/// Request message for
6126/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
6127///
6128/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6129/// feature is not currently available to most Cloud Bigtable customers. This
6130/// feature might be changed in backward-incompatible ways and is not recommended
6131/// for production use. It is not subject to any SLA or deprecation policy.
6132///
6133/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]: crate::client::BigtableTableAdmin::get_snapshot
6134#[derive(Clone, Default, PartialEq)]
6135#[non_exhaustive]
6136pub struct GetSnapshotRequest {
6137    /// Required. The unique name of the requested snapshot.
6138    /// Values are of the form
6139    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6140    pub name: std::string::String,
6141
6142    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6143}
6144
6145impl GetSnapshotRequest {
6146    /// Creates a new default instance.
6147    pub fn new() -> Self {
6148        std::default::Default::default()
6149    }
6150
6151    /// Sets the value of [name][crate::model::GetSnapshotRequest::name].
6152    ///
6153    /// # Example
6154    /// ```ignore,no_run
6155    /// # use google_cloud_bigtable_admin_v2::model::GetSnapshotRequest;
6156    /// let x = GetSnapshotRequest::new().set_name("example");
6157    /// ```
6158    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6159        self.name = v.into();
6160        self
6161    }
6162}
6163
6164impl wkt::message::Message for GetSnapshotRequest {
6165    fn typename() -> &'static str {
6166        "type.googleapis.com/google.bigtable.admin.v2.GetSnapshotRequest"
6167    }
6168}
6169
6170/// Request message for
6171/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6172///
6173/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6174/// feature is not currently available to most Cloud Bigtable customers. This
6175/// feature might be changed in backward-incompatible ways and is not recommended
6176/// for production use. It is not subject to any SLA or deprecation policy.
6177///
6178/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6179#[derive(Clone, Default, PartialEq)]
6180#[non_exhaustive]
6181pub struct ListSnapshotsRequest {
6182    /// Required. The unique name of the cluster for which snapshots should be
6183    /// listed. Values are of the form
6184    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
6185    /// Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
6186    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
6187    pub parent: std::string::String,
6188
6189    /// The maximum number of snapshots to return per page.
6190    /// CURRENTLY UNIMPLEMENTED AND IGNORED.
6191    pub page_size: i32,
6192
6193    /// The value of `next_page_token` returned by a previous call.
6194    pub page_token: std::string::String,
6195
6196    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6197}
6198
6199impl ListSnapshotsRequest {
6200    /// Creates a new default instance.
6201    pub fn new() -> Self {
6202        std::default::Default::default()
6203    }
6204
6205    /// Sets the value of [parent][crate::model::ListSnapshotsRequest::parent].
6206    ///
6207    /// # Example
6208    /// ```ignore,no_run
6209    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6210    /// let x = ListSnapshotsRequest::new().set_parent("example");
6211    /// ```
6212    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6213        self.parent = v.into();
6214        self
6215    }
6216
6217    /// Sets the value of [page_size][crate::model::ListSnapshotsRequest::page_size].
6218    ///
6219    /// # Example
6220    /// ```ignore,no_run
6221    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6222    /// let x = ListSnapshotsRequest::new().set_page_size(42);
6223    /// ```
6224    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6225        self.page_size = v.into();
6226        self
6227    }
6228
6229    /// Sets the value of [page_token][crate::model::ListSnapshotsRequest::page_token].
6230    ///
6231    /// # Example
6232    /// ```ignore,no_run
6233    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6234    /// let x = ListSnapshotsRequest::new().set_page_token("example");
6235    /// ```
6236    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6237        self.page_token = v.into();
6238        self
6239    }
6240}
6241
6242impl wkt::message::Message for ListSnapshotsRequest {
6243    fn typename() -> &'static str {
6244        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsRequest"
6245    }
6246}
6247
6248/// Response message for
6249/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6250///
6251/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6252/// feature is not currently available to most Cloud Bigtable customers. This
6253/// feature might be changed in backward-incompatible ways and is not recommended
6254/// for production use. It is not subject to any SLA or deprecation policy.
6255///
6256/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6257#[derive(Clone, Default, PartialEq)]
6258#[non_exhaustive]
6259pub struct ListSnapshotsResponse {
6260    /// The snapshots present in the requested cluster.
6261    pub snapshots: std::vec::Vec<crate::model::Snapshot>,
6262
6263    /// Set if not all snapshots could be returned in a single response.
6264    /// Pass this value to `page_token` in another request to get the next
6265    /// page of results.
6266    pub next_page_token: std::string::String,
6267
6268    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6269}
6270
6271impl ListSnapshotsResponse {
6272    /// Creates a new default instance.
6273    pub fn new() -> Self {
6274        std::default::Default::default()
6275    }
6276
6277    /// Sets the value of [snapshots][crate::model::ListSnapshotsResponse::snapshots].
6278    ///
6279    /// # Example
6280    /// ```ignore,no_run
6281    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6282    /// use google_cloud_bigtable_admin_v2::model::Snapshot;
6283    /// let x = ListSnapshotsResponse::new()
6284    ///     .set_snapshots([
6285    ///         Snapshot::default()/* use setters */,
6286    ///         Snapshot::default()/* use (different) setters */,
6287    ///     ]);
6288    /// ```
6289    pub fn set_snapshots<T, V>(mut self, v: T) -> Self
6290    where
6291        T: std::iter::IntoIterator<Item = V>,
6292        V: std::convert::Into<crate::model::Snapshot>,
6293    {
6294        use std::iter::Iterator;
6295        self.snapshots = v.into_iter().map(|i| i.into()).collect();
6296        self
6297    }
6298
6299    /// Sets the value of [next_page_token][crate::model::ListSnapshotsResponse::next_page_token].
6300    ///
6301    /// # Example
6302    /// ```ignore,no_run
6303    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6304    /// let x = ListSnapshotsResponse::new().set_next_page_token("example");
6305    /// ```
6306    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6307        self.next_page_token = v.into();
6308        self
6309    }
6310}
6311
6312impl wkt::message::Message for ListSnapshotsResponse {
6313    fn typename() -> &'static str {
6314        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsResponse"
6315    }
6316}
6317
6318#[doc(hidden)]
6319impl google_cloud_gax::paginator::internal::PageableResponse for ListSnapshotsResponse {
6320    type PageItem = crate::model::Snapshot;
6321
6322    fn items(self) -> std::vec::Vec<Self::PageItem> {
6323        self.snapshots
6324    }
6325
6326    fn next_page_token(&self) -> std::string::String {
6327        use std::clone::Clone;
6328        self.next_page_token.clone()
6329    }
6330}
6331
6332/// Request message for
6333/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
6334///
6335/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6336/// feature is not currently available to most Cloud Bigtable customers. This
6337/// feature might be changed in backward-incompatible ways and is not recommended
6338/// for production use. It is not subject to any SLA or deprecation policy.
6339///
6340/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]: crate::client::BigtableTableAdmin::delete_snapshot
6341#[derive(Clone, Default, PartialEq)]
6342#[non_exhaustive]
6343pub struct DeleteSnapshotRequest {
6344    /// Required. The unique name of the snapshot to be deleted.
6345    /// Values are of the form
6346    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6347    pub name: std::string::String,
6348
6349    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6350}
6351
6352impl DeleteSnapshotRequest {
6353    /// Creates a new default instance.
6354    pub fn new() -> Self {
6355        std::default::Default::default()
6356    }
6357
6358    /// Sets the value of [name][crate::model::DeleteSnapshotRequest::name].
6359    ///
6360    /// # Example
6361    /// ```ignore,no_run
6362    /// # use google_cloud_bigtable_admin_v2::model::DeleteSnapshotRequest;
6363    /// let x = DeleteSnapshotRequest::new().set_name("example");
6364    /// ```
6365    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6366        self.name = v.into();
6367        self
6368    }
6369}
6370
6371impl wkt::message::Message for DeleteSnapshotRequest {
6372    fn typename() -> &'static str {
6373        "type.googleapis.com/google.bigtable.admin.v2.DeleteSnapshotRequest"
6374    }
6375}
6376
6377/// The metadata for the Operation returned by SnapshotTable.
6378///
6379/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6380/// feature is not currently available to most Cloud Bigtable customers. This
6381/// feature might be changed in backward-incompatible ways and is not recommended
6382/// for production use. It is not subject to any SLA or deprecation policy.
6383#[derive(Clone, Default, PartialEq)]
6384#[non_exhaustive]
6385pub struct SnapshotTableMetadata {
6386    /// The request that prompted the initiation of this SnapshotTable operation.
6387    pub original_request: std::option::Option<crate::model::SnapshotTableRequest>,
6388
6389    /// The time at which the original request was received.
6390    pub request_time: std::option::Option<wkt::Timestamp>,
6391
6392    /// The time at which the operation failed or was completed successfully.
6393    pub finish_time: std::option::Option<wkt::Timestamp>,
6394
6395    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6396}
6397
6398impl SnapshotTableMetadata {
6399    /// Creates a new default instance.
6400    pub fn new() -> Self {
6401        std::default::Default::default()
6402    }
6403
6404    /// Sets the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6405    ///
6406    /// # Example
6407    /// ```ignore,no_run
6408    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6409    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6410    /// let x = SnapshotTableMetadata::new().set_original_request(SnapshotTableRequest::default()/* use setters */);
6411    /// ```
6412    pub fn set_original_request<T>(mut self, v: T) -> Self
6413    where
6414        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6415    {
6416        self.original_request = std::option::Option::Some(v.into());
6417        self
6418    }
6419
6420    /// Sets or clears the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6421    ///
6422    /// # Example
6423    /// ```ignore,no_run
6424    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6425    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6426    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(Some(SnapshotTableRequest::default()/* use setters */));
6427    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(None::<SnapshotTableRequest>);
6428    /// ```
6429    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6430    where
6431        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6432    {
6433        self.original_request = v.map(|x| x.into());
6434        self
6435    }
6436
6437    /// Sets the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6438    ///
6439    /// # Example
6440    /// ```ignore,no_run
6441    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6442    /// use wkt::Timestamp;
6443    /// let x = SnapshotTableMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6444    /// ```
6445    pub fn set_request_time<T>(mut self, v: T) -> Self
6446    where
6447        T: std::convert::Into<wkt::Timestamp>,
6448    {
6449        self.request_time = std::option::Option::Some(v.into());
6450        self
6451    }
6452
6453    /// Sets or clears the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6454    ///
6455    /// # Example
6456    /// ```ignore,no_run
6457    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6458    /// use wkt::Timestamp;
6459    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
6460    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(None::<Timestamp>);
6461    /// ```
6462    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
6463    where
6464        T: std::convert::Into<wkt::Timestamp>,
6465    {
6466        self.request_time = v.map(|x| x.into());
6467        self
6468    }
6469
6470    /// Sets the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
6471    ///
6472    /// # Example
6473    /// ```ignore,no_run
6474    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6475    /// use wkt::Timestamp;
6476    /// let x = SnapshotTableMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
6477    /// ```
6478    pub fn set_finish_time<T>(mut self, v: T) -> Self
6479    where
6480        T: std::convert::Into<wkt::Timestamp>,
6481    {
6482        self.finish_time = std::option::Option::Some(v.into());
6483        self
6484    }
6485
6486    /// Sets or clears the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
6487    ///
6488    /// # Example
6489    /// ```ignore,no_run
6490    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6491    /// use wkt::Timestamp;
6492    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
6493    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
6494    /// ```
6495    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
6496    where
6497        T: std::convert::Into<wkt::Timestamp>,
6498    {
6499        self.finish_time = v.map(|x| x.into());
6500        self
6501    }
6502}
6503
6504impl wkt::message::Message for SnapshotTableMetadata {
6505    fn typename() -> &'static str {
6506        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableMetadata"
6507    }
6508}
6509
6510/// The metadata for the Operation returned by CreateTableFromSnapshot.
6511///
6512/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6513/// feature is not currently available to most Cloud Bigtable customers. This
6514/// feature might be changed in backward-incompatible ways and is not recommended
6515/// for production use. It is not subject to any SLA or deprecation policy.
6516#[derive(Clone, Default, PartialEq)]
6517#[non_exhaustive]
6518pub struct CreateTableFromSnapshotMetadata {
6519    /// The request that prompted the initiation of this CreateTableFromSnapshot
6520    /// operation.
6521    pub original_request: std::option::Option<crate::model::CreateTableFromSnapshotRequest>,
6522
6523    /// The time at which the original request was received.
6524    pub request_time: std::option::Option<wkt::Timestamp>,
6525
6526    /// The time at which the operation failed or was completed successfully.
6527    pub finish_time: std::option::Option<wkt::Timestamp>,
6528
6529    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6530}
6531
6532impl CreateTableFromSnapshotMetadata {
6533    /// Creates a new default instance.
6534    pub fn new() -> Self {
6535        std::default::Default::default()
6536    }
6537
6538    /// Sets the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
6539    ///
6540    /// # Example
6541    /// ```ignore,no_run
6542    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6543    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
6544    /// let x = CreateTableFromSnapshotMetadata::new().set_original_request(CreateTableFromSnapshotRequest::default()/* use setters */);
6545    /// ```
6546    pub fn set_original_request<T>(mut self, v: T) -> Self
6547    where
6548        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
6549    {
6550        self.original_request = std::option::Option::Some(v.into());
6551        self
6552    }
6553
6554    /// Sets or clears the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
6555    ///
6556    /// # Example
6557    /// ```ignore,no_run
6558    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6559    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
6560    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(Some(CreateTableFromSnapshotRequest::default()/* use setters */));
6561    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(None::<CreateTableFromSnapshotRequest>);
6562    /// ```
6563    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6564    where
6565        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
6566    {
6567        self.original_request = v.map(|x| x.into());
6568        self
6569    }
6570
6571    /// Sets the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
6572    ///
6573    /// # Example
6574    /// ```ignore,no_run
6575    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6576    /// use wkt::Timestamp;
6577    /// let x = CreateTableFromSnapshotMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6578    /// ```
6579    pub fn set_request_time<T>(mut self, v: T) -> Self
6580    where
6581        T: std::convert::Into<wkt::Timestamp>,
6582    {
6583        self.request_time = std::option::Option::Some(v.into());
6584        self
6585    }
6586
6587    /// Sets or clears the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
6588    ///
6589    /// # Example
6590    /// ```ignore,no_run
6591    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6592    /// use wkt::Timestamp;
6593    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
6594    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(None::<Timestamp>);
6595    /// ```
6596    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
6597    where
6598        T: std::convert::Into<wkt::Timestamp>,
6599    {
6600        self.request_time = v.map(|x| x.into());
6601        self
6602    }
6603
6604    /// Sets the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
6605    ///
6606    /// # Example
6607    /// ```ignore,no_run
6608    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6609    /// use wkt::Timestamp;
6610    /// let x = CreateTableFromSnapshotMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
6611    /// ```
6612    pub fn set_finish_time<T>(mut self, v: T) -> Self
6613    where
6614        T: std::convert::Into<wkt::Timestamp>,
6615    {
6616        self.finish_time = std::option::Option::Some(v.into());
6617        self
6618    }
6619
6620    /// Sets or clears the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
6621    ///
6622    /// # Example
6623    /// ```ignore,no_run
6624    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6625    /// use wkt::Timestamp;
6626    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
6627    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
6628    /// ```
6629    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
6630    where
6631        T: std::convert::Into<wkt::Timestamp>,
6632    {
6633        self.finish_time = v.map(|x| x.into());
6634        self
6635    }
6636}
6637
6638impl wkt::message::Message for CreateTableFromSnapshotMetadata {
6639    fn typename() -> &'static str {
6640        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotMetadata"
6641    }
6642}
6643
6644/// The request for
6645/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
6646///
6647/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
6648#[derive(Clone, Default, PartialEq)]
6649#[non_exhaustive]
6650pub struct CreateBackupRequest {
6651    /// Required. This must be one of the clusters in the instance in which this
6652    /// table is located. The backup will be stored in this cluster. Values are
6653    /// of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
6654    pub parent: std::string::String,
6655
6656    /// Required. The id of the backup to be created. The `backup_id` along with
6657    /// the parent `parent` are combined as {parent}/backups/{backup_id} to create
6658    /// the full backup name, of the form:
6659    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
6660    /// This string must be between 1 and 50 characters in length and match the
6661    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
6662    pub backup_id: std::string::String,
6663
6664    /// Required. The backup to create.
6665    pub backup: std::option::Option<crate::model::Backup>,
6666
6667    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6668}
6669
6670impl CreateBackupRequest {
6671    /// Creates a new default instance.
6672    pub fn new() -> Self {
6673        std::default::Default::default()
6674    }
6675
6676    /// Sets the value of [parent][crate::model::CreateBackupRequest::parent].
6677    ///
6678    /// # Example
6679    /// ```ignore,no_run
6680    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6681    /// let x = CreateBackupRequest::new().set_parent("example");
6682    /// ```
6683    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6684        self.parent = v.into();
6685        self
6686    }
6687
6688    /// Sets the value of [backup_id][crate::model::CreateBackupRequest::backup_id].
6689    ///
6690    /// # Example
6691    /// ```ignore,no_run
6692    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6693    /// let x = CreateBackupRequest::new().set_backup_id("example");
6694    /// ```
6695    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6696        self.backup_id = v.into();
6697        self
6698    }
6699
6700    /// Sets the value of [backup][crate::model::CreateBackupRequest::backup].
6701    ///
6702    /// # Example
6703    /// ```ignore,no_run
6704    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6705    /// use google_cloud_bigtable_admin_v2::model::Backup;
6706    /// let x = CreateBackupRequest::new().set_backup(Backup::default()/* use setters */);
6707    /// ```
6708    pub fn set_backup<T>(mut self, v: T) -> Self
6709    where
6710        T: std::convert::Into<crate::model::Backup>,
6711    {
6712        self.backup = std::option::Option::Some(v.into());
6713        self
6714    }
6715
6716    /// Sets or clears the value of [backup][crate::model::CreateBackupRequest::backup].
6717    ///
6718    /// # Example
6719    /// ```ignore,no_run
6720    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6721    /// use google_cloud_bigtable_admin_v2::model::Backup;
6722    /// let x = CreateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
6723    /// let x = CreateBackupRequest::new().set_or_clear_backup(None::<Backup>);
6724    /// ```
6725    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6726    where
6727        T: std::convert::Into<crate::model::Backup>,
6728    {
6729        self.backup = v.map(|x| x.into());
6730        self
6731    }
6732}
6733
6734impl wkt::message::Message for CreateBackupRequest {
6735    fn typename() -> &'static str {
6736        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupRequest"
6737    }
6738}
6739
6740/// Metadata type for the operation returned by
6741/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
6742///
6743/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
6744#[derive(Clone, Default, PartialEq)]
6745#[non_exhaustive]
6746pub struct CreateBackupMetadata {
6747    /// The name of the backup being created.
6748    pub name: std::string::String,
6749
6750    /// The name of the table the backup is created from.
6751    pub source_table: std::string::String,
6752
6753    /// The time at which this operation started.
6754    pub start_time: std::option::Option<wkt::Timestamp>,
6755
6756    /// If set, the time at which this operation finished or was cancelled.
6757    pub end_time: std::option::Option<wkt::Timestamp>,
6758
6759    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6760}
6761
6762impl CreateBackupMetadata {
6763    /// Creates a new default instance.
6764    pub fn new() -> Self {
6765        std::default::Default::default()
6766    }
6767
6768    /// Sets the value of [name][crate::model::CreateBackupMetadata::name].
6769    ///
6770    /// # Example
6771    /// ```ignore,no_run
6772    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6773    /// let x = CreateBackupMetadata::new().set_name("example");
6774    /// ```
6775    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6776        self.name = v.into();
6777        self
6778    }
6779
6780    /// Sets the value of [source_table][crate::model::CreateBackupMetadata::source_table].
6781    ///
6782    /// # Example
6783    /// ```ignore,no_run
6784    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6785    /// let x = CreateBackupMetadata::new().set_source_table("example");
6786    /// ```
6787    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6788        self.source_table = v.into();
6789        self
6790    }
6791
6792    /// Sets the value of [start_time][crate::model::CreateBackupMetadata::start_time].
6793    ///
6794    /// # Example
6795    /// ```ignore,no_run
6796    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6797    /// use wkt::Timestamp;
6798    /// let x = CreateBackupMetadata::new().set_start_time(Timestamp::default()/* use setters */);
6799    /// ```
6800    pub fn set_start_time<T>(mut self, v: T) -> Self
6801    where
6802        T: std::convert::Into<wkt::Timestamp>,
6803    {
6804        self.start_time = std::option::Option::Some(v.into());
6805        self
6806    }
6807
6808    /// Sets or clears the value of [start_time][crate::model::CreateBackupMetadata::start_time].
6809    ///
6810    /// # Example
6811    /// ```ignore,no_run
6812    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6813    /// use wkt::Timestamp;
6814    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
6815    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(None::<Timestamp>);
6816    /// ```
6817    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6818    where
6819        T: std::convert::Into<wkt::Timestamp>,
6820    {
6821        self.start_time = v.map(|x| x.into());
6822        self
6823    }
6824
6825    /// Sets the value of [end_time][crate::model::CreateBackupMetadata::end_time].
6826    ///
6827    /// # Example
6828    /// ```ignore,no_run
6829    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6830    /// use wkt::Timestamp;
6831    /// let x = CreateBackupMetadata::new().set_end_time(Timestamp::default()/* use setters */);
6832    /// ```
6833    pub fn set_end_time<T>(mut self, v: T) -> Self
6834    where
6835        T: std::convert::Into<wkt::Timestamp>,
6836    {
6837        self.end_time = std::option::Option::Some(v.into());
6838        self
6839    }
6840
6841    /// Sets or clears the value of [end_time][crate::model::CreateBackupMetadata::end_time].
6842    ///
6843    /// # Example
6844    /// ```ignore,no_run
6845    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6846    /// use wkt::Timestamp;
6847    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
6848    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(None::<Timestamp>);
6849    /// ```
6850    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6851    where
6852        T: std::convert::Into<wkt::Timestamp>,
6853    {
6854        self.end_time = v.map(|x| x.into());
6855        self
6856    }
6857}
6858
6859impl wkt::message::Message for CreateBackupMetadata {
6860    fn typename() -> &'static str {
6861        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupMetadata"
6862    }
6863}
6864
6865/// The request for
6866/// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup].
6867///
6868/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]: crate::client::BigtableTableAdmin::update_backup
6869#[derive(Clone, Default, PartialEq)]
6870#[non_exhaustive]
6871pub struct UpdateBackupRequest {
6872    /// Required. The backup to update. `backup.name`, and the fields to be updated
6873    /// as specified by `update_mask` are required. Other fields are ignored.
6874    /// Update is only supported for the following fields:
6875    ///
6876    /// * `backup.expire_time`.
6877    pub backup: std::option::Option<crate::model::Backup>,
6878
6879    /// Required. A mask specifying which fields (e.g. `expire_time`) in the
6880    /// Backup resource should be updated. This mask is relative to the Backup
6881    /// resource, not to the request message. The field mask must always be
6882    /// specified; this prevents any future fields from being erased accidentally
6883    /// by clients that do not know about them.
6884    pub update_mask: std::option::Option<wkt::FieldMask>,
6885
6886    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6887}
6888
6889impl UpdateBackupRequest {
6890    /// Creates a new default instance.
6891    pub fn new() -> Self {
6892        std::default::Default::default()
6893    }
6894
6895    /// Sets the value of [backup][crate::model::UpdateBackupRequest::backup].
6896    ///
6897    /// # Example
6898    /// ```ignore,no_run
6899    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6900    /// use google_cloud_bigtable_admin_v2::model::Backup;
6901    /// let x = UpdateBackupRequest::new().set_backup(Backup::default()/* use setters */);
6902    /// ```
6903    pub fn set_backup<T>(mut self, v: T) -> Self
6904    where
6905        T: std::convert::Into<crate::model::Backup>,
6906    {
6907        self.backup = std::option::Option::Some(v.into());
6908        self
6909    }
6910
6911    /// Sets or clears the value of [backup][crate::model::UpdateBackupRequest::backup].
6912    ///
6913    /// # Example
6914    /// ```ignore,no_run
6915    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6916    /// use google_cloud_bigtable_admin_v2::model::Backup;
6917    /// let x = UpdateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
6918    /// let x = UpdateBackupRequest::new().set_or_clear_backup(None::<Backup>);
6919    /// ```
6920    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6921    where
6922        T: std::convert::Into<crate::model::Backup>,
6923    {
6924        self.backup = v.map(|x| x.into());
6925        self
6926    }
6927
6928    /// Sets the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
6929    ///
6930    /// # Example
6931    /// ```ignore,no_run
6932    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6933    /// use wkt::FieldMask;
6934    /// let x = UpdateBackupRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6935    /// ```
6936    pub fn set_update_mask<T>(mut self, v: T) -> Self
6937    where
6938        T: std::convert::Into<wkt::FieldMask>,
6939    {
6940        self.update_mask = std::option::Option::Some(v.into());
6941        self
6942    }
6943
6944    /// Sets or clears the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
6945    ///
6946    /// # Example
6947    /// ```ignore,no_run
6948    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
6949    /// use wkt::FieldMask;
6950    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6951    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6952    /// ```
6953    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6954    where
6955        T: std::convert::Into<wkt::FieldMask>,
6956    {
6957        self.update_mask = v.map(|x| x.into());
6958        self
6959    }
6960}
6961
6962impl wkt::message::Message for UpdateBackupRequest {
6963    fn typename() -> &'static str {
6964        "type.googleapis.com/google.bigtable.admin.v2.UpdateBackupRequest"
6965    }
6966}
6967
6968/// The request for
6969/// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup].
6970///
6971/// [google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]: crate::client::BigtableTableAdmin::get_backup
6972#[derive(Clone, Default, PartialEq)]
6973#[non_exhaustive]
6974pub struct GetBackupRequest {
6975    /// Required. Name of the backup.
6976    /// Values are of the form
6977    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
6978    pub name: std::string::String,
6979
6980    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6981}
6982
6983impl GetBackupRequest {
6984    /// Creates a new default instance.
6985    pub fn new() -> Self {
6986        std::default::Default::default()
6987    }
6988
6989    /// Sets the value of [name][crate::model::GetBackupRequest::name].
6990    ///
6991    /// # Example
6992    /// ```ignore,no_run
6993    /// # use google_cloud_bigtable_admin_v2::model::GetBackupRequest;
6994    /// let x = GetBackupRequest::new().set_name("example");
6995    /// ```
6996    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6997        self.name = v.into();
6998        self
6999    }
7000}
7001
7002impl wkt::message::Message for GetBackupRequest {
7003    fn typename() -> &'static str {
7004        "type.googleapis.com/google.bigtable.admin.v2.GetBackupRequest"
7005    }
7006}
7007
7008/// The request for
7009/// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup].
7010///
7011/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]: crate::client::BigtableTableAdmin::delete_backup
7012#[derive(Clone, Default, PartialEq)]
7013#[non_exhaustive]
7014pub struct DeleteBackupRequest {
7015    /// Required. Name of the backup to delete.
7016    /// Values are of the form
7017    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
7018    pub name: std::string::String,
7019
7020    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7021}
7022
7023impl DeleteBackupRequest {
7024    /// Creates a new default instance.
7025    pub fn new() -> Self {
7026        std::default::Default::default()
7027    }
7028
7029    /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
7030    ///
7031    /// # Example
7032    /// ```ignore,no_run
7033    /// # use google_cloud_bigtable_admin_v2::model::DeleteBackupRequest;
7034    /// let x = DeleteBackupRequest::new().set_name("example");
7035    /// ```
7036    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7037        self.name = v.into();
7038        self
7039    }
7040}
7041
7042impl wkt::message::Message for DeleteBackupRequest {
7043    fn typename() -> &'static str {
7044        "type.googleapis.com/google.bigtable.admin.v2.DeleteBackupRequest"
7045    }
7046}
7047
7048/// The request for
7049/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
7050///
7051/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7052#[derive(Clone, Default, PartialEq)]
7053#[non_exhaustive]
7054pub struct ListBackupsRequest {
7055    /// Required. The cluster to list backups from.  Values are of the
7056    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
7057    /// Use `{cluster} = '-'` to list backups for all clusters in an instance,
7058    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
7059    pub parent: std::string::String,
7060
7061    /// A filter expression that filters backups listed in the response.
7062    /// The expression must specify the field name, a comparison operator,
7063    /// and the value that you want to use for filtering. The value must be a
7064    /// string, a number, or a boolean. The comparison operator must be
7065    /// <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is
7066    /// roughly synonymous with equality. Filter rules are case insensitive.
7067    ///
7068    /// The fields eligible for filtering are:
7069    ///
7070    /// * `name`
7071    /// * `source_table`
7072    /// * `state`
7073    /// * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7074    /// * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7075    /// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7076    /// * `size_bytes`
7077    ///
7078    /// To filter on multiple expressions, provide each separate expression within
7079    /// parentheses. By default, each expression is an AND expression. However,
7080    /// you can include AND, OR, and NOT expressions explicitly.
7081    ///
7082    /// Some examples of using filters are:
7083    ///
7084    /// * `name:"exact"` --> The backup's name is the string "exact".
7085    /// * `name:howl` --> The backup's name contains the string "howl".
7086    /// * `source_table:prod`
7087    ///   --> The source_table's name contains the string "prod".
7088    /// * `state:CREATING` --> The backup is pending creation.
7089    /// * `state:READY` --> The backup is fully created and ready for use.
7090    /// * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")`
7091    ///   --> The backup name contains the string "howl" and start_time
7092    ///   of the backup is before 2018-03-28T14:50:00Z.
7093    /// * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
7094    pub filter: std::string::String,
7095
7096    /// An expression for specifying the sort order of the results of the request.
7097    /// The string value should specify one or more fields in
7098    /// [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at
7099    /// <https://aip.dev/132#ordering>.
7100    ///
7101    /// Fields supported are:
7102    ///
7103    /// * name
7104    /// * source_table
7105    /// * expire_time
7106    /// * start_time
7107    /// * end_time
7108    /// * size_bytes
7109    /// * state
7110    ///
7111    /// For example, "start_time". The default sorting order is ascending.
7112    /// To specify descending order for the field, a suffix " desc" should
7113    /// be appended to the field name. For example, "start_time desc".
7114    /// Redundant space characters in the syntax are insigificant.
7115    ///
7116    /// If order_by is empty, results will be sorted by `start_time` in descending
7117    /// order starting from the most recently created backup.
7118    ///
7119    /// [google.bigtable.admin.v2.Backup]: crate::model::Backup
7120    pub order_by: std::string::String,
7121
7122    /// Number of backups to be returned in the response. If 0 or
7123    /// less, defaults to the server's maximum allowed page size.
7124    pub page_size: i32,
7125
7126    /// If non-empty, `page_token` should contain a
7127    /// [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token]
7128    /// from a previous
7129    /// [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the
7130    /// same `parent` and with the same `filter`.
7131    ///
7132    /// [google.bigtable.admin.v2.ListBackupsResponse]: crate::model::ListBackupsResponse
7133    /// [google.bigtable.admin.v2.ListBackupsResponse.next_page_token]: crate::model::ListBackupsResponse::next_page_token
7134    pub page_token: std::string::String,
7135
7136    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7137}
7138
7139impl ListBackupsRequest {
7140    /// Creates a new default instance.
7141    pub fn new() -> Self {
7142        std::default::Default::default()
7143    }
7144
7145    /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
7146    ///
7147    /// # Example
7148    /// ```ignore,no_run
7149    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7150    /// let x = ListBackupsRequest::new().set_parent("example");
7151    /// ```
7152    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7153        self.parent = v.into();
7154        self
7155    }
7156
7157    /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
7158    ///
7159    /// # Example
7160    /// ```ignore,no_run
7161    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7162    /// let x = ListBackupsRequest::new().set_filter("example");
7163    /// ```
7164    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7165        self.filter = v.into();
7166        self
7167    }
7168
7169    /// Sets the value of [order_by][crate::model::ListBackupsRequest::order_by].
7170    ///
7171    /// # Example
7172    /// ```ignore,no_run
7173    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7174    /// let x = ListBackupsRequest::new().set_order_by("example");
7175    /// ```
7176    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7177        self.order_by = v.into();
7178        self
7179    }
7180
7181    /// Sets the value of [page_size][crate::model::ListBackupsRequest::page_size].
7182    ///
7183    /// # Example
7184    /// ```ignore,no_run
7185    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7186    /// let x = ListBackupsRequest::new().set_page_size(42);
7187    /// ```
7188    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7189        self.page_size = v.into();
7190        self
7191    }
7192
7193    /// Sets the value of [page_token][crate::model::ListBackupsRequest::page_token].
7194    ///
7195    /// # Example
7196    /// ```ignore,no_run
7197    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7198    /// let x = ListBackupsRequest::new().set_page_token("example");
7199    /// ```
7200    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7201        self.page_token = v.into();
7202        self
7203    }
7204}
7205
7206impl wkt::message::Message for ListBackupsRequest {
7207    fn typename() -> &'static str {
7208        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsRequest"
7209    }
7210}
7211
7212/// The response for
7213/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
7214///
7215/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7216#[derive(Clone, Default, PartialEq)]
7217#[non_exhaustive]
7218pub struct ListBackupsResponse {
7219    /// The list of matching backups.
7220    pub backups: std::vec::Vec<crate::model::Backup>,
7221
7222    /// `next_page_token` can be sent in a subsequent
7223    /// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call
7224    /// to fetch more of the matching backups.
7225    ///
7226    /// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7227    pub next_page_token: std::string::String,
7228
7229    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7230}
7231
7232impl ListBackupsResponse {
7233    /// Creates a new default instance.
7234    pub fn new() -> Self {
7235        std::default::Default::default()
7236    }
7237
7238    /// Sets the value of [backups][crate::model::ListBackupsResponse::backups].
7239    ///
7240    /// # Example
7241    /// ```ignore,no_run
7242    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7243    /// use google_cloud_bigtable_admin_v2::model::Backup;
7244    /// let x = ListBackupsResponse::new()
7245    ///     .set_backups([
7246    ///         Backup::default()/* use setters */,
7247    ///         Backup::default()/* use (different) setters */,
7248    ///     ]);
7249    /// ```
7250    pub fn set_backups<T, V>(mut self, v: T) -> Self
7251    where
7252        T: std::iter::IntoIterator<Item = V>,
7253        V: std::convert::Into<crate::model::Backup>,
7254    {
7255        use std::iter::Iterator;
7256        self.backups = v.into_iter().map(|i| i.into()).collect();
7257        self
7258    }
7259
7260    /// Sets the value of [next_page_token][crate::model::ListBackupsResponse::next_page_token].
7261    ///
7262    /// # Example
7263    /// ```ignore,no_run
7264    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7265    /// let x = ListBackupsResponse::new().set_next_page_token("example");
7266    /// ```
7267    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7268        self.next_page_token = v.into();
7269        self
7270    }
7271}
7272
7273impl wkt::message::Message for ListBackupsResponse {
7274    fn typename() -> &'static str {
7275        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsResponse"
7276    }
7277}
7278
7279#[doc(hidden)]
7280impl google_cloud_gax::paginator::internal::PageableResponse for ListBackupsResponse {
7281    type PageItem = crate::model::Backup;
7282
7283    fn items(self) -> std::vec::Vec<Self::PageItem> {
7284        self.backups
7285    }
7286
7287    fn next_page_token(&self) -> std::string::String {
7288        use std::clone::Clone;
7289        self.next_page_token.clone()
7290    }
7291}
7292
7293/// The request for
7294/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7295///
7296/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7297#[derive(Clone, Default, PartialEq)]
7298#[non_exhaustive]
7299pub struct CopyBackupRequest {
7300    /// Required. The name of the destination cluster that will contain the backup
7301    /// copy. The cluster must already exist. Values are of the form:
7302    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
7303    pub parent: std::string::String,
7304
7305    /// Required. The id of the new backup. The `backup_id` along with `parent`
7306    /// are combined as {parent}/backups/{backup_id} to create the full backup
7307    /// name, of the form:
7308    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
7309    /// This string must be between 1 and 50 characters in length and match the
7310    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
7311    pub backup_id: std::string::String,
7312
7313    /// Required. The source backup to be copied from.
7314    /// The source backup needs to be in READY state for it to be copied.
7315    /// Copying a copied backup is not allowed.
7316    /// Once CopyBackup is in progress, the source backup cannot be deleted or
7317    /// cleaned up on expiration until CopyBackup is finished.
7318    /// Values are of the form:
7319    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7320    pub source_backup: std::string::String,
7321
7322    /// Required. Required. The expiration time of the copied backup with
7323    /// microsecond granularity that must be at least 6 hours and at most 30 days
7324    /// from the time the request is received. Once the `expire_time` has
7325    /// passed, Cloud Bigtable will delete the backup and free the resources used
7326    /// by the backup.
7327    pub expire_time: std::option::Option<wkt::Timestamp>,
7328
7329    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7330}
7331
7332impl CopyBackupRequest {
7333    /// Creates a new default instance.
7334    pub fn new() -> Self {
7335        std::default::Default::default()
7336    }
7337
7338    /// Sets the value of [parent][crate::model::CopyBackupRequest::parent].
7339    ///
7340    /// # Example
7341    /// ```ignore,no_run
7342    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7343    /// let x = CopyBackupRequest::new().set_parent("example");
7344    /// ```
7345    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7346        self.parent = v.into();
7347        self
7348    }
7349
7350    /// Sets the value of [backup_id][crate::model::CopyBackupRequest::backup_id].
7351    ///
7352    /// # Example
7353    /// ```ignore,no_run
7354    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7355    /// let x = CopyBackupRequest::new().set_backup_id("example");
7356    /// ```
7357    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7358        self.backup_id = v.into();
7359        self
7360    }
7361
7362    /// Sets the value of [source_backup][crate::model::CopyBackupRequest::source_backup].
7363    ///
7364    /// # Example
7365    /// ```ignore,no_run
7366    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7367    /// let x = CopyBackupRequest::new().set_source_backup("example");
7368    /// ```
7369    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7370        self.source_backup = v.into();
7371        self
7372    }
7373
7374    /// Sets the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7375    ///
7376    /// # Example
7377    /// ```ignore,no_run
7378    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7379    /// use wkt::Timestamp;
7380    /// let x = CopyBackupRequest::new().set_expire_time(Timestamp::default()/* use setters */);
7381    /// ```
7382    pub fn set_expire_time<T>(mut self, v: T) -> Self
7383    where
7384        T: std::convert::Into<wkt::Timestamp>,
7385    {
7386        self.expire_time = std::option::Option::Some(v.into());
7387        self
7388    }
7389
7390    /// Sets or clears the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7391    ///
7392    /// # Example
7393    /// ```ignore,no_run
7394    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7395    /// use wkt::Timestamp;
7396    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
7397    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(None::<Timestamp>);
7398    /// ```
7399    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
7400    where
7401        T: std::convert::Into<wkt::Timestamp>,
7402    {
7403        self.expire_time = v.map(|x| x.into());
7404        self
7405    }
7406}
7407
7408impl wkt::message::Message for CopyBackupRequest {
7409    fn typename() -> &'static str {
7410        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupRequest"
7411    }
7412}
7413
7414/// Metadata type for the google.longrunning.Operation returned by
7415/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7416///
7417/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7418#[derive(Clone, Default, PartialEq)]
7419#[non_exhaustive]
7420pub struct CopyBackupMetadata {
7421    /// The name of the backup being created through the copy operation.
7422    /// Values are of the form
7423    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7424    pub name: std::string::String,
7425
7426    /// Information about the source backup that is being copied from.
7427    pub source_backup_info: std::option::Option<crate::model::BackupInfo>,
7428
7429    /// The progress of the
7430    /// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]
7431    /// operation.
7432    ///
7433    /// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7434    pub progress: std::option::Option<crate::model::OperationProgress>,
7435
7436    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7437}
7438
7439impl CopyBackupMetadata {
7440    /// Creates a new default instance.
7441    pub fn new() -> Self {
7442        std::default::Default::default()
7443    }
7444
7445    /// Sets the value of [name][crate::model::CopyBackupMetadata::name].
7446    ///
7447    /// # Example
7448    /// ```ignore,no_run
7449    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7450    /// let x = CopyBackupMetadata::new().set_name("example");
7451    /// ```
7452    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7453        self.name = v.into();
7454        self
7455    }
7456
7457    /// Sets the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
7458    ///
7459    /// # Example
7460    /// ```ignore,no_run
7461    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7462    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
7463    /// let x = CopyBackupMetadata::new().set_source_backup_info(BackupInfo::default()/* use setters */);
7464    /// ```
7465    pub fn set_source_backup_info<T>(mut self, v: T) -> Self
7466    where
7467        T: std::convert::Into<crate::model::BackupInfo>,
7468    {
7469        self.source_backup_info = std::option::Option::Some(v.into());
7470        self
7471    }
7472
7473    /// Sets or clears the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
7474    ///
7475    /// # Example
7476    /// ```ignore,no_run
7477    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7478    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
7479    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(Some(BackupInfo::default()/* use setters */));
7480    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(None::<BackupInfo>);
7481    /// ```
7482    pub fn set_or_clear_source_backup_info<T>(mut self, v: std::option::Option<T>) -> Self
7483    where
7484        T: std::convert::Into<crate::model::BackupInfo>,
7485    {
7486        self.source_backup_info = v.map(|x| x.into());
7487        self
7488    }
7489
7490    /// Sets the value of [progress][crate::model::CopyBackupMetadata::progress].
7491    ///
7492    /// # Example
7493    /// ```ignore,no_run
7494    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7495    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
7496    /// let x = CopyBackupMetadata::new().set_progress(OperationProgress::default()/* use setters */);
7497    /// ```
7498    pub fn set_progress<T>(mut self, v: T) -> Self
7499    where
7500        T: std::convert::Into<crate::model::OperationProgress>,
7501    {
7502        self.progress = std::option::Option::Some(v.into());
7503        self
7504    }
7505
7506    /// Sets or clears the value of [progress][crate::model::CopyBackupMetadata::progress].
7507    ///
7508    /// # Example
7509    /// ```ignore,no_run
7510    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7511    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
7512    /// let x = CopyBackupMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
7513    /// let x = CopyBackupMetadata::new().set_or_clear_progress(None::<OperationProgress>);
7514    /// ```
7515    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
7516    where
7517        T: std::convert::Into<crate::model::OperationProgress>,
7518    {
7519        self.progress = v.map(|x| x.into());
7520        self
7521    }
7522}
7523
7524impl wkt::message::Message for CopyBackupMetadata {
7525    fn typename() -> &'static str {
7526        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupMetadata"
7527    }
7528}
7529
7530/// The request for
7531/// [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]
7532///
7533/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]: crate::client::BigtableTableAdmin::create_authorized_view
7534#[derive(Clone, Default, PartialEq)]
7535#[non_exhaustive]
7536pub struct CreateAuthorizedViewRequest {
7537    /// Required. This is the name of the table the AuthorizedView belongs to.
7538    /// Values are of the form
7539    /// `projects/{project}/instances/{instance}/tables/{table}`.
7540    pub parent: std::string::String,
7541
7542    /// Required. The id of the AuthorizedView to create. This AuthorizedView must
7543    /// not already exist. The `authorized_view_id` appended to `parent` forms the
7544    /// full AuthorizedView name of the form
7545    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
7546    pub authorized_view_id: std::string::String,
7547
7548    /// Required. The AuthorizedView to create.
7549    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
7550
7551    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7552}
7553
7554impl CreateAuthorizedViewRequest {
7555    /// Creates a new default instance.
7556    pub fn new() -> Self {
7557        std::default::Default::default()
7558    }
7559
7560    /// Sets the value of [parent][crate::model::CreateAuthorizedViewRequest::parent].
7561    ///
7562    /// # Example
7563    /// ```ignore,no_run
7564    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7565    /// let x = CreateAuthorizedViewRequest::new().set_parent("example");
7566    /// ```
7567    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7568        self.parent = v.into();
7569        self
7570    }
7571
7572    /// Sets the value of [authorized_view_id][crate::model::CreateAuthorizedViewRequest::authorized_view_id].
7573    ///
7574    /// # Example
7575    /// ```ignore,no_run
7576    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7577    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view_id("example");
7578    /// ```
7579    pub fn set_authorized_view_id<T: std::convert::Into<std::string::String>>(
7580        mut self,
7581        v: T,
7582    ) -> Self {
7583        self.authorized_view_id = v.into();
7584        self
7585    }
7586
7587    /// Sets the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
7588    ///
7589    /// # Example
7590    /// ```ignore,no_run
7591    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7592    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7593    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
7594    /// ```
7595    pub fn set_authorized_view<T>(mut self, v: T) -> Self
7596    where
7597        T: std::convert::Into<crate::model::AuthorizedView>,
7598    {
7599        self.authorized_view = std::option::Option::Some(v.into());
7600        self
7601    }
7602
7603    /// Sets or clears the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
7604    ///
7605    /// # Example
7606    /// ```ignore,no_run
7607    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7608    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7609    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
7610    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
7611    /// ```
7612    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
7613    where
7614        T: std::convert::Into<crate::model::AuthorizedView>,
7615    {
7616        self.authorized_view = v.map(|x| x.into());
7617        self
7618    }
7619}
7620
7621impl wkt::message::Message for CreateAuthorizedViewRequest {
7622    fn typename() -> &'static str {
7623        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewRequest"
7624    }
7625}
7626
7627/// The metadata for the Operation returned by CreateAuthorizedView.
7628#[derive(Clone, Default, PartialEq)]
7629#[non_exhaustive]
7630pub struct CreateAuthorizedViewMetadata {
7631    /// The request that prompted the initiation of this CreateAuthorizedView
7632    /// operation.
7633    pub original_request: std::option::Option<crate::model::CreateAuthorizedViewRequest>,
7634
7635    /// The time at which the original request was received.
7636    pub request_time: std::option::Option<wkt::Timestamp>,
7637
7638    /// The time at which the operation failed or was completed successfully.
7639    pub finish_time: std::option::Option<wkt::Timestamp>,
7640
7641    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7642}
7643
7644impl CreateAuthorizedViewMetadata {
7645    /// Creates a new default instance.
7646    pub fn new() -> Self {
7647        std::default::Default::default()
7648    }
7649
7650    /// Sets the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
7651    ///
7652    /// # Example
7653    /// ```ignore,no_run
7654    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7655    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7656    /// let x = CreateAuthorizedViewMetadata::new().set_original_request(CreateAuthorizedViewRequest::default()/* use setters */);
7657    /// ```
7658    pub fn set_original_request<T>(mut self, v: T) -> Self
7659    where
7660        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
7661    {
7662        self.original_request = std::option::Option::Some(v.into());
7663        self
7664    }
7665
7666    /// Sets or clears the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
7667    ///
7668    /// # Example
7669    /// ```ignore,no_run
7670    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7671    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7672    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(CreateAuthorizedViewRequest::default()/* use setters */));
7673    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<CreateAuthorizedViewRequest>);
7674    /// ```
7675    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
7676    where
7677        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
7678    {
7679        self.original_request = v.map(|x| x.into());
7680        self
7681    }
7682
7683    /// Sets the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
7684    ///
7685    /// # Example
7686    /// ```ignore,no_run
7687    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7688    /// use wkt::Timestamp;
7689    /// let x = CreateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
7690    /// ```
7691    pub fn set_request_time<T>(mut self, v: T) -> Self
7692    where
7693        T: std::convert::Into<wkt::Timestamp>,
7694    {
7695        self.request_time = std::option::Option::Some(v.into());
7696        self
7697    }
7698
7699    /// Sets or clears the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
7700    ///
7701    /// # Example
7702    /// ```ignore,no_run
7703    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7704    /// use wkt::Timestamp;
7705    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
7706    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
7707    /// ```
7708    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
7709    where
7710        T: std::convert::Into<wkt::Timestamp>,
7711    {
7712        self.request_time = v.map(|x| x.into());
7713        self
7714    }
7715
7716    /// Sets the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
7717    ///
7718    /// # Example
7719    /// ```ignore,no_run
7720    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7721    /// use wkt::Timestamp;
7722    /// let x = CreateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
7723    /// ```
7724    pub fn set_finish_time<T>(mut self, v: T) -> Self
7725    where
7726        T: std::convert::Into<wkt::Timestamp>,
7727    {
7728        self.finish_time = std::option::Option::Some(v.into());
7729        self
7730    }
7731
7732    /// Sets or clears the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
7733    ///
7734    /// # Example
7735    /// ```ignore,no_run
7736    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7737    /// use wkt::Timestamp;
7738    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
7739    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
7740    /// ```
7741    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
7742    where
7743        T: std::convert::Into<wkt::Timestamp>,
7744    {
7745        self.finish_time = v.map(|x| x.into());
7746        self
7747    }
7748}
7749
7750impl wkt::message::Message for CreateAuthorizedViewMetadata {
7751    fn typename() -> &'static str {
7752        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewMetadata"
7753    }
7754}
7755
7756/// Request message for
7757/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
7758///
7759/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
7760#[derive(Clone, Default, PartialEq)]
7761#[non_exhaustive]
7762pub struct ListAuthorizedViewsRequest {
7763    /// Required. The unique name of the table for which AuthorizedViews should be
7764    /// listed. Values are of the form
7765    /// `projects/{project}/instances/{instance}/tables/{table}`.
7766    pub parent: std::string::String,
7767
7768    /// Optional. Maximum number of results per page.
7769    ///
7770    /// A page_size of zero lets the server choose the number of items to return.
7771    /// A page_size which is strictly positive will return at most that many items.
7772    /// A negative page_size will cause an error.
7773    ///
7774    /// Following the first request, subsequent paginated calls are not required
7775    /// to pass a page_size. If a page_size is set in subsequent calls, it must
7776    /// match the page_size given in the first request.
7777    pub page_size: i32,
7778
7779    /// Optional. The value of `next_page_token` returned by a previous call.
7780    pub page_token: std::string::String,
7781
7782    /// Optional. The resource_view to be applied to the returned AuthorizedViews'
7783    /// fields. Default to NAME_ONLY.
7784    pub view: crate::model::authorized_view::ResponseView,
7785
7786    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7787}
7788
7789impl ListAuthorizedViewsRequest {
7790    /// Creates a new default instance.
7791    pub fn new() -> Self {
7792        std::default::Default::default()
7793    }
7794
7795    /// Sets the value of [parent][crate::model::ListAuthorizedViewsRequest::parent].
7796    ///
7797    /// # Example
7798    /// ```ignore,no_run
7799    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7800    /// let x = ListAuthorizedViewsRequest::new().set_parent("example");
7801    /// ```
7802    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7803        self.parent = v.into();
7804        self
7805    }
7806
7807    /// Sets the value of [page_size][crate::model::ListAuthorizedViewsRequest::page_size].
7808    ///
7809    /// # Example
7810    /// ```ignore,no_run
7811    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7812    /// let x = ListAuthorizedViewsRequest::new().set_page_size(42);
7813    /// ```
7814    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7815        self.page_size = v.into();
7816        self
7817    }
7818
7819    /// Sets the value of [page_token][crate::model::ListAuthorizedViewsRequest::page_token].
7820    ///
7821    /// # Example
7822    /// ```ignore,no_run
7823    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7824    /// let x = ListAuthorizedViewsRequest::new().set_page_token("example");
7825    /// ```
7826    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7827        self.page_token = v.into();
7828        self
7829    }
7830
7831    /// Sets the value of [view][crate::model::ListAuthorizedViewsRequest::view].
7832    ///
7833    /// # Example
7834    /// ```ignore,no_run
7835    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7836    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
7837    /// let x0 = ListAuthorizedViewsRequest::new().set_view(ResponseView::NameOnly);
7838    /// let x1 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Basic);
7839    /// let x2 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Full);
7840    /// ```
7841    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
7842        mut self,
7843        v: T,
7844    ) -> Self {
7845        self.view = v.into();
7846        self
7847    }
7848}
7849
7850impl wkt::message::Message for ListAuthorizedViewsRequest {
7851    fn typename() -> &'static str {
7852        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsRequest"
7853    }
7854}
7855
7856/// Response message for
7857/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
7858///
7859/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
7860#[derive(Clone, Default, PartialEq)]
7861#[non_exhaustive]
7862pub struct ListAuthorizedViewsResponse {
7863    /// The AuthorizedViews present in the requested table.
7864    pub authorized_views: std::vec::Vec<crate::model::AuthorizedView>,
7865
7866    /// Set if not all tables could be returned in a single response.
7867    /// Pass this value to `page_token` in another request to get the next
7868    /// page of results.
7869    pub next_page_token: std::string::String,
7870
7871    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7872}
7873
7874impl ListAuthorizedViewsResponse {
7875    /// Creates a new default instance.
7876    pub fn new() -> Self {
7877        std::default::Default::default()
7878    }
7879
7880    /// Sets the value of [authorized_views][crate::model::ListAuthorizedViewsResponse::authorized_views].
7881    ///
7882    /// # Example
7883    /// ```ignore,no_run
7884    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
7885    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7886    /// let x = ListAuthorizedViewsResponse::new()
7887    ///     .set_authorized_views([
7888    ///         AuthorizedView::default()/* use setters */,
7889    ///         AuthorizedView::default()/* use (different) setters */,
7890    ///     ]);
7891    /// ```
7892    pub fn set_authorized_views<T, V>(mut self, v: T) -> Self
7893    where
7894        T: std::iter::IntoIterator<Item = V>,
7895        V: std::convert::Into<crate::model::AuthorizedView>,
7896    {
7897        use std::iter::Iterator;
7898        self.authorized_views = v.into_iter().map(|i| i.into()).collect();
7899        self
7900    }
7901
7902    /// Sets the value of [next_page_token][crate::model::ListAuthorizedViewsResponse::next_page_token].
7903    ///
7904    /// # Example
7905    /// ```ignore,no_run
7906    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
7907    /// let x = ListAuthorizedViewsResponse::new().set_next_page_token("example");
7908    /// ```
7909    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7910        self.next_page_token = v.into();
7911        self
7912    }
7913}
7914
7915impl wkt::message::Message for ListAuthorizedViewsResponse {
7916    fn typename() -> &'static str {
7917        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsResponse"
7918    }
7919}
7920
7921#[doc(hidden)]
7922impl google_cloud_gax::paginator::internal::PageableResponse for ListAuthorizedViewsResponse {
7923    type PageItem = crate::model::AuthorizedView;
7924
7925    fn items(self) -> std::vec::Vec<Self::PageItem> {
7926        self.authorized_views
7927    }
7928
7929    fn next_page_token(&self) -> std::string::String {
7930        use std::clone::Clone;
7931        self.next_page_token.clone()
7932    }
7933}
7934
7935/// Request message for
7936/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]
7937///
7938/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]: crate::client::BigtableTableAdmin::get_authorized_view
7939#[derive(Clone, Default, PartialEq)]
7940#[non_exhaustive]
7941pub struct GetAuthorizedViewRequest {
7942    /// Required. The unique name of the requested AuthorizedView.
7943    /// Values are of the form
7944    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
7945    pub name: std::string::String,
7946
7947    /// Optional. The resource_view to be applied to the returned AuthorizedView's
7948    /// fields. Default to BASIC.
7949    pub view: crate::model::authorized_view::ResponseView,
7950
7951    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7952}
7953
7954impl GetAuthorizedViewRequest {
7955    /// Creates a new default instance.
7956    pub fn new() -> Self {
7957        std::default::Default::default()
7958    }
7959
7960    /// Sets the value of [name][crate::model::GetAuthorizedViewRequest::name].
7961    ///
7962    /// # Example
7963    /// ```ignore,no_run
7964    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
7965    /// let x = GetAuthorizedViewRequest::new().set_name("example");
7966    /// ```
7967    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7968        self.name = v.into();
7969        self
7970    }
7971
7972    /// Sets the value of [view][crate::model::GetAuthorizedViewRequest::view].
7973    ///
7974    /// # Example
7975    /// ```ignore,no_run
7976    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
7977    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
7978    /// let x0 = GetAuthorizedViewRequest::new().set_view(ResponseView::NameOnly);
7979    /// let x1 = GetAuthorizedViewRequest::new().set_view(ResponseView::Basic);
7980    /// let x2 = GetAuthorizedViewRequest::new().set_view(ResponseView::Full);
7981    /// ```
7982    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
7983        mut self,
7984        v: T,
7985    ) -> Self {
7986        self.view = v.into();
7987        self
7988    }
7989}
7990
7991impl wkt::message::Message for GetAuthorizedViewRequest {
7992    fn typename() -> &'static str {
7993        "type.googleapis.com/google.bigtable.admin.v2.GetAuthorizedViewRequest"
7994    }
7995}
7996
7997/// The request for
7998/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
7999///
8000/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
8001#[derive(Clone, Default, PartialEq)]
8002#[non_exhaustive]
8003pub struct UpdateAuthorizedViewRequest {
8004    /// Required. The AuthorizedView to update. The `name` in `authorized_view` is
8005    /// used to identify the AuthorizedView. AuthorizedView name must in this
8006    /// format:
8007    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8008    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
8009
8010    /// Optional. The list of fields to update.
8011    /// A mask specifying which fields in the AuthorizedView resource should be
8012    /// updated. This mask is relative to the AuthorizedView resource, not to the
8013    /// request message. A field will be overwritten if it is in the mask. If
8014    /// empty, all fields set in the request will be overwritten. A special value
8015    /// `*` means to overwrite all fields (including fields not set in the
8016    /// request).
8017    pub update_mask: std::option::Option<wkt::FieldMask>,
8018
8019    /// Optional. If true, ignore the safety checks when updating the
8020    /// AuthorizedView.
8021    pub ignore_warnings: bool,
8022
8023    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8024}
8025
8026impl UpdateAuthorizedViewRequest {
8027    /// Creates a new default instance.
8028    pub fn new() -> Self {
8029        std::default::Default::default()
8030    }
8031
8032    /// Sets the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
8033    ///
8034    /// # Example
8035    /// ```ignore,no_run
8036    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8037    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8038    /// let x = UpdateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
8039    /// ```
8040    pub fn set_authorized_view<T>(mut self, v: T) -> Self
8041    where
8042        T: std::convert::Into<crate::model::AuthorizedView>,
8043    {
8044        self.authorized_view = std::option::Option::Some(v.into());
8045        self
8046    }
8047
8048    /// Sets or clears the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
8049    ///
8050    /// # Example
8051    /// ```ignore,no_run
8052    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8053    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8054    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
8055    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
8056    /// ```
8057    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
8058    where
8059        T: std::convert::Into<crate::model::AuthorizedView>,
8060    {
8061        self.authorized_view = v.map(|x| x.into());
8062        self
8063    }
8064
8065    /// Sets the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
8066    ///
8067    /// # Example
8068    /// ```ignore,no_run
8069    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8070    /// use wkt::FieldMask;
8071    /// let x = UpdateAuthorizedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8072    /// ```
8073    pub fn set_update_mask<T>(mut self, v: T) -> Self
8074    where
8075        T: std::convert::Into<wkt::FieldMask>,
8076    {
8077        self.update_mask = std::option::Option::Some(v.into());
8078        self
8079    }
8080
8081    /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
8082    ///
8083    /// # Example
8084    /// ```ignore,no_run
8085    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8086    /// use wkt::FieldMask;
8087    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8088    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8089    /// ```
8090    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8091    where
8092        T: std::convert::Into<wkt::FieldMask>,
8093    {
8094        self.update_mask = v.map(|x| x.into());
8095        self
8096    }
8097
8098    /// Sets the value of [ignore_warnings][crate::model::UpdateAuthorizedViewRequest::ignore_warnings].
8099    ///
8100    /// # Example
8101    /// ```ignore,no_run
8102    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8103    /// let x = UpdateAuthorizedViewRequest::new().set_ignore_warnings(true);
8104    /// ```
8105    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8106        self.ignore_warnings = v.into();
8107        self
8108    }
8109}
8110
8111impl wkt::message::Message for UpdateAuthorizedViewRequest {
8112    fn typename() -> &'static str {
8113        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewRequest"
8114    }
8115}
8116
8117/// Metadata for the google.longrunning.Operation returned by
8118/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
8119///
8120/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
8121#[derive(Clone, Default, PartialEq)]
8122#[non_exhaustive]
8123pub struct UpdateAuthorizedViewMetadata {
8124    /// The request that prompted the initiation of this UpdateAuthorizedView
8125    /// operation.
8126    pub original_request: std::option::Option<crate::model::UpdateAuthorizedViewRequest>,
8127
8128    /// The time at which the original request was received.
8129    pub request_time: std::option::Option<wkt::Timestamp>,
8130
8131    /// The time at which the operation failed or was completed successfully.
8132    pub finish_time: std::option::Option<wkt::Timestamp>,
8133
8134    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8135}
8136
8137impl UpdateAuthorizedViewMetadata {
8138    /// Creates a new default instance.
8139    pub fn new() -> Self {
8140        std::default::Default::default()
8141    }
8142
8143    /// Sets the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8144    ///
8145    /// # Example
8146    /// ```ignore,no_run
8147    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8148    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8149    /// let x = UpdateAuthorizedViewMetadata::new().set_original_request(UpdateAuthorizedViewRequest::default()/* use setters */);
8150    /// ```
8151    pub fn set_original_request<T>(mut self, v: T) -> Self
8152    where
8153        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8154    {
8155        self.original_request = std::option::Option::Some(v.into());
8156        self
8157    }
8158
8159    /// Sets or clears the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8160    ///
8161    /// # Example
8162    /// ```ignore,no_run
8163    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8164    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8165    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(UpdateAuthorizedViewRequest::default()/* use setters */));
8166    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<UpdateAuthorizedViewRequest>);
8167    /// ```
8168    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
8169    where
8170        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8171    {
8172        self.original_request = v.map(|x| x.into());
8173        self
8174    }
8175
8176    /// Sets the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8177    ///
8178    /// # Example
8179    /// ```ignore,no_run
8180    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8181    /// use wkt::Timestamp;
8182    /// let x = UpdateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
8183    /// ```
8184    pub fn set_request_time<T>(mut self, v: T) -> Self
8185    where
8186        T: std::convert::Into<wkt::Timestamp>,
8187    {
8188        self.request_time = std::option::Option::Some(v.into());
8189        self
8190    }
8191
8192    /// Sets or clears the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8193    ///
8194    /// # Example
8195    /// ```ignore,no_run
8196    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8197    /// use wkt::Timestamp;
8198    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
8199    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
8200    /// ```
8201    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
8202    where
8203        T: std::convert::Into<wkt::Timestamp>,
8204    {
8205        self.request_time = v.map(|x| x.into());
8206        self
8207    }
8208
8209    /// Sets the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8210    ///
8211    /// # Example
8212    /// ```ignore,no_run
8213    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8214    /// use wkt::Timestamp;
8215    /// let x = UpdateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
8216    /// ```
8217    pub fn set_finish_time<T>(mut self, v: T) -> Self
8218    where
8219        T: std::convert::Into<wkt::Timestamp>,
8220    {
8221        self.finish_time = std::option::Option::Some(v.into());
8222        self
8223    }
8224
8225    /// Sets or clears the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8226    ///
8227    /// # Example
8228    /// ```ignore,no_run
8229    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8230    /// use wkt::Timestamp;
8231    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
8232    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
8233    /// ```
8234    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
8235    where
8236        T: std::convert::Into<wkt::Timestamp>,
8237    {
8238        self.finish_time = v.map(|x| x.into());
8239        self
8240    }
8241}
8242
8243impl wkt::message::Message for UpdateAuthorizedViewMetadata {
8244    fn typename() -> &'static str {
8245        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewMetadata"
8246    }
8247}
8248
8249/// Request message for
8250/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]
8251///
8252/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]: crate::client::BigtableTableAdmin::delete_authorized_view
8253#[derive(Clone, Default, PartialEq)]
8254#[non_exhaustive]
8255pub struct DeleteAuthorizedViewRequest {
8256    /// Required. The unique name of the AuthorizedView to be deleted.
8257    /// Values are of the form
8258    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8259    pub name: std::string::String,
8260
8261    /// Optional. The current etag of the AuthorizedView.
8262    /// If an etag is provided and does not match the current etag of the
8263    /// AuthorizedView, deletion will be blocked and an ABORTED error will be
8264    /// returned.
8265    pub etag: std::string::String,
8266
8267    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8268}
8269
8270impl DeleteAuthorizedViewRequest {
8271    /// Creates a new default instance.
8272    pub fn new() -> Self {
8273        std::default::Default::default()
8274    }
8275
8276    /// Sets the value of [name][crate::model::DeleteAuthorizedViewRequest::name].
8277    ///
8278    /// # Example
8279    /// ```ignore,no_run
8280    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8281    /// let x = DeleteAuthorizedViewRequest::new().set_name("example");
8282    /// ```
8283    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8284        self.name = v.into();
8285        self
8286    }
8287
8288    /// Sets the value of [etag][crate::model::DeleteAuthorizedViewRequest::etag].
8289    ///
8290    /// # Example
8291    /// ```ignore,no_run
8292    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8293    /// let x = DeleteAuthorizedViewRequest::new().set_etag("example");
8294    /// ```
8295    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8296        self.etag = v.into();
8297        self
8298    }
8299}
8300
8301impl wkt::message::Message for DeleteAuthorizedViewRequest {
8302    fn typename() -> &'static str {
8303        "type.googleapis.com/google.bigtable.admin.v2.DeleteAuthorizedViewRequest"
8304    }
8305}
8306
8307/// The request for
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 CreateSchemaBundleRequest {
8314    /// Required. The parent resource where this schema bundle will be created.
8315    /// Values are of the form
8316    /// `projects/{project}/instances/{instance}/tables/{table}`.
8317    pub parent: std::string::String,
8318
8319    /// Required. The unique ID to use for the schema bundle, which will become the
8320    /// final component of the schema bundle's resource name.
8321    pub schema_bundle_id: std::string::String,
8322
8323    /// Required. The schema bundle to create.
8324    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8325
8326    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8327}
8328
8329impl CreateSchemaBundleRequest {
8330    /// Creates a new default instance.
8331    pub fn new() -> Self {
8332        std::default::Default::default()
8333    }
8334
8335    /// Sets the value of [parent][crate::model::CreateSchemaBundleRequest::parent].
8336    ///
8337    /// # Example
8338    /// ```ignore,no_run
8339    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8340    /// let x = CreateSchemaBundleRequest::new().set_parent("example");
8341    /// ```
8342    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8343        self.parent = v.into();
8344        self
8345    }
8346
8347    /// Sets the value of [schema_bundle_id][crate::model::CreateSchemaBundleRequest::schema_bundle_id].
8348    ///
8349    /// # Example
8350    /// ```ignore,no_run
8351    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8352    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle_id("example");
8353    /// ```
8354    pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
8355        mut self,
8356        v: T,
8357    ) -> Self {
8358        self.schema_bundle_id = v.into();
8359        self
8360    }
8361
8362    /// Sets the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8363    ///
8364    /// # Example
8365    /// ```ignore,no_run
8366    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8367    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8368    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8369    /// ```
8370    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8371    where
8372        T: std::convert::Into<crate::model::SchemaBundle>,
8373    {
8374        self.schema_bundle = std::option::Option::Some(v.into());
8375        self
8376    }
8377
8378    /// Sets or clears the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8379    ///
8380    /// # Example
8381    /// ```ignore,no_run
8382    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8383    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8384    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8385    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8386    /// ```
8387    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8388    where
8389        T: std::convert::Into<crate::model::SchemaBundle>,
8390    {
8391        self.schema_bundle = v.map(|x| x.into());
8392        self
8393    }
8394}
8395
8396impl wkt::message::Message for CreateSchemaBundleRequest {
8397    fn typename() -> &'static str {
8398        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleRequest"
8399    }
8400}
8401
8402/// The metadata for the Operation returned by
8403/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8404///
8405/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8406#[derive(Clone, Default, PartialEq)]
8407#[non_exhaustive]
8408pub struct CreateSchemaBundleMetadata {
8409    /// The unique name identifying this schema bundle.
8410    /// Values are of the form
8411    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8412    pub name: std::string::String,
8413
8414    /// The time at which this operation started.
8415    pub start_time: std::option::Option<wkt::Timestamp>,
8416
8417    /// If set, the time at which this operation finished or was canceled.
8418    pub end_time: std::option::Option<wkt::Timestamp>,
8419
8420    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8421}
8422
8423impl CreateSchemaBundleMetadata {
8424    /// Creates a new default instance.
8425    pub fn new() -> Self {
8426        std::default::Default::default()
8427    }
8428
8429    /// Sets the value of [name][crate::model::CreateSchemaBundleMetadata::name].
8430    ///
8431    /// # Example
8432    /// ```ignore,no_run
8433    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8434    /// let x = CreateSchemaBundleMetadata::new().set_name("example");
8435    /// ```
8436    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8437        self.name = v.into();
8438        self
8439    }
8440
8441    /// Sets the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
8442    ///
8443    /// # Example
8444    /// ```ignore,no_run
8445    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8446    /// use wkt::Timestamp;
8447    /// let x = CreateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
8448    /// ```
8449    pub fn set_start_time<T>(mut self, v: T) -> Self
8450    where
8451        T: std::convert::Into<wkt::Timestamp>,
8452    {
8453        self.start_time = std::option::Option::Some(v.into());
8454        self
8455    }
8456
8457    /// Sets or clears the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
8458    ///
8459    /// # Example
8460    /// ```ignore,no_run
8461    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8462    /// use wkt::Timestamp;
8463    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8464    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
8465    /// ```
8466    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8467    where
8468        T: std::convert::Into<wkt::Timestamp>,
8469    {
8470        self.start_time = v.map(|x| x.into());
8471        self
8472    }
8473
8474    /// Sets the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
8475    ///
8476    /// # Example
8477    /// ```ignore,no_run
8478    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8479    /// use wkt::Timestamp;
8480    /// let x = CreateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8481    /// ```
8482    pub fn set_end_time<T>(mut self, v: T) -> Self
8483    where
8484        T: std::convert::Into<wkt::Timestamp>,
8485    {
8486        self.end_time = std::option::Option::Some(v.into());
8487        self
8488    }
8489
8490    /// Sets or clears the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
8491    ///
8492    /// # Example
8493    /// ```ignore,no_run
8494    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8495    /// use wkt::Timestamp;
8496    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8497    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8498    /// ```
8499    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8500    where
8501        T: std::convert::Into<wkt::Timestamp>,
8502    {
8503        self.end_time = v.map(|x| x.into());
8504        self
8505    }
8506}
8507
8508impl wkt::message::Message for CreateSchemaBundleMetadata {
8509    fn typename() -> &'static str {
8510        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleMetadata"
8511    }
8512}
8513
8514/// The request for
8515/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
8516///
8517/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
8518#[derive(Clone, Default, PartialEq)]
8519#[non_exhaustive]
8520pub struct UpdateSchemaBundleRequest {
8521    /// Required. The schema bundle to update.
8522    ///
8523    /// The schema bundle's `name` field is used to identify the schema bundle to
8524    /// update. Values are of the form
8525    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8526    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8527
8528    /// Optional. The list of fields to update.
8529    pub update_mask: std::option::Option<wkt::FieldMask>,
8530
8531    /// Optional. If set, ignore the safety checks when updating the Schema Bundle.
8532    /// The safety checks are:
8533    ///
8534    /// - The new Schema Bundle is backwards compatible with the existing Schema
8535    ///   Bundle.
8536    pub ignore_warnings: bool,
8537
8538    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8539}
8540
8541impl UpdateSchemaBundleRequest {
8542    /// Creates a new default instance.
8543    pub fn new() -> Self {
8544        std::default::Default::default()
8545    }
8546
8547    /// Sets the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
8548    ///
8549    /// # Example
8550    /// ```ignore,no_run
8551    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8552    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8553    /// let x = UpdateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8554    /// ```
8555    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8556    where
8557        T: std::convert::Into<crate::model::SchemaBundle>,
8558    {
8559        self.schema_bundle = std::option::Option::Some(v.into());
8560        self
8561    }
8562
8563    /// Sets or clears the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
8564    ///
8565    /// # Example
8566    /// ```ignore,no_run
8567    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8568    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8569    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8570    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8571    /// ```
8572    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8573    where
8574        T: std::convert::Into<crate::model::SchemaBundle>,
8575    {
8576        self.schema_bundle = v.map(|x| x.into());
8577        self
8578    }
8579
8580    /// Sets the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
8581    ///
8582    /// # Example
8583    /// ```ignore,no_run
8584    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8585    /// use wkt::FieldMask;
8586    /// let x = UpdateSchemaBundleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8587    /// ```
8588    pub fn set_update_mask<T>(mut self, v: T) -> Self
8589    where
8590        T: std::convert::Into<wkt::FieldMask>,
8591    {
8592        self.update_mask = std::option::Option::Some(v.into());
8593        self
8594    }
8595
8596    /// Sets or clears the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
8597    ///
8598    /// # Example
8599    /// ```ignore,no_run
8600    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8601    /// use wkt::FieldMask;
8602    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8603    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8604    /// ```
8605    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8606    where
8607        T: std::convert::Into<wkt::FieldMask>,
8608    {
8609        self.update_mask = v.map(|x| x.into());
8610        self
8611    }
8612
8613    /// Sets the value of [ignore_warnings][crate::model::UpdateSchemaBundleRequest::ignore_warnings].
8614    ///
8615    /// # Example
8616    /// ```ignore,no_run
8617    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8618    /// let x = UpdateSchemaBundleRequest::new().set_ignore_warnings(true);
8619    /// ```
8620    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8621        self.ignore_warnings = v.into();
8622        self
8623    }
8624}
8625
8626impl wkt::message::Message for UpdateSchemaBundleRequest {
8627    fn typename() -> &'static str {
8628        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleRequest"
8629    }
8630}
8631
8632/// The metadata for the Operation returned by
8633/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
8634///
8635/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
8636#[derive(Clone, Default, PartialEq)]
8637#[non_exhaustive]
8638pub struct UpdateSchemaBundleMetadata {
8639    /// The unique name identifying this schema bundle.
8640    /// Values are of the form
8641    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8642    pub name: std::string::String,
8643
8644    /// The time at which this operation started.
8645    pub start_time: std::option::Option<wkt::Timestamp>,
8646
8647    /// If set, the time at which this operation finished or was canceled.
8648    pub end_time: std::option::Option<wkt::Timestamp>,
8649
8650    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8651}
8652
8653impl UpdateSchemaBundleMetadata {
8654    /// Creates a new default instance.
8655    pub fn new() -> Self {
8656        std::default::Default::default()
8657    }
8658
8659    /// Sets the value of [name][crate::model::UpdateSchemaBundleMetadata::name].
8660    ///
8661    /// # Example
8662    /// ```ignore,no_run
8663    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8664    /// let x = UpdateSchemaBundleMetadata::new().set_name("example");
8665    /// ```
8666    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8667        self.name = v.into();
8668        self
8669    }
8670
8671    /// Sets the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
8672    ///
8673    /// # Example
8674    /// ```ignore,no_run
8675    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8676    /// use wkt::Timestamp;
8677    /// let x = UpdateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
8678    /// ```
8679    pub fn set_start_time<T>(mut self, v: T) -> Self
8680    where
8681        T: std::convert::Into<wkt::Timestamp>,
8682    {
8683        self.start_time = std::option::Option::Some(v.into());
8684        self
8685    }
8686
8687    /// Sets or clears the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
8688    ///
8689    /// # Example
8690    /// ```ignore,no_run
8691    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8692    /// use wkt::Timestamp;
8693    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8694    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
8695    /// ```
8696    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8697    where
8698        T: std::convert::Into<wkt::Timestamp>,
8699    {
8700        self.start_time = v.map(|x| x.into());
8701        self
8702    }
8703
8704    /// Sets the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
8705    ///
8706    /// # Example
8707    /// ```ignore,no_run
8708    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8709    /// use wkt::Timestamp;
8710    /// let x = UpdateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8711    /// ```
8712    pub fn set_end_time<T>(mut self, v: T) -> Self
8713    where
8714        T: std::convert::Into<wkt::Timestamp>,
8715    {
8716        self.end_time = std::option::Option::Some(v.into());
8717        self
8718    }
8719
8720    /// Sets or clears the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
8721    ///
8722    /// # Example
8723    /// ```ignore,no_run
8724    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8725    /// use wkt::Timestamp;
8726    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8727    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8728    /// ```
8729    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8730    where
8731        T: std::convert::Into<wkt::Timestamp>,
8732    {
8733        self.end_time = v.map(|x| x.into());
8734        self
8735    }
8736}
8737
8738impl wkt::message::Message for UpdateSchemaBundleMetadata {
8739    fn typename() -> &'static str {
8740        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleMetadata"
8741    }
8742}
8743
8744/// The request for
8745/// [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle].
8746///
8747/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle]: crate::client::BigtableTableAdmin::get_schema_bundle
8748#[derive(Clone, Default, PartialEq)]
8749#[non_exhaustive]
8750pub struct GetSchemaBundleRequest {
8751    /// Required. The unique name of the schema bundle to retrieve.
8752    /// Values are of the form
8753    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8754    pub name: std::string::String,
8755
8756    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8757}
8758
8759impl GetSchemaBundleRequest {
8760    /// Creates a new default instance.
8761    pub fn new() -> Self {
8762        std::default::Default::default()
8763    }
8764
8765    /// Sets the value of [name][crate::model::GetSchemaBundleRequest::name].
8766    ///
8767    /// # Example
8768    /// ```ignore,no_run
8769    /// # use google_cloud_bigtable_admin_v2::model::GetSchemaBundleRequest;
8770    /// let x = GetSchemaBundleRequest::new().set_name("example");
8771    /// ```
8772    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8773        self.name = v.into();
8774        self
8775    }
8776}
8777
8778impl wkt::message::Message for GetSchemaBundleRequest {
8779    fn typename() -> &'static str {
8780        "type.googleapis.com/google.bigtable.admin.v2.GetSchemaBundleRequest"
8781    }
8782}
8783
8784/// The request for
8785/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
8786///
8787/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
8788#[derive(Clone, Default, PartialEq)]
8789#[non_exhaustive]
8790pub struct ListSchemaBundlesRequest {
8791    /// Required. The parent, which owns this collection of schema bundles.
8792    /// Values are of the form
8793    /// `projects/{project}/instances/{instance}/tables/{table}`.
8794    pub parent: std::string::String,
8795
8796    /// The maximum number of schema bundles to return. If the value is positive,
8797    /// the server may return at most this value. If unspecified, the server will
8798    /// return the maximum allowed page size.
8799    pub page_size: i32,
8800
8801    /// A page token, received from a previous `ListSchemaBundles` call.
8802    /// Provide this to retrieve the subsequent page.
8803    ///
8804    /// When paginating, all other parameters provided to `ListSchemaBundles` must
8805    /// match the call that provided the page token.
8806    pub page_token: std::string::String,
8807
8808    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8809}
8810
8811impl ListSchemaBundlesRequest {
8812    /// Creates a new default instance.
8813    pub fn new() -> Self {
8814        std::default::Default::default()
8815    }
8816
8817    /// Sets the value of [parent][crate::model::ListSchemaBundlesRequest::parent].
8818    ///
8819    /// # Example
8820    /// ```ignore,no_run
8821    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8822    /// let x = ListSchemaBundlesRequest::new().set_parent("example");
8823    /// ```
8824    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8825        self.parent = v.into();
8826        self
8827    }
8828
8829    /// Sets the value of [page_size][crate::model::ListSchemaBundlesRequest::page_size].
8830    ///
8831    /// # Example
8832    /// ```ignore,no_run
8833    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8834    /// let x = ListSchemaBundlesRequest::new().set_page_size(42);
8835    /// ```
8836    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8837        self.page_size = v.into();
8838        self
8839    }
8840
8841    /// Sets the value of [page_token][crate::model::ListSchemaBundlesRequest::page_token].
8842    ///
8843    /// # Example
8844    /// ```ignore,no_run
8845    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8846    /// let x = ListSchemaBundlesRequest::new().set_page_token("example");
8847    /// ```
8848    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8849        self.page_token = v.into();
8850        self
8851    }
8852}
8853
8854impl wkt::message::Message for ListSchemaBundlesRequest {
8855    fn typename() -> &'static str {
8856        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesRequest"
8857    }
8858}
8859
8860/// The response for
8861/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
8862///
8863/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
8864#[derive(Clone, Default, PartialEq)]
8865#[non_exhaustive]
8866pub struct ListSchemaBundlesResponse {
8867    /// The schema bundles from the specified table.
8868    pub schema_bundles: std::vec::Vec<crate::model::SchemaBundle>,
8869
8870    /// A token, which can be sent as `page_token` to retrieve the next page.
8871    /// If this field is omitted, there are no subsequent pages.
8872    pub next_page_token: std::string::String,
8873
8874    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8875}
8876
8877impl ListSchemaBundlesResponse {
8878    /// Creates a new default instance.
8879    pub fn new() -> Self {
8880        std::default::Default::default()
8881    }
8882
8883    /// Sets the value of [schema_bundles][crate::model::ListSchemaBundlesResponse::schema_bundles].
8884    ///
8885    /// # Example
8886    /// ```ignore,no_run
8887    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
8888    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8889    /// let x = ListSchemaBundlesResponse::new()
8890    ///     .set_schema_bundles([
8891    ///         SchemaBundle::default()/* use setters */,
8892    ///         SchemaBundle::default()/* use (different) setters */,
8893    ///     ]);
8894    /// ```
8895    pub fn set_schema_bundles<T, V>(mut self, v: T) -> Self
8896    where
8897        T: std::iter::IntoIterator<Item = V>,
8898        V: std::convert::Into<crate::model::SchemaBundle>,
8899    {
8900        use std::iter::Iterator;
8901        self.schema_bundles = v.into_iter().map(|i| i.into()).collect();
8902        self
8903    }
8904
8905    /// Sets the value of [next_page_token][crate::model::ListSchemaBundlesResponse::next_page_token].
8906    ///
8907    /// # Example
8908    /// ```ignore,no_run
8909    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
8910    /// let x = ListSchemaBundlesResponse::new().set_next_page_token("example");
8911    /// ```
8912    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8913        self.next_page_token = v.into();
8914        self
8915    }
8916}
8917
8918impl wkt::message::Message for ListSchemaBundlesResponse {
8919    fn typename() -> &'static str {
8920        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesResponse"
8921    }
8922}
8923
8924#[doc(hidden)]
8925impl google_cloud_gax::paginator::internal::PageableResponse for ListSchemaBundlesResponse {
8926    type PageItem = crate::model::SchemaBundle;
8927
8928    fn items(self) -> std::vec::Vec<Self::PageItem> {
8929        self.schema_bundles
8930    }
8931
8932    fn next_page_token(&self) -> std::string::String {
8933        use std::clone::Clone;
8934        self.next_page_token.clone()
8935    }
8936}
8937
8938/// The request for
8939/// [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle].
8940///
8941/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle]: crate::client::BigtableTableAdmin::delete_schema_bundle
8942#[derive(Clone, Default, PartialEq)]
8943#[non_exhaustive]
8944pub struct DeleteSchemaBundleRequest {
8945    /// Required. The unique name of the schema bundle to delete.
8946    /// Values are of the form
8947    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8948    pub name: std::string::String,
8949
8950    /// Optional. The etag of the schema bundle.
8951    /// If this is provided, it must match the server's etag. The server
8952    /// returns an ABORTED error on a mismatched etag.
8953    pub etag: std::string::String,
8954
8955    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8956}
8957
8958impl DeleteSchemaBundleRequest {
8959    /// Creates a new default instance.
8960    pub fn new() -> Self {
8961        std::default::Default::default()
8962    }
8963
8964    /// Sets the value of [name][crate::model::DeleteSchemaBundleRequest::name].
8965    ///
8966    /// # Example
8967    /// ```ignore,no_run
8968    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
8969    /// let x = DeleteSchemaBundleRequest::new().set_name("example");
8970    /// ```
8971    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8972        self.name = v.into();
8973        self
8974    }
8975
8976    /// Sets the value of [etag][crate::model::DeleteSchemaBundleRequest::etag].
8977    ///
8978    /// # Example
8979    /// ```ignore,no_run
8980    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
8981    /// let x = DeleteSchemaBundleRequest::new().set_etag("example");
8982    /// ```
8983    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8984        self.etag = v.into();
8985        self
8986    }
8987}
8988
8989impl wkt::message::Message for DeleteSchemaBundleRequest {
8990    fn typename() -> &'static str {
8991        "type.googleapis.com/google.bigtable.admin.v2.DeleteSchemaBundleRequest"
8992    }
8993}
8994
8995/// Encapsulates progress related information for a Cloud Bigtable long
8996/// running operation.
8997#[derive(Clone, Default, PartialEq)]
8998#[non_exhaustive]
8999pub struct OperationProgress {
9000    /// Percent completion of the operation.
9001    /// Values are between 0 and 100 inclusive.
9002    pub progress_percent: i32,
9003
9004    /// Time the request was received.
9005    pub start_time: std::option::Option<wkt::Timestamp>,
9006
9007    /// If set, the time at which this operation failed or was completed
9008    /// successfully.
9009    pub end_time: std::option::Option<wkt::Timestamp>,
9010
9011    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9012}
9013
9014impl OperationProgress {
9015    /// Creates a new default instance.
9016    pub fn new() -> Self {
9017        std::default::Default::default()
9018    }
9019
9020    /// Sets the value of [progress_percent][crate::model::OperationProgress::progress_percent].
9021    ///
9022    /// # Example
9023    /// ```ignore,no_run
9024    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9025    /// let x = OperationProgress::new().set_progress_percent(42);
9026    /// ```
9027    pub fn set_progress_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9028        self.progress_percent = v.into();
9029        self
9030    }
9031
9032    /// Sets the value of [start_time][crate::model::OperationProgress::start_time].
9033    ///
9034    /// # Example
9035    /// ```ignore,no_run
9036    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9037    /// use wkt::Timestamp;
9038    /// let x = OperationProgress::new().set_start_time(Timestamp::default()/* use setters */);
9039    /// ```
9040    pub fn set_start_time<T>(mut self, v: T) -> Self
9041    where
9042        T: std::convert::Into<wkt::Timestamp>,
9043    {
9044        self.start_time = std::option::Option::Some(v.into());
9045        self
9046    }
9047
9048    /// Sets or clears the value of [start_time][crate::model::OperationProgress::start_time].
9049    ///
9050    /// # Example
9051    /// ```ignore,no_run
9052    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9053    /// use wkt::Timestamp;
9054    /// let x = OperationProgress::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
9055    /// let x = OperationProgress::new().set_or_clear_start_time(None::<Timestamp>);
9056    /// ```
9057    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
9058    where
9059        T: std::convert::Into<wkt::Timestamp>,
9060    {
9061        self.start_time = v.map(|x| x.into());
9062        self
9063    }
9064
9065    /// Sets the value of [end_time][crate::model::OperationProgress::end_time].
9066    ///
9067    /// # Example
9068    /// ```ignore,no_run
9069    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9070    /// use wkt::Timestamp;
9071    /// let x = OperationProgress::new().set_end_time(Timestamp::default()/* use setters */);
9072    /// ```
9073    pub fn set_end_time<T>(mut self, v: T) -> Self
9074    where
9075        T: std::convert::Into<wkt::Timestamp>,
9076    {
9077        self.end_time = std::option::Option::Some(v.into());
9078        self
9079    }
9080
9081    /// Sets or clears the value of [end_time][crate::model::OperationProgress::end_time].
9082    ///
9083    /// # Example
9084    /// ```ignore,no_run
9085    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9086    /// use wkt::Timestamp;
9087    /// let x = OperationProgress::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9088    /// let x = OperationProgress::new().set_or_clear_end_time(None::<Timestamp>);
9089    /// ```
9090    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9091    where
9092        T: std::convert::Into<wkt::Timestamp>,
9093    {
9094        self.end_time = v.map(|x| x.into());
9095        self
9096    }
9097}
9098
9099impl wkt::message::Message for OperationProgress {
9100    fn typename() -> &'static str {
9101        "type.googleapis.com/google.bigtable.admin.v2.OperationProgress"
9102    }
9103}
9104
9105/// A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and
9106/// the resources that serve them.
9107/// All tables in an instance are served from all
9108/// [Clusters][google.bigtable.admin.v2.Cluster] in the instance.
9109///
9110/// [google.bigtable.admin.v2.Cluster]: crate::model::Cluster
9111/// [google.bigtable.admin.v2.Table]: crate::model::Table
9112#[derive(Clone, Default, PartialEq)]
9113#[non_exhaustive]
9114pub struct Instance {
9115    /// The unique name of the instance. Values are of the form
9116    /// `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
9117    pub name: std::string::String,
9118
9119    /// Required. The descriptive name for this instance as it appears in UIs.
9120    /// Can be changed at any time, but should be kept globally unique
9121    /// to avoid confusion.
9122    pub display_name: std::string::String,
9123
9124    /// Output only. The current state of the instance.
9125    pub state: crate::model::instance::State,
9126
9127    /// The type of the instance. Defaults to `PRODUCTION`.
9128    pub r#type: crate::model::instance::Type,
9129
9130    /// Optional. The edition of the instance. See
9131    /// [Edition][google.bigtable.admin.v2.Instance.Edition] for details.
9132    ///
9133    /// [google.bigtable.admin.v2.Instance.Edition]: crate::model::instance::Edition
9134    pub edition: crate::model::instance::Edition,
9135
9136    /// Labels are a flexible and lightweight mechanism for organizing cloud
9137    /// resources into groups that reflect a customer's organizational needs and
9138    /// deployment strategies. They can be used to filter resources and aggregate
9139    /// metrics.
9140    ///
9141    /// * Label keys must be between 1 and 63 characters long and must conform to
9142    ///   the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
9143    /// * Label values must be between 0 and 63 characters long and must conform to
9144    ///   the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
9145    /// * No more than 64 labels can be associated with a given resource.
9146    /// * Keys and values must both be under 128 bytes.
9147    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9148
9149    /// Output only. A commit timestamp representing when this Instance was
9150    /// created. For instances created before this field was added (August 2021),
9151    /// this value is `seconds: 0, nanos: 1`.
9152    pub create_time: std::option::Option<wkt::Timestamp>,
9153
9154    /// Output only. Reserved for future use.
9155    pub satisfies_pzs: std::option::Option<bool>,
9156
9157    /// Output only. Reserved for future use.
9158    pub satisfies_pzi: std::option::Option<bool>,
9159
9160    /// Optional. Input only. Immutable. Tag keys/values directly bound to this
9161    /// resource. For example:
9162    ///
9163    /// - "123/environment": "production",
9164    /// - "123/costCenter": "marketing"
9165    ///
9166    /// Tags and Labels (above) are both used to bind metadata to resources, with
9167    /// different use-cases. See
9168    /// <https://cloud.google.com/resource-manager/docs/tags/tags-overview> for an
9169    /// in-depth overview on the difference between tags and labels.
9170    pub tags: std::collections::HashMap<std::string::String, std::string::String>,
9171
9172    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9173}
9174
9175impl Instance {
9176    /// Creates a new default instance.
9177    pub fn new() -> Self {
9178        std::default::Default::default()
9179    }
9180
9181    /// Sets the value of [name][crate::model::Instance::name].
9182    ///
9183    /// # Example
9184    /// ```ignore,no_run
9185    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9186    /// let x = Instance::new().set_name("example");
9187    /// ```
9188    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9189        self.name = v.into();
9190        self
9191    }
9192
9193    /// Sets the value of [display_name][crate::model::Instance::display_name].
9194    ///
9195    /// # Example
9196    /// ```ignore,no_run
9197    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9198    /// let x = Instance::new().set_display_name("example");
9199    /// ```
9200    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9201        self.display_name = v.into();
9202        self
9203    }
9204
9205    /// Sets the value of [state][crate::model::Instance::state].
9206    ///
9207    /// # Example
9208    /// ```ignore,no_run
9209    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9210    /// use google_cloud_bigtable_admin_v2::model::instance::State;
9211    /// let x0 = Instance::new().set_state(State::Ready);
9212    /// let x1 = Instance::new().set_state(State::Creating);
9213    /// ```
9214    pub fn set_state<T: std::convert::Into<crate::model::instance::State>>(mut self, v: T) -> Self {
9215        self.state = v.into();
9216        self
9217    }
9218
9219    /// Sets the value of [r#type][crate::model::Instance::type].
9220    ///
9221    /// # Example
9222    /// ```ignore,no_run
9223    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9224    /// use google_cloud_bigtable_admin_v2::model::instance::Type;
9225    /// let x0 = Instance::new().set_type(Type::Production);
9226    /// let x1 = Instance::new().set_type(Type::Development);
9227    /// ```
9228    pub fn set_type<T: std::convert::Into<crate::model::instance::Type>>(mut self, v: T) -> Self {
9229        self.r#type = v.into();
9230        self
9231    }
9232
9233    /// Sets the value of [edition][crate::model::Instance::edition].
9234    ///
9235    /// # Example
9236    /// ```ignore,no_run
9237    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9238    /// use google_cloud_bigtable_admin_v2::model::instance::Edition;
9239    /// let x0 = Instance::new().set_edition(Edition::Enterprise);
9240    /// let x1 = Instance::new().set_edition(Edition::EnterprisePlus);
9241    /// ```
9242    pub fn set_edition<T: std::convert::Into<crate::model::instance::Edition>>(
9243        mut self,
9244        v: T,
9245    ) -> Self {
9246        self.edition = v.into();
9247        self
9248    }
9249
9250    /// Sets the value of [labels][crate::model::Instance::labels].
9251    ///
9252    /// # Example
9253    /// ```ignore,no_run
9254    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9255    /// let x = Instance::new().set_labels([
9256    ///     ("key0", "abc"),
9257    ///     ("key1", "xyz"),
9258    /// ]);
9259    /// ```
9260    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9261    where
9262        T: std::iter::IntoIterator<Item = (K, V)>,
9263        K: std::convert::Into<std::string::String>,
9264        V: std::convert::Into<std::string::String>,
9265    {
9266        use std::iter::Iterator;
9267        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9268        self
9269    }
9270
9271    /// Sets the value of [create_time][crate::model::Instance::create_time].
9272    ///
9273    /// # Example
9274    /// ```ignore,no_run
9275    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9276    /// use wkt::Timestamp;
9277    /// let x = Instance::new().set_create_time(Timestamp::default()/* use setters */);
9278    /// ```
9279    pub fn set_create_time<T>(mut self, v: T) -> Self
9280    where
9281        T: std::convert::Into<wkt::Timestamp>,
9282    {
9283        self.create_time = std::option::Option::Some(v.into());
9284        self
9285    }
9286
9287    /// Sets or clears the value of [create_time][crate::model::Instance::create_time].
9288    ///
9289    /// # Example
9290    /// ```ignore,no_run
9291    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9292    /// use wkt::Timestamp;
9293    /// let x = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9294    /// let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);
9295    /// ```
9296    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9297    where
9298        T: std::convert::Into<wkt::Timestamp>,
9299    {
9300        self.create_time = v.map(|x| x.into());
9301        self
9302    }
9303
9304    /// Sets the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9305    ///
9306    /// # Example
9307    /// ```ignore,no_run
9308    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9309    /// let x = Instance::new().set_satisfies_pzs(true);
9310    /// ```
9311    pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
9312    where
9313        T: std::convert::Into<bool>,
9314    {
9315        self.satisfies_pzs = std::option::Option::Some(v.into());
9316        self
9317    }
9318
9319    /// Sets or clears the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9320    ///
9321    /// # Example
9322    /// ```ignore,no_run
9323    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9324    /// let x = Instance::new().set_or_clear_satisfies_pzs(Some(false));
9325    /// let x = Instance::new().set_or_clear_satisfies_pzs(None::<bool>);
9326    /// ```
9327    pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
9328    where
9329        T: std::convert::Into<bool>,
9330    {
9331        self.satisfies_pzs = v.map(|x| x.into());
9332        self
9333    }
9334
9335    /// Sets the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9336    ///
9337    /// # Example
9338    /// ```ignore,no_run
9339    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9340    /// let x = Instance::new().set_satisfies_pzi(true);
9341    /// ```
9342    pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
9343    where
9344        T: std::convert::Into<bool>,
9345    {
9346        self.satisfies_pzi = std::option::Option::Some(v.into());
9347        self
9348    }
9349
9350    /// Sets or clears the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9351    ///
9352    /// # Example
9353    /// ```ignore,no_run
9354    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9355    /// let x = Instance::new().set_or_clear_satisfies_pzi(Some(false));
9356    /// let x = Instance::new().set_or_clear_satisfies_pzi(None::<bool>);
9357    /// ```
9358    pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
9359    where
9360        T: std::convert::Into<bool>,
9361    {
9362        self.satisfies_pzi = v.map(|x| x.into());
9363        self
9364    }
9365
9366    /// Sets the value of [tags][crate::model::Instance::tags].
9367    ///
9368    /// # Example
9369    /// ```ignore,no_run
9370    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9371    /// let x = Instance::new().set_tags([
9372    ///     ("key0", "abc"),
9373    ///     ("key1", "xyz"),
9374    /// ]);
9375    /// ```
9376    pub fn set_tags<T, K, V>(mut self, v: T) -> Self
9377    where
9378        T: std::iter::IntoIterator<Item = (K, V)>,
9379        K: std::convert::Into<std::string::String>,
9380        V: std::convert::Into<std::string::String>,
9381    {
9382        use std::iter::Iterator;
9383        self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9384        self
9385    }
9386}
9387
9388impl wkt::message::Message for Instance {
9389    fn typename() -> &'static str {
9390        "type.googleapis.com/google.bigtable.admin.v2.Instance"
9391    }
9392}
9393
9394/// Defines additional types related to [Instance].
9395pub mod instance {
9396    #[allow(unused_imports)]
9397    use super::*;
9398
9399    /// Possible states of an instance.
9400    ///
9401    /// # Working with unknown values
9402    ///
9403    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9404    /// additional enum variants at any time. Adding new variants is not considered
9405    /// a breaking change. Applications should write their code in anticipation of:
9406    ///
9407    /// - New values appearing in future releases of the client library, **and**
9408    /// - New values received dynamically, without application changes.
9409    ///
9410    /// Please consult the [Working with enums] section in the user guide for some
9411    /// guidelines.
9412    ///
9413    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9414    #[derive(Clone, Debug, PartialEq)]
9415    #[non_exhaustive]
9416    pub enum State {
9417        /// The state of the instance could not be determined.
9418        NotKnown,
9419        /// The instance has been successfully created and can serve requests
9420        /// to its tables.
9421        Ready,
9422        /// The instance is currently being created, and may be destroyed
9423        /// if the creation process encounters an error.
9424        Creating,
9425        /// If set, the enum was initialized with an unknown value.
9426        ///
9427        /// Applications can examine the value using [State::value] or
9428        /// [State::name].
9429        UnknownValue(state::UnknownValue),
9430    }
9431
9432    #[doc(hidden)]
9433    pub mod state {
9434        #[allow(unused_imports)]
9435        use super::*;
9436        #[derive(Clone, Debug, PartialEq)]
9437        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9438    }
9439
9440    impl State {
9441        /// Gets the enum value.
9442        ///
9443        /// Returns `None` if the enum contains an unknown value deserialized from
9444        /// the string representation of enums.
9445        pub fn value(&self) -> std::option::Option<i32> {
9446            match self {
9447                Self::NotKnown => std::option::Option::Some(0),
9448                Self::Ready => std::option::Option::Some(1),
9449                Self::Creating => std::option::Option::Some(2),
9450                Self::UnknownValue(u) => u.0.value(),
9451            }
9452        }
9453
9454        /// Gets the enum value as a string.
9455        ///
9456        /// Returns `None` if the enum contains an unknown value deserialized from
9457        /// the integer representation of enums.
9458        pub fn name(&self) -> std::option::Option<&str> {
9459            match self {
9460                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
9461                Self::Ready => std::option::Option::Some("READY"),
9462                Self::Creating => std::option::Option::Some("CREATING"),
9463                Self::UnknownValue(u) => u.0.name(),
9464            }
9465        }
9466    }
9467
9468    impl std::default::Default for State {
9469        fn default() -> Self {
9470            use std::convert::From;
9471            Self::from(0)
9472        }
9473    }
9474
9475    impl std::fmt::Display for State {
9476        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9477            wkt::internal::display_enum(f, self.name(), self.value())
9478        }
9479    }
9480
9481    impl std::convert::From<i32> for State {
9482        fn from(value: i32) -> Self {
9483            match value {
9484                0 => Self::NotKnown,
9485                1 => Self::Ready,
9486                2 => Self::Creating,
9487                _ => Self::UnknownValue(state::UnknownValue(
9488                    wkt::internal::UnknownEnumValue::Integer(value),
9489                )),
9490            }
9491        }
9492    }
9493
9494    impl std::convert::From<&str> for State {
9495        fn from(value: &str) -> Self {
9496            use std::string::ToString;
9497            match value {
9498                "STATE_NOT_KNOWN" => Self::NotKnown,
9499                "READY" => Self::Ready,
9500                "CREATING" => Self::Creating,
9501                _ => Self::UnknownValue(state::UnknownValue(
9502                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9503                )),
9504            }
9505        }
9506    }
9507
9508    impl serde::ser::Serialize for State {
9509        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9510        where
9511            S: serde::Serializer,
9512        {
9513            match self {
9514                Self::NotKnown => serializer.serialize_i32(0),
9515                Self::Ready => serializer.serialize_i32(1),
9516                Self::Creating => serializer.serialize_i32(2),
9517                Self::UnknownValue(u) => u.0.serialize(serializer),
9518            }
9519        }
9520    }
9521
9522    impl<'de> serde::de::Deserialize<'de> for State {
9523        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9524        where
9525            D: serde::Deserializer<'de>,
9526        {
9527            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9528                ".google.bigtable.admin.v2.Instance.State",
9529            ))
9530        }
9531    }
9532
9533    /// The type of the instance.
9534    ///
9535    /// # Working with unknown values
9536    ///
9537    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9538    /// additional enum variants at any time. Adding new variants is not considered
9539    /// a breaking change. Applications should write their code in anticipation of:
9540    ///
9541    /// - New values appearing in future releases of the client library, **and**
9542    /// - New values received dynamically, without application changes.
9543    ///
9544    /// Please consult the [Working with enums] section in the user guide for some
9545    /// guidelines.
9546    ///
9547    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9548    #[derive(Clone, Debug, PartialEq)]
9549    #[non_exhaustive]
9550    pub enum Type {
9551        /// The type of the instance is unspecified. If set when creating an
9552        /// instance, a `PRODUCTION` instance will be created. If set when updating
9553        /// an instance, the type will be left unchanged.
9554        Unspecified,
9555        /// An instance meant for production use. `serve_nodes` must be set
9556        /// on the cluster.
9557        Production,
9558        /// DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces
9559        /// a higher minimum node count than DEVELOPMENT.
9560        Development,
9561        /// If set, the enum was initialized with an unknown value.
9562        ///
9563        /// Applications can examine the value using [Type::value] or
9564        /// [Type::name].
9565        UnknownValue(r#type::UnknownValue),
9566    }
9567
9568    #[doc(hidden)]
9569    pub mod r#type {
9570        #[allow(unused_imports)]
9571        use super::*;
9572        #[derive(Clone, Debug, PartialEq)]
9573        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9574    }
9575
9576    impl Type {
9577        /// Gets the enum value.
9578        ///
9579        /// Returns `None` if the enum contains an unknown value deserialized from
9580        /// the string representation of enums.
9581        pub fn value(&self) -> std::option::Option<i32> {
9582            match self {
9583                Self::Unspecified => std::option::Option::Some(0),
9584                Self::Production => std::option::Option::Some(1),
9585                Self::Development => std::option::Option::Some(2),
9586                Self::UnknownValue(u) => u.0.value(),
9587            }
9588        }
9589
9590        /// Gets the enum value as a string.
9591        ///
9592        /// Returns `None` if the enum contains an unknown value deserialized from
9593        /// the integer representation of enums.
9594        pub fn name(&self) -> std::option::Option<&str> {
9595            match self {
9596                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
9597                Self::Production => std::option::Option::Some("PRODUCTION"),
9598                Self::Development => std::option::Option::Some("DEVELOPMENT"),
9599                Self::UnknownValue(u) => u.0.name(),
9600            }
9601        }
9602    }
9603
9604    impl std::default::Default for Type {
9605        fn default() -> Self {
9606            use std::convert::From;
9607            Self::from(0)
9608        }
9609    }
9610
9611    impl std::fmt::Display for Type {
9612        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9613            wkt::internal::display_enum(f, self.name(), self.value())
9614        }
9615    }
9616
9617    impl std::convert::From<i32> for Type {
9618        fn from(value: i32) -> Self {
9619            match value {
9620                0 => Self::Unspecified,
9621                1 => Self::Production,
9622                2 => Self::Development,
9623                _ => Self::UnknownValue(r#type::UnknownValue(
9624                    wkt::internal::UnknownEnumValue::Integer(value),
9625                )),
9626            }
9627        }
9628    }
9629
9630    impl std::convert::From<&str> for Type {
9631        fn from(value: &str) -> Self {
9632            use std::string::ToString;
9633            match value {
9634                "TYPE_UNSPECIFIED" => Self::Unspecified,
9635                "PRODUCTION" => Self::Production,
9636                "DEVELOPMENT" => Self::Development,
9637                _ => Self::UnknownValue(r#type::UnknownValue(
9638                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9639                )),
9640            }
9641        }
9642    }
9643
9644    impl serde::ser::Serialize for Type {
9645        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9646        where
9647            S: serde::Serializer,
9648        {
9649            match self {
9650                Self::Unspecified => serializer.serialize_i32(0),
9651                Self::Production => serializer.serialize_i32(1),
9652                Self::Development => serializer.serialize_i32(2),
9653                Self::UnknownValue(u) => u.0.serialize(serializer),
9654            }
9655        }
9656    }
9657
9658    impl<'de> serde::de::Deserialize<'de> for Type {
9659        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9660        where
9661            D: serde::Deserializer<'de>,
9662        {
9663            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
9664                ".google.bigtable.admin.v2.Instance.Type",
9665            ))
9666        }
9667    }
9668
9669    /// Possible editions of an instance.
9670    ///
9671    /// An edition is a specific tier of Cloud Bigtable. Each edition is tailored
9672    /// to different customer needs. Higher tiers offer more features and better
9673    /// performance.
9674    ///
9675    /// # Working with unknown values
9676    ///
9677    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9678    /// additional enum variants at any time. Adding new variants is not considered
9679    /// a breaking change. Applications should write their code in anticipation of:
9680    ///
9681    /// - New values appearing in future releases of the client library, **and**
9682    /// - New values received dynamically, without application changes.
9683    ///
9684    /// Please consult the [Working with enums] section in the user guide for some
9685    /// guidelines.
9686    ///
9687    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9688    #[derive(Clone, Debug, PartialEq)]
9689    #[non_exhaustive]
9690    pub enum Edition {
9691        /// The edition is unspecified. This is treated as `ENTERPRISE`.
9692        Unspecified,
9693        /// The Enterprise edition. This is the default offering that is designed to
9694        /// meet the needs of most enterprise workloads.
9695        Enterprise,
9696        /// The Enterprise Plus edition. This is a premium tier that is designed for
9697        /// demanding, multi-tenant workloads requiring the highest levels of
9698        /// performance, scale, and global availability.
9699        ///
9700        /// The nodes in the Enterprise Plus tier come at a higher cost than the
9701        /// Enterprise tier. Any Enterprise Plus features must be disabled before
9702        /// downgrading to Enterprise.
9703        EnterprisePlus,
9704        /// If set, the enum was initialized with an unknown value.
9705        ///
9706        /// Applications can examine the value using [Edition::value] or
9707        /// [Edition::name].
9708        UnknownValue(edition::UnknownValue),
9709    }
9710
9711    #[doc(hidden)]
9712    pub mod edition {
9713        #[allow(unused_imports)]
9714        use super::*;
9715        #[derive(Clone, Debug, PartialEq)]
9716        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9717    }
9718
9719    impl Edition {
9720        /// Gets the enum value.
9721        ///
9722        /// Returns `None` if the enum contains an unknown value deserialized from
9723        /// the string representation of enums.
9724        pub fn value(&self) -> std::option::Option<i32> {
9725            match self {
9726                Self::Unspecified => std::option::Option::Some(0),
9727                Self::Enterprise => std::option::Option::Some(1),
9728                Self::EnterprisePlus => std::option::Option::Some(2),
9729                Self::UnknownValue(u) => u.0.value(),
9730            }
9731        }
9732
9733        /// Gets the enum value as a string.
9734        ///
9735        /// Returns `None` if the enum contains an unknown value deserialized from
9736        /// the integer representation of enums.
9737        pub fn name(&self) -> std::option::Option<&str> {
9738            match self {
9739                Self::Unspecified => std::option::Option::Some("EDITION_UNSPECIFIED"),
9740                Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
9741                Self::EnterprisePlus => std::option::Option::Some("ENTERPRISE_PLUS"),
9742                Self::UnknownValue(u) => u.0.name(),
9743            }
9744        }
9745    }
9746
9747    impl std::default::Default for Edition {
9748        fn default() -> Self {
9749            use std::convert::From;
9750            Self::from(0)
9751        }
9752    }
9753
9754    impl std::fmt::Display for Edition {
9755        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9756            wkt::internal::display_enum(f, self.name(), self.value())
9757        }
9758    }
9759
9760    impl std::convert::From<i32> for Edition {
9761        fn from(value: i32) -> Self {
9762            match value {
9763                0 => Self::Unspecified,
9764                1 => Self::Enterprise,
9765                2 => Self::EnterprisePlus,
9766                _ => Self::UnknownValue(edition::UnknownValue(
9767                    wkt::internal::UnknownEnumValue::Integer(value),
9768                )),
9769            }
9770        }
9771    }
9772
9773    impl std::convert::From<&str> for Edition {
9774        fn from(value: &str) -> Self {
9775            use std::string::ToString;
9776            match value {
9777                "EDITION_UNSPECIFIED" => Self::Unspecified,
9778                "ENTERPRISE" => Self::Enterprise,
9779                "ENTERPRISE_PLUS" => Self::EnterprisePlus,
9780                _ => Self::UnknownValue(edition::UnknownValue(
9781                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9782                )),
9783            }
9784        }
9785    }
9786
9787    impl serde::ser::Serialize for Edition {
9788        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9789        where
9790            S: serde::Serializer,
9791        {
9792            match self {
9793                Self::Unspecified => serializer.serialize_i32(0),
9794                Self::Enterprise => serializer.serialize_i32(1),
9795                Self::EnterprisePlus => serializer.serialize_i32(2),
9796                Self::UnknownValue(u) => u.0.serialize(serializer),
9797            }
9798        }
9799    }
9800
9801    impl<'de> serde::de::Deserialize<'de> for Edition {
9802        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9803        where
9804            D: serde::Deserializer<'de>,
9805        {
9806            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Edition>::new(
9807                ".google.bigtable.admin.v2.Instance.Edition",
9808            ))
9809        }
9810    }
9811}
9812
9813/// The Autoscaling targets for a Cluster. These determine the recommended nodes.
9814#[derive(Clone, Default, PartialEq)]
9815#[non_exhaustive]
9816pub struct AutoscalingTargets {
9817    /// The cpu utilization that the Autoscaler should be trying to achieve.
9818    /// This number is on a scale from 0 (no utilization) to
9819    /// 100 (total utilization), and is limited between 10 and 80, otherwise it
9820    /// will return INVALID_ARGUMENT error.
9821    pub cpu_utilization_percent: i32,
9822
9823    /// The storage utilization that the Autoscaler should be trying to achieve.
9824    /// This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
9825    /// cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster,
9826    /// otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
9827    /// it will be treated as if it were set to the default value: 2560 for SSD,
9828    /// 8192 for HDD.
9829    pub storage_utilization_gib_per_node: i32,
9830
9831    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9832}
9833
9834impl AutoscalingTargets {
9835    /// Creates a new default instance.
9836    pub fn new() -> Self {
9837        std::default::Default::default()
9838    }
9839
9840    /// Sets the value of [cpu_utilization_percent][crate::model::AutoscalingTargets::cpu_utilization_percent].
9841    ///
9842    /// # Example
9843    /// ```ignore,no_run
9844    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9845    /// let x = AutoscalingTargets::new().set_cpu_utilization_percent(42);
9846    /// ```
9847    pub fn set_cpu_utilization_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9848        self.cpu_utilization_percent = v.into();
9849        self
9850    }
9851
9852    /// Sets the value of [storage_utilization_gib_per_node][crate::model::AutoscalingTargets::storage_utilization_gib_per_node].
9853    ///
9854    /// # Example
9855    /// ```ignore,no_run
9856    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9857    /// let x = AutoscalingTargets::new().set_storage_utilization_gib_per_node(42);
9858    /// ```
9859    pub fn set_storage_utilization_gib_per_node<T: std::convert::Into<i32>>(
9860        mut self,
9861        v: T,
9862    ) -> Self {
9863        self.storage_utilization_gib_per_node = v.into();
9864        self
9865    }
9866}
9867
9868impl wkt::message::Message for AutoscalingTargets {
9869    fn typename() -> &'static str {
9870        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingTargets"
9871    }
9872}
9873
9874/// Limits for the number of nodes a Cluster can autoscale up/down to.
9875#[derive(Clone, Default, PartialEq)]
9876#[non_exhaustive]
9877pub struct AutoscalingLimits {
9878    /// Required. Minimum number of nodes to scale down to.
9879    pub min_serve_nodes: i32,
9880
9881    /// Required. Maximum number of nodes to scale up to.
9882    pub max_serve_nodes: i32,
9883
9884    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9885}
9886
9887impl AutoscalingLimits {
9888    /// Creates a new default instance.
9889    pub fn new() -> Self {
9890        std::default::Default::default()
9891    }
9892
9893    /// Sets the value of [min_serve_nodes][crate::model::AutoscalingLimits::min_serve_nodes].
9894    ///
9895    /// # Example
9896    /// ```ignore,no_run
9897    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
9898    /// let x = AutoscalingLimits::new().set_min_serve_nodes(42);
9899    /// ```
9900    pub fn set_min_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9901        self.min_serve_nodes = v.into();
9902        self
9903    }
9904
9905    /// Sets the value of [max_serve_nodes][crate::model::AutoscalingLimits::max_serve_nodes].
9906    ///
9907    /// # Example
9908    /// ```ignore,no_run
9909    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
9910    /// let x = AutoscalingLimits::new().set_max_serve_nodes(42);
9911    /// ```
9912    pub fn set_max_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9913        self.max_serve_nodes = v.into();
9914        self
9915    }
9916}
9917
9918impl wkt::message::Message for AutoscalingLimits {
9919    fn typename() -> &'static str {
9920        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingLimits"
9921    }
9922}
9923
9924/// A resizable group of nodes in a particular cloud location, capable
9925/// of serving all [Tables][google.bigtable.admin.v2.Table] in the parent
9926/// [Instance][google.bigtable.admin.v2.Instance].
9927///
9928/// [google.bigtable.admin.v2.Instance]: crate::model::Instance
9929/// [google.bigtable.admin.v2.Table]: crate::model::Table
9930#[derive(Clone, Default, PartialEq)]
9931#[non_exhaustive]
9932pub struct Cluster {
9933    /// The unique name of the cluster. Values are of the form
9934    /// `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
9935    pub name: std::string::String,
9936
9937    /// Immutable. The location where this cluster's nodes and storage reside. For
9938    /// best performance, clients should be located as close as possible to this
9939    /// cluster. Currently only zones are supported, so values should be of the
9940    /// form `projects/{project}/locations/{zone}`.
9941    pub location: std::string::String,
9942
9943    /// Output only. The current state of the cluster.
9944    pub state: crate::model::cluster::State,
9945
9946    /// The number of nodes in the cluster. If no value is set,
9947    /// Cloud Bigtable automatically allocates nodes based on your data footprint
9948    /// and optimized for 50% storage utilization.
9949    pub serve_nodes: i32,
9950
9951    /// Immutable. The node scaling factor of this cluster.
9952    pub node_scaling_factor: crate::model::cluster::NodeScalingFactor,
9953
9954    /// Immutable. The type of storage used by this cluster to serve its
9955    /// parent instance's tables, unless explicitly overridden.
9956    pub default_storage_type: crate::model::StorageType,
9957
9958    /// Immutable. The encryption configuration for CMEK-protected clusters.
9959    pub encryption_config: std::option::Option<crate::model::cluster::EncryptionConfig>,
9960
9961    #[allow(missing_docs)]
9962    pub config: std::option::Option<crate::model::cluster::Config>,
9963
9964    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9965}
9966
9967impl Cluster {
9968    /// Creates a new default instance.
9969    pub fn new() -> Self {
9970        std::default::Default::default()
9971    }
9972
9973    /// Sets the value of [name][crate::model::Cluster::name].
9974    ///
9975    /// # Example
9976    /// ```ignore,no_run
9977    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9978    /// let x = Cluster::new().set_name("example");
9979    /// ```
9980    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9981        self.name = v.into();
9982        self
9983    }
9984
9985    /// Sets the value of [location][crate::model::Cluster::location].
9986    ///
9987    /// # Example
9988    /// ```ignore,no_run
9989    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
9990    /// let x = Cluster::new().set_location("example");
9991    /// ```
9992    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9993        self.location = v.into();
9994        self
9995    }
9996
9997    /// Sets the value of [state][crate::model::Cluster::state].
9998    ///
9999    /// # Example
10000    /// ```ignore,no_run
10001    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10002    /// use google_cloud_bigtable_admin_v2::model::cluster::State;
10003    /// let x0 = Cluster::new().set_state(State::Ready);
10004    /// let x1 = Cluster::new().set_state(State::Creating);
10005    /// let x2 = Cluster::new().set_state(State::Resizing);
10006    /// ```
10007    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
10008        self.state = v.into();
10009        self
10010    }
10011
10012    /// Sets the value of [serve_nodes][crate::model::Cluster::serve_nodes].
10013    ///
10014    /// # Example
10015    /// ```ignore,no_run
10016    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10017    /// let x = Cluster::new().set_serve_nodes(42);
10018    /// ```
10019    pub fn set_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10020        self.serve_nodes = v.into();
10021        self
10022    }
10023
10024    /// Sets the value of [node_scaling_factor][crate::model::Cluster::node_scaling_factor].
10025    ///
10026    /// # Example
10027    /// ```ignore,no_run
10028    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10029    /// use google_cloud_bigtable_admin_v2::model::cluster::NodeScalingFactor;
10030    /// let x0 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor1X);
10031    /// let x1 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor2X);
10032    /// ```
10033    pub fn set_node_scaling_factor<
10034        T: std::convert::Into<crate::model::cluster::NodeScalingFactor>,
10035    >(
10036        mut self,
10037        v: T,
10038    ) -> Self {
10039        self.node_scaling_factor = v.into();
10040        self
10041    }
10042
10043    /// Sets the value of [default_storage_type][crate::model::Cluster::default_storage_type].
10044    ///
10045    /// # Example
10046    /// ```ignore,no_run
10047    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10048    /// use google_cloud_bigtable_admin_v2::model::StorageType;
10049    /// let x0 = Cluster::new().set_default_storage_type(StorageType::Ssd);
10050    /// let x1 = Cluster::new().set_default_storage_type(StorageType::Hdd);
10051    /// ```
10052    pub fn set_default_storage_type<T: std::convert::Into<crate::model::StorageType>>(
10053        mut self,
10054        v: T,
10055    ) -> Self {
10056        self.default_storage_type = v.into();
10057        self
10058    }
10059
10060    /// Sets the value of [encryption_config][crate::model::Cluster::encryption_config].
10061    ///
10062    /// # Example
10063    /// ```ignore,no_run
10064    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10065    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10066    /// let x = Cluster::new().set_encryption_config(EncryptionConfig::default()/* use setters */);
10067    /// ```
10068    pub fn set_encryption_config<T>(mut self, v: T) -> Self
10069    where
10070        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
10071    {
10072        self.encryption_config = std::option::Option::Some(v.into());
10073        self
10074    }
10075
10076    /// Sets or clears the value of [encryption_config][crate::model::Cluster::encryption_config].
10077    ///
10078    /// # Example
10079    /// ```ignore,no_run
10080    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10081    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10082    /// let x = Cluster::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
10083    /// let x = Cluster::new().set_or_clear_encryption_config(None::<EncryptionConfig>);
10084    /// ```
10085    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
10086    where
10087        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
10088    {
10089        self.encryption_config = v.map(|x| x.into());
10090        self
10091    }
10092
10093    /// Sets the value of [config][crate::model::Cluster::config].
10094    ///
10095    /// Note that all the setters affecting `config` are mutually
10096    /// exclusive.
10097    ///
10098    /// # Example
10099    /// ```ignore,no_run
10100    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10101    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10102    /// let x = Cluster::new().set_config(Some(
10103    ///     google_cloud_bigtable_admin_v2::model::cluster::Config::ClusterConfig(ClusterConfig::default().into())));
10104    /// ```
10105    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::cluster::Config>>>(
10106        mut self,
10107        v: T,
10108    ) -> Self {
10109        self.config = v.into();
10110        self
10111    }
10112
10113    /// The value of [config][crate::model::Cluster::config]
10114    /// if it holds a `ClusterConfig`, `None` if the field is not set or
10115    /// holds a different branch.
10116    pub fn cluster_config(
10117        &self,
10118    ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::ClusterConfig>> {
10119        #[allow(unreachable_patterns)]
10120        self.config.as_ref().and_then(|v| match v {
10121            crate::model::cluster::Config::ClusterConfig(v) => std::option::Option::Some(v),
10122            _ => std::option::Option::None,
10123        })
10124    }
10125
10126    /// Sets the value of [config][crate::model::Cluster::config]
10127    /// to hold a `ClusterConfig`.
10128    ///
10129    /// Note that all the setters affecting `config` are
10130    /// mutually exclusive.
10131    ///
10132    /// # Example
10133    /// ```ignore,no_run
10134    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10135    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10136    /// let x = Cluster::new().set_cluster_config(ClusterConfig::default()/* use setters */);
10137    /// assert!(x.cluster_config().is_some());
10138    /// ```
10139    pub fn set_cluster_config<
10140        T: std::convert::Into<std::boxed::Box<crate::model::cluster::ClusterConfig>>,
10141    >(
10142        mut self,
10143        v: T,
10144    ) -> Self {
10145        self.config =
10146            std::option::Option::Some(crate::model::cluster::Config::ClusterConfig(v.into()));
10147        self
10148    }
10149}
10150
10151impl wkt::message::Message for Cluster {
10152    fn typename() -> &'static str {
10153        "type.googleapis.com/google.bigtable.admin.v2.Cluster"
10154    }
10155}
10156
10157/// Defines additional types related to [Cluster].
10158pub mod cluster {
10159    #[allow(unused_imports)]
10160    use super::*;
10161
10162    /// Autoscaling config for a cluster.
10163    #[derive(Clone, Default, PartialEq)]
10164    #[non_exhaustive]
10165    pub struct ClusterAutoscalingConfig {
10166        /// Required. Autoscaling limits for this cluster.
10167        pub autoscaling_limits: std::option::Option<crate::model::AutoscalingLimits>,
10168
10169        /// Required. Autoscaling targets for this cluster.
10170        pub autoscaling_targets: std::option::Option<crate::model::AutoscalingTargets>,
10171
10172        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10173    }
10174
10175    impl ClusterAutoscalingConfig {
10176        /// Creates a new default instance.
10177        pub fn new() -> Self {
10178            std::default::Default::default()
10179        }
10180
10181        /// Sets the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
10182        ///
10183        /// # Example
10184        /// ```ignore,no_run
10185        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10186        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10187        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_limits(AutoscalingLimits::default()/* use setters */);
10188        /// ```
10189        pub fn set_autoscaling_limits<T>(mut self, v: T) -> Self
10190        where
10191            T: std::convert::Into<crate::model::AutoscalingLimits>,
10192        {
10193            self.autoscaling_limits = std::option::Option::Some(v.into());
10194            self
10195        }
10196
10197        /// Sets or clears the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
10198        ///
10199        /// # Example
10200        /// ```ignore,no_run
10201        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10202        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10203        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(Some(AutoscalingLimits::default()/* use setters */));
10204        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(None::<AutoscalingLimits>);
10205        /// ```
10206        pub fn set_or_clear_autoscaling_limits<T>(mut self, v: std::option::Option<T>) -> Self
10207        where
10208            T: std::convert::Into<crate::model::AutoscalingLimits>,
10209        {
10210            self.autoscaling_limits = v.map(|x| x.into());
10211            self
10212        }
10213
10214        /// Sets the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
10215        ///
10216        /// # Example
10217        /// ```ignore,no_run
10218        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10219        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10220        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_targets(AutoscalingTargets::default()/* use setters */);
10221        /// ```
10222        pub fn set_autoscaling_targets<T>(mut self, v: T) -> Self
10223        where
10224            T: std::convert::Into<crate::model::AutoscalingTargets>,
10225        {
10226            self.autoscaling_targets = std::option::Option::Some(v.into());
10227            self
10228        }
10229
10230        /// Sets or clears the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
10231        ///
10232        /// # Example
10233        /// ```ignore,no_run
10234        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10235        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10236        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(Some(AutoscalingTargets::default()/* use setters */));
10237        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(None::<AutoscalingTargets>);
10238        /// ```
10239        pub fn set_or_clear_autoscaling_targets<T>(mut self, v: std::option::Option<T>) -> Self
10240        where
10241            T: std::convert::Into<crate::model::AutoscalingTargets>,
10242        {
10243            self.autoscaling_targets = v.map(|x| x.into());
10244            self
10245        }
10246    }
10247
10248    impl wkt::message::Message for ClusterAutoscalingConfig {
10249        fn typename() -> &'static str {
10250            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig"
10251        }
10252    }
10253
10254    /// Configuration for a cluster.
10255    #[derive(Clone, Default, PartialEq)]
10256    #[non_exhaustive]
10257    pub struct ClusterConfig {
10258        /// Autoscaling configuration for this cluster.
10259        pub cluster_autoscaling_config:
10260            std::option::Option<crate::model::cluster::ClusterAutoscalingConfig>,
10261
10262        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10263    }
10264
10265    impl ClusterConfig {
10266        /// Creates a new default instance.
10267        pub fn new() -> Self {
10268            std::default::Default::default()
10269        }
10270
10271        /// Sets the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
10272        ///
10273        /// # Example
10274        /// ```ignore,no_run
10275        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10276        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10277        /// let x = ClusterConfig::new().set_cluster_autoscaling_config(ClusterAutoscalingConfig::default()/* use setters */);
10278        /// ```
10279        pub fn set_cluster_autoscaling_config<T>(mut self, v: T) -> Self
10280        where
10281            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10282        {
10283            self.cluster_autoscaling_config = std::option::Option::Some(v.into());
10284            self
10285        }
10286
10287        /// Sets or clears the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
10288        ///
10289        /// # Example
10290        /// ```ignore,no_run
10291        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10292        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10293        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(Some(ClusterAutoscalingConfig::default()/* use setters */));
10294        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(None::<ClusterAutoscalingConfig>);
10295        /// ```
10296        pub fn set_or_clear_cluster_autoscaling_config<T>(
10297            mut self,
10298            v: std::option::Option<T>,
10299        ) -> Self
10300        where
10301            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10302        {
10303            self.cluster_autoscaling_config = v.map(|x| x.into());
10304            self
10305        }
10306    }
10307
10308    impl wkt::message::Message for ClusterConfig {
10309        fn typename() -> &'static str {
10310            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterConfig"
10311        }
10312    }
10313
10314    /// Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected
10315    /// cluster.
10316    #[derive(Clone, Default, PartialEq)]
10317    #[non_exhaustive]
10318    pub struct EncryptionConfig {
10319        /// Describes the Cloud KMS encryption key that will be used to protect the
10320        /// destination Bigtable cluster. The requirements for this key are:
10321        ///
10322        /// 1. The Cloud Bigtable service account associated with the project that
10323        ///    contains this cluster must be granted the
10324        ///    `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
10325        /// 1. Only regional keys can be used and the region of the CMEK key must
10326        ///    match the region of the cluster.
10327        ///    Values are of the form
10328        ///    `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
10329        pub kms_key_name: std::string::String,
10330
10331        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10332    }
10333
10334    impl EncryptionConfig {
10335        /// Creates a new default instance.
10336        pub fn new() -> Self {
10337            std::default::Default::default()
10338        }
10339
10340        /// Sets the value of [kms_key_name][crate::model::cluster::EncryptionConfig::kms_key_name].
10341        ///
10342        /// # Example
10343        /// ```ignore,no_run
10344        /// # use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10345        /// let x = EncryptionConfig::new().set_kms_key_name("example");
10346        /// ```
10347        pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(
10348            mut self,
10349            v: T,
10350        ) -> Self {
10351            self.kms_key_name = v.into();
10352            self
10353        }
10354    }
10355
10356    impl wkt::message::Message for EncryptionConfig {
10357        fn typename() -> &'static str {
10358            "type.googleapis.com/google.bigtable.admin.v2.Cluster.EncryptionConfig"
10359        }
10360    }
10361
10362    /// Possible states of a cluster.
10363    ///
10364    /// # Working with unknown values
10365    ///
10366    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10367    /// additional enum variants at any time. Adding new variants is not considered
10368    /// a breaking change. Applications should write their code in anticipation of:
10369    ///
10370    /// - New values appearing in future releases of the client library, **and**
10371    /// - New values received dynamically, without application changes.
10372    ///
10373    /// Please consult the [Working with enums] section in the user guide for some
10374    /// guidelines.
10375    ///
10376    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10377    #[derive(Clone, Debug, PartialEq)]
10378    #[non_exhaustive]
10379    pub enum State {
10380        /// The state of the cluster could not be determined.
10381        NotKnown,
10382        /// The cluster has been successfully created and is ready to serve requests.
10383        Ready,
10384        /// The cluster is currently being created, and may be destroyed
10385        /// if the creation process encounters an error.
10386        /// A cluster may not be able to serve requests while being created.
10387        Creating,
10388        /// The cluster is currently being resized, and may revert to its previous
10389        /// node count if the process encounters an error.
10390        /// A cluster is still capable of serving requests while being resized,
10391        /// but may exhibit performance as if its number of allocated nodes is
10392        /// between the starting and requested states.
10393        Resizing,
10394        /// The cluster has no backing nodes. The data (tables) still
10395        /// exist, but no operations can be performed on the cluster.
10396        Disabled,
10397        /// If set, the enum was initialized with an unknown value.
10398        ///
10399        /// Applications can examine the value using [State::value] or
10400        /// [State::name].
10401        UnknownValue(state::UnknownValue),
10402    }
10403
10404    #[doc(hidden)]
10405    pub mod state {
10406        #[allow(unused_imports)]
10407        use super::*;
10408        #[derive(Clone, Debug, PartialEq)]
10409        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10410    }
10411
10412    impl State {
10413        /// Gets the enum value.
10414        ///
10415        /// Returns `None` if the enum contains an unknown value deserialized from
10416        /// the string representation of enums.
10417        pub fn value(&self) -> std::option::Option<i32> {
10418            match self {
10419                Self::NotKnown => std::option::Option::Some(0),
10420                Self::Ready => std::option::Option::Some(1),
10421                Self::Creating => std::option::Option::Some(2),
10422                Self::Resizing => std::option::Option::Some(3),
10423                Self::Disabled => std::option::Option::Some(4),
10424                Self::UnknownValue(u) => u.0.value(),
10425            }
10426        }
10427
10428        /// Gets the enum value as a string.
10429        ///
10430        /// Returns `None` if the enum contains an unknown value deserialized from
10431        /// the integer representation of enums.
10432        pub fn name(&self) -> std::option::Option<&str> {
10433            match self {
10434                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
10435                Self::Ready => std::option::Option::Some("READY"),
10436                Self::Creating => std::option::Option::Some("CREATING"),
10437                Self::Resizing => std::option::Option::Some("RESIZING"),
10438                Self::Disabled => std::option::Option::Some("DISABLED"),
10439                Self::UnknownValue(u) => u.0.name(),
10440            }
10441        }
10442    }
10443
10444    impl std::default::Default for State {
10445        fn default() -> Self {
10446            use std::convert::From;
10447            Self::from(0)
10448        }
10449    }
10450
10451    impl std::fmt::Display for State {
10452        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10453            wkt::internal::display_enum(f, self.name(), self.value())
10454        }
10455    }
10456
10457    impl std::convert::From<i32> for State {
10458        fn from(value: i32) -> Self {
10459            match value {
10460                0 => Self::NotKnown,
10461                1 => Self::Ready,
10462                2 => Self::Creating,
10463                3 => Self::Resizing,
10464                4 => Self::Disabled,
10465                _ => Self::UnknownValue(state::UnknownValue(
10466                    wkt::internal::UnknownEnumValue::Integer(value),
10467                )),
10468            }
10469        }
10470    }
10471
10472    impl std::convert::From<&str> for State {
10473        fn from(value: &str) -> Self {
10474            use std::string::ToString;
10475            match value {
10476                "STATE_NOT_KNOWN" => Self::NotKnown,
10477                "READY" => Self::Ready,
10478                "CREATING" => Self::Creating,
10479                "RESIZING" => Self::Resizing,
10480                "DISABLED" => Self::Disabled,
10481                _ => Self::UnknownValue(state::UnknownValue(
10482                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10483                )),
10484            }
10485        }
10486    }
10487
10488    impl serde::ser::Serialize for State {
10489        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10490        where
10491            S: serde::Serializer,
10492        {
10493            match self {
10494                Self::NotKnown => serializer.serialize_i32(0),
10495                Self::Ready => serializer.serialize_i32(1),
10496                Self::Creating => serializer.serialize_i32(2),
10497                Self::Resizing => serializer.serialize_i32(3),
10498                Self::Disabled => serializer.serialize_i32(4),
10499                Self::UnknownValue(u) => u.0.serialize(serializer),
10500            }
10501        }
10502    }
10503
10504    impl<'de> serde::de::Deserialize<'de> for State {
10505        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10506        where
10507            D: serde::Deserializer<'de>,
10508        {
10509            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10510                ".google.bigtable.admin.v2.Cluster.State",
10511            ))
10512        }
10513    }
10514
10515    /// Possible node scaling factors of the clusters. Node scaling delivers better
10516    /// latency and more throughput by removing node boundaries.
10517    ///
10518    /// # Working with unknown values
10519    ///
10520    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10521    /// additional enum variants at any time. Adding new variants is not considered
10522    /// a breaking change. Applications should write their code in anticipation of:
10523    ///
10524    /// - New values appearing in future releases of the client library, **and**
10525    /// - New values received dynamically, without application changes.
10526    ///
10527    /// Please consult the [Working with enums] section in the user guide for some
10528    /// guidelines.
10529    ///
10530    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10531    #[derive(Clone, Debug, PartialEq)]
10532    #[non_exhaustive]
10533    pub enum NodeScalingFactor {
10534        /// No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X.
10535        Unspecified,
10536        /// The cluster is running with a scaling factor of 1.
10537        NodeScalingFactor1X,
10538        /// The cluster is running with a scaling factor of 2.
10539        /// All node count values must be in increments of 2 with this scaling factor
10540        /// enabled, otherwise an INVALID_ARGUMENT error will be returned.
10541        NodeScalingFactor2X,
10542        /// If set, the enum was initialized with an unknown value.
10543        ///
10544        /// Applications can examine the value using [NodeScalingFactor::value] or
10545        /// [NodeScalingFactor::name].
10546        UnknownValue(node_scaling_factor::UnknownValue),
10547    }
10548
10549    #[doc(hidden)]
10550    pub mod node_scaling_factor {
10551        #[allow(unused_imports)]
10552        use super::*;
10553        #[derive(Clone, Debug, PartialEq)]
10554        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10555    }
10556
10557    impl NodeScalingFactor {
10558        /// Gets the enum value.
10559        ///
10560        /// Returns `None` if the enum contains an unknown value deserialized from
10561        /// the string representation of enums.
10562        pub fn value(&self) -> std::option::Option<i32> {
10563            match self {
10564                Self::Unspecified => std::option::Option::Some(0),
10565                Self::NodeScalingFactor1X => std::option::Option::Some(1),
10566                Self::NodeScalingFactor2X => std::option::Option::Some(2),
10567                Self::UnknownValue(u) => u.0.value(),
10568            }
10569        }
10570
10571        /// Gets the enum value as a string.
10572        ///
10573        /// Returns `None` if the enum contains an unknown value deserialized from
10574        /// the integer representation of enums.
10575        pub fn name(&self) -> std::option::Option<&str> {
10576            match self {
10577                Self::Unspecified => std::option::Option::Some("NODE_SCALING_FACTOR_UNSPECIFIED"),
10578                Self::NodeScalingFactor1X => std::option::Option::Some("NODE_SCALING_FACTOR_1X"),
10579                Self::NodeScalingFactor2X => std::option::Option::Some("NODE_SCALING_FACTOR_2X"),
10580                Self::UnknownValue(u) => u.0.name(),
10581            }
10582        }
10583    }
10584
10585    impl std::default::Default for NodeScalingFactor {
10586        fn default() -> Self {
10587            use std::convert::From;
10588            Self::from(0)
10589        }
10590    }
10591
10592    impl std::fmt::Display for NodeScalingFactor {
10593        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10594            wkt::internal::display_enum(f, self.name(), self.value())
10595        }
10596    }
10597
10598    impl std::convert::From<i32> for NodeScalingFactor {
10599        fn from(value: i32) -> Self {
10600            match value {
10601                0 => Self::Unspecified,
10602                1 => Self::NodeScalingFactor1X,
10603                2 => Self::NodeScalingFactor2X,
10604                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
10605                    wkt::internal::UnknownEnumValue::Integer(value),
10606                )),
10607            }
10608        }
10609    }
10610
10611    impl std::convert::From<&str> for NodeScalingFactor {
10612        fn from(value: &str) -> Self {
10613            use std::string::ToString;
10614            match value {
10615                "NODE_SCALING_FACTOR_UNSPECIFIED" => Self::Unspecified,
10616                "NODE_SCALING_FACTOR_1X" => Self::NodeScalingFactor1X,
10617                "NODE_SCALING_FACTOR_2X" => Self::NodeScalingFactor2X,
10618                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
10619                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10620                )),
10621            }
10622        }
10623    }
10624
10625    impl serde::ser::Serialize for NodeScalingFactor {
10626        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10627        where
10628            S: serde::Serializer,
10629        {
10630            match self {
10631                Self::Unspecified => serializer.serialize_i32(0),
10632                Self::NodeScalingFactor1X => serializer.serialize_i32(1),
10633                Self::NodeScalingFactor2X => serializer.serialize_i32(2),
10634                Self::UnknownValue(u) => u.0.serialize(serializer),
10635            }
10636        }
10637    }
10638
10639    impl<'de> serde::de::Deserialize<'de> for NodeScalingFactor {
10640        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10641        where
10642            D: serde::Deserializer<'de>,
10643        {
10644            deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeScalingFactor>::new(
10645                ".google.bigtable.admin.v2.Cluster.NodeScalingFactor",
10646            ))
10647        }
10648    }
10649
10650    #[allow(missing_docs)]
10651    #[derive(Clone, Debug, PartialEq)]
10652    #[non_exhaustive]
10653    pub enum Config {
10654        /// Configuration for this cluster.
10655        ClusterConfig(std::boxed::Box<crate::model::cluster::ClusterConfig>),
10656    }
10657}
10658
10659/// A configuration object describing how Cloud Bigtable should treat traffic
10660/// from a particular end user application.
10661#[derive(Clone, Default, PartialEq)]
10662#[non_exhaustive]
10663pub struct AppProfile {
10664    /// The unique name of the app profile. Values are of the form
10665    /// `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
10666    pub name: std::string::String,
10667
10668    /// Strongly validated etag for optimistic concurrency control. Preserve the
10669    /// value returned from `GetAppProfile` when calling `UpdateAppProfile` to
10670    /// fail the request if there has been a modification in the mean time. The
10671    /// `update_mask` of the request need not include `etag` for this protection
10672    /// to apply.
10673    /// See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
10674    /// [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
10675    /// details.
10676    pub etag: std::string::String,
10677
10678    /// Long form description of the use case for this AppProfile.
10679    pub description: std::string::String,
10680
10681    /// The routing policy for all read/write requests that use this app profile.
10682    /// A value must be explicitly set.
10683    pub routing_policy: std::option::Option<crate::model::app_profile::RoutingPolicy>,
10684
10685    /// Options for isolating this app profile's traffic from other use cases.
10686    pub isolation: std::option::Option<crate::model::app_profile::Isolation>,
10687
10688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10689}
10690
10691impl AppProfile {
10692    /// Creates a new default instance.
10693    pub fn new() -> Self {
10694        std::default::Default::default()
10695    }
10696
10697    /// Sets the value of [name][crate::model::AppProfile::name].
10698    ///
10699    /// # Example
10700    /// ```ignore,no_run
10701    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10702    /// let x = AppProfile::new().set_name("example");
10703    /// ```
10704    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10705        self.name = v.into();
10706        self
10707    }
10708
10709    /// Sets the value of [etag][crate::model::AppProfile::etag].
10710    ///
10711    /// # Example
10712    /// ```ignore,no_run
10713    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10714    /// let x = AppProfile::new().set_etag("example");
10715    /// ```
10716    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10717        self.etag = v.into();
10718        self
10719    }
10720
10721    /// Sets the value of [description][crate::model::AppProfile::description].
10722    ///
10723    /// # Example
10724    /// ```ignore,no_run
10725    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10726    /// let x = AppProfile::new().set_description("example");
10727    /// ```
10728    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10729        self.description = v.into();
10730        self
10731    }
10732
10733    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy].
10734    ///
10735    /// Note that all the setters affecting `routing_policy` are mutually
10736    /// exclusive.
10737    ///
10738    /// # Example
10739    /// ```ignore,no_run
10740    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10741    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10742    /// let x = AppProfile::new().set_routing_policy(Some(
10743    ///     google_cloud_bigtable_admin_v2::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(MultiClusterRoutingUseAny::default().into())));
10744    /// ```
10745    pub fn set_routing_policy<
10746        T: std::convert::Into<std::option::Option<crate::model::app_profile::RoutingPolicy>>,
10747    >(
10748        mut self,
10749        v: T,
10750    ) -> Self {
10751        self.routing_policy = v.into();
10752        self
10753    }
10754
10755    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
10756    /// if it holds a `MultiClusterRoutingUseAny`, `None` if the field is not set or
10757    /// holds a different branch.
10758    pub fn multi_cluster_routing_use_any(
10759        &self,
10760    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>
10761    {
10762        #[allow(unreachable_patterns)]
10763        self.routing_policy.as_ref().and_then(|v| match v {
10764            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v) => {
10765                std::option::Option::Some(v)
10766            }
10767            _ => std::option::Option::None,
10768        })
10769    }
10770
10771    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
10772    /// to hold a `MultiClusterRoutingUseAny`.
10773    ///
10774    /// Note that all the setters affecting `routing_policy` are
10775    /// mutually exclusive.
10776    ///
10777    /// # Example
10778    /// ```ignore,no_run
10779    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10780    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10781    /// let x = AppProfile::new().set_multi_cluster_routing_use_any(MultiClusterRoutingUseAny::default()/* use setters */);
10782    /// assert!(x.multi_cluster_routing_use_any().is_some());
10783    /// assert!(x.single_cluster_routing().is_none());
10784    /// ```
10785    pub fn set_multi_cluster_routing_use_any<
10786        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>,
10787    >(
10788        mut self,
10789        v: T,
10790    ) -> Self {
10791        self.routing_policy = std::option::Option::Some(
10792            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v.into()),
10793        );
10794        self
10795    }
10796
10797    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
10798    /// if it holds a `SingleClusterRouting`, `None` if the field is not set or
10799    /// holds a different branch.
10800    pub fn single_cluster_routing(
10801        &self,
10802    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>
10803    {
10804        #[allow(unreachable_patterns)]
10805        self.routing_policy.as_ref().and_then(|v| match v {
10806            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v) => {
10807                std::option::Option::Some(v)
10808            }
10809            _ => std::option::Option::None,
10810        })
10811    }
10812
10813    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
10814    /// to hold a `SingleClusterRouting`.
10815    ///
10816    /// Note that all the setters affecting `routing_policy` are
10817    /// mutually exclusive.
10818    ///
10819    /// # Example
10820    /// ```ignore,no_run
10821    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10822    /// use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
10823    /// let x = AppProfile::new().set_single_cluster_routing(SingleClusterRouting::default()/* use setters */);
10824    /// assert!(x.single_cluster_routing().is_some());
10825    /// assert!(x.multi_cluster_routing_use_any().is_none());
10826    /// ```
10827    pub fn set_single_cluster_routing<
10828        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>,
10829    >(
10830        mut self,
10831        v: T,
10832    ) -> Self {
10833        self.routing_policy = std::option::Option::Some(
10834            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v.into()),
10835        );
10836        self
10837    }
10838
10839    /// Sets the value of [isolation][crate::model::AppProfile::isolation].
10840    ///
10841    /// Note that all the setters affecting `isolation` are mutually
10842    /// exclusive.
10843    ///
10844    /// # Example
10845    /// ```ignore,no_run
10846    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10847    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
10848    /// let x = AppProfile::new().set_isolation(Some(
10849    ///     google_cloud_bigtable_admin_v2::model::app_profile::Isolation::StandardIsolation(StandardIsolation::default().into())));
10850    /// ```
10851    pub fn set_isolation<
10852        T: std::convert::Into<std::option::Option<crate::model::app_profile::Isolation>>,
10853    >(
10854        mut self,
10855        v: T,
10856    ) -> Self {
10857        self.isolation = v.into();
10858        self
10859    }
10860
10861    /// The value of [isolation][crate::model::AppProfile::isolation]
10862    /// if it holds a `Priority`, `None` if the field is not set or
10863    /// holds a different branch.
10864    #[deprecated]
10865    pub fn priority(&self) -> std::option::Option<&crate::model::app_profile::Priority> {
10866        #[allow(unreachable_patterns)]
10867        self.isolation.as_ref().and_then(|v| match v {
10868            crate::model::app_profile::Isolation::Priority(v) => std::option::Option::Some(v),
10869            _ => std::option::Option::None,
10870        })
10871    }
10872
10873    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
10874    /// to hold a `Priority`.
10875    ///
10876    /// Note that all the setters affecting `isolation` are
10877    /// mutually exclusive.
10878    ///
10879    /// # Example
10880    /// ```ignore,no_run
10881    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10882    /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
10883    /// let x0 = AppProfile::new().set_priority(Priority::Low);
10884    /// let x1 = AppProfile::new().set_priority(Priority::Medium);
10885    /// let x2 = AppProfile::new().set_priority(Priority::High);
10886    /// assert!(x0.priority().is_some());
10887    /// assert!(x0.standard_isolation().is_none());
10888    /// assert!(x0.data_boost_isolation_read_only().is_none());
10889    /// assert!(x1.priority().is_some());
10890    /// assert!(x1.standard_isolation().is_none());
10891    /// assert!(x1.data_boost_isolation_read_only().is_none());
10892    /// assert!(x2.priority().is_some());
10893    /// assert!(x2.standard_isolation().is_none());
10894    /// assert!(x2.data_boost_isolation_read_only().is_none());
10895    /// ```
10896    #[deprecated]
10897    pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
10898        mut self,
10899        v: T,
10900    ) -> Self {
10901        self.isolation =
10902            std::option::Option::Some(crate::model::app_profile::Isolation::Priority(v.into()));
10903        self
10904    }
10905
10906    /// The value of [isolation][crate::model::AppProfile::isolation]
10907    /// if it holds a `StandardIsolation`, `None` if the field is not set or
10908    /// holds a different branch.
10909    pub fn standard_isolation(
10910        &self,
10911    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::StandardIsolation>> {
10912        #[allow(unreachable_patterns)]
10913        self.isolation.as_ref().and_then(|v| match v {
10914            crate::model::app_profile::Isolation::StandardIsolation(v) => {
10915                std::option::Option::Some(v)
10916            }
10917            _ => std::option::Option::None,
10918        })
10919    }
10920
10921    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
10922    /// to hold a `StandardIsolation`.
10923    ///
10924    /// Note that all the setters affecting `isolation` are
10925    /// mutually exclusive.
10926    ///
10927    /// # Example
10928    /// ```ignore,no_run
10929    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10930    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
10931    /// let x = AppProfile::new().set_standard_isolation(StandardIsolation::default()/* use setters */);
10932    /// assert!(x.standard_isolation().is_some());
10933    /// assert!(x.priority().is_none());
10934    /// assert!(x.data_boost_isolation_read_only().is_none());
10935    /// ```
10936    pub fn set_standard_isolation<
10937        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::StandardIsolation>>,
10938    >(
10939        mut self,
10940        v: T,
10941    ) -> Self {
10942        self.isolation = std::option::Option::Some(
10943            crate::model::app_profile::Isolation::StandardIsolation(v.into()),
10944        );
10945        self
10946    }
10947
10948    /// The value of [isolation][crate::model::AppProfile::isolation]
10949    /// if it holds a `DataBoostIsolationReadOnly`, `None` if the field is not set or
10950    /// holds a different branch.
10951    pub fn data_boost_isolation_read_only(
10952        &self,
10953    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>
10954    {
10955        #[allow(unreachable_patterns)]
10956        self.isolation.as_ref().and_then(|v| match v {
10957            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v) => {
10958                std::option::Option::Some(v)
10959            }
10960            _ => std::option::Option::None,
10961        })
10962    }
10963
10964    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
10965    /// to hold a `DataBoostIsolationReadOnly`.
10966    ///
10967    /// Note that all the setters affecting `isolation` are
10968    /// mutually exclusive.
10969    ///
10970    /// # Example
10971    /// ```ignore,no_run
10972    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10973    /// use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
10974    /// let x = AppProfile::new().set_data_boost_isolation_read_only(DataBoostIsolationReadOnly::default()/* use setters */);
10975    /// assert!(x.data_boost_isolation_read_only().is_some());
10976    /// assert!(x.priority().is_none());
10977    /// assert!(x.standard_isolation().is_none());
10978    /// ```
10979    pub fn set_data_boost_isolation_read_only<
10980        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>,
10981    >(
10982        mut self,
10983        v: T,
10984    ) -> Self {
10985        self.isolation = std::option::Option::Some(
10986            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v.into()),
10987        );
10988        self
10989    }
10990}
10991
10992impl wkt::message::Message for AppProfile {
10993    fn typename() -> &'static str {
10994        "type.googleapis.com/google.bigtable.admin.v2.AppProfile"
10995    }
10996}
10997
10998/// Defines additional types related to [AppProfile].
10999pub mod app_profile {
11000    #[allow(unused_imports)]
11001    use super::*;
11002
11003    /// Read/write requests are routed to the nearest cluster in the instance, and
11004    /// will fail over to the nearest cluster that is available in the event of
11005    /// transient errors or delays. Clusters in a region are considered
11006    /// equidistant. Choosing this option sacrifices read-your-writes consistency
11007    /// to improve availability.
11008    #[derive(Clone, Default, PartialEq)]
11009    #[non_exhaustive]
11010    pub struct MultiClusterRoutingUseAny {
11011        /// The set of clusters to route to. The order is ignored; clusters will be
11012        /// tried in order of distance. If left empty, all clusters are eligible.
11013        pub cluster_ids: std::vec::Vec<std::string::String>,
11014
11015        /// Possible algorithms for routing affinity. If enabled, Bigtable will
11016        /// route between equidistant clusters in a deterministic order rather than
11017        /// choosing randomly.
11018        ///
11019        /// This mechanism gives read-your-writes consistency for *most* requests
11020        /// under *most* circumstances, without sacrificing availability. Consistency
11021        /// is *not* guaranteed, as requests might still fail over between clusters
11022        /// in the event of errors or latency.
11023        pub affinity:
11024            std::option::Option<crate::model::app_profile::multi_cluster_routing_use_any::Affinity>,
11025
11026        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11027    }
11028
11029    impl MultiClusterRoutingUseAny {
11030        /// Creates a new default instance.
11031        pub fn new() -> Self {
11032            std::default::Default::default()
11033        }
11034
11035        /// Sets the value of [cluster_ids][crate::model::app_profile::MultiClusterRoutingUseAny::cluster_ids].
11036        ///
11037        /// # Example
11038        /// ```ignore,no_run
11039        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11040        /// let x = MultiClusterRoutingUseAny::new().set_cluster_ids(["a", "b", "c"]);
11041        /// ```
11042        pub fn set_cluster_ids<T, V>(mut self, v: T) -> Self
11043        where
11044            T: std::iter::IntoIterator<Item = V>,
11045            V: std::convert::Into<std::string::String>,
11046        {
11047            use std::iter::Iterator;
11048            self.cluster_ids = v.into_iter().map(|i| i.into()).collect();
11049            self
11050        }
11051
11052        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity].
11053        ///
11054        /// Note that all the setters affecting `affinity` are mutually
11055        /// exclusive.
11056        ///
11057        /// # Example
11058        /// ```ignore,no_run
11059        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11060        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
11061        /// let x = MultiClusterRoutingUseAny::new().set_affinity(Some(
11062        ///     google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(RowAffinity::default().into())));
11063        /// ```
11064        pub fn set_affinity<
11065            T: std::convert::Into<
11066                    std::option::Option<
11067                        crate::model::app_profile::multi_cluster_routing_use_any::Affinity,
11068                    >,
11069                >,
11070        >(
11071            mut self,
11072            v: T,
11073        ) -> Self {
11074            self.affinity = v.into();
11075            self
11076        }
11077
11078        /// The value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
11079        /// if it holds a `RowAffinity`, `None` if the field is not set or
11080        /// holds a different branch.
11081        pub fn row_affinity(
11082            &self,
11083        ) -> std::option::Option<
11084            &std::boxed::Box<crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity>,
11085        > {
11086            #[allow(unreachable_patterns)]
11087            self.affinity.as_ref().and_then(|v| match v {
11088                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
11089                    v,
11090                ) => std::option::Option::Some(v),
11091                _ => std::option::Option::None,
11092            })
11093        }
11094
11095        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
11096        /// to hold a `RowAffinity`.
11097        ///
11098        /// Note that all the setters affecting `affinity` are
11099        /// mutually exclusive.
11100        ///
11101        /// # Example
11102        /// ```ignore,no_run
11103        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11104        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
11105        /// let x = MultiClusterRoutingUseAny::new().set_row_affinity(RowAffinity::default()/* use setters */);
11106        /// assert!(x.row_affinity().is_some());
11107        /// ```
11108        pub fn set_row_affinity<
11109            T: std::convert::Into<
11110                    std::boxed::Box<
11111                        crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
11112                    >,
11113                >,
11114        >(
11115            mut self,
11116            v: T,
11117        ) -> Self {
11118            self.affinity = std::option::Option::Some(
11119                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
11120                    v.into(),
11121                ),
11122            );
11123            self
11124        }
11125    }
11126
11127    impl wkt::message::Message for MultiClusterRoutingUseAny {
11128        fn typename() -> &'static str {
11129            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny"
11130        }
11131    }
11132
11133    /// Defines additional types related to [MultiClusterRoutingUseAny].
11134    pub mod multi_cluster_routing_use_any {
11135        #[allow(unused_imports)]
11136        use super::*;
11137
11138        /// If enabled, Bigtable will route the request based on the row key of the
11139        /// request, rather than randomly. Instead, each row key will be assigned
11140        /// to a cluster, and will stick to that cluster. If clusters are added or
11141        /// removed, then this may affect which row keys stick to which clusters.
11142        /// To avoid this, users can use a cluster group to specify which clusters
11143        /// are to be used. In this case, new clusters that are not a part of the
11144        /// cluster group will not be routed to, and routing will be unaffected by
11145        /// the new cluster. Moreover, clusters specified in the cluster group cannot
11146        /// be deleted unless removed from the cluster group.
11147        #[derive(Clone, Default, PartialEq)]
11148        #[non_exhaustive]
11149        pub struct RowAffinity {
11150            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11151        }
11152
11153        impl RowAffinity {
11154            /// Creates a new default instance.
11155            pub fn new() -> Self {
11156                std::default::Default::default()
11157            }
11158        }
11159
11160        impl wkt::message::Message for RowAffinity {
11161            fn typename() -> &'static str {
11162                "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity"
11163            }
11164        }
11165
11166        /// Possible algorithms for routing affinity. If enabled, Bigtable will
11167        /// route between equidistant clusters in a deterministic order rather than
11168        /// choosing randomly.
11169        ///
11170        /// This mechanism gives read-your-writes consistency for *most* requests
11171        /// under *most* circumstances, without sacrificing availability. Consistency
11172        /// is *not* guaranteed, as requests might still fail over between clusters
11173        /// in the event of errors or latency.
11174        #[derive(Clone, Debug, PartialEq)]
11175        #[non_exhaustive]
11176        pub enum Affinity {
11177            /// Row affinity sticky routing based on the row key of the request.
11178            /// Requests that span multiple rows are routed non-deterministically.
11179            RowAffinity(
11180                std::boxed::Box<
11181                    crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
11182                >,
11183            ),
11184        }
11185    }
11186
11187    /// Unconditionally routes all read/write requests to a specific cluster.
11188    /// This option preserves read-your-writes consistency but does not improve
11189    /// availability.
11190    #[derive(Clone, Default, PartialEq)]
11191    #[non_exhaustive]
11192    pub struct SingleClusterRouting {
11193        /// The cluster to which read/write requests should be routed.
11194        pub cluster_id: std::string::String,
11195
11196        /// Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
11197        /// allowed by this app profile. It is unsafe to send these requests to
11198        /// the same table/row/column in multiple clusters.
11199        pub allow_transactional_writes: bool,
11200
11201        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11202    }
11203
11204    impl SingleClusterRouting {
11205        /// Creates a new default instance.
11206        pub fn new() -> Self {
11207            std::default::Default::default()
11208        }
11209
11210        /// Sets the value of [cluster_id][crate::model::app_profile::SingleClusterRouting::cluster_id].
11211        ///
11212        /// # Example
11213        /// ```ignore,no_run
11214        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
11215        /// let x = SingleClusterRouting::new().set_cluster_id("example");
11216        /// ```
11217        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11218            self.cluster_id = v.into();
11219            self
11220        }
11221
11222        /// Sets the value of [allow_transactional_writes][crate::model::app_profile::SingleClusterRouting::allow_transactional_writes].
11223        ///
11224        /// # Example
11225        /// ```ignore,no_run
11226        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
11227        /// let x = SingleClusterRouting::new().set_allow_transactional_writes(true);
11228        /// ```
11229        pub fn set_allow_transactional_writes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11230            self.allow_transactional_writes = v.into();
11231            self
11232        }
11233    }
11234
11235    impl wkt::message::Message for SingleClusterRouting {
11236        fn typename() -> &'static str {
11237            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.SingleClusterRouting"
11238        }
11239    }
11240
11241    /// Standard options for isolating this app profile's traffic from other use
11242    /// cases.
11243    #[derive(Clone, Default, PartialEq)]
11244    #[non_exhaustive]
11245    pub struct StandardIsolation {
11246        /// The priority of requests sent using this app profile.
11247        pub priority: crate::model::app_profile::Priority,
11248
11249        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11250    }
11251
11252    impl StandardIsolation {
11253        /// Creates a new default instance.
11254        pub fn new() -> Self {
11255            std::default::Default::default()
11256        }
11257
11258        /// Sets the value of [priority][crate::model::app_profile::StandardIsolation::priority].
11259        ///
11260        /// # Example
11261        /// ```ignore,no_run
11262        /// # use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
11263        /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
11264        /// let x0 = StandardIsolation::new().set_priority(Priority::Low);
11265        /// let x1 = StandardIsolation::new().set_priority(Priority::Medium);
11266        /// let x2 = StandardIsolation::new().set_priority(Priority::High);
11267        /// ```
11268        pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
11269            mut self,
11270            v: T,
11271        ) -> Self {
11272            self.priority = v.into();
11273            self
11274        }
11275    }
11276
11277    impl wkt::message::Message for StandardIsolation {
11278        fn typename() -> &'static str {
11279            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.StandardIsolation"
11280        }
11281    }
11282
11283    /// Data Boost is a serverless compute capability that lets you run
11284    /// high-throughput read jobs and queries on your Bigtable data, without
11285    /// impacting the performance of the clusters that handle your application
11286    /// traffic. Data Boost supports read-only use cases with single-cluster
11287    /// routing.
11288    #[derive(Clone, Default, PartialEq)]
11289    #[non_exhaustive]
11290    pub struct DataBoostIsolationReadOnly {
11291        /// The Compute Billing Owner for this Data Boost App Profile.
11292        pub compute_billing_owner: std::option::Option<
11293            crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11294        >,
11295
11296        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11297    }
11298
11299    impl DataBoostIsolationReadOnly {
11300        /// Creates a new default instance.
11301        pub fn new() -> Self {
11302            std::default::Default::default()
11303        }
11304
11305        /// Sets the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
11306        ///
11307        /// # Example
11308        /// ```ignore,no_run
11309        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11310        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
11311        /// let x0 = DataBoostIsolationReadOnly::new().set_compute_billing_owner(ComputeBillingOwner::HostPays);
11312        /// ```
11313        pub fn set_compute_billing_owner<T>(mut self, v: T) -> Self
11314        where
11315            T: std::convert::Into<
11316                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11317                >,
11318        {
11319            self.compute_billing_owner = std::option::Option::Some(v.into());
11320            self
11321        }
11322
11323        /// Sets or clears the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
11324        ///
11325        /// # Example
11326        /// ```ignore,no_run
11327        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11328        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
11329        /// let x0 = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(Some(ComputeBillingOwner::HostPays));
11330        /// let x_none = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(None::<ComputeBillingOwner>);
11331        /// ```
11332        pub fn set_or_clear_compute_billing_owner<T>(mut self, v: std::option::Option<T>) -> Self
11333        where
11334            T: std::convert::Into<
11335                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11336                >,
11337        {
11338            self.compute_billing_owner = v.map(|x| x.into());
11339            self
11340        }
11341    }
11342
11343    impl wkt::message::Message for DataBoostIsolationReadOnly {
11344        fn typename() -> &'static str {
11345            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly"
11346        }
11347    }
11348
11349    /// Defines additional types related to [DataBoostIsolationReadOnly].
11350    pub mod data_boost_isolation_read_only {
11351        #[allow(unused_imports)]
11352        use super::*;
11353
11354        /// Compute Billing Owner specifies how usage should be accounted when using
11355        /// Data Boost. Compute Billing Owner also configures which Cloud Project is
11356        /// charged for relevant quota.
11357        ///
11358        /// # Working with unknown values
11359        ///
11360        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11361        /// additional enum variants at any time. Adding new variants is not considered
11362        /// a breaking change. Applications should write their code in anticipation of:
11363        ///
11364        /// - New values appearing in future releases of the client library, **and**
11365        /// - New values received dynamically, without application changes.
11366        ///
11367        /// Please consult the [Working with enums] section in the user guide for some
11368        /// guidelines.
11369        ///
11370        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11371        #[derive(Clone, Debug, PartialEq)]
11372        #[non_exhaustive]
11373        pub enum ComputeBillingOwner {
11374            /// Unspecified value.
11375            Unspecified,
11376            /// The host Cloud Project containing the targeted Bigtable Instance /
11377            /// Table pays for compute.
11378            HostPays,
11379            /// If set, the enum was initialized with an unknown value.
11380            ///
11381            /// Applications can examine the value using [ComputeBillingOwner::value] or
11382            /// [ComputeBillingOwner::name].
11383            UnknownValue(compute_billing_owner::UnknownValue),
11384        }
11385
11386        #[doc(hidden)]
11387        pub mod compute_billing_owner {
11388            #[allow(unused_imports)]
11389            use super::*;
11390            #[derive(Clone, Debug, PartialEq)]
11391            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11392        }
11393
11394        impl ComputeBillingOwner {
11395            /// Gets the enum value.
11396            ///
11397            /// Returns `None` if the enum contains an unknown value deserialized from
11398            /// the string representation of enums.
11399            pub fn value(&self) -> std::option::Option<i32> {
11400                match self {
11401                    Self::Unspecified => std::option::Option::Some(0),
11402                    Self::HostPays => std::option::Option::Some(1),
11403                    Self::UnknownValue(u) => u.0.value(),
11404                }
11405            }
11406
11407            /// Gets the enum value as a string.
11408            ///
11409            /// Returns `None` if the enum contains an unknown value deserialized from
11410            /// the integer representation of enums.
11411            pub fn name(&self) -> std::option::Option<&str> {
11412                match self {
11413                    Self::Unspecified => {
11414                        std::option::Option::Some("COMPUTE_BILLING_OWNER_UNSPECIFIED")
11415                    }
11416                    Self::HostPays => std::option::Option::Some("HOST_PAYS"),
11417                    Self::UnknownValue(u) => u.0.name(),
11418                }
11419            }
11420        }
11421
11422        impl std::default::Default for ComputeBillingOwner {
11423            fn default() -> Self {
11424                use std::convert::From;
11425                Self::from(0)
11426            }
11427        }
11428
11429        impl std::fmt::Display for ComputeBillingOwner {
11430            fn fmt(
11431                &self,
11432                f: &mut std::fmt::Formatter<'_>,
11433            ) -> std::result::Result<(), std::fmt::Error> {
11434                wkt::internal::display_enum(f, self.name(), self.value())
11435            }
11436        }
11437
11438        impl std::convert::From<i32> for ComputeBillingOwner {
11439            fn from(value: i32) -> Self {
11440                match value {
11441                    0 => Self::Unspecified,
11442                    1 => Self::HostPays,
11443                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
11444                        wkt::internal::UnknownEnumValue::Integer(value),
11445                    )),
11446                }
11447            }
11448        }
11449
11450        impl std::convert::From<&str> for ComputeBillingOwner {
11451            fn from(value: &str) -> Self {
11452                use std::string::ToString;
11453                match value {
11454                    "COMPUTE_BILLING_OWNER_UNSPECIFIED" => Self::Unspecified,
11455                    "HOST_PAYS" => Self::HostPays,
11456                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
11457                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11458                    )),
11459                }
11460            }
11461        }
11462
11463        impl serde::ser::Serialize for ComputeBillingOwner {
11464            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11465            where
11466                S: serde::Serializer,
11467            {
11468                match self {
11469                    Self::Unspecified => serializer.serialize_i32(0),
11470                    Self::HostPays => serializer.serialize_i32(1),
11471                    Self::UnknownValue(u) => u.0.serialize(serializer),
11472                }
11473            }
11474        }
11475
11476        impl<'de> serde::de::Deserialize<'de> for ComputeBillingOwner {
11477            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11478            where
11479                D: serde::Deserializer<'de>,
11480            {
11481                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComputeBillingOwner>::new(
11482                    ".google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner"))
11483            }
11484        }
11485    }
11486
11487    /// Possible priorities for an app profile. Note that higher priority writes
11488    /// can sometimes queue behind lower priority writes to the same tablet, as
11489    /// writes must be strictly sequenced in the durability log.
11490    ///
11491    /// # Working with unknown values
11492    ///
11493    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11494    /// additional enum variants at any time. Adding new variants is not considered
11495    /// a breaking change. Applications should write their code in anticipation of:
11496    ///
11497    /// - New values appearing in future releases of the client library, **and**
11498    /// - New values received dynamically, without application changes.
11499    ///
11500    /// Please consult the [Working with enums] section in the user guide for some
11501    /// guidelines.
11502    ///
11503    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11504    #[derive(Clone, Debug, PartialEq)]
11505    #[non_exhaustive]
11506    pub enum Priority {
11507        /// Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation.
11508        Unspecified,
11509        #[allow(missing_docs)]
11510        Low,
11511        #[allow(missing_docs)]
11512        Medium,
11513        #[allow(missing_docs)]
11514        High,
11515        /// If set, the enum was initialized with an unknown value.
11516        ///
11517        /// Applications can examine the value using [Priority::value] or
11518        /// [Priority::name].
11519        UnknownValue(priority::UnknownValue),
11520    }
11521
11522    #[doc(hidden)]
11523    pub mod priority {
11524        #[allow(unused_imports)]
11525        use super::*;
11526        #[derive(Clone, Debug, PartialEq)]
11527        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11528    }
11529
11530    impl Priority {
11531        /// Gets the enum value.
11532        ///
11533        /// Returns `None` if the enum contains an unknown value deserialized from
11534        /// the string representation of enums.
11535        pub fn value(&self) -> std::option::Option<i32> {
11536            match self {
11537                Self::Unspecified => std::option::Option::Some(0),
11538                Self::Low => std::option::Option::Some(1),
11539                Self::Medium => std::option::Option::Some(2),
11540                Self::High => std::option::Option::Some(3),
11541                Self::UnknownValue(u) => u.0.value(),
11542            }
11543        }
11544
11545        /// Gets the enum value as a string.
11546        ///
11547        /// Returns `None` if the enum contains an unknown value deserialized from
11548        /// the integer representation of enums.
11549        pub fn name(&self) -> std::option::Option<&str> {
11550            match self {
11551                Self::Unspecified => std::option::Option::Some("PRIORITY_UNSPECIFIED"),
11552                Self::Low => std::option::Option::Some("PRIORITY_LOW"),
11553                Self::Medium => std::option::Option::Some("PRIORITY_MEDIUM"),
11554                Self::High => std::option::Option::Some("PRIORITY_HIGH"),
11555                Self::UnknownValue(u) => u.0.name(),
11556            }
11557        }
11558    }
11559
11560    impl std::default::Default for Priority {
11561        fn default() -> Self {
11562            use std::convert::From;
11563            Self::from(0)
11564        }
11565    }
11566
11567    impl std::fmt::Display for Priority {
11568        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11569            wkt::internal::display_enum(f, self.name(), self.value())
11570        }
11571    }
11572
11573    impl std::convert::From<i32> for Priority {
11574        fn from(value: i32) -> Self {
11575            match value {
11576                0 => Self::Unspecified,
11577                1 => Self::Low,
11578                2 => Self::Medium,
11579                3 => Self::High,
11580                _ => Self::UnknownValue(priority::UnknownValue(
11581                    wkt::internal::UnknownEnumValue::Integer(value),
11582                )),
11583            }
11584        }
11585    }
11586
11587    impl std::convert::From<&str> for Priority {
11588        fn from(value: &str) -> Self {
11589            use std::string::ToString;
11590            match value {
11591                "PRIORITY_UNSPECIFIED" => Self::Unspecified,
11592                "PRIORITY_LOW" => Self::Low,
11593                "PRIORITY_MEDIUM" => Self::Medium,
11594                "PRIORITY_HIGH" => Self::High,
11595                _ => Self::UnknownValue(priority::UnknownValue(
11596                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11597                )),
11598            }
11599        }
11600    }
11601
11602    impl serde::ser::Serialize for Priority {
11603        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11604        where
11605            S: serde::Serializer,
11606        {
11607            match self {
11608                Self::Unspecified => serializer.serialize_i32(0),
11609                Self::Low => serializer.serialize_i32(1),
11610                Self::Medium => serializer.serialize_i32(2),
11611                Self::High => serializer.serialize_i32(3),
11612                Self::UnknownValue(u) => u.0.serialize(serializer),
11613            }
11614        }
11615    }
11616
11617    impl<'de> serde::de::Deserialize<'de> for Priority {
11618        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11619        where
11620            D: serde::Deserializer<'de>,
11621        {
11622            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Priority>::new(
11623                ".google.bigtable.admin.v2.AppProfile.Priority",
11624            ))
11625        }
11626    }
11627
11628    /// The routing policy for all read/write requests that use this app profile.
11629    /// A value must be explicitly set.
11630    #[derive(Clone, Debug, PartialEq)]
11631    #[non_exhaustive]
11632    pub enum RoutingPolicy {
11633        /// Use a multi-cluster routing policy.
11634        MultiClusterRoutingUseAny(
11635            std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>,
11636        ),
11637        /// Use a single-cluster routing policy.
11638        SingleClusterRouting(std::boxed::Box<crate::model::app_profile::SingleClusterRouting>),
11639    }
11640
11641    /// Options for isolating this app profile's traffic from other use cases.
11642    #[derive(Clone, Debug, PartialEq)]
11643    #[non_exhaustive]
11644    pub enum Isolation {
11645        /// This field has been deprecated in favor of `standard_isolation.priority`.
11646        /// If you set this field, `standard_isolation.priority` will be set instead.
11647        ///
11648        /// The priority of requests sent using this app profile.
11649        #[deprecated]
11650        Priority(crate::model::app_profile::Priority),
11651        /// The standard options used for isolating this app profile's traffic from
11652        /// other use cases.
11653        StandardIsolation(std::boxed::Box<crate::model::app_profile::StandardIsolation>),
11654        /// Specifies that this app profile is intended for read-only usage via the
11655        /// Data Boost feature.
11656        DataBoostIsolationReadOnly(
11657            std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>,
11658        ),
11659    }
11660}
11661
11662/// A tablet is a defined by a start and end key and is explained in
11663/// <https://cloud.google.com/bigtable/docs/overview#architecture> and
11664/// <https://cloud.google.com/bigtable/docs/performance#optimization>.
11665/// A Hot tablet is a tablet that exhibits high average cpu usage during the time
11666/// interval from start time to end time.
11667#[derive(Clone, Default, PartialEq)]
11668#[non_exhaustive]
11669pub struct HotTablet {
11670    /// The unique name of the hot tablet. Values are of the form
11671    /// `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`.
11672    pub name: std::string::String,
11673
11674    /// Name of the table that contains the tablet. Values are of the form
11675    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
11676    pub table_name: std::string::String,
11677
11678    /// Output only. The start time of the hot tablet.
11679    pub start_time: std::option::Option<wkt::Timestamp>,
11680
11681    /// Output only. The end time of the hot tablet.
11682    pub end_time: std::option::Option<wkt::Timestamp>,
11683
11684    /// Tablet Start Key (inclusive).
11685    pub start_key: std::string::String,
11686
11687    /// Tablet End Key (inclusive).
11688    pub end_key: std::string::String,
11689
11690    /// Output only. The average CPU usage spent by a node on this tablet over the
11691    /// start_time to end_time time range. The percentage is the amount of CPU used
11692    /// by the node to serve the tablet, from 0% (tablet was not interacted with)
11693    /// to 100% (the node spent all cycles serving the hot tablet).
11694    pub node_cpu_usage_percent: f32,
11695
11696    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11697}
11698
11699impl HotTablet {
11700    /// Creates a new default instance.
11701    pub fn new() -> Self {
11702        std::default::Default::default()
11703    }
11704
11705    /// Sets the value of [name][crate::model::HotTablet::name].
11706    ///
11707    /// # Example
11708    /// ```ignore,no_run
11709    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11710    /// let x = HotTablet::new().set_name("example");
11711    /// ```
11712    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11713        self.name = v.into();
11714        self
11715    }
11716
11717    /// Sets the value of [table_name][crate::model::HotTablet::table_name].
11718    ///
11719    /// # Example
11720    /// ```ignore,no_run
11721    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11722    /// let x = HotTablet::new().set_table_name("example");
11723    /// ```
11724    pub fn set_table_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11725        self.table_name = v.into();
11726        self
11727    }
11728
11729    /// Sets the value of [start_time][crate::model::HotTablet::start_time].
11730    ///
11731    /// # Example
11732    /// ```ignore,no_run
11733    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11734    /// use wkt::Timestamp;
11735    /// let x = HotTablet::new().set_start_time(Timestamp::default()/* use setters */);
11736    /// ```
11737    pub fn set_start_time<T>(mut self, v: T) -> Self
11738    where
11739        T: std::convert::Into<wkt::Timestamp>,
11740    {
11741        self.start_time = std::option::Option::Some(v.into());
11742        self
11743    }
11744
11745    /// Sets or clears the value of [start_time][crate::model::HotTablet::start_time].
11746    ///
11747    /// # Example
11748    /// ```ignore,no_run
11749    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11750    /// use wkt::Timestamp;
11751    /// let x = HotTablet::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
11752    /// let x = HotTablet::new().set_or_clear_start_time(None::<Timestamp>);
11753    /// ```
11754    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
11755    where
11756        T: std::convert::Into<wkt::Timestamp>,
11757    {
11758        self.start_time = v.map(|x| x.into());
11759        self
11760    }
11761
11762    /// Sets the value of [end_time][crate::model::HotTablet::end_time].
11763    ///
11764    /// # Example
11765    /// ```ignore,no_run
11766    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11767    /// use wkt::Timestamp;
11768    /// let x = HotTablet::new().set_end_time(Timestamp::default()/* use setters */);
11769    /// ```
11770    pub fn set_end_time<T>(mut self, v: T) -> Self
11771    where
11772        T: std::convert::Into<wkt::Timestamp>,
11773    {
11774        self.end_time = std::option::Option::Some(v.into());
11775        self
11776    }
11777
11778    /// Sets or clears the value of [end_time][crate::model::HotTablet::end_time].
11779    ///
11780    /// # Example
11781    /// ```ignore,no_run
11782    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11783    /// use wkt::Timestamp;
11784    /// let x = HotTablet::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
11785    /// let x = HotTablet::new().set_or_clear_end_time(None::<Timestamp>);
11786    /// ```
11787    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
11788    where
11789        T: std::convert::Into<wkt::Timestamp>,
11790    {
11791        self.end_time = v.map(|x| x.into());
11792        self
11793    }
11794
11795    /// Sets the value of [start_key][crate::model::HotTablet::start_key].
11796    ///
11797    /// # Example
11798    /// ```ignore,no_run
11799    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11800    /// let x = HotTablet::new().set_start_key("example");
11801    /// ```
11802    pub fn set_start_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11803        self.start_key = v.into();
11804        self
11805    }
11806
11807    /// Sets the value of [end_key][crate::model::HotTablet::end_key].
11808    ///
11809    /// # Example
11810    /// ```ignore,no_run
11811    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11812    /// let x = HotTablet::new().set_end_key("example");
11813    /// ```
11814    pub fn set_end_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11815        self.end_key = v.into();
11816        self
11817    }
11818
11819    /// Sets the value of [node_cpu_usage_percent][crate::model::HotTablet::node_cpu_usage_percent].
11820    ///
11821    /// # Example
11822    /// ```ignore,no_run
11823    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11824    /// let x = HotTablet::new().set_node_cpu_usage_percent(42.0);
11825    /// ```
11826    pub fn set_node_cpu_usage_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
11827        self.node_cpu_usage_percent = v.into();
11828        self
11829    }
11830}
11831
11832impl wkt::message::Message for HotTablet {
11833    fn typename() -> &'static str {
11834        "type.googleapis.com/google.bigtable.admin.v2.HotTablet"
11835    }
11836}
11837
11838/// A SQL logical view object that can be referenced in SQL queries.
11839#[derive(Clone, Default, PartialEq)]
11840#[non_exhaustive]
11841pub struct LogicalView {
11842    /// Identifier. The unique name of the logical view.
11843    /// Format:
11844    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
11845    pub name: std::string::String,
11846
11847    /// Required. The logical view's select query.
11848    pub query: std::string::String,
11849
11850    /// Optional. The etag for this logical view.
11851    /// This may be sent on update requests to ensure that the client has an
11852    /// up-to-date value before proceeding. The server returns an ABORTED error on
11853    /// a mismatched etag.
11854    pub etag: std::string::String,
11855
11856    /// Optional. Set to true to make the LogicalView protected against deletion.
11857    pub deletion_protection: bool,
11858
11859    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11860}
11861
11862impl LogicalView {
11863    /// Creates a new default instance.
11864    pub fn new() -> Self {
11865        std::default::Default::default()
11866    }
11867
11868    /// Sets the value of [name][crate::model::LogicalView::name].
11869    ///
11870    /// # Example
11871    /// ```ignore,no_run
11872    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11873    /// let x = LogicalView::new().set_name("example");
11874    /// ```
11875    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11876        self.name = v.into();
11877        self
11878    }
11879
11880    /// Sets the value of [query][crate::model::LogicalView::query].
11881    ///
11882    /// # Example
11883    /// ```ignore,no_run
11884    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11885    /// let x = LogicalView::new().set_query("example");
11886    /// ```
11887    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11888        self.query = v.into();
11889        self
11890    }
11891
11892    /// Sets the value of [etag][crate::model::LogicalView::etag].
11893    ///
11894    /// # Example
11895    /// ```ignore,no_run
11896    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11897    /// let x = LogicalView::new().set_etag("example");
11898    /// ```
11899    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11900        self.etag = v.into();
11901        self
11902    }
11903
11904    /// Sets the value of [deletion_protection][crate::model::LogicalView::deletion_protection].
11905    ///
11906    /// # Example
11907    /// ```ignore,no_run
11908    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
11909    /// let x = LogicalView::new().set_deletion_protection(true);
11910    /// ```
11911    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11912        self.deletion_protection = v.into();
11913        self
11914    }
11915}
11916
11917impl wkt::message::Message for LogicalView {
11918    fn typename() -> &'static str {
11919        "type.googleapis.com/google.bigtable.admin.v2.LogicalView"
11920    }
11921}
11922
11923/// A materialized view object that can be referenced in SQL queries.
11924#[derive(Clone, Default, PartialEq)]
11925#[non_exhaustive]
11926pub struct MaterializedView {
11927    /// Identifier. The unique name of the materialized view.
11928    /// Format:
11929    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
11930    pub name: std::string::String,
11931
11932    /// Required. Immutable. The materialized view's select query.
11933    pub query: std::string::String,
11934
11935    /// Optional. The etag for this materialized view.
11936    /// This may be sent on update requests to ensure that the client has an
11937    /// up-to-date value before proceeding. The server returns an ABORTED error on
11938    /// a mismatched etag.
11939    pub etag: std::string::String,
11940
11941    /// Set to true to make the MaterializedView protected against deletion.
11942    pub deletion_protection: bool,
11943
11944    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11945}
11946
11947impl MaterializedView {
11948    /// Creates a new default instance.
11949    pub fn new() -> Self {
11950        std::default::Default::default()
11951    }
11952
11953    /// Sets the value of [name][crate::model::MaterializedView::name].
11954    ///
11955    /// # Example
11956    /// ```ignore,no_run
11957    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11958    /// let x = MaterializedView::new().set_name("example");
11959    /// ```
11960    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11961        self.name = v.into();
11962        self
11963    }
11964
11965    /// Sets the value of [query][crate::model::MaterializedView::query].
11966    ///
11967    /// # Example
11968    /// ```ignore,no_run
11969    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11970    /// let x = MaterializedView::new().set_query("example");
11971    /// ```
11972    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11973        self.query = v.into();
11974        self
11975    }
11976
11977    /// Sets the value of [etag][crate::model::MaterializedView::etag].
11978    ///
11979    /// # Example
11980    /// ```ignore,no_run
11981    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11982    /// let x = MaterializedView::new().set_etag("example");
11983    /// ```
11984    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11985        self.etag = v.into();
11986        self
11987    }
11988
11989    /// Sets the value of [deletion_protection][crate::model::MaterializedView::deletion_protection].
11990    ///
11991    /// # Example
11992    /// ```ignore,no_run
11993    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
11994    /// let x = MaterializedView::new().set_deletion_protection(true);
11995    /// ```
11996    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11997        self.deletion_protection = v.into();
11998        self
11999    }
12000}
12001
12002impl wkt::message::Message for MaterializedView {
12003    fn typename() -> &'static str {
12004        "type.googleapis.com/google.bigtable.admin.v2.MaterializedView"
12005    }
12006}
12007
12008/// Information about a table restore.
12009#[derive(Clone, Default, PartialEq)]
12010#[non_exhaustive]
12011pub struct RestoreInfo {
12012    /// The type of the restore source.
12013    pub source_type: crate::model::RestoreSourceType,
12014
12015    /// Information about the source used to restore the table.
12016    pub source_info: std::option::Option<crate::model::restore_info::SourceInfo>,
12017
12018    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12019}
12020
12021impl RestoreInfo {
12022    /// Creates a new default instance.
12023    pub fn new() -> Self {
12024        std::default::Default::default()
12025    }
12026
12027    /// Sets the value of [source_type][crate::model::RestoreInfo::source_type].
12028    ///
12029    /// # Example
12030    /// ```ignore,no_run
12031    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12032    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
12033    /// let x0 = RestoreInfo::new().set_source_type(RestoreSourceType::Backup);
12034    /// ```
12035    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
12036        mut self,
12037        v: T,
12038    ) -> Self {
12039        self.source_type = v.into();
12040        self
12041    }
12042
12043    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info].
12044    ///
12045    /// Note that all the setters affecting `source_info` are mutually
12046    /// exclusive.
12047    ///
12048    /// # Example
12049    /// ```ignore,no_run
12050    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12051    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
12052    /// let x = RestoreInfo::new().set_source_info(Some(
12053    ///     google_cloud_bigtable_admin_v2::model::restore_info::SourceInfo::BackupInfo(BackupInfo::default().into())));
12054    /// ```
12055    pub fn set_source_info<
12056        T: std::convert::Into<std::option::Option<crate::model::restore_info::SourceInfo>>,
12057    >(
12058        mut self,
12059        v: T,
12060    ) -> Self {
12061        self.source_info = v.into();
12062        self
12063    }
12064
12065    /// The value of [source_info][crate::model::RestoreInfo::source_info]
12066    /// if it holds a `BackupInfo`, `None` if the field is not set or
12067    /// holds a different branch.
12068    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
12069        #[allow(unreachable_patterns)]
12070        self.source_info.as_ref().and_then(|v| match v {
12071            crate::model::restore_info::SourceInfo::BackupInfo(v) => std::option::Option::Some(v),
12072            _ => std::option::Option::None,
12073        })
12074    }
12075
12076    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info]
12077    /// to hold a `BackupInfo`.
12078    ///
12079    /// Note that all the setters affecting `source_info` are
12080    /// mutually exclusive.
12081    ///
12082    /// # Example
12083    /// ```ignore,no_run
12084    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12085    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
12086    /// let x = RestoreInfo::new().set_backup_info(BackupInfo::default()/* use setters */);
12087    /// assert!(x.backup_info().is_some());
12088    /// ```
12089    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
12090        mut self,
12091        v: T,
12092    ) -> Self {
12093        self.source_info =
12094            std::option::Option::Some(crate::model::restore_info::SourceInfo::BackupInfo(v.into()));
12095        self
12096    }
12097}
12098
12099impl wkt::message::Message for RestoreInfo {
12100    fn typename() -> &'static str {
12101        "type.googleapis.com/google.bigtable.admin.v2.RestoreInfo"
12102    }
12103}
12104
12105/// Defines additional types related to [RestoreInfo].
12106pub mod restore_info {
12107    #[allow(unused_imports)]
12108    use super::*;
12109
12110    /// Information about the source used to restore the table.
12111    #[derive(Clone, Debug, PartialEq)]
12112    #[non_exhaustive]
12113    pub enum SourceInfo {
12114        /// Information about the backup used to restore the table. The backup
12115        /// may no longer exist.
12116        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
12117    }
12118}
12119
12120/// Change stream configuration.
12121#[derive(Clone, Default, PartialEq)]
12122#[non_exhaustive]
12123pub struct ChangeStreamConfig {
12124    /// How long the change stream should be retained. Change stream data older
12125    /// than the retention period will not be returned when reading the change
12126    /// stream from the table.
12127    /// Values must be at least 1 day and at most 7 days, and will be truncated to
12128    /// microsecond granularity.
12129    pub retention_period: std::option::Option<wkt::Duration>,
12130
12131    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12132}
12133
12134impl ChangeStreamConfig {
12135    /// Creates a new default instance.
12136    pub fn new() -> Self {
12137        std::default::Default::default()
12138    }
12139
12140    /// Sets the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
12141    ///
12142    /// # Example
12143    /// ```ignore,no_run
12144    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12145    /// use wkt::Duration;
12146    /// let x = ChangeStreamConfig::new().set_retention_period(Duration::default()/* use setters */);
12147    /// ```
12148    pub fn set_retention_period<T>(mut self, v: T) -> Self
12149    where
12150        T: std::convert::Into<wkt::Duration>,
12151    {
12152        self.retention_period = std::option::Option::Some(v.into());
12153        self
12154    }
12155
12156    /// Sets or clears the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
12157    ///
12158    /// # Example
12159    /// ```ignore,no_run
12160    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12161    /// use wkt::Duration;
12162    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
12163    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(None::<Duration>);
12164    /// ```
12165    pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
12166    where
12167        T: std::convert::Into<wkt::Duration>,
12168    {
12169        self.retention_period = v.map(|x| x.into());
12170        self
12171    }
12172}
12173
12174impl wkt::message::Message for ChangeStreamConfig {
12175    fn typename() -> &'static str {
12176        "type.googleapis.com/google.bigtable.admin.v2.ChangeStreamConfig"
12177    }
12178}
12179
12180/// A collection of user data indexed by row, column, and timestamp.
12181/// Each table is served using the resources of its parent cluster.
12182#[derive(Clone, Default, PartialEq)]
12183#[non_exhaustive]
12184pub struct Table {
12185    /// The unique name of the table. Values are of the form
12186    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
12187    /// Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
12188    pub name: std::string::String,
12189
12190    /// Output only. Map from cluster ID to per-cluster table state.
12191    /// If it could not be determined whether or not the table has data in a
12192    /// particular cluster (for example, if its zone is unavailable), then
12193    /// there will be an entry for the cluster with UNKNOWN `replication_status`.
12194    /// Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
12195    pub cluster_states:
12196        std::collections::HashMap<std::string::String, crate::model::table::ClusterState>,
12197
12198    /// The column families configured for this table, mapped by column family ID.
12199    /// Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
12200    pub column_families: std::collections::HashMap<std::string::String, crate::model::ColumnFamily>,
12201
12202    /// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
12203    /// in this table. Timestamps not matching the granularity will be rejected. If
12204    /// unspecified at creation time, the value will be set to `MILLIS`. Views:
12205    /// `SCHEMA_VIEW`, `FULL`.
12206    pub granularity: crate::model::table::TimestampGranularity,
12207
12208    /// Output only. If this table was restored from another data source (e.g. a
12209    /// backup), this field will be populated with information about the restore.
12210    pub restore_info: std::option::Option<crate::model::RestoreInfo>,
12211
12212    /// If specified, enable the change stream on this table.
12213    /// Otherwise, the change stream is disabled and the change stream is not
12214    /// retained.
12215    pub change_stream_config: std::option::Option<crate::model::ChangeStreamConfig>,
12216
12217    /// Set to true to make the table protected against data loss. i.e. deleting
12218    /// the following resources through Admin APIs are prohibited:
12219    ///
12220    /// * The table.
12221    /// * The column families in the table.
12222    /// * The instance containing the table.
12223    ///
12224    /// Note one can still delete the data stored in the table through Data APIs.
12225    pub deletion_protection: bool,
12226
12227    /// Rules to specify what data is stored in each storage tier.
12228    /// Different tiers store data differently, providing different trade-offs
12229    /// between cost and performance. Different parts of a table can be stored
12230    /// separately on different tiers.
12231    /// If a config is specified, tiered storage is enabled for this table.
12232    /// Otherwise, tiered storage is disabled.
12233    /// Only SSD instances can configure tiered storage.
12234    pub tiered_storage_config: std::option::Option<crate::model::TieredStorageConfig>,
12235
12236    /// The row key schema for this table. The schema is used to decode the raw row
12237    /// key bytes into a structured format. The order of field declarations in this
12238    /// schema is important, as it reflects how the raw row key bytes are
12239    /// structured. Currently, this only affects how the key is read via a
12240    /// GoogleSQL query from the ExecuteQuery API.
12241    ///
12242    /// For a SQL query, the _key column is still read as raw bytes. But queries
12243    /// can reference the key fields by name, which will be decoded from _key using
12244    /// provided type and encoding. Queries that reference key fields will fail if
12245    /// they encounter an invalid row key.
12246    ///
12247    /// For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
12248    /// following schema:
12249    /// {
12250    /// fields {
12251    /// field_name: "id"
12252    /// type { string { encoding: utf8_bytes {} } }
12253    /// }
12254    /// fields {
12255    /// field_name: "date"
12256    /// type { string { encoding: utf8_bytes {} } }
12257    /// }
12258    /// fields {
12259    /// field_name: "product_code"
12260    /// type { int64 { encoding: big_endian_bytes {} } }
12261    /// }
12262    /// encoding { delimited_bytes { delimiter: "#" } }
12263    /// }
12264    ///
12265    /// The decoded key parts would be:
12266    /// id = "some_id", date = "2024-04-30", product_code = 1245427
12267    /// The query "SELECT _key, product_code FROM table" will return two columns:
12268    /// /------------------------------------------------------\
12269    /// |              _key                     | product_code |
12270    /// | --------------------------------------|--------------|
12271    /// | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
12272    /// \------------------------------------------------------/
12273    ///
12274    /// The schema has the following invariants:
12275    /// (1) The decoded field values are order-preserved. For read, the field
12276    /// values will be decoded in sorted mode from the raw bytes.
12277    /// (2) Every field in the schema must specify a non-empty name.
12278    /// (3) Every field must specify a type with an associated encoding. The type
12279    /// is limited to scalar types only: Array, Map, Aggregate, and Struct are not
12280    /// allowed.
12281    /// (4) The field names must not collide with existing column family
12282    /// names and reserved keywords "_key" and "_timestamp".
12283    ///
12284    /// The following update operations are allowed for row_key_schema:
12285    ///
12286    /// - Update from an empty schema to a new schema.
12287    /// - Remove the existing schema. This operation requires setting the
12288    ///   `ignore_warnings` flag to `true`, since it might be a backward
12289    ///   incompatible change. Without the flag, the update request will fail with
12290    ///   an INVALID_ARGUMENT error.
12291    ///   Any other row key schema update operation (e.g. update existing schema
12292    ///   columns names or types) is currently unsupported.
12293    pub row_key_schema: std::option::Option<crate::model::r#type::Struct>,
12294
12295    #[allow(missing_docs)]
12296    pub automated_backup_config: std::option::Option<crate::model::table::AutomatedBackupConfig>,
12297
12298    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12299}
12300
12301impl Table {
12302    /// Creates a new default instance.
12303    pub fn new() -> Self {
12304        std::default::Default::default()
12305    }
12306
12307    /// Sets the value of [name][crate::model::Table::name].
12308    ///
12309    /// # Example
12310    /// ```ignore,no_run
12311    /// # use google_cloud_bigtable_admin_v2::model::Table;
12312    /// let x = Table::new().set_name("example");
12313    /// ```
12314    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12315        self.name = v.into();
12316        self
12317    }
12318
12319    /// Sets the value of [cluster_states][crate::model::Table::cluster_states].
12320    ///
12321    /// # Example
12322    /// ```ignore,no_run
12323    /// # use google_cloud_bigtable_admin_v2::model::Table;
12324    /// use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12325    /// let x = Table::new().set_cluster_states([
12326    ///     ("key0", ClusterState::default()/* use setters */),
12327    ///     ("key1", ClusterState::default()/* use (different) setters */),
12328    /// ]);
12329    /// ```
12330    pub fn set_cluster_states<T, K, V>(mut self, v: T) -> Self
12331    where
12332        T: std::iter::IntoIterator<Item = (K, V)>,
12333        K: std::convert::Into<std::string::String>,
12334        V: std::convert::Into<crate::model::table::ClusterState>,
12335    {
12336        use std::iter::Iterator;
12337        self.cluster_states = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12338        self
12339    }
12340
12341    /// Sets the value of [column_families][crate::model::Table::column_families].
12342    ///
12343    /// # Example
12344    /// ```ignore,no_run
12345    /// # use google_cloud_bigtable_admin_v2::model::Table;
12346    /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
12347    /// let x = Table::new().set_column_families([
12348    ///     ("key0", ColumnFamily::default()/* use setters */),
12349    ///     ("key1", ColumnFamily::default()/* use (different) setters */),
12350    /// ]);
12351    /// ```
12352    pub fn set_column_families<T, K, V>(mut self, v: T) -> Self
12353    where
12354        T: std::iter::IntoIterator<Item = (K, V)>,
12355        K: std::convert::Into<std::string::String>,
12356        V: std::convert::Into<crate::model::ColumnFamily>,
12357    {
12358        use std::iter::Iterator;
12359        self.column_families = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12360        self
12361    }
12362
12363    /// Sets the value of [granularity][crate::model::Table::granularity].
12364    ///
12365    /// # Example
12366    /// ```ignore,no_run
12367    /// # use google_cloud_bigtable_admin_v2::model::Table;
12368    /// use google_cloud_bigtable_admin_v2::model::table::TimestampGranularity;
12369    /// let x0 = Table::new().set_granularity(TimestampGranularity::Millis);
12370    /// ```
12371    pub fn set_granularity<T: std::convert::Into<crate::model::table::TimestampGranularity>>(
12372        mut self,
12373        v: T,
12374    ) -> Self {
12375        self.granularity = v.into();
12376        self
12377    }
12378
12379    /// Sets the value of [restore_info][crate::model::Table::restore_info].
12380    ///
12381    /// # Example
12382    /// ```ignore,no_run
12383    /// # use google_cloud_bigtable_admin_v2::model::Table;
12384    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12385    /// let x = Table::new().set_restore_info(RestoreInfo::default()/* use setters */);
12386    /// ```
12387    pub fn set_restore_info<T>(mut self, v: T) -> Self
12388    where
12389        T: std::convert::Into<crate::model::RestoreInfo>,
12390    {
12391        self.restore_info = std::option::Option::Some(v.into());
12392        self
12393    }
12394
12395    /// Sets or clears the value of [restore_info][crate::model::Table::restore_info].
12396    ///
12397    /// # Example
12398    /// ```ignore,no_run
12399    /// # use google_cloud_bigtable_admin_v2::model::Table;
12400    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12401    /// let x = Table::new().set_or_clear_restore_info(Some(RestoreInfo::default()/* use setters */));
12402    /// let x = Table::new().set_or_clear_restore_info(None::<RestoreInfo>);
12403    /// ```
12404    pub fn set_or_clear_restore_info<T>(mut self, v: std::option::Option<T>) -> Self
12405    where
12406        T: std::convert::Into<crate::model::RestoreInfo>,
12407    {
12408        self.restore_info = v.map(|x| x.into());
12409        self
12410    }
12411
12412    /// Sets the value of [change_stream_config][crate::model::Table::change_stream_config].
12413    ///
12414    /// # Example
12415    /// ```ignore,no_run
12416    /// # use google_cloud_bigtable_admin_v2::model::Table;
12417    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12418    /// let x = Table::new().set_change_stream_config(ChangeStreamConfig::default()/* use setters */);
12419    /// ```
12420    pub fn set_change_stream_config<T>(mut self, v: T) -> Self
12421    where
12422        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12423    {
12424        self.change_stream_config = std::option::Option::Some(v.into());
12425        self
12426    }
12427
12428    /// Sets or clears the value of [change_stream_config][crate::model::Table::change_stream_config].
12429    ///
12430    /// # Example
12431    /// ```ignore,no_run
12432    /// # use google_cloud_bigtable_admin_v2::model::Table;
12433    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12434    /// let x = Table::new().set_or_clear_change_stream_config(Some(ChangeStreamConfig::default()/* use setters */));
12435    /// let x = Table::new().set_or_clear_change_stream_config(None::<ChangeStreamConfig>);
12436    /// ```
12437    pub fn set_or_clear_change_stream_config<T>(mut self, v: std::option::Option<T>) -> Self
12438    where
12439        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12440    {
12441        self.change_stream_config = v.map(|x| x.into());
12442        self
12443    }
12444
12445    /// Sets the value of [deletion_protection][crate::model::Table::deletion_protection].
12446    ///
12447    /// # Example
12448    /// ```ignore,no_run
12449    /// # use google_cloud_bigtable_admin_v2::model::Table;
12450    /// let x = Table::new().set_deletion_protection(true);
12451    /// ```
12452    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12453        self.deletion_protection = v.into();
12454        self
12455    }
12456
12457    /// Sets the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
12458    ///
12459    /// # Example
12460    /// ```ignore,no_run
12461    /// # use google_cloud_bigtable_admin_v2::model::Table;
12462    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
12463    /// let x = Table::new().set_tiered_storage_config(TieredStorageConfig::default()/* use setters */);
12464    /// ```
12465    pub fn set_tiered_storage_config<T>(mut self, v: T) -> Self
12466    where
12467        T: std::convert::Into<crate::model::TieredStorageConfig>,
12468    {
12469        self.tiered_storage_config = std::option::Option::Some(v.into());
12470        self
12471    }
12472
12473    /// Sets or clears the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
12474    ///
12475    /// # Example
12476    /// ```ignore,no_run
12477    /// # use google_cloud_bigtable_admin_v2::model::Table;
12478    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
12479    /// let x = Table::new().set_or_clear_tiered_storage_config(Some(TieredStorageConfig::default()/* use setters */));
12480    /// let x = Table::new().set_or_clear_tiered_storage_config(None::<TieredStorageConfig>);
12481    /// ```
12482    pub fn set_or_clear_tiered_storage_config<T>(mut self, v: std::option::Option<T>) -> Self
12483    where
12484        T: std::convert::Into<crate::model::TieredStorageConfig>,
12485    {
12486        self.tiered_storage_config = v.map(|x| x.into());
12487        self
12488    }
12489
12490    /// Sets the value of [row_key_schema][crate::model::Table::row_key_schema].
12491    ///
12492    /// # Example
12493    /// ```ignore,no_run
12494    /// # use google_cloud_bigtable_admin_v2::model::Table;
12495    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12496    /// let x = Table::new().set_row_key_schema(Struct::default()/* use setters */);
12497    /// ```
12498    pub fn set_row_key_schema<T>(mut self, v: T) -> Self
12499    where
12500        T: std::convert::Into<crate::model::r#type::Struct>,
12501    {
12502        self.row_key_schema = std::option::Option::Some(v.into());
12503        self
12504    }
12505
12506    /// Sets or clears the value of [row_key_schema][crate::model::Table::row_key_schema].
12507    ///
12508    /// # Example
12509    /// ```ignore,no_run
12510    /// # use google_cloud_bigtable_admin_v2::model::Table;
12511    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12512    /// let x = Table::new().set_or_clear_row_key_schema(Some(Struct::default()/* use setters */));
12513    /// let x = Table::new().set_or_clear_row_key_schema(None::<Struct>);
12514    /// ```
12515    pub fn set_or_clear_row_key_schema<T>(mut self, v: std::option::Option<T>) -> Self
12516    where
12517        T: std::convert::Into<crate::model::r#type::Struct>,
12518    {
12519        self.row_key_schema = v.map(|x| x.into());
12520        self
12521    }
12522
12523    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config].
12524    ///
12525    /// Note that all the setters affecting `automated_backup_config` are mutually
12526    /// exclusive.
12527    ///
12528    /// # Example
12529    /// ```ignore,no_run
12530    /// # use google_cloud_bigtable_admin_v2::model::Table;
12531    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12532    /// let x = Table::new().set_automated_backup_config(Some(
12533    ///     google_cloud_bigtable_admin_v2::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(AutomatedBackupPolicy::default().into())));
12534    /// ```
12535    pub fn set_automated_backup_config<
12536        T: std::convert::Into<std::option::Option<crate::model::table::AutomatedBackupConfig>>,
12537    >(
12538        mut self,
12539        v: T,
12540    ) -> Self {
12541        self.automated_backup_config = v.into();
12542        self
12543    }
12544
12545    /// The value of [automated_backup_config][crate::model::Table::automated_backup_config]
12546    /// if it holds a `AutomatedBackupPolicy`, `None` if the field is not set or
12547    /// holds a different branch.
12548    pub fn automated_backup_policy(
12549        &self,
12550    ) -> std::option::Option<&std::boxed::Box<crate::model::table::AutomatedBackupPolicy>> {
12551        #[allow(unreachable_patterns)]
12552        self.automated_backup_config.as_ref().and_then(|v| match v {
12553            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v) => {
12554                std::option::Option::Some(v)
12555            }
12556            _ => std::option::Option::None,
12557        })
12558    }
12559
12560    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config]
12561    /// to hold a `AutomatedBackupPolicy`.
12562    ///
12563    /// Note that all the setters affecting `automated_backup_config` are
12564    /// mutually exclusive.
12565    ///
12566    /// # Example
12567    /// ```ignore,no_run
12568    /// # use google_cloud_bigtable_admin_v2::model::Table;
12569    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12570    /// let x = Table::new().set_automated_backup_policy(AutomatedBackupPolicy::default()/* use setters */);
12571    /// assert!(x.automated_backup_policy().is_some());
12572    /// ```
12573    pub fn set_automated_backup_policy<
12574        T: std::convert::Into<std::boxed::Box<crate::model::table::AutomatedBackupPolicy>>,
12575    >(
12576        mut self,
12577        v: T,
12578    ) -> Self {
12579        self.automated_backup_config = std::option::Option::Some(
12580            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v.into()),
12581        );
12582        self
12583    }
12584}
12585
12586impl wkt::message::Message for Table {
12587    fn typename() -> &'static str {
12588        "type.googleapis.com/google.bigtable.admin.v2.Table"
12589    }
12590}
12591
12592/// Defines additional types related to [Table].
12593pub mod table {
12594    #[allow(unused_imports)]
12595    use super::*;
12596
12597    /// The state of a table's data in a particular cluster.
12598    #[derive(Clone, Default, PartialEq)]
12599    #[non_exhaustive]
12600    pub struct ClusterState {
12601        /// Output only. The state of replication for the table in this cluster.
12602        pub replication_state: crate::model::table::cluster_state::ReplicationState,
12603
12604        /// Output only. The encryption information for the table in this cluster.
12605        /// If the encryption key protecting this resource is customer managed, then
12606        /// its version can be rotated in Cloud Key Management Service (Cloud KMS).
12607        /// The primary version of the key and its status will be reflected here when
12608        /// changes propagate from Cloud KMS.
12609        pub encryption_info: std::vec::Vec<crate::model::EncryptionInfo>,
12610
12611        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12612    }
12613
12614    impl ClusterState {
12615        /// Creates a new default instance.
12616        pub fn new() -> Self {
12617            std::default::Default::default()
12618        }
12619
12620        /// Sets the value of [replication_state][crate::model::table::ClusterState::replication_state].
12621        ///
12622        /// # Example
12623        /// ```ignore,no_run
12624        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12625        /// use google_cloud_bigtable_admin_v2::model::table::cluster_state::ReplicationState;
12626        /// let x0 = ClusterState::new().set_replication_state(ReplicationState::Initializing);
12627        /// let x1 = ClusterState::new().set_replication_state(ReplicationState::PlannedMaintenance);
12628        /// let x2 = ClusterState::new().set_replication_state(ReplicationState::UnplannedMaintenance);
12629        /// ```
12630        pub fn set_replication_state<
12631            T: std::convert::Into<crate::model::table::cluster_state::ReplicationState>,
12632        >(
12633            mut self,
12634            v: T,
12635        ) -> Self {
12636            self.replication_state = v.into();
12637            self
12638        }
12639
12640        /// Sets the value of [encryption_info][crate::model::table::ClusterState::encryption_info].
12641        ///
12642        /// # Example
12643        /// ```ignore,no_run
12644        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12645        /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
12646        /// let x = ClusterState::new()
12647        ///     .set_encryption_info([
12648        ///         EncryptionInfo::default()/* use setters */,
12649        ///         EncryptionInfo::default()/* use (different) setters */,
12650        ///     ]);
12651        /// ```
12652        pub fn set_encryption_info<T, V>(mut self, v: T) -> Self
12653        where
12654            T: std::iter::IntoIterator<Item = V>,
12655            V: std::convert::Into<crate::model::EncryptionInfo>,
12656        {
12657            use std::iter::Iterator;
12658            self.encryption_info = v.into_iter().map(|i| i.into()).collect();
12659            self
12660        }
12661    }
12662
12663    impl wkt::message::Message for ClusterState {
12664        fn typename() -> &'static str {
12665            "type.googleapis.com/google.bigtable.admin.v2.Table.ClusterState"
12666        }
12667    }
12668
12669    /// Defines additional types related to [ClusterState].
12670    pub mod cluster_state {
12671        #[allow(unused_imports)]
12672        use super::*;
12673
12674        /// Table replication states.
12675        ///
12676        /// # Working with unknown values
12677        ///
12678        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12679        /// additional enum variants at any time. Adding new variants is not considered
12680        /// a breaking change. Applications should write their code in anticipation of:
12681        ///
12682        /// - New values appearing in future releases of the client library, **and**
12683        /// - New values received dynamically, without application changes.
12684        ///
12685        /// Please consult the [Working with enums] section in the user guide for some
12686        /// guidelines.
12687        ///
12688        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12689        #[derive(Clone, Debug, PartialEq)]
12690        #[non_exhaustive]
12691        pub enum ReplicationState {
12692            /// The replication state of the table is unknown in this cluster.
12693            StateNotKnown,
12694            /// The cluster was recently created, and the table must finish copying
12695            /// over pre-existing data from other clusters before it can begin
12696            /// receiving live replication updates and serving Data API requests.
12697            Initializing,
12698            /// The table is temporarily unable to serve Data API requests from this
12699            /// cluster due to planned internal maintenance.
12700            PlannedMaintenance,
12701            /// The table is temporarily unable to serve Data API requests from this
12702            /// cluster due to unplanned or emergency maintenance.
12703            UnplannedMaintenance,
12704            /// The table can serve Data API requests from this cluster. Depending on
12705            /// replication delay, reads may not immediately reflect the state of the
12706            /// table in other clusters.
12707            Ready,
12708            /// The table is fully created and ready for use after a restore, and is
12709            /// being optimized for performance. When optimizations are complete, the
12710            /// table will transition to `READY` state.
12711            ReadyOptimizing,
12712            /// If set, the enum was initialized with an unknown value.
12713            ///
12714            /// Applications can examine the value using [ReplicationState::value] or
12715            /// [ReplicationState::name].
12716            UnknownValue(replication_state::UnknownValue),
12717        }
12718
12719        #[doc(hidden)]
12720        pub mod replication_state {
12721            #[allow(unused_imports)]
12722            use super::*;
12723            #[derive(Clone, Debug, PartialEq)]
12724            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12725        }
12726
12727        impl ReplicationState {
12728            /// Gets the enum value.
12729            ///
12730            /// Returns `None` if the enum contains an unknown value deserialized from
12731            /// the string representation of enums.
12732            pub fn value(&self) -> std::option::Option<i32> {
12733                match self {
12734                    Self::StateNotKnown => std::option::Option::Some(0),
12735                    Self::Initializing => std::option::Option::Some(1),
12736                    Self::PlannedMaintenance => std::option::Option::Some(2),
12737                    Self::UnplannedMaintenance => std::option::Option::Some(3),
12738                    Self::Ready => std::option::Option::Some(4),
12739                    Self::ReadyOptimizing => std::option::Option::Some(5),
12740                    Self::UnknownValue(u) => u.0.value(),
12741                }
12742            }
12743
12744            /// Gets the enum value as a string.
12745            ///
12746            /// Returns `None` if the enum contains an unknown value deserialized from
12747            /// the integer representation of enums.
12748            pub fn name(&self) -> std::option::Option<&str> {
12749                match self {
12750                    Self::StateNotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
12751                    Self::Initializing => std::option::Option::Some("INITIALIZING"),
12752                    Self::PlannedMaintenance => std::option::Option::Some("PLANNED_MAINTENANCE"),
12753                    Self::UnplannedMaintenance => {
12754                        std::option::Option::Some("UNPLANNED_MAINTENANCE")
12755                    }
12756                    Self::Ready => std::option::Option::Some("READY"),
12757                    Self::ReadyOptimizing => std::option::Option::Some("READY_OPTIMIZING"),
12758                    Self::UnknownValue(u) => u.0.name(),
12759                }
12760            }
12761        }
12762
12763        impl std::default::Default for ReplicationState {
12764            fn default() -> Self {
12765                use std::convert::From;
12766                Self::from(0)
12767            }
12768        }
12769
12770        impl std::fmt::Display for ReplicationState {
12771            fn fmt(
12772                &self,
12773                f: &mut std::fmt::Formatter<'_>,
12774            ) -> std::result::Result<(), std::fmt::Error> {
12775                wkt::internal::display_enum(f, self.name(), self.value())
12776            }
12777        }
12778
12779        impl std::convert::From<i32> for ReplicationState {
12780            fn from(value: i32) -> Self {
12781                match value {
12782                    0 => Self::StateNotKnown,
12783                    1 => Self::Initializing,
12784                    2 => Self::PlannedMaintenance,
12785                    3 => Self::UnplannedMaintenance,
12786                    4 => Self::Ready,
12787                    5 => Self::ReadyOptimizing,
12788                    _ => Self::UnknownValue(replication_state::UnknownValue(
12789                        wkt::internal::UnknownEnumValue::Integer(value),
12790                    )),
12791                }
12792            }
12793        }
12794
12795        impl std::convert::From<&str> for ReplicationState {
12796            fn from(value: &str) -> Self {
12797                use std::string::ToString;
12798                match value {
12799                    "STATE_NOT_KNOWN" => Self::StateNotKnown,
12800                    "INITIALIZING" => Self::Initializing,
12801                    "PLANNED_MAINTENANCE" => Self::PlannedMaintenance,
12802                    "UNPLANNED_MAINTENANCE" => Self::UnplannedMaintenance,
12803                    "READY" => Self::Ready,
12804                    "READY_OPTIMIZING" => Self::ReadyOptimizing,
12805                    _ => Self::UnknownValue(replication_state::UnknownValue(
12806                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12807                    )),
12808                }
12809            }
12810        }
12811
12812        impl serde::ser::Serialize for ReplicationState {
12813            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12814            where
12815                S: serde::Serializer,
12816            {
12817                match self {
12818                    Self::StateNotKnown => serializer.serialize_i32(0),
12819                    Self::Initializing => serializer.serialize_i32(1),
12820                    Self::PlannedMaintenance => serializer.serialize_i32(2),
12821                    Self::UnplannedMaintenance => serializer.serialize_i32(3),
12822                    Self::Ready => serializer.serialize_i32(4),
12823                    Self::ReadyOptimizing => serializer.serialize_i32(5),
12824                    Self::UnknownValue(u) => u.0.serialize(serializer),
12825                }
12826            }
12827        }
12828
12829        impl<'de> serde::de::Deserialize<'de> for ReplicationState {
12830            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12831            where
12832                D: serde::Deserializer<'de>,
12833            {
12834                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReplicationState>::new(
12835                    ".google.bigtable.admin.v2.Table.ClusterState.ReplicationState",
12836                ))
12837            }
12838        }
12839    }
12840
12841    /// Defines an automated backup policy for a table
12842    #[derive(Clone, Default, PartialEq)]
12843    #[non_exhaustive]
12844    pub struct AutomatedBackupPolicy {
12845        /// Required. How long the automated backups should be retained. Values must
12846        /// be at least 3 days and at most 90 days.
12847        pub retention_period: std::option::Option<wkt::Duration>,
12848
12849        /// How frequently automated backups should occur. The only supported value
12850        /// at this time is 24 hours. An undefined frequency is treated as 24 hours.
12851        pub frequency: std::option::Option<wkt::Duration>,
12852
12853        /// Optional. A list of Cloud Bigtable zones where automated backups are
12854        /// allowed to be created. If empty, automated backups will be created in all
12855        /// zones of the instance. Locations are in the format
12856        /// `projects/{project}/locations/{zone}`.
12857        /// This field can only set for tables in Enterprise Plus instances.
12858        pub locations: std::vec::Vec<std::string::String>,
12859
12860        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12861    }
12862
12863    impl AutomatedBackupPolicy {
12864        /// Creates a new default instance.
12865        pub fn new() -> Self {
12866            std::default::Default::default()
12867        }
12868
12869        /// Sets the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
12870        ///
12871        /// # Example
12872        /// ```ignore,no_run
12873        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12874        /// use wkt::Duration;
12875        /// let x = AutomatedBackupPolicy::new().set_retention_period(Duration::default()/* use setters */);
12876        /// ```
12877        pub fn set_retention_period<T>(mut self, v: T) -> Self
12878        where
12879            T: std::convert::Into<wkt::Duration>,
12880        {
12881            self.retention_period = std::option::Option::Some(v.into());
12882            self
12883        }
12884
12885        /// Sets or clears the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
12886        ///
12887        /// # Example
12888        /// ```ignore,no_run
12889        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12890        /// use wkt::Duration;
12891        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
12892        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(None::<Duration>);
12893        /// ```
12894        pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
12895        where
12896            T: std::convert::Into<wkt::Duration>,
12897        {
12898            self.retention_period = v.map(|x| x.into());
12899            self
12900        }
12901
12902        /// Sets the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
12903        ///
12904        /// # Example
12905        /// ```ignore,no_run
12906        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12907        /// use wkt::Duration;
12908        /// let x = AutomatedBackupPolicy::new().set_frequency(Duration::default()/* use setters */);
12909        /// ```
12910        pub fn set_frequency<T>(mut self, v: T) -> Self
12911        where
12912            T: std::convert::Into<wkt::Duration>,
12913        {
12914            self.frequency = std::option::Option::Some(v.into());
12915            self
12916        }
12917
12918        /// Sets or clears the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
12919        ///
12920        /// # Example
12921        /// ```ignore,no_run
12922        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12923        /// use wkt::Duration;
12924        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(Some(Duration::default()/* use setters */));
12925        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(None::<Duration>);
12926        /// ```
12927        pub fn set_or_clear_frequency<T>(mut self, v: std::option::Option<T>) -> Self
12928        where
12929            T: std::convert::Into<wkt::Duration>,
12930        {
12931            self.frequency = v.map(|x| x.into());
12932            self
12933        }
12934
12935        /// Sets the value of [locations][crate::model::table::AutomatedBackupPolicy::locations].
12936        ///
12937        /// # Example
12938        /// ```ignore,no_run
12939        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12940        /// let x = AutomatedBackupPolicy::new().set_locations(["a", "b", "c"]);
12941        /// ```
12942        pub fn set_locations<T, V>(mut self, v: T) -> Self
12943        where
12944            T: std::iter::IntoIterator<Item = V>,
12945            V: std::convert::Into<std::string::String>,
12946        {
12947            use std::iter::Iterator;
12948            self.locations = v.into_iter().map(|i| i.into()).collect();
12949            self
12950        }
12951    }
12952
12953    impl wkt::message::Message for AutomatedBackupPolicy {
12954        fn typename() -> &'static str {
12955            "type.googleapis.com/google.bigtable.admin.v2.Table.AutomatedBackupPolicy"
12956        }
12957    }
12958
12959    /// Possible timestamp granularities to use when keeping multiple versions
12960    /// of data in a table.
12961    ///
12962    /// # Working with unknown values
12963    ///
12964    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12965    /// additional enum variants at any time. Adding new variants is not considered
12966    /// a breaking change. Applications should write their code in anticipation of:
12967    ///
12968    /// - New values appearing in future releases of the client library, **and**
12969    /// - New values received dynamically, without application changes.
12970    ///
12971    /// Please consult the [Working with enums] section in the user guide for some
12972    /// guidelines.
12973    ///
12974    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12975    #[derive(Clone, Debug, PartialEq)]
12976    #[non_exhaustive]
12977    pub enum TimestampGranularity {
12978        /// The user did not specify a granularity. Should not be returned.
12979        /// When specified during table creation, MILLIS will be used.
12980        Unspecified,
12981        /// The table keeps data versioned at a granularity of 1ms.
12982        Millis,
12983        /// If set, the enum was initialized with an unknown value.
12984        ///
12985        /// Applications can examine the value using [TimestampGranularity::value] or
12986        /// [TimestampGranularity::name].
12987        UnknownValue(timestamp_granularity::UnknownValue),
12988    }
12989
12990    #[doc(hidden)]
12991    pub mod timestamp_granularity {
12992        #[allow(unused_imports)]
12993        use super::*;
12994        #[derive(Clone, Debug, PartialEq)]
12995        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12996    }
12997
12998    impl TimestampGranularity {
12999        /// Gets the enum value.
13000        ///
13001        /// Returns `None` if the enum contains an unknown value deserialized from
13002        /// the string representation of enums.
13003        pub fn value(&self) -> std::option::Option<i32> {
13004            match self {
13005                Self::Unspecified => std::option::Option::Some(0),
13006                Self::Millis => std::option::Option::Some(1),
13007                Self::UnknownValue(u) => u.0.value(),
13008            }
13009        }
13010
13011        /// Gets the enum value as a string.
13012        ///
13013        /// Returns `None` if the enum contains an unknown value deserialized from
13014        /// the integer representation of enums.
13015        pub fn name(&self) -> std::option::Option<&str> {
13016            match self {
13017                Self::Unspecified => std::option::Option::Some("TIMESTAMP_GRANULARITY_UNSPECIFIED"),
13018                Self::Millis => std::option::Option::Some("MILLIS"),
13019                Self::UnknownValue(u) => u.0.name(),
13020            }
13021        }
13022    }
13023
13024    impl std::default::Default for TimestampGranularity {
13025        fn default() -> Self {
13026            use std::convert::From;
13027            Self::from(0)
13028        }
13029    }
13030
13031    impl std::fmt::Display for TimestampGranularity {
13032        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13033            wkt::internal::display_enum(f, self.name(), self.value())
13034        }
13035    }
13036
13037    impl std::convert::From<i32> for TimestampGranularity {
13038        fn from(value: i32) -> Self {
13039            match value {
13040                0 => Self::Unspecified,
13041                1 => Self::Millis,
13042                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
13043                    wkt::internal::UnknownEnumValue::Integer(value),
13044                )),
13045            }
13046        }
13047    }
13048
13049    impl std::convert::From<&str> for TimestampGranularity {
13050        fn from(value: &str) -> Self {
13051            use std::string::ToString;
13052            match value {
13053                "TIMESTAMP_GRANULARITY_UNSPECIFIED" => Self::Unspecified,
13054                "MILLIS" => Self::Millis,
13055                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
13056                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13057                )),
13058            }
13059        }
13060    }
13061
13062    impl serde::ser::Serialize for TimestampGranularity {
13063        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13064        where
13065            S: serde::Serializer,
13066        {
13067            match self {
13068                Self::Unspecified => serializer.serialize_i32(0),
13069                Self::Millis => serializer.serialize_i32(1),
13070                Self::UnknownValue(u) => u.0.serialize(serializer),
13071            }
13072        }
13073    }
13074
13075    impl<'de> serde::de::Deserialize<'de> for TimestampGranularity {
13076        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13077        where
13078            D: serde::Deserializer<'de>,
13079        {
13080            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TimestampGranularity>::new(
13081                ".google.bigtable.admin.v2.Table.TimestampGranularity",
13082            ))
13083        }
13084    }
13085
13086    /// Defines a view over a table's fields.
13087    ///
13088    /// # Working with unknown values
13089    ///
13090    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13091    /// additional enum variants at any time. Adding new variants is not considered
13092    /// a breaking change. Applications should write their code in anticipation of:
13093    ///
13094    /// - New values appearing in future releases of the client library, **and**
13095    /// - New values received dynamically, without application changes.
13096    ///
13097    /// Please consult the [Working with enums] section in the user guide for some
13098    /// guidelines.
13099    ///
13100    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13101    #[derive(Clone, Debug, PartialEq)]
13102    #[non_exhaustive]
13103    pub enum View {
13104        /// Uses the default view for each method as documented in its request.
13105        Unspecified,
13106        /// Only populates `name`.
13107        NameOnly,
13108        /// Only populates `name` and fields related to the table's schema.
13109        SchemaView,
13110        /// Only populates `name` and fields related to the table's replication
13111        /// state.
13112        ReplicationView,
13113        /// Only populates `name` and fields related to the table's encryption state.
13114        EncryptionView,
13115        /// Populates all fields.
13116        Full,
13117        /// If set, the enum was initialized with an unknown value.
13118        ///
13119        /// Applications can examine the value using [View::value] or
13120        /// [View::name].
13121        UnknownValue(view::UnknownValue),
13122    }
13123
13124    #[doc(hidden)]
13125    pub mod view {
13126        #[allow(unused_imports)]
13127        use super::*;
13128        #[derive(Clone, Debug, PartialEq)]
13129        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13130    }
13131
13132    impl View {
13133        /// Gets the enum value.
13134        ///
13135        /// Returns `None` if the enum contains an unknown value deserialized from
13136        /// the string representation of enums.
13137        pub fn value(&self) -> std::option::Option<i32> {
13138            match self {
13139                Self::Unspecified => std::option::Option::Some(0),
13140                Self::NameOnly => std::option::Option::Some(1),
13141                Self::SchemaView => std::option::Option::Some(2),
13142                Self::ReplicationView => std::option::Option::Some(3),
13143                Self::EncryptionView => std::option::Option::Some(5),
13144                Self::Full => std::option::Option::Some(4),
13145                Self::UnknownValue(u) => u.0.value(),
13146            }
13147        }
13148
13149        /// Gets the enum value as a string.
13150        ///
13151        /// Returns `None` if the enum contains an unknown value deserialized from
13152        /// the integer representation of enums.
13153        pub fn name(&self) -> std::option::Option<&str> {
13154            match self {
13155                Self::Unspecified => std::option::Option::Some("VIEW_UNSPECIFIED"),
13156                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
13157                Self::SchemaView => std::option::Option::Some("SCHEMA_VIEW"),
13158                Self::ReplicationView => std::option::Option::Some("REPLICATION_VIEW"),
13159                Self::EncryptionView => std::option::Option::Some("ENCRYPTION_VIEW"),
13160                Self::Full => std::option::Option::Some("FULL"),
13161                Self::UnknownValue(u) => u.0.name(),
13162            }
13163        }
13164    }
13165
13166    impl std::default::Default for View {
13167        fn default() -> Self {
13168            use std::convert::From;
13169            Self::from(0)
13170        }
13171    }
13172
13173    impl std::fmt::Display for View {
13174        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13175            wkt::internal::display_enum(f, self.name(), self.value())
13176        }
13177    }
13178
13179    impl std::convert::From<i32> for View {
13180        fn from(value: i32) -> Self {
13181            match value {
13182                0 => Self::Unspecified,
13183                1 => Self::NameOnly,
13184                2 => Self::SchemaView,
13185                3 => Self::ReplicationView,
13186                4 => Self::Full,
13187                5 => Self::EncryptionView,
13188                _ => Self::UnknownValue(view::UnknownValue(
13189                    wkt::internal::UnknownEnumValue::Integer(value),
13190                )),
13191            }
13192        }
13193    }
13194
13195    impl std::convert::From<&str> for View {
13196        fn from(value: &str) -> Self {
13197            use std::string::ToString;
13198            match value {
13199                "VIEW_UNSPECIFIED" => Self::Unspecified,
13200                "NAME_ONLY" => Self::NameOnly,
13201                "SCHEMA_VIEW" => Self::SchemaView,
13202                "REPLICATION_VIEW" => Self::ReplicationView,
13203                "ENCRYPTION_VIEW" => Self::EncryptionView,
13204                "FULL" => Self::Full,
13205                _ => Self::UnknownValue(view::UnknownValue(
13206                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13207                )),
13208            }
13209        }
13210    }
13211
13212    impl serde::ser::Serialize for View {
13213        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13214        where
13215            S: serde::Serializer,
13216        {
13217            match self {
13218                Self::Unspecified => serializer.serialize_i32(0),
13219                Self::NameOnly => serializer.serialize_i32(1),
13220                Self::SchemaView => serializer.serialize_i32(2),
13221                Self::ReplicationView => serializer.serialize_i32(3),
13222                Self::EncryptionView => serializer.serialize_i32(5),
13223                Self::Full => serializer.serialize_i32(4),
13224                Self::UnknownValue(u) => u.0.serialize(serializer),
13225            }
13226        }
13227    }
13228
13229    impl<'de> serde::de::Deserialize<'de> for View {
13230        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13231        where
13232            D: serde::Deserializer<'de>,
13233        {
13234            deserializer.deserialize_any(wkt::internal::EnumVisitor::<View>::new(
13235                ".google.bigtable.admin.v2.Table.View",
13236            ))
13237        }
13238    }
13239
13240    #[allow(missing_docs)]
13241    #[derive(Clone, Debug, PartialEq)]
13242    #[non_exhaustive]
13243    pub enum AutomatedBackupConfig {
13244        /// If specified, automated backups are enabled for this table.
13245        /// Otherwise, automated backups are disabled.
13246        AutomatedBackupPolicy(std::boxed::Box<crate::model::table::AutomatedBackupPolicy>),
13247    }
13248}
13249
13250/// AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users
13251/// can configure access to each Authorized View independently from the table and
13252/// use the existing Data APIs to access the subset of data.
13253#[derive(Clone, Default, PartialEq)]
13254#[non_exhaustive]
13255pub struct AuthorizedView {
13256    /// Identifier. The name of this AuthorizedView.
13257    /// Values are of the form
13258    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`
13259    pub name: std::string::String,
13260
13261    /// The etag for this AuthorizedView.
13262    /// If this is provided on update, it must match the server's etag. The server
13263    /// returns ABORTED error on a mismatched etag.
13264    pub etag: std::string::String,
13265
13266    /// Set to true to make the AuthorizedView protected against deletion.
13267    /// The parent Table and containing Instance cannot be deleted if an
13268    /// AuthorizedView has this bit set.
13269    pub deletion_protection: bool,
13270
13271    /// The type of this AuthorizedView.
13272    pub authorized_view: std::option::Option<crate::model::authorized_view::AuthorizedView>,
13273
13274    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13275}
13276
13277impl AuthorizedView {
13278    /// Creates a new default instance.
13279    pub fn new() -> Self {
13280        std::default::Default::default()
13281    }
13282
13283    /// Sets the value of [name][crate::model::AuthorizedView::name].
13284    ///
13285    /// # Example
13286    /// ```ignore,no_run
13287    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13288    /// let x = AuthorizedView::new().set_name("example");
13289    /// ```
13290    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13291        self.name = v.into();
13292        self
13293    }
13294
13295    /// Sets the value of [etag][crate::model::AuthorizedView::etag].
13296    ///
13297    /// # Example
13298    /// ```ignore,no_run
13299    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13300    /// let x = AuthorizedView::new().set_etag("example");
13301    /// ```
13302    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13303        self.etag = v.into();
13304        self
13305    }
13306
13307    /// Sets the value of [deletion_protection][crate::model::AuthorizedView::deletion_protection].
13308    ///
13309    /// # Example
13310    /// ```ignore,no_run
13311    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13312    /// let x = AuthorizedView::new().set_deletion_protection(true);
13313    /// ```
13314    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13315        self.deletion_protection = v.into();
13316        self
13317    }
13318
13319    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view].
13320    ///
13321    /// Note that all the setters affecting `authorized_view` are mutually
13322    /// exclusive.
13323    ///
13324    /// # Example
13325    /// ```ignore,no_run
13326    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13327    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13328    /// let x = AuthorizedView::new().set_authorized_view(Some(
13329    ///     google_cloud_bigtable_admin_v2::model::authorized_view::AuthorizedView::SubsetView(SubsetView::default().into())));
13330    /// ```
13331    pub fn set_authorized_view<
13332        T: std::convert::Into<std::option::Option<crate::model::authorized_view::AuthorizedView>>,
13333    >(
13334        mut self,
13335        v: T,
13336    ) -> Self {
13337        self.authorized_view = v.into();
13338        self
13339    }
13340
13341    /// The value of [authorized_view][crate::model::AuthorizedView::authorized_view]
13342    /// if it holds a `SubsetView`, `None` if the field is not set or
13343    /// holds a different branch.
13344    pub fn subset_view(
13345        &self,
13346    ) -> std::option::Option<&std::boxed::Box<crate::model::authorized_view::SubsetView>> {
13347        #[allow(unreachable_patterns)]
13348        self.authorized_view.as_ref().and_then(|v| match v {
13349            crate::model::authorized_view::AuthorizedView::SubsetView(v) => {
13350                std::option::Option::Some(v)
13351            }
13352            _ => std::option::Option::None,
13353        })
13354    }
13355
13356    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view]
13357    /// to hold a `SubsetView`.
13358    ///
13359    /// Note that all the setters affecting `authorized_view` are
13360    /// mutually exclusive.
13361    ///
13362    /// # Example
13363    /// ```ignore,no_run
13364    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13365    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13366    /// let x = AuthorizedView::new().set_subset_view(SubsetView::default()/* use setters */);
13367    /// assert!(x.subset_view().is_some());
13368    /// ```
13369    pub fn set_subset_view<
13370        T: std::convert::Into<std::boxed::Box<crate::model::authorized_view::SubsetView>>,
13371    >(
13372        mut self,
13373        v: T,
13374    ) -> Self {
13375        self.authorized_view = std::option::Option::Some(
13376            crate::model::authorized_view::AuthorizedView::SubsetView(v.into()),
13377        );
13378        self
13379    }
13380}
13381
13382impl wkt::message::Message for AuthorizedView {
13383    fn typename() -> &'static str {
13384        "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView"
13385    }
13386}
13387
13388/// Defines additional types related to [AuthorizedView].
13389pub mod authorized_view {
13390    #[allow(unused_imports)]
13391    use super::*;
13392
13393    /// Subsets of a column family that are included in this AuthorizedView.
13394    #[derive(Clone, Default, PartialEq)]
13395    #[non_exhaustive]
13396    pub struct FamilySubsets {
13397        /// Individual exact column qualifiers to be included in the AuthorizedView.
13398        pub qualifiers: std::vec::Vec<::bytes::Bytes>,
13399
13400        /// Prefixes for qualifiers to be included in the AuthorizedView. Every
13401        /// qualifier starting with one of these prefixes is included in the
13402        /// AuthorizedView. To provide access to all qualifiers, include the empty
13403        /// string as a prefix
13404        /// ("").
13405        pub qualifier_prefixes: std::vec::Vec<::bytes::Bytes>,
13406
13407        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13408    }
13409
13410    impl FamilySubsets {
13411        /// Creates a new default instance.
13412        pub fn new() -> Self {
13413            std::default::Default::default()
13414        }
13415
13416        /// Sets the value of [qualifiers][crate::model::authorized_view::FamilySubsets::qualifiers].
13417        ///
13418        /// # Example
13419        /// ```ignore,no_run
13420        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13421        /// let b1 = bytes::Bytes::from_static(b"abc");
13422        /// let b2 = bytes::Bytes::from_static(b"xyz");
13423        /// let x = FamilySubsets::new().set_qualifiers([b1, b2]);
13424        /// ```
13425        pub fn set_qualifiers<T, V>(mut self, v: T) -> Self
13426        where
13427            T: std::iter::IntoIterator<Item = V>,
13428            V: std::convert::Into<::bytes::Bytes>,
13429        {
13430            use std::iter::Iterator;
13431            self.qualifiers = v.into_iter().map(|i| i.into()).collect();
13432            self
13433        }
13434
13435        /// Sets the value of [qualifier_prefixes][crate::model::authorized_view::FamilySubsets::qualifier_prefixes].
13436        ///
13437        /// # Example
13438        /// ```ignore,no_run
13439        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13440        /// let b1 = bytes::Bytes::from_static(b"abc");
13441        /// let b2 = bytes::Bytes::from_static(b"xyz");
13442        /// let x = FamilySubsets::new().set_qualifier_prefixes([b1, b2]);
13443        /// ```
13444        pub fn set_qualifier_prefixes<T, V>(mut self, v: T) -> Self
13445        where
13446            T: std::iter::IntoIterator<Item = V>,
13447            V: std::convert::Into<::bytes::Bytes>,
13448        {
13449            use std::iter::Iterator;
13450            self.qualifier_prefixes = v.into_iter().map(|i| i.into()).collect();
13451            self
13452        }
13453    }
13454
13455    impl wkt::message::Message for FamilySubsets {
13456        fn typename() -> &'static str {
13457            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.FamilySubsets"
13458        }
13459    }
13460
13461    /// Defines a simple AuthorizedView that is a subset of the underlying Table.
13462    #[derive(Clone, Default, PartialEq)]
13463    #[non_exhaustive]
13464    pub struct SubsetView {
13465        /// Row prefixes to be included in the AuthorizedView.
13466        /// To provide access to all rows, include the empty string as a prefix ("").
13467        pub row_prefixes: std::vec::Vec<::bytes::Bytes>,
13468
13469        /// Map from column family name to the columns in this family to be included
13470        /// in the AuthorizedView.
13471        pub family_subsets: std::collections::HashMap<
13472            std::string::String,
13473            crate::model::authorized_view::FamilySubsets,
13474        >,
13475
13476        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13477    }
13478
13479    impl SubsetView {
13480        /// Creates a new default instance.
13481        pub fn new() -> Self {
13482            std::default::Default::default()
13483        }
13484
13485        /// Sets the value of [row_prefixes][crate::model::authorized_view::SubsetView::row_prefixes].
13486        ///
13487        /// # Example
13488        /// ```ignore,no_run
13489        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13490        /// let b1 = bytes::Bytes::from_static(b"abc");
13491        /// let b2 = bytes::Bytes::from_static(b"xyz");
13492        /// let x = SubsetView::new().set_row_prefixes([b1, b2]);
13493        /// ```
13494        pub fn set_row_prefixes<T, V>(mut self, v: T) -> Self
13495        where
13496            T: std::iter::IntoIterator<Item = V>,
13497            V: std::convert::Into<::bytes::Bytes>,
13498        {
13499            use std::iter::Iterator;
13500            self.row_prefixes = v.into_iter().map(|i| i.into()).collect();
13501            self
13502        }
13503
13504        /// Sets the value of [family_subsets][crate::model::authorized_view::SubsetView::family_subsets].
13505        ///
13506        /// # Example
13507        /// ```ignore,no_run
13508        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13509        /// use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13510        /// let x = SubsetView::new().set_family_subsets([
13511        ///     ("key0", FamilySubsets::default()/* use setters */),
13512        ///     ("key1", FamilySubsets::default()/* use (different) setters */),
13513        /// ]);
13514        /// ```
13515        pub fn set_family_subsets<T, K, V>(mut self, v: T) -> Self
13516        where
13517            T: std::iter::IntoIterator<Item = (K, V)>,
13518            K: std::convert::Into<std::string::String>,
13519            V: std::convert::Into<crate::model::authorized_view::FamilySubsets>,
13520        {
13521            use std::iter::Iterator;
13522            self.family_subsets = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13523            self
13524        }
13525    }
13526
13527    impl wkt::message::Message for SubsetView {
13528        fn typename() -> &'static str {
13529            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.SubsetView"
13530        }
13531    }
13532
13533    /// Defines a subset of an AuthorizedView's fields.
13534    ///
13535    /// # Working with unknown values
13536    ///
13537    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13538    /// additional enum variants at any time. Adding new variants is not considered
13539    /// a breaking change. Applications should write their code in anticipation of:
13540    ///
13541    /// - New values appearing in future releases of the client library, **and**
13542    /// - New values received dynamically, without application changes.
13543    ///
13544    /// Please consult the [Working with enums] section in the user guide for some
13545    /// guidelines.
13546    ///
13547    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13548    #[derive(Clone, Debug, PartialEq)]
13549    #[non_exhaustive]
13550    pub enum ResponseView {
13551        /// Uses the default view for each method as documented in the request.
13552        Unspecified,
13553        /// Only populates `name`.
13554        NameOnly,
13555        /// Only populates the AuthorizedView's basic metadata. This includes:
13556        /// name, deletion_protection, etag.
13557        Basic,
13558        /// Populates every fields.
13559        Full,
13560        /// If set, the enum was initialized with an unknown value.
13561        ///
13562        /// Applications can examine the value using [ResponseView::value] or
13563        /// [ResponseView::name].
13564        UnknownValue(response_view::UnknownValue),
13565    }
13566
13567    #[doc(hidden)]
13568    pub mod response_view {
13569        #[allow(unused_imports)]
13570        use super::*;
13571        #[derive(Clone, Debug, PartialEq)]
13572        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13573    }
13574
13575    impl ResponseView {
13576        /// Gets the enum value.
13577        ///
13578        /// Returns `None` if the enum contains an unknown value deserialized from
13579        /// the string representation of enums.
13580        pub fn value(&self) -> std::option::Option<i32> {
13581            match self {
13582                Self::Unspecified => std::option::Option::Some(0),
13583                Self::NameOnly => std::option::Option::Some(1),
13584                Self::Basic => std::option::Option::Some(2),
13585                Self::Full => std::option::Option::Some(3),
13586                Self::UnknownValue(u) => u.0.value(),
13587            }
13588        }
13589
13590        /// Gets the enum value as a string.
13591        ///
13592        /// Returns `None` if the enum contains an unknown value deserialized from
13593        /// the integer representation of enums.
13594        pub fn name(&self) -> std::option::Option<&str> {
13595            match self {
13596                Self::Unspecified => std::option::Option::Some("RESPONSE_VIEW_UNSPECIFIED"),
13597                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
13598                Self::Basic => std::option::Option::Some("BASIC"),
13599                Self::Full => std::option::Option::Some("FULL"),
13600                Self::UnknownValue(u) => u.0.name(),
13601            }
13602        }
13603    }
13604
13605    impl std::default::Default for ResponseView {
13606        fn default() -> Self {
13607            use std::convert::From;
13608            Self::from(0)
13609        }
13610    }
13611
13612    impl std::fmt::Display for ResponseView {
13613        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13614            wkt::internal::display_enum(f, self.name(), self.value())
13615        }
13616    }
13617
13618    impl std::convert::From<i32> for ResponseView {
13619        fn from(value: i32) -> Self {
13620            match value {
13621                0 => Self::Unspecified,
13622                1 => Self::NameOnly,
13623                2 => Self::Basic,
13624                3 => Self::Full,
13625                _ => Self::UnknownValue(response_view::UnknownValue(
13626                    wkt::internal::UnknownEnumValue::Integer(value),
13627                )),
13628            }
13629        }
13630    }
13631
13632    impl std::convert::From<&str> for ResponseView {
13633        fn from(value: &str) -> Self {
13634            use std::string::ToString;
13635            match value {
13636                "RESPONSE_VIEW_UNSPECIFIED" => Self::Unspecified,
13637                "NAME_ONLY" => Self::NameOnly,
13638                "BASIC" => Self::Basic,
13639                "FULL" => Self::Full,
13640                _ => Self::UnknownValue(response_view::UnknownValue(
13641                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13642                )),
13643            }
13644        }
13645    }
13646
13647    impl serde::ser::Serialize for ResponseView {
13648        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13649        where
13650            S: serde::Serializer,
13651        {
13652            match self {
13653                Self::Unspecified => serializer.serialize_i32(0),
13654                Self::NameOnly => serializer.serialize_i32(1),
13655                Self::Basic => serializer.serialize_i32(2),
13656                Self::Full => serializer.serialize_i32(3),
13657                Self::UnknownValue(u) => u.0.serialize(serializer),
13658            }
13659        }
13660    }
13661
13662    impl<'de> serde::de::Deserialize<'de> for ResponseView {
13663        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13664        where
13665            D: serde::Deserializer<'de>,
13666        {
13667            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResponseView>::new(
13668                ".google.bigtable.admin.v2.AuthorizedView.ResponseView",
13669            ))
13670        }
13671    }
13672
13673    /// The type of this AuthorizedView.
13674    #[derive(Clone, Debug, PartialEq)]
13675    #[non_exhaustive]
13676    pub enum AuthorizedView {
13677        /// An AuthorizedView permitting access to an explicit subset of a Table.
13678        SubsetView(std::boxed::Box<crate::model::authorized_view::SubsetView>),
13679    }
13680}
13681
13682/// A set of columns within a table which share a common configuration.
13683#[derive(Clone, Default, PartialEq)]
13684#[non_exhaustive]
13685pub struct ColumnFamily {
13686    /// Garbage collection rule specified as a protobuf.
13687    /// Must serialize to at most 500 bytes.
13688    ///
13689    /// NOTE: Garbage collection executes opportunistically in the background, and
13690    /// so it's possible for reads to return a cell even if it matches the active
13691    /// GC expression for its family.
13692    pub gc_rule: std::option::Option<crate::model::GcRule>,
13693
13694    /// The type of data stored in each of this family's cell values, including its
13695    /// full encoding. If omitted, the family only serves raw untyped bytes.
13696    ///
13697    /// For now, only the `Aggregate` type is supported.
13698    ///
13699    /// `Aggregate` can only be set at family creation and is immutable afterwards.
13700    ///
13701    /// If `value_type` is `Aggregate`, written data must be compatible with:
13702    ///
13703    /// * `value_type.input_type` for `AddInput` mutations
13704    pub value_type: std::option::Option<crate::model::Type>,
13705
13706    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13707}
13708
13709impl ColumnFamily {
13710    /// Creates a new default instance.
13711    pub fn new() -> Self {
13712        std::default::Default::default()
13713    }
13714
13715    /// Sets the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13716    ///
13717    /// # Example
13718    /// ```ignore,no_run
13719    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13720    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13721    /// let x = ColumnFamily::new().set_gc_rule(GcRule::default()/* use setters */);
13722    /// ```
13723    pub fn set_gc_rule<T>(mut self, v: T) -> Self
13724    where
13725        T: std::convert::Into<crate::model::GcRule>,
13726    {
13727        self.gc_rule = std::option::Option::Some(v.into());
13728        self
13729    }
13730
13731    /// Sets or clears the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13732    ///
13733    /// # Example
13734    /// ```ignore,no_run
13735    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13736    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13737    /// let x = ColumnFamily::new().set_or_clear_gc_rule(Some(GcRule::default()/* use setters */));
13738    /// let x = ColumnFamily::new().set_or_clear_gc_rule(None::<GcRule>);
13739    /// ```
13740    pub fn set_or_clear_gc_rule<T>(mut self, v: std::option::Option<T>) -> Self
13741    where
13742        T: std::convert::Into<crate::model::GcRule>,
13743    {
13744        self.gc_rule = v.map(|x| x.into());
13745        self
13746    }
13747
13748    /// Sets the value of [value_type][crate::model::ColumnFamily::value_type].
13749    ///
13750    /// # Example
13751    /// ```ignore,no_run
13752    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13753    /// use google_cloud_bigtable_admin_v2::model::Type;
13754    /// let x = ColumnFamily::new().set_value_type(Type::default()/* use setters */);
13755    /// ```
13756    pub fn set_value_type<T>(mut self, v: T) -> Self
13757    where
13758        T: std::convert::Into<crate::model::Type>,
13759    {
13760        self.value_type = std::option::Option::Some(v.into());
13761        self
13762    }
13763
13764    /// Sets or clears the value of [value_type][crate::model::ColumnFamily::value_type].
13765    ///
13766    /// # Example
13767    /// ```ignore,no_run
13768    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13769    /// use google_cloud_bigtable_admin_v2::model::Type;
13770    /// let x = ColumnFamily::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
13771    /// let x = ColumnFamily::new().set_or_clear_value_type(None::<Type>);
13772    /// ```
13773    pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
13774    where
13775        T: std::convert::Into<crate::model::Type>,
13776    {
13777        self.value_type = v.map(|x| x.into());
13778        self
13779    }
13780}
13781
13782impl wkt::message::Message for ColumnFamily {
13783    fn typename() -> &'static str {
13784        "type.googleapis.com/google.bigtable.admin.v2.ColumnFamily"
13785    }
13786}
13787
13788/// Rule for determining which cells to delete during garbage collection.
13789#[derive(Clone, Default, PartialEq)]
13790#[non_exhaustive]
13791pub struct GcRule {
13792    /// Garbage collection rules.
13793    pub rule: std::option::Option<crate::model::gc_rule::Rule>,
13794
13795    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13796}
13797
13798impl GcRule {
13799    /// Creates a new default instance.
13800    pub fn new() -> Self {
13801        std::default::Default::default()
13802    }
13803
13804    /// Sets the value of [rule][crate::model::GcRule::rule].
13805    ///
13806    /// Note that all the setters affecting `rule` are mutually
13807    /// exclusive.
13808    ///
13809    /// # Example
13810    /// ```ignore,no_run
13811    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13812    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Rule;
13813    /// let x = GcRule::new().set_rule(Some(Rule::MaxNumVersions(42)));
13814    /// ```
13815    pub fn set_rule<T: std::convert::Into<std::option::Option<crate::model::gc_rule::Rule>>>(
13816        mut self,
13817        v: T,
13818    ) -> Self {
13819        self.rule = v.into();
13820        self
13821    }
13822
13823    /// The value of [rule][crate::model::GcRule::rule]
13824    /// if it holds a `MaxNumVersions`, `None` if the field is not set or
13825    /// holds a different branch.
13826    pub fn max_num_versions(&self) -> std::option::Option<&i32> {
13827        #[allow(unreachable_patterns)]
13828        self.rule.as_ref().and_then(|v| match v {
13829            crate::model::gc_rule::Rule::MaxNumVersions(v) => std::option::Option::Some(v),
13830            _ => std::option::Option::None,
13831        })
13832    }
13833
13834    /// Sets the value of [rule][crate::model::GcRule::rule]
13835    /// to hold a `MaxNumVersions`.
13836    ///
13837    /// Note that all the setters affecting `rule` are
13838    /// mutually exclusive.
13839    ///
13840    /// # Example
13841    /// ```ignore,no_run
13842    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13843    /// let x = GcRule::new().set_max_num_versions(42);
13844    /// assert!(x.max_num_versions().is_some());
13845    /// assert!(x.max_age().is_none());
13846    /// assert!(x.intersection().is_none());
13847    /// assert!(x.union().is_none());
13848    /// ```
13849    pub fn set_max_num_versions<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
13850        self.rule =
13851            std::option::Option::Some(crate::model::gc_rule::Rule::MaxNumVersions(v.into()));
13852        self
13853    }
13854
13855    /// The value of [rule][crate::model::GcRule::rule]
13856    /// if it holds a `MaxAge`, `None` if the field is not set or
13857    /// holds a different branch.
13858    pub fn max_age(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
13859        #[allow(unreachable_patterns)]
13860        self.rule.as_ref().and_then(|v| match v {
13861            crate::model::gc_rule::Rule::MaxAge(v) => std::option::Option::Some(v),
13862            _ => std::option::Option::None,
13863        })
13864    }
13865
13866    /// Sets the value of [rule][crate::model::GcRule::rule]
13867    /// to hold a `MaxAge`.
13868    ///
13869    /// Note that all the setters affecting `rule` are
13870    /// mutually exclusive.
13871    ///
13872    /// # Example
13873    /// ```ignore,no_run
13874    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13875    /// use wkt::Duration;
13876    /// let x = GcRule::new().set_max_age(Duration::default()/* use setters */);
13877    /// assert!(x.max_age().is_some());
13878    /// assert!(x.max_num_versions().is_none());
13879    /// assert!(x.intersection().is_none());
13880    /// assert!(x.union().is_none());
13881    /// ```
13882    pub fn set_max_age<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
13883        mut self,
13884        v: T,
13885    ) -> Self {
13886        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::MaxAge(v.into()));
13887        self
13888    }
13889
13890    /// The value of [rule][crate::model::GcRule::rule]
13891    /// if it holds a `Intersection`, `None` if the field is not set or
13892    /// holds a different branch.
13893    pub fn intersection(
13894        &self,
13895    ) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Intersection>> {
13896        #[allow(unreachable_patterns)]
13897        self.rule.as_ref().and_then(|v| match v {
13898            crate::model::gc_rule::Rule::Intersection(v) => std::option::Option::Some(v),
13899            _ => std::option::Option::None,
13900        })
13901    }
13902
13903    /// Sets the value of [rule][crate::model::GcRule::rule]
13904    /// to hold a `Intersection`.
13905    ///
13906    /// Note that all the setters affecting `rule` are
13907    /// mutually exclusive.
13908    ///
13909    /// # Example
13910    /// ```ignore,no_run
13911    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13912    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
13913    /// let x = GcRule::new().set_intersection(Intersection::default()/* use setters */);
13914    /// assert!(x.intersection().is_some());
13915    /// assert!(x.max_num_versions().is_none());
13916    /// assert!(x.max_age().is_none());
13917    /// assert!(x.union().is_none());
13918    /// ```
13919    pub fn set_intersection<
13920        T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Intersection>>,
13921    >(
13922        mut self,
13923        v: T,
13924    ) -> Self {
13925        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Intersection(v.into()));
13926        self
13927    }
13928
13929    /// The value of [rule][crate::model::GcRule::rule]
13930    /// if it holds a `Union`, `None` if the field is not set or
13931    /// holds a different branch.
13932    pub fn union(&self) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Union>> {
13933        #[allow(unreachable_patterns)]
13934        self.rule.as_ref().and_then(|v| match v {
13935            crate::model::gc_rule::Rule::Union(v) => std::option::Option::Some(v),
13936            _ => std::option::Option::None,
13937        })
13938    }
13939
13940    /// Sets the value of [rule][crate::model::GcRule::rule]
13941    /// to hold a `Union`.
13942    ///
13943    /// Note that all the setters affecting `rule` are
13944    /// mutually exclusive.
13945    ///
13946    /// # Example
13947    /// ```ignore,no_run
13948    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13949    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
13950    /// let x = GcRule::new().set_union(Union::default()/* use setters */);
13951    /// assert!(x.union().is_some());
13952    /// assert!(x.max_num_versions().is_none());
13953    /// assert!(x.max_age().is_none());
13954    /// assert!(x.intersection().is_none());
13955    /// ```
13956    pub fn set_union<T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Union>>>(
13957        mut self,
13958        v: T,
13959    ) -> Self {
13960        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Union(v.into()));
13961        self
13962    }
13963}
13964
13965impl wkt::message::Message for GcRule {
13966    fn typename() -> &'static str {
13967        "type.googleapis.com/google.bigtable.admin.v2.GcRule"
13968    }
13969}
13970
13971/// Defines additional types related to [GcRule].
13972pub mod gc_rule {
13973    #[allow(unused_imports)]
13974    use super::*;
13975
13976    /// A GcRule which deletes cells matching all of the given rules.
13977    #[derive(Clone, Default, PartialEq)]
13978    #[non_exhaustive]
13979    pub struct Intersection {
13980        /// Only delete cells which would be deleted by every element of `rules`.
13981        pub rules: std::vec::Vec<crate::model::GcRule>,
13982
13983        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13984    }
13985
13986    impl Intersection {
13987        /// Creates a new default instance.
13988        pub fn new() -> Self {
13989            std::default::Default::default()
13990        }
13991
13992        /// Sets the value of [rules][crate::model::gc_rule::Intersection::rules].
13993        ///
13994        /// # Example
13995        /// ```ignore,no_run
13996        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
13997        /// use google_cloud_bigtable_admin_v2::model::GcRule;
13998        /// let x = Intersection::new()
13999        ///     .set_rules([
14000        ///         GcRule::default()/* use setters */,
14001        ///         GcRule::default()/* use (different) setters */,
14002        ///     ]);
14003        /// ```
14004        pub fn set_rules<T, V>(mut self, v: T) -> Self
14005        where
14006            T: std::iter::IntoIterator<Item = V>,
14007            V: std::convert::Into<crate::model::GcRule>,
14008        {
14009            use std::iter::Iterator;
14010            self.rules = v.into_iter().map(|i| i.into()).collect();
14011            self
14012        }
14013    }
14014
14015    impl wkt::message::Message for Intersection {
14016        fn typename() -> &'static str {
14017            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Intersection"
14018        }
14019    }
14020
14021    /// A GcRule which deletes cells matching any of the given rules.
14022    #[derive(Clone, Default, PartialEq)]
14023    #[non_exhaustive]
14024    pub struct Union {
14025        /// Delete cells which would be deleted by any element of `rules`.
14026        pub rules: std::vec::Vec<crate::model::GcRule>,
14027
14028        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14029    }
14030
14031    impl Union {
14032        /// Creates a new default instance.
14033        pub fn new() -> Self {
14034            std::default::Default::default()
14035        }
14036
14037        /// Sets the value of [rules][crate::model::gc_rule::Union::rules].
14038        ///
14039        /// # Example
14040        /// ```ignore,no_run
14041        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
14042        /// use google_cloud_bigtable_admin_v2::model::GcRule;
14043        /// let x = Union::new()
14044        ///     .set_rules([
14045        ///         GcRule::default()/* use setters */,
14046        ///         GcRule::default()/* use (different) setters */,
14047        ///     ]);
14048        /// ```
14049        pub fn set_rules<T, V>(mut self, v: T) -> Self
14050        where
14051            T: std::iter::IntoIterator<Item = V>,
14052            V: std::convert::Into<crate::model::GcRule>,
14053        {
14054            use std::iter::Iterator;
14055            self.rules = v.into_iter().map(|i| i.into()).collect();
14056            self
14057        }
14058    }
14059
14060    impl wkt::message::Message for Union {
14061        fn typename() -> &'static str {
14062            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Union"
14063        }
14064    }
14065
14066    /// Garbage collection rules.
14067    #[derive(Clone, Debug, PartialEq)]
14068    #[non_exhaustive]
14069    pub enum Rule {
14070        /// Delete all cells in a column except the most recent N.
14071        MaxNumVersions(i32),
14072        /// Delete cells in a column older than the given age.
14073        /// Values must be at least one millisecond, and will be truncated to
14074        /// microsecond granularity.
14075        MaxAge(std::boxed::Box<wkt::Duration>),
14076        /// Delete cells that would be deleted by every nested rule.
14077        Intersection(std::boxed::Box<crate::model::gc_rule::Intersection>),
14078        /// Delete cells that would be deleted by any nested rule.
14079        Union(std::boxed::Box<crate::model::gc_rule::Union>),
14080    }
14081}
14082
14083/// Encryption information for a given resource.
14084/// If this resource is protected with customer managed encryption, the in-use
14085/// Cloud Key Management Service (Cloud KMS) key version is specified along with
14086/// its status.
14087#[derive(Clone, Default, PartialEq)]
14088#[non_exhaustive]
14089pub struct EncryptionInfo {
14090    /// Output only. The type of encryption used to protect this resource.
14091    pub encryption_type: crate::model::encryption_info::EncryptionType,
14092
14093    /// Output only. The status of encrypt/decrypt calls on underlying data for
14094    /// this resource. Regardless of status, the existing data is always encrypted
14095    /// at rest.
14096    pub encryption_status: std::option::Option<google_cloud_rpc::model::Status>,
14097
14098    /// Output only. The version of the Cloud KMS key specified in the parent
14099    /// cluster that is in use for the data underlying this table.
14100    pub kms_key_version: std::string::String,
14101
14102    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14103}
14104
14105impl EncryptionInfo {
14106    /// Creates a new default instance.
14107    pub fn new() -> Self {
14108        std::default::Default::default()
14109    }
14110
14111    /// Sets the value of [encryption_type][crate::model::EncryptionInfo::encryption_type].
14112    ///
14113    /// # Example
14114    /// ```ignore,no_run
14115    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14116    /// use google_cloud_bigtable_admin_v2::model::encryption_info::EncryptionType;
14117    /// let x0 = EncryptionInfo::new().set_encryption_type(EncryptionType::GoogleDefaultEncryption);
14118    /// let x1 = EncryptionInfo::new().set_encryption_type(EncryptionType::CustomerManagedEncryption);
14119    /// ```
14120    pub fn set_encryption_type<
14121        T: std::convert::Into<crate::model::encryption_info::EncryptionType>,
14122    >(
14123        mut self,
14124        v: T,
14125    ) -> Self {
14126        self.encryption_type = v.into();
14127        self
14128    }
14129
14130    /// Sets the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
14131    ///
14132    /// # Example
14133    /// ```ignore,no_run
14134    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14135    /// use google_cloud_rpc::model::Status;
14136    /// let x = EncryptionInfo::new().set_encryption_status(Status::default()/* use setters */);
14137    /// ```
14138    pub fn set_encryption_status<T>(mut self, v: T) -> Self
14139    where
14140        T: std::convert::Into<google_cloud_rpc::model::Status>,
14141    {
14142        self.encryption_status = std::option::Option::Some(v.into());
14143        self
14144    }
14145
14146    /// Sets or clears the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
14147    ///
14148    /// # Example
14149    /// ```ignore,no_run
14150    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14151    /// use google_cloud_rpc::model::Status;
14152    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(Some(Status::default()/* use setters */));
14153    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(None::<Status>);
14154    /// ```
14155    pub fn set_or_clear_encryption_status<T>(mut self, v: std::option::Option<T>) -> Self
14156    where
14157        T: std::convert::Into<google_cloud_rpc::model::Status>,
14158    {
14159        self.encryption_status = v.map(|x| x.into());
14160        self
14161    }
14162
14163    /// Sets the value of [kms_key_version][crate::model::EncryptionInfo::kms_key_version].
14164    ///
14165    /// # Example
14166    /// ```ignore,no_run
14167    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14168    /// let x = EncryptionInfo::new().set_kms_key_version("example");
14169    /// ```
14170    pub fn set_kms_key_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14171        self.kms_key_version = v.into();
14172        self
14173    }
14174}
14175
14176impl wkt::message::Message for EncryptionInfo {
14177    fn typename() -> &'static str {
14178        "type.googleapis.com/google.bigtable.admin.v2.EncryptionInfo"
14179    }
14180}
14181
14182/// Defines additional types related to [EncryptionInfo].
14183pub mod encryption_info {
14184    #[allow(unused_imports)]
14185    use super::*;
14186
14187    /// Possible encryption types for a resource.
14188    ///
14189    /// # Working with unknown values
14190    ///
14191    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14192    /// additional enum variants at any time. Adding new variants is not considered
14193    /// a breaking change. Applications should write their code in anticipation of:
14194    ///
14195    /// - New values appearing in future releases of the client library, **and**
14196    /// - New values received dynamically, without application changes.
14197    ///
14198    /// Please consult the [Working with enums] section in the user guide for some
14199    /// guidelines.
14200    ///
14201    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14202    #[derive(Clone, Debug, PartialEq)]
14203    #[non_exhaustive]
14204    pub enum EncryptionType {
14205        /// Encryption type was not specified, though data at rest remains encrypted.
14206        Unspecified,
14207        /// The data backing this resource is encrypted at rest with a key that is
14208        /// fully managed by Google. No key version or status will be populated.
14209        /// This is the default state.
14210        GoogleDefaultEncryption,
14211        /// The data backing this resource is encrypted at rest with a key that is
14212        /// managed by the customer.
14213        /// The in-use version of the key and its status are populated for
14214        /// CMEK-protected tables.
14215        /// CMEK-protected backups are pinned to the key version that was in use at
14216        /// the time the backup was taken. This key version is populated but its
14217        /// status is not tracked and is reported as `UNKNOWN`.
14218        CustomerManagedEncryption,
14219        /// If set, the enum was initialized with an unknown value.
14220        ///
14221        /// Applications can examine the value using [EncryptionType::value] or
14222        /// [EncryptionType::name].
14223        UnknownValue(encryption_type::UnknownValue),
14224    }
14225
14226    #[doc(hidden)]
14227    pub mod encryption_type {
14228        #[allow(unused_imports)]
14229        use super::*;
14230        #[derive(Clone, Debug, PartialEq)]
14231        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14232    }
14233
14234    impl EncryptionType {
14235        /// Gets the enum value.
14236        ///
14237        /// Returns `None` if the enum contains an unknown value deserialized from
14238        /// the string representation of enums.
14239        pub fn value(&self) -> std::option::Option<i32> {
14240            match self {
14241                Self::Unspecified => std::option::Option::Some(0),
14242                Self::GoogleDefaultEncryption => std::option::Option::Some(1),
14243                Self::CustomerManagedEncryption => std::option::Option::Some(2),
14244                Self::UnknownValue(u) => u.0.value(),
14245            }
14246        }
14247
14248        /// Gets the enum value as a string.
14249        ///
14250        /// Returns `None` if the enum contains an unknown value deserialized from
14251        /// the integer representation of enums.
14252        pub fn name(&self) -> std::option::Option<&str> {
14253            match self {
14254                Self::Unspecified => std::option::Option::Some("ENCRYPTION_TYPE_UNSPECIFIED"),
14255                Self::GoogleDefaultEncryption => {
14256                    std::option::Option::Some("GOOGLE_DEFAULT_ENCRYPTION")
14257                }
14258                Self::CustomerManagedEncryption => {
14259                    std::option::Option::Some("CUSTOMER_MANAGED_ENCRYPTION")
14260                }
14261                Self::UnknownValue(u) => u.0.name(),
14262            }
14263        }
14264    }
14265
14266    impl std::default::Default for EncryptionType {
14267        fn default() -> Self {
14268            use std::convert::From;
14269            Self::from(0)
14270        }
14271    }
14272
14273    impl std::fmt::Display for EncryptionType {
14274        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14275            wkt::internal::display_enum(f, self.name(), self.value())
14276        }
14277    }
14278
14279    impl std::convert::From<i32> for EncryptionType {
14280        fn from(value: i32) -> Self {
14281            match value {
14282                0 => Self::Unspecified,
14283                1 => Self::GoogleDefaultEncryption,
14284                2 => Self::CustomerManagedEncryption,
14285                _ => Self::UnknownValue(encryption_type::UnknownValue(
14286                    wkt::internal::UnknownEnumValue::Integer(value),
14287                )),
14288            }
14289        }
14290    }
14291
14292    impl std::convert::From<&str> for EncryptionType {
14293        fn from(value: &str) -> Self {
14294            use std::string::ToString;
14295            match value {
14296                "ENCRYPTION_TYPE_UNSPECIFIED" => Self::Unspecified,
14297                "GOOGLE_DEFAULT_ENCRYPTION" => Self::GoogleDefaultEncryption,
14298                "CUSTOMER_MANAGED_ENCRYPTION" => Self::CustomerManagedEncryption,
14299                _ => Self::UnknownValue(encryption_type::UnknownValue(
14300                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14301                )),
14302            }
14303        }
14304    }
14305
14306    impl serde::ser::Serialize for EncryptionType {
14307        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14308        where
14309            S: serde::Serializer,
14310        {
14311            match self {
14312                Self::Unspecified => serializer.serialize_i32(0),
14313                Self::GoogleDefaultEncryption => serializer.serialize_i32(1),
14314                Self::CustomerManagedEncryption => serializer.serialize_i32(2),
14315                Self::UnknownValue(u) => u.0.serialize(serializer),
14316            }
14317        }
14318    }
14319
14320    impl<'de> serde::de::Deserialize<'de> for EncryptionType {
14321        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14322        where
14323            D: serde::Deserializer<'de>,
14324        {
14325            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionType>::new(
14326                ".google.bigtable.admin.v2.EncryptionInfo.EncryptionType",
14327            ))
14328        }
14329    }
14330}
14331
14332/// A snapshot of a table at a particular time. A snapshot can be used as a
14333/// checkpoint for data restoration or a data source for a new table.
14334///
14335/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
14336/// feature is not currently available to most Cloud Bigtable customers. This
14337/// feature might be changed in backward-incompatible ways and is not recommended
14338/// for production use. It is not subject to any SLA or deprecation policy.
14339#[derive(Clone, Default, PartialEq)]
14340#[non_exhaustive]
14341pub struct Snapshot {
14342    /// The unique name of the snapshot.
14343    /// Values are of the form
14344    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
14345    pub name: std::string::String,
14346
14347    /// Output only. The source table at the time the snapshot was taken.
14348    pub source_table: std::option::Option<crate::model::Table>,
14349
14350    /// Output only. The size of the data in the source table at the time the
14351    /// snapshot was taken. In some cases, this value may be computed
14352    /// asynchronously via a background process and a placeholder of 0 will be used
14353    /// in the meantime.
14354    pub data_size_bytes: i64,
14355
14356    /// Output only. The time when the snapshot is created.
14357    pub create_time: std::option::Option<wkt::Timestamp>,
14358
14359    /// The time when the snapshot will be deleted. The maximum amount of time a
14360    /// snapshot can stay active is 365 days. If 'ttl' is not specified,
14361    /// the default maximum of 365 days will be used.
14362    pub delete_time: std::option::Option<wkt::Timestamp>,
14363
14364    /// Output only. The current state of the snapshot.
14365    pub state: crate::model::snapshot::State,
14366
14367    /// Description of the snapshot.
14368    pub description: std::string::String,
14369
14370    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14371}
14372
14373impl Snapshot {
14374    /// Creates a new default instance.
14375    pub fn new() -> Self {
14376        std::default::Default::default()
14377    }
14378
14379    /// Sets the value of [name][crate::model::Snapshot::name].
14380    ///
14381    /// # Example
14382    /// ```ignore,no_run
14383    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14384    /// let x = Snapshot::new().set_name("example");
14385    /// ```
14386    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14387        self.name = v.into();
14388        self
14389    }
14390
14391    /// Sets the value of [source_table][crate::model::Snapshot::source_table].
14392    ///
14393    /// # Example
14394    /// ```ignore,no_run
14395    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14396    /// use google_cloud_bigtable_admin_v2::model::Table;
14397    /// let x = Snapshot::new().set_source_table(Table::default()/* use setters */);
14398    /// ```
14399    pub fn set_source_table<T>(mut self, v: T) -> Self
14400    where
14401        T: std::convert::Into<crate::model::Table>,
14402    {
14403        self.source_table = std::option::Option::Some(v.into());
14404        self
14405    }
14406
14407    /// Sets or clears the value of [source_table][crate::model::Snapshot::source_table].
14408    ///
14409    /// # Example
14410    /// ```ignore,no_run
14411    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14412    /// use google_cloud_bigtable_admin_v2::model::Table;
14413    /// let x = Snapshot::new().set_or_clear_source_table(Some(Table::default()/* use setters */));
14414    /// let x = Snapshot::new().set_or_clear_source_table(None::<Table>);
14415    /// ```
14416    pub fn set_or_clear_source_table<T>(mut self, v: std::option::Option<T>) -> Self
14417    where
14418        T: std::convert::Into<crate::model::Table>,
14419    {
14420        self.source_table = v.map(|x| x.into());
14421        self
14422    }
14423
14424    /// Sets the value of [data_size_bytes][crate::model::Snapshot::data_size_bytes].
14425    ///
14426    /// # Example
14427    /// ```ignore,no_run
14428    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14429    /// let x = Snapshot::new().set_data_size_bytes(42);
14430    /// ```
14431    pub fn set_data_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14432        self.data_size_bytes = v.into();
14433        self
14434    }
14435
14436    /// Sets the value of [create_time][crate::model::Snapshot::create_time].
14437    ///
14438    /// # Example
14439    /// ```ignore,no_run
14440    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14441    /// use wkt::Timestamp;
14442    /// let x = Snapshot::new().set_create_time(Timestamp::default()/* use setters */);
14443    /// ```
14444    pub fn set_create_time<T>(mut self, v: T) -> Self
14445    where
14446        T: std::convert::Into<wkt::Timestamp>,
14447    {
14448        self.create_time = std::option::Option::Some(v.into());
14449        self
14450    }
14451
14452    /// Sets or clears the value of [create_time][crate::model::Snapshot::create_time].
14453    ///
14454    /// # Example
14455    /// ```ignore,no_run
14456    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14457    /// use wkt::Timestamp;
14458    /// let x = Snapshot::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14459    /// let x = Snapshot::new().set_or_clear_create_time(None::<Timestamp>);
14460    /// ```
14461    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14462    where
14463        T: std::convert::Into<wkt::Timestamp>,
14464    {
14465        self.create_time = v.map(|x| x.into());
14466        self
14467    }
14468
14469    /// Sets the value of [delete_time][crate::model::Snapshot::delete_time].
14470    ///
14471    /// # Example
14472    /// ```ignore,no_run
14473    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14474    /// use wkt::Timestamp;
14475    /// let x = Snapshot::new().set_delete_time(Timestamp::default()/* use setters */);
14476    /// ```
14477    pub fn set_delete_time<T>(mut self, v: T) -> Self
14478    where
14479        T: std::convert::Into<wkt::Timestamp>,
14480    {
14481        self.delete_time = std::option::Option::Some(v.into());
14482        self
14483    }
14484
14485    /// Sets or clears the value of [delete_time][crate::model::Snapshot::delete_time].
14486    ///
14487    /// # Example
14488    /// ```ignore,no_run
14489    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14490    /// use wkt::Timestamp;
14491    /// let x = Snapshot::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
14492    /// let x = Snapshot::new().set_or_clear_delete_time(None::<Timestamp>);
14493    /// ```
14494    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
14495    where
14496        T: std::convert::Into<wkt::Timestamp>,
14497    {
14498        self.delete_time = v.map(|x| x.into());
14499        self
14500    }
14501
14502    /// Sets the value of [state][crate::model::Snapshot::state].
14503    ///
14504    /// # Example
14505    /// ```ignore,no_run
14506    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14507    /// use google_cloud_bigtable_admin_v2::model::snapshot::State;
14508    /// let x0 = Snapshot::new().set_state(State::Ready);
14509    /// let x1 = Snapshot::new().set_state(State::Creating);
14510    /// ```
14511    pub fn set_state<T: std::convert::Into<crate::model::snapshot::State>>(mut self, v: T) -> Self {
14512        self.state = v.into();
14513        self
14514    }
14515
14516    /// Sets the value of [description][crate::model::Snapshot::description].
14517    ///
14518    /// # Example
14519    /// ```ignore,no_run
14520    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14521    /// let x = Snapshot::new().set_description("example");
14522    /// ```
14523    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14524        self.description = v.into();
14525        self
14526    }
14527}
14528
14529impl wkt::message::Message for Snapshot {
14530    fn typename() -> &'static str {
14531        "type.googleapis.com/google.bigtable.admin.v2.Snapshot"
14532    }
14533}
14534
14535/// Defines additional types related to [Snapshot].
14536pub mod snapshot {
14537    #[allow(unused_imports)]
14538    use super::*;
14539
14540    /// Possible states of a snapshot.
14541    ///
14542    /// # Working with unknown values
14543    ///
14544    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14545    /// additional enum variants at any time. Adding new variants is not considered
14546    /// a breaking change. Applications should write their code in anticipation of:
14547    ///
14548    /// - New values appearing in future releases of the client library, **and**
14549    /// - New values received dynamically, without application changes.
14550    ///
14551    /// Please consult the [Working with enums] section in the user guide for some
14552    /// guidelines.
14553    ///
14554    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14555    #[derive(Clone, Debug, PartialEq)]
14556    #[non_exhaustive]
14557    pub enum State {
14558        /// The state of the snapshot could not be determined.
14559        NotKnown,
14560        /// The snapshot has been successfully created and can serve all requests.
14561        Ready,
14562        /// The snapshot is currently being created, and may be destroyed if the
14563        /// creation process encounters an error. A snapshot may not be restored to a
14564        /// table while it is being created.
14565        Creating,
14566        /// If set, the enum was initialized with an unknown value.
14567        ///
14568        /// Applications can examine the value using [State::value] or
14569        /// [State::name].
14570        UnknownValue(state::UnknownValue),
14571    }
14572
14573    #[doc(hidden)]
14574    pub mod state {
14575        #[allow(unused_imports)]
14576        use super::*;
14577        #[derive(Clone, Debug, PartialEq)]
14578        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14579    }
14580
14581    impl State {
14582        /// Gets the enum value.
14583        ///
14584        /// Returns `None` if the enum contains an unknown value deserialized from
14585        /// the string representation of enums.
14586        pub fn value(&self) -> std::option::Option<i32> {
14587            match self {
14588                Self::NotKnown => std::option::Option::Some(0),
14589                Self::Ready => std::option::Option::Some(1),
14590                Self::Creating => std::option::Option::Some(2),
14591                Self::UnknownValue(u) => u.0.value(),
14592            }
14593        }
14594
14595        /// Gets the enum value as a string.
14596        ///
14597        /// Returns `None` if the enum contains an unknown value deserialized from
14598        /// the integer representation of enums.
14599        pub fn name(&self) -> std::option::Option<&str> {
14600            match self {
14601                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
14602                Self::Ready => std::option::Option::Some("READY"),
14603                Self::Creating => std::option::Option::Some("CREATING"),
14604                Self::UnknownValue(u) => u.0.name(),
14605            }
14606        }
14607    }
14608
14609    impl std::default::Default for State {
14610        fn default() -> Self {
14611            use std::convert::From;
14612            Self::from(0)
14613        }
14614    }
14615
14616    impl std::fmt::Display for State {
14617        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14618            wkt::internal::display_enum(f, self.name(), self.value())
14619        }
14620    }
14621
14622    impl std::convert::From<i32> for State {
14623        fn from(value: i32) -> Self {
14624            match value {
14625                0 => Self::NotKnown,
14626                1 => Self::Ready,
14627                2 => Self::Creating,
14628                _ => Self::UnknownValue(state::UnknownValue(
14629                    wkt::internal::UnknownEnumValue::Integer(value),
14630                )),
14631            }
14632        }
14633    }
14634
14635    impl std::convert::From<&str> for State {
14636        fn from(value: &str) -> Self {
14637            use std::string::ToString;
14638            match value {
14639                "STATE_NOT_KNOWN" => Self::NotKnown,
14640                "READY" => Self::Ready,
14641                "CREATING" => Self::Creating,
14642                _ => Self::UnknownValue(state::UnknownValue(
14643                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14644                )),
14645            }
14646        }
14647    }
14648
14649    impl serde::ser::Serialize for State {
14650        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14651        where
14652            S: serde::Serializer,
14653        {
14654            match self {
14655                Self::NotKnown => serializer.serialize_i32(0),
14656                Self::Ready => serializer.serialize_i32(1),
14657                Self::Creating => serializer.serialize_i32(2),
14658                Self::UnknownValue(u) => u.0.serialize(serializer),
14659            }
14660        }
14661    }
14662
14663    impl<'de> serde::de::Deserialize<'de> for State {
14664        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14665        where
14666            D: serde::Deserializer<'de>,
14667        {
14668            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14669                ".google.bigtable.admin.v2.Snapshot.State",
14670            ))
14671        }
14672    }
14673}
14674
14675/// A backup of a Cloud Bigtable table.
14676#[derive(Clone, Default, PartialEq)]
14677#[non_exhaustive]
14678pub struct Backup {
14679    /// A globally unique identifier for the backup which cannot be
14680    /// changed. Values are of the form
14681    /// `projects/{project}/instances/{instance}/clusters/{cluster}/
14682    /// backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
14683    /// The final segment of the name must be between 1 and 50 characters
14684    /// in length.
14685    ///
14686    /// The backup is stored in the cluster identified by the prefix of the backup
14687    /// name of the form
14688    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
14689    pub name: std::string::String,
14690
14691    /// Required. Immutable. Name of the table from which this backup was created.
14692    /// This needs to be in the same instance as the backup. Values are of the form
14693    /// `projects/{project}/instances/{instance}/tables/{source_table}`.
14694    pub source_table: std::string::String,
14695
14696    /// Output only. Name of the backup from which this backup was copied. If a
14697    /// backup is not created by copying a backup, this field will be empty. Values
14698    /// are of the form:
14699    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
14700    pub source_backup: std::string::String,
14701
14702    /// Required. The expiration time of the backup.
14703    /// When creating a backup or updating its `expire_time`, the value must be
14704    /// greater than the backup creation time by:
14705    ///
14706    /// - At least 6 hours
14707    /// - At most 90 days
14708    ///
14709    /// Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
14710    pub expire_time: std::option::Option<wkt::Timestamp>,
14711
14712    /// Output only. `start_time` is the time that the backup was started
14713    /// (i.e. approximately the time the
14714    /// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]
14715    /// request is received).  The row data in this backup will be no older than
14716    /// this timestamp.
14717    ///
14718    /// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
14719    pub start_time: std::option::Option<wkt::Timestamp>,
14720
14721    /// Output only. `end_time` is the time that the backup was finished. The row
14722    /// data in the backup will be no newer than this timestamp.
14723    pub end_time: std::option::Option<wkt::Timestamp>,
14724
14725    /// Output only. Size of the backup in bytes.
14726    pub size_bytes: i64,
14727
14728    /// Output only. The current state of the backup.
14729    pub state: crate::model::backup::State,
14730
14731    /// Output only. The encryption information for the backup.
14732    pub encryption_info: std::option::Option<crate::model::EncryptionInfo>,
14733
14734    /// Indicates the backup type of the backup.
14735    pub backup_type: crate::model::backup::BackupType,
14736
14737    /// The time at which the hot backup will be converted to a standard backup.
14738    /// Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
14739    /// hot backup to a standard backup. This value must be greater than the backup
14740    /// creation time by:
14741    ///
14742    /// - At least 24 hours
14743    ///
14744    /// This field only applies for hot backups. When creating or updating a
14745    /// standard backup, attempting to set this field will fail the request.
14746    pub hot_to_standard_time: std::option::Option<wkt::Timestamp>,
14747
14748    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14749}
14750
14751impl Backup {
14752    /// Creates a new default instance.
14753    pub fn new() -> Self {
14754        std::default::Default::default()
14755    }
14756
14757    /// Sets the value of [name][crate::model::Backup::name].
14758    ///
14759    /// # Example
14760    /// ```ignore,no_run
14761    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14762    /// let x = Backup::new().set_name("example");
14763    /// ```
14764    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14765        self.name = v.into();
14766        self
14767    }
14768
14769    /// Sets the value of [source_table][crate::model::Backup::source_table].
14770    ///
14771    /// # Example
14772    /// ```ignore,no_run
14773    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14774    /// let x = Backup::new().set_source_table("example");
14775    /// ```
14776    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14777        self.source_table = v.into();
14778        self
14779    }
14780
14781    /// Sets the value of [source_backup][crate::model::Backup::source_backup].
14782    ///
14783    /// # Example
14784    /// ```ignore,no_run
14785    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14786    /// let x = Backup::new().set_source_backup("example");
14787    /// ```
14788    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14789        self.source_backup = v.into();
14790        self
14791    }
14792
14793    /// Sets the value of [expire_time][crate::model::Backup::expire_time].
14794    ///
14795    /// # Example
14796    /// ```ignore,no_run
14797    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14798    /// use wkt::Timestamp;
14799    /// let x = Backup::new().set_expire_time(Timestamp::default()/* use setters */);
14800    /// ```
14801    pub fn set_expire_time<T>(mut self, v: T) -> Self
14802    where
14803        T: std::convert::Into<wkt::Timestamp>,
14804    {
14805        self.expire_time = std::option::Option::Some(v.into());
14806        self
14807    }
14808
14809    /// Sets or clears the value of [expire_time][crate::model::Backup::expire_time].
14810    ///
14811    /// # Example
14812    /// ```ignore,no_run
14813    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14814    /// use wkt::Timestamp;
14815    /// let x = Backup::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
14816    /// let x = Backup::new().set_or_clear_expire_time(None::<Timestamp>);
14817    /// ```
14818    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
14819    where
14820        T: std::convert::Into<wkt::Timestamp>,
14821    {
14822        self.expire_time = v.map(|x| x.into());
14823        self
14824    }
14825
14826    /// Sets the value of [start_time][crate::model::Backup::start_time].
14827    ///
14828    /// # Example
14829    /// ```ignore,no_run
14830    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14831    /// use wkt::Timestamp;
14832    /// let x = Backup::new().set_start_time(Timestamp::default()/* use setters */);
14833    /// ```
14834    pub fn set_start_time<T>(mut self, v: T) -> Self
14835    where
14836        T: std::convert::Into<wkt::Timestamp>,
14837    {
14838        self.start_time = std::option::Option::Some(v.into());
14839        self
14840    }
14841
14842    /// Sets or clears the value of [start_time][crate::model::Backup::start_time].
14843    ///
14844    /// # Example
14845    /// ```ignore,no_run
14846    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14847    /// use wkt::Timestamp;
14848    /// let x = Backup::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
14849    /// let x = Backup::new().set_or_clear_start_time(None::<Timestamp>);
14850    /// ```
14851    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
14852    where
14853        T: std::convert::Into<wkt::Timestamp>,
14854    {
14855        self.start_time = v.map(|x| x.into());
14856        self
14857    }
14858
14859    /// Sets the value of [end_time][crate::model::Backup::end_time].
14860    ///
14861    /// # Example
14862    /// ```ignore,no_run
14863    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14864    /// use wkt::Timestamp;
14865    /// let x = Backup::new().set_end_time(Timestamp::default()/* use setters */);
14866    /// ```
14867    pub fn set_end_time<T>(mut self, v: T) -> Self
14868    where
14869        T: std::convert::Into<wkt::Timestamp>,
14870    {
14871        self.end_time = std::option::Option::Some(v.into());
14872        self
14873    }
14874
14875    /// Sets or clears the value of [end_time][crate::model::Backup::end_time].
14876    ///
14877    /// # Example
14878    /// ```ignore,no_run
14879    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14880    /// use wkt::Timestamp;
14881    /// let x = Backup::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
14882    /// let x = Backup::new().set_or_clear_end_time(None::<Timestamp>);
14883    /// ```
14884    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
14885    where
14886        T: std::convert::Into<wkt::Timestamp>,
14887    {
14888        self.end_time = v.map(|x| x.into());
14889        self
14890    }
14891
14892    /// Sets the value of [size_bytes][crate::model::Backup::size_bytes].
14893    ///
14894    /// # Example
14895    /// ```ignore,no_run
14896    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14897    /// let x = Backup::new().set_size_bytes(42);
14898    /// ```
14899    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14900        self.size_bytes = v.into();
14901        self
14902    }
14903
14904    /// Sets the value of [state][crate::model::Backup::state].
14905    ///
14906    /// # Example
14907    /// ```ignore,no_run
14908    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14909    /// use google_cloud_bigtable_admin_v2::model::backup::State;
14910    /// let x0 = Backup::new().set_state(State::Creating);
14911    /// let x1 = Backup::new().set_state(State::Ready);
14912    /// ```
14913    pub fn set_state<T: std::convert::Into<crate::model::backup::State>>(mut self, v: T) -> Self {
14914        self.state = v.into();
14915        self
14916    }
14917
14918    /// Sets the value of [encryption_info][crate::model::Backup::encryption_info].
14919    ///
14920    /// # Example
14921    /// ```ignore,no_run
14922    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14923    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14924    /// let x = Backup::new().set_encryption_info(EncryptionInfo::default()/* use setters */);
14925    /// ```
14926    pub fn set_encryption_info<T>(mut self, v: T) -> Self
14927    where
14928        T: std::convert::Into<crate::model::EncryptionInfo>,
14929    {
14930        self.encryption_info = std::option::Option::Some(v.into());
14931        self
14932    }
14933
14934    /// Sets or clears the value of [encryption_info][crate::model::Backup::encryption_info].
14935    ///
14936    /// # Example
14937    /// ```ignore,no_run
14938    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14939    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14940    /// let x = Backup::new().set_or_clear_encryption_info(Some(EncryptionInfo::default()/* use setters */));
14941    /// let x = Backup::new().set_or_clear_encryption_info(None::<EncryptionInfo>);
14942    /// ```
14943    pub fn set_or_clear_encryption_info<T>(mut self, v: std::option::Option<T>) -> Self
14944    where
14945        T: std::convert::Into<crate::model::EncryptionInfo>,
14946    {
14947        self.encryption_info = v.map(|x| x.into());
14948        self
14949    }
14950
14951    /// Sets the value of [backup_type][crate::model::Backup::backup_type].
14952    ///
14953    /// # Example
14954    /// ```ignore,no_run
14955    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14956    /// use google_cloud_bigtable_admin_v2::model::backup::BackupType;
14957    /// let x0 = Backup::new().set_backup_type(BackupType::Standard);
14958    /// let x1 = Backup::new().set_backup_type(BackupType::Hot);
14959    /// ```
14960    pub fn set_backup_type<T: std::convert::Into<crate::model::backup::BackupType>>(
14961        mut self,
14962        v: T,
14963    ) -> Self {
14964        self.backup_type = v.into();
14965        self
14966    }
14967
14968    /// Sets the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
14969    ///
14970    /// # Example
14971    /// ```ignore,no_run
14972    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14973    /// use wkt::Timestamp;
14974    /// let x = Backup::new().set_hot_to_standard_time(Timestamp::default()/* use setters */);
14975    /// ```
14976    pub fn set_hot_to_standard_time<T>(mut self, v: T) -> Self
14977    where
14978        T: std::convert::Into<wkt::Timestamp>,
14979    {
14980        self.hot_to_standard_time = std::option::Option::Some(v.into());
14981        self
14982    }
14983
14984    /// Sets or clears the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
14985    ///
14986    /// # Example
14987    /// ```ignore,no_run
14988    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14989    /// use wkt::Timestamp;
14990    /// let x = Backup::new().set_or_clear_hot_to_standard_time(Some(Timestamp::default()/* use setters */));
14991    /// let x = Backup::new().set_or_clear_hot_to_standard_time(None::<Timestamp>);
14992    /// ```
14993    pub fn set_or_clear_hot_to_standard_time<T>(mut self, v: std::option::Option<T>) -> Self
14994    where
14995        T: std::convert::Into<wkt::Timestamp>,
14996    {
14997        self.hot_to_standard_time = v.map(|x| x.into());
14998        self
14999    }
15000}
15001
15002impl wkt::message::Message for Backup {
15003    fn typename() -> &'static str {
15004        "type.googleapis.com/google.bigtable.admin.v2.Backup"
15005    }
15006}
15007
15008/// Defines additional types related to [Backup].
15009pub mod backup {
15010    #[allow(unused_imports)]
15011    use super::*;
15012
15013    /// Indicates the current state of the backup.
15014    ///
15015    /// # Working with unknown values
15016    ///
15017    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15018    /// additional enum variants at any time. Adding new variants is not considered
15019    /// a breaking change. Applications should write their code in anticipation of:
15020    ///
15021    /// - New values appearing in future releases of the client library, **and**
15022    /// - New values received dynamically, without application changes.
15023    ///
15024    /// Please consult the [Working with enums] section in the user guide for some
15025    /// guidelines.
15026    ///
15027    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15028    #[derive(Clone, Debug, PartialEq)]
15029    #[non_exhaustive]
15030    pub enum State {
15031        /// Not specified.
15032        Unspecified,
15033        /// The pending backup is still being created. Operations on the
15034        /// backup may fail with `FAILED_PRECONDITION` in this state.
15035        Creating,
15036        /// The backup is complete and ready for use.
15037        Ready,
15038        /// If set, the enum was initialized with an unknown value.
15039        ///
15040        /// Applications can examine the value using [State::value] or
15041        /// [State::name].
15042        UnknownValue(state::UnknownValue),
15043    }
15044
15045    #[doc(hidden)]
15046    pub mod state {
15047        #[allow(unused_imports)]
15048        use super::*;
15049        #[derive(Clone, Debug, PartialEq)]
15050        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15051    }
15052
15053    impl State {
15054        /// Gets the enum value.
15055        ///
15056        /// Returns `None` if the enum contains an unknown value deserialized from
15057        /// the string representation of enums.
15058        pub fn value(&self) -> std::option::Option<i32> {
15059            match self {
15060                Self::Unspecified => std::option::Option::Some(0),
15061                Self::Creating => std::option::Option::Some(1),
15062                Self::Ready => std::option::Option::Some(2),
15063                Self::UnknownValue(u) => u.0.value(),
15064            }
15065        }
15066
15067        /// Gets the enum value as a string.
15068        ///
15069        /// Returns `None` if the enum contains an unknown value deserialized from
15070        /// the integer representation of enums.
15071        pub fn name(&self) -> std::option::Option<&str> {
15072            match self {
15073                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
15074                Self::Creating => std::option::Option::Some("CREATING"),
15075                Self::Ready => std::option::Option::Some("READY"),
15076                Self::UnknownValue(u) => u.0.name(),
15077            }
15078        }
15079    }
15080
15081    impl std::default::Default for State {
15082        fn default() -> Self {
15083            use std::convert::From;
15084            Self::from(0)
15085        }
15086    }
15087
15088    impl std::fmt::Display for State {
15089        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15090            wkt::internal::display_enum(f, self.name(), self.value())
15091        }
15092    }
15093
15094    impl std::convert::From<i32> for State {
15095        fn from(value: i32) -> Self {
15096            match value {
15097                0 => Self::Unspecified,
15098                1 => Self::Creating,
15099                2 => Self::Ready,
15100                _ => Self::UnknownValue(state::UnknownValue(
15101                    wkt::internal::UnknownEnumValue::Integer(value),
15102                )),
15103            }
15104        }
15105    }
15106
15107    impl std::convert::From<&str> for State {
15108        fn from(value: &str) -> Self {
15109            use std::string::ToString;
15110            match value {
15111                "STATE_UNSPECIFIED" => Self::Unspecified,
15112                "CREATING" => Self::Creating,
15113                "READY" => Self::Ready,
15114                _ => Self::UnknownValue(state::UnknownValue(
15115                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15116                )),
15117            }
15118        }
15119    }
15120
15121    impl serde::ser::Serialize for State {
15122        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15123        where
15124            S: serde::Serializer,
15125        {
15126            match self {
15127                Self::Unspecified => serializer.serialize_i32(0),
15128                Self::Creating => serializer.serialize_i32(1),
15129                Self::Ready => serializer.serialize_i32(2),
15130                Self::UnknownValue(u) => u.0.serialize(serializer),
15131            }
15132        }
15133    }
15134
15135    impl<'de> serde::de::Deserialize<'de> for State {
15136        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15137        where
15138            D: serde::Deserializer<'de>,
15139        {
15140            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15141                ".google.bigtable.admin.v2.Backup.State",
15142            ))
15143        }
15144    }
15145
15146    /// The type of the backup.
15147    ///
15148    /// # Working with unknown values
15149    ///
15150    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15151    /// additional enum variants at any time. Adding new variants is not considered
15152    /// a breaking change. Applications should write their code in anticipation of:
15153    ///
15154    /// - New values appearing in future releases of the client library, **and**
15155    /// - New values received dynamically, without application changes.
15156    ///
15157    /// Please consult the [Working with enums] section in the user guide for some
15158    /// guidelines.
15159    ///
15160    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15161    #[derive(Clone, Debug, PartialEq)]
15162    #[non_exhaustive]
15163    pub enum BackupType {
15164        /// Not specified.
15165        Unspecified,
15166        /// The default type for Cloud Bigtable managed backups. Supported for
15167        /// backups created in both HDD and SSD instances. Requires optimization when
15168        /// restored to a table in an SSD instance.
15169        Standard,
15170        /// A backup type with faster restore to SSD performance. Only supported for
15171        /// backups created in SSD instances. A new SSD table restored from a hot
15172        /// backup reaches production performance more quickly than a standard
15173        /// backup.
15174        Hot,
15175        /// If set, the enum was initialized with an unknown value.
15176        ///
15177        /// Applications can examine the value using [BackupType::value] or
15178        /// [BackupType::name].
15179        UnknownValue(backup_type::UnknownValue),
15180    }
15181
15182    #[doc(hidden)]
15183    pub mod backup_type {
15184        #[allow(unused_imports)]
15185        use super::*;
15186        #[derive(Clone, Debug, PartialEq)]
15187        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15188    }
15189
15190    impl BackupType {
15191        /// Gets the enum value.
15192        ///
15193        /// Returns `None` if the enum contains an unknown value deserialized from
15194        /// the string representation of enums.
15195        pub fn value(&self) -> std::option::Option<i32> {
15196            match self {
15197                Self::Unspecified => std::option::Option::Some(0),
15198                Self::Standard => std::option::Option::Some(1),
15199                Self::Hot => std::option::Option::Some(2),
15200                Self::UnknownValue(u) => u.0.value(),
15201            }
15202        }
15203
15204        /// Gets the enum value as a string.
15205        ///
15206        /// Returns `None` if the enum contains an unknown value deserialized from
15207        /// the integer representation of enums.
15208        pub fn name(&self) -> std::option::Option<&str> {
15209            match self {
15210                Self::Unspecified => std::option::Option::Some("BACKUP_TYPE_UNSPECIFIED"),
15211                Self::Standard => std::option::Option::Some("STANDARD"),
15212                Self::Hot => std::option::Option::Some("HOT"),
15213                Self::UnknownValue(u) => u.0.name(),
15214            }
15215        }
15216    }
15217
15218    impl std::default::Default for BackupType {
15219        fn default() -> Self {
15220            use std::convert::From;
15221            Self::from(0)
15222        }
15223    }
15224
15225    impl std::fmt::Display for BackupType {
15226        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15227            wkt::internal::display_enum(f, self.name(), self.value())
15228        }
15229    }
15230
15231    impl std::convert::From<i32> for BackupType {
15232        fn from(value: i32) -> Self {
15233            match value {
15234                0 => Self::Unspecified,
15235                1 => Self::Standard,
15236                2 => Self::Hot,
15237                _ => Self::UnknownValue(backup_type::UnknownValue(
15238                    wkt::internal::UnknownEnumValue::Integer(value),
15239                )),
15240            }
15241        }
15242    }
15243
15244    impl std::convert::From<&str> for BackupType {
15245        fn from(value: &str) -> Self {
15246            use std::string::ToString;
15247            match value {
15248                "BACKUP_TYPE_UNSPECIFIED" => Self::Unspecified,
15249                "STANDARD" => Self::Standard,
15250                "HOT" => Self::Hot,
15251                _ => Self::UnknownValue(backup_type::UnknownValue(
15252                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15253                )),
15254            }
15255        }
15256    }
15257
15258    impl serde::ser::Serialize for BackupType {
15259        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15260        where
15261            S: serde::Serializer,
15262        {
15263            match self {
15264                Self::Unspecified => serializer.serialize_i32(0),
15265                Self::Standard => serializer.serialize_i32(1),
15266                Self::Hot => serializer.serialize_i32(2),
15267                Self::UnknownValue(u) => u.0.serialize(serializer),
15268            }
15269        }
15270    }
15271
15272    impl<'de> serde::de::Deserialize<'de> for BackupType {
15273        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15274        where
15275            D: serde::Deserializer<'de>,
15276        {
15277            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupType>::new(
15278                ".google.bigtable.admin.v2.Backup.BackupType",
15279            ))
15280        }
15281    }
15282}
15283
15284/// Information about a backup.
15285#[derive(Clone, Default, PartialEq)]
15286#[non_exhaustive]
15287pub struct BackupInfo {
15288    /// Output only. Name of the backup.
15289    pub backup: std::string::String,
15290
15291    /// Output only. The time that the backup was started. Row data in the backup
15292    /// will be no older than this timestamp.
15293    pub start_time: std::option::Option<wkt::Timestamp>,
15294
15295    /// Output only. This time that the backup was finished. Row data in the
15296    /// backup will be no newer than this timestamp.
15297    pub end_time: std::option::Option<wkt::Timestamp>,
15298
15299    /// Output only. Name of the table the backup was created from.
15300    pub source_table: std::string::String,
15301
15302    /// Output only. Name of the backup from which this backup was copied. If a
15303    /// backup is not created by copying a backup, this field will be empty. Values
15304    /// are of the form:
15305    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
15306    pub source_backup: std::string::String,
15307
15308    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15309}
15310
15311impl BackupInfo {
15312    /// Creates a new default instance.
15313    pub fn new() -> Self {
15314        std::default::Default::default()
15315    }
15316
15317    /// Sets the value of [backup][crate::model::BackupInfo::backup].
15318    ///
15319    /// # Example
15320    /// ```ignore,no_run
15321    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15322    /// let x = BackupInfo::new().set_backup("example");
15323    /// ```
15324    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15325        self.backup = v.into();
15326        self
15327    }
15328
15329    /// Sets the value of [start_time][crate::model::BackupInfo::start_time].
15330    ///
15331    /// # Example
15332    /// ```ignore,no_run
15333    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15334    /// use wkt::Timestamp;
15335    /// let x = BackupInfo::new().set_start_time(Timestamp::default()/* use setters */);
15336    /// ```
15337    pub fn set_start_time<T>(mut self, v: T) -> Self
15338    where
15339        T: std::convert::Into<wkt::Timestamp>,
15340    {
15341        self.start_time = std::option::Option::Some(v.into());
15342        self
15343    }
15344
15345    /// Sets or clears the value of [start_time][crate::model::BackupInfo::start_time].
15346    ///
15347    /// # Example
15348    /// ```ignore,no_run
15349    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15350    /// use wkt::Timestamp;
15351    /// let x = BackupInfo::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
15352    /// let x = BackupInfo::new().set_or_clear_start_time(None::<Timestamp>);
15353    /// ```
15354    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
15355    where
15356        T: std::convert::Into<wkt::Timestamp>,
15357    {
15358        self.start_time = v.map(|x| x.into());
15359        self
15360    }
15361
15362    /// Sets the value of [end_time][crate::model::BackupInfo::end_time].
15363    ///
15364    /// # Example
15365    /// ```ignore,no_run
15366    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15367    /// use wkt::Timestamp;
15368    /// let x = BackupInfo::new().set_end_time(Timestamp::default()/* use setters */);
15369    /// ```
15370    pub fn set_end_time<T>(mut self, v: T) -> Self
15371    where
15372        T: std::convert::Into<wkt::Timestamp>,
15373    {
15374        self.end_time = std::option::Option::Some(v.into());
15375        self
15376    }
15377
15378    /// Sets or clears the value of [end_time][crate::model::BackupInfo::end_time].
15379    ///
15380    /// # Example
15381    /// ```ignore,no_run
15382    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15383    /// use wkt::Timestamp;
15384    /// let x = BackupInfo::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15385    /// let x = BackupInfo::new().set_or_clear_end_time(None::<Timestamp>);
15386    /// ```
15387    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15388    where
15389        T: std::convert::Into<wkt::Timestamp>,
15390    {
15391        self.end_time = v.map(|x| x.into());
15392        self
15393    }
15394
15395    /// Sets the value of [source_table][crate::model::BackupInfo::source_table].
15396    ///
15397    /// # Example
15398    /// ```ignore,no_run
15399    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15400    /// let x = BackupInfo::new().set_source_table("example");
15401    /// ```
15402    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15403        self.source_table = v.into();
15404        self
15405    }
15406
15407    /// Sets the value of [source_backup][crate::model::BackupInfo::source_backup].
15408    ///
15409    /// # Example
15410    /// ```ignore,no_run
15411    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15412    /// let x = BackupInfo::new().set_source_backup("example");
15413    /// ```
15414    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15415        self.source_backup = v.into();
15416        self
15417    }
15418}
15419
15420impl wkt::message::Message for BackupInfo {
15421    fn typename() -> &'static str {
15422        "type.googleapis.com/google.bigtable.admin.v2.BackupInfo"
15423    }
15424}
15425
15426/// Config for tiered storage.
15427/// A valid config must have a valid TieredStorageRule. Otherwise the whole
15428/// TieredStorageConfig must be unset.
15429/// By default all data is stored in the SSD tier (only SSD instances can
15430/// configure tiered storage).
15431#[derive(Clone, Default, PartialEq)]
15432#[non_exhaustive]
15433pub struct TieredStorageConfig {
15434    /// Rule to specify what data is stored in the infrequent access(IA) tier.
15435    /// The IA tier allows storing more data per node with reduced performance.
15436    pub infrequent_access: std::option::Option<crate::model::TieredStorageRule>,
15437
15438    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15439}
15440
15441impl TieredStorageConfig {
15442    /// Creates a new default instance.
15443    pub fn new() -> Self {
15444        std::default::Default::default()
15445    }
15446
15447    /// Sets the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
15448    ///
15449    /// # Example
15450    /// ```ignore,no_run
15451    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
15452    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15453    /// let x = TieredStorageConfig::new().set_infrequent_access(TieredStorageRule::default()/* use setters */);
15454    /// ```
15455    pub fn set_infrequent_access<T>(mut self, v: T) -> Self
15456    where
15457        T: std::convert::Into<crate::model::TieredStorageRule>,
15458    {
15459        self.infrequent_access = std::option::Option::Some(v.into());
15460        self
15461    }
15462
15463    /// Sets or clears the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
15464    ///
15465    /// # Example
15466    /// ```ignore,no_run
15467    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
15468    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15469    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(Some(TieredStorageRule::default()/* use setters */));
15470    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(None::<TieredStorageRule>);
15471    /// ```
15472    pub fn set_or_clear_infrequent_access<T>(mut self, v: std::option::Option<T>) -> Self
15473    where
15474        T: std::convert::Into<crate::model::TieredStorageRule>,
15475    {
15476        self.infrequent_access = v.map(|x| x.into());
15477        self
15478    }
15479}
15480
15481impl wkt::message::Message for TieredStorageConfig {
15482    fn typename() -> &'static str {
15483        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageConfig"
15484    }
15485}
15486
15487/// Rule to specify what data is stored in a storage tier.
15488#[derive(Clone, Default, PartialEq)]
15489#[non_exhaustive]
15490pub struct TieredStorageRule {
15491    /// Rules to specify what data is stored in this tier.
15492    pub rule: std::option::Option<crate::model::tiered_storage_rule::Rule>,
15493
15494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15495}
15496
15497impl TieredStorageRule {
15498    /// Creates a new default instance.
15499    pub fn new() -> Self {
15500        std::default::Default::default()
15501    }
15502
15503    /// Sets the value of [rule][crate::model::TieredStorageRule::rule].
15504    ///
15505    /// Note that all the setters affecting `rule` are mutually
15506    /// exclusive.
15507    ///
15508    /// # Example
15509    /// ```ignore,no_run
15510    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15511    /// use wkt::Duration;
15512    /// let x = TieredStorageRule::new().set_rule(Some(
15513    ///     google_cloud_bigtable_admin_v2::model::tiered_storage_rule::Rule::IncludeIfOlderThan(Duration::default().into())));
15514    /// ```
15515    pub fn set_rule<
15516        T: std::convert::Into<std::option::Option<crate::model::tiered_storage_rule::Rule>>,
15517    >(
15518        mut self,
15519        v: T,
15520    ) -> Self {
15521        self.rule = v.into();
15522        self
15523    }
15524
15525    /// The value of [rule][crate::model::TieredStorageRule::rule]
15526    /// if it holds a `IncludeIfOlderThan`, `None` if the field is not set or
15527    /// holds a different branch.
15528    pub fn include_if_older_than(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
15529        #[allow(unreachable_patterns)]
15530        self.rule.as_ref().and_then(|v| match v {
15531            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v) => {
15532                std::option::Option::Some(v)
15533            }
15534            _ => std::option::Option::None,
15535        })
15536    }
15537
15538    /// Sets the value of [rule][crate::model::TieredStorageRule::rule]
15539    /// to hold a `IncludeIfOlderThan`.
15540    ///
15541    /// Note that all the setters affecting `rule` are
15542    /// mutually exclusive.
15543    ///
15544    /// # Example
15545    /// ```ignore,no_run
15546    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15547    /// use wkt::Duration;
15548    /// let x = TieredStorageRule::new().set_include_if_older_than(Duration::default()/* use setters */);
15549    /// assert!(x.include_if_older_than().is_some());
15550    /// ```
15551    pub fn set_include_if_older_than<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
15552        mut self,
15553        v: T,
15554    ) -> Self {
15555        self.rule = std::option::Option::Some(
15556            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v.into()),
15557        );
15558        self
15559    }
15560}
15561
15562impl wkt::message::Message for TieredStorageRule {
15563    fn typename() -> &'static str {
15564        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageRule"
15565    }
15566}
15567
15568/// Defines additional types related to [TieredStorageRule].
15569pub mod tiered_storage_rule {
15570    #[allow(unused_imports)]
15571    use super::*;
15572
15573    /// Rules to specify what data is stored in this tier.
15574    #[derive(Clone, Debug, PartialEq)]
15575    #[non_exhaustive]
15576    pub enum Rule {
15577        /// Include cells older than the given age.
15578        /// For the infrequent access tier, this value must be at least 30 days.
15579        IncludeIfOlderThan(std::boxed::Box<wkt::Duration>),
15580    }
15581}
15582
15583/// Represents a protobuf schema.
15584#[derive(Clone, Default, PartialEq)]
15585#[non_exhaustive]
15586pub struct ProtoSchema {
15587    /// Required. Contains a protobuf-serialized
15588    /// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
15589    /// which could include multiple proto files.
15590    /// To generate it, [install](https://grpc.io/docs/protoc-installation/) and
15591    /// run `protoc` with
15592    /// `--include_imports` and `--descriptor_set_out`. For example, to generate
15593    /// for moon/shot/app.proto, run
15594    ///
15595    /// ```norust
15596    /// $protoc  --proto_path=/app_path --proto_path=/lib_path \
15597    ///          --include_imports \
15598    ///          --descriptor_set_out=descriptors.pb \
15599    ///          moon/shot/app.proto
15600    /// ```
15601    ///
15602    /// For more details, see protobuffer [self
15603    /// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
15604    pub proto_descriptors: ::bytes::Bytes,
15605
15606    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15607}
15608
15609impl ProtoSchema {
15610    /// Creates a new default instance.
15611    pub fn new() -> Self {
15612        std::default::Default::default()
15613    }
15614
15615    /// Sets the value of [proto_descriptors][crate::model::ProtoSchema::proto_descriptors].
15616    ///
15617    /// # Example
15618    /// ```ignore,no_run
15619    /// # use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15620    /// let x = ProtoSchema::new().set_proto_descriptors(bytes::Bytes::from_static(b"example"));
15621    /// ```
15622    pub fn set_proto_descriptors<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
15623        self.proto_descriptors = v.into();
15624        self
15625    }
15626}
15627
15628impl wkt::message::Message for ProtoSchema {
15629    fn typename() -> &'static str {
15630        "type.googleapis.com/google.bigtable.admin.v2.ProtoSchema"
15631    }
15632}
15633
15634/// A named collection of related schemas.
15635#[derive(Clone, Default, PartialEq)]
15636#[non_exhaustive]
15637pub struct SchemaBundle {
15638    /// Identifier. The unique name identifying this schema bundle.
15639    /// Values are of the form
15640    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
15641    pub name: std::string::String,
15642
15643    /// Optional. The etag for this schema bundle.
15644    /// This may be sent on update and delete requests to ensure the
15645    /// client has an up-to-date value before proceeding. The server
15646    /// returns an ABORTED error on a mismatched etag.
15647    pub etag: std::string::String,
15648
15649    /// The type of this schema bundle. The oneof case cannot change after
15650    /// creation.
15651    pub r#type: std::option::Option<crate::model::schema_bundle::Type>,
15652
15653    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15654}
15655
15656impl SchemaBundle {
15657    /// Creates a new default instance.
15658    pub fn new() -> Self {
15659        std::default::Default::default()
15660    }
15661
15662    /// Sets the value of [name][crate::model::SchemaBundle::name].
15663    ///
15664    /// # Example
15665    /// ```ignore,no_run
15666    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15667    /// let x = SchemaBundle::new().set_name("example");
15668    /// ```
15669    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15670        self.name = v.into();
15671        self
15672    }
15673
15674    /// Sets the value of [etag][crate::model::SchemaBundle::etag].
15675    ///
15676    /// # Example
15677    /// ```ignore,no_run
15678    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15679    /// let x = SchemaBundle::new().set_etag("example");
15680    /// ```
15681    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15682        self.etag = v.into();
15683        self
15684    }
15685
15686    /// Sets the value of [r#type][crate::model::SchemaBundle::type].
15687    ///
15688    /// Note that all the setters affecting `r#type` are mutually
15689    /// exclusive.
15690    ///
15691    /// # Example
15692    /// ```ignore,no_run
15693    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15694    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15695    /// let x = SchemaBundle::new().set_type(Some(
15696    ///     google_cloud_bigtable_admin_v2::model::schema_bundle::Type::ProtoSchema(ProtoSchema::default().into())));
15697    /// ```
15698    pub fn set_type<
15699        T: std::convert::Into<std::option::Option<crate::model::schema_bundle::Type>>,
15700    >(
15701        mut self,
15702        v: T,
15703    ) -> Self {
15704        self.r#type = v.into();
15705        self
15706    }
15707
15708    /// The value of [r#type][crate::model::SchemaBundle::r#type]
15709    /// if it holds a `ProtoSchema`, `None` if the field is not set or
15710    /// holds a different branch.
15711    pub fn proto_schema(&self) -> std::option::Option<&std::boxed::Box<crate::model::ProtoSchema>> {
15712        #[allow(unreachable_patterns)]
15713        self.r#type.as_ref().and_then(|v| match v {
15714            crate::model::schema_bundle::Type::ProtoSchema(v) => std::option::Option::Some(v),
15715            _ => std::option::Option::None,
15716        })
15717    }
15718
15719    /// Sets the value of [r#type][crate::model::SchemaBundle::r#type]
15720    /// to hold a `ProtoSchema`.
15721    ///
15722    /// Note that all the setters affecting `r#type` are
15723    /// mutually exclusive.
15724    ///
15725    /// # Example
15726    /// ```ignore,no_run
15727    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15728    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15729    /// let x = SchemaBundle::new().set_proto_schema(ProtoSchema::default()/* use setters */);
15730    /// assert!(x.proto_schema().is_some());
15731    /// ```
15732    pub fn set_proto_schema<T: std::convert::Into<std::boxed::Box<crate::model::ProtoSchema>>>(
15733        mut self,
15734        v: T,
15735    ) -> Self {
15736        self.r#type =
15737            std::option::Option::Some(crate::model::schema_bundle::Type::ProtoSchema(v.into()));
15738        self
15739    }
15740}
15741
15742impl wkt::message::Message for SchemaBundle {
15743    fn typename() -> &'static str {
15744        "type.googleapis.com/google.bigtable.admin.v2.SchemaBundle"
15745    }
15746}
15747
15748/// Defines additional types related to [SchemaBundle].
15749pub mod schema_bundle {
15750    #[allow(unused_imports)]
15751    use super::*;
15752
15753    /// The type of this schema bundle. The oneof case cannot change after
15754    /// creation.
15755    #[derive(Clone, Debug, PartialEq)]
15756    #[non_exhaustive]
15757    pub enum Type {
15758        /// Schema for Protobufs.
15759        ProtoSchema(std::boxed::Box<crate::model::ProtoSchema>),
15760    }
15761}
15762
15763/// `Type` represents the type of data that is written to, read from, or stored
15764/// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
15765/// familiarity and consistency across products and features.
15766///
15767/// For compatibility with Bigtable's existing untyped APIs, each `Type` includes
15768/// an `Encoding` which describes how to convert to or from the underlying data.
15769///
15770/// Each encoding can operate in one of two modes:
15771///
15772/// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)`
15773///   if and only if `X <= Y`. This is useful anywhere sort order is important,
15774///   for example when encoding keys.
15775/// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then
15776///   `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For
15777///   example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}"
15778///   are valid encodings of the same JSON value.
15779///
15780/// The API clearly documents which mode is used wherever an encoding can be
15781/// configured. Each encoding also documents which values are supported in which
15782/// modes. For example, when encoding INT64 as a numeric STRING, negative numbers
15783/// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but
15784/// `STRING("-00001") > STRING("00001")`.
15785#[derive(Clone, Default, PartialEq)]
15786#[non_exhaustive]
15787pub struct Type {
15788    /// The kind of type that this represents.
15789    pub kind: std::option::Option<crate::model::r#type::Kind>,
15790
15791    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15792}
15793
15794impl Type {
15795    /// Creates a new default instance.
15796    pub fn new() -> Self {
15797        std::default::Default::default()
15798    }
15799
15800    /// Sets the value of [kind][crate::model::Type::kind].
15801    ///
15802    /// Note that all the setters affecting `kind` are mutually
15803    /// exclusive.
15804    ///
15805    /// # Example
15806    /// ```ignore,no_run
15807    /// # use google_cloud_bigtable_admin_v2::model::Type;
15808    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
15809    /// let x = Type::new().set_kind(Some(
15810    ///     google_cloud_bigtable_admin_v2::model::r#type::Kind::BytesType(Bytes::default().into())));
15811    /// ```
15812    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::r#type::Kind>>>(
15813        mut self,
15814        v: T,
15815    ) -> Self {
15816        self.kind = v.into();
15817        self
15818    }
15819
15820    /// The value of [kind][crate::model::Type::kind]
15821    /// if it holds a `BytesType`, `None` if the field is not set or
15822    /// holds a different branch.
15823    pub fn bytes_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bytes>> {
15824        #[allow(unreachable_patterns)]
15825        self.kind.as_ref().and_then(|v| match v {
15826            crate::model::r#type::Kind::BytesType(v) => std::option::Option::Some(v),
15827            _ => std::option::Option::None,
15828        })
15829    }
15830
15831    /// Sets the value of [kind][crate::model::Type::kind]
15832    /// to hold a `BytesType`.
15833    ///
15834    /// Note that all the setters affecting `kind` are
15835    /// mutually exclusive.
15836    ///
15837    /// # Example
15838    /// ```ignore,no_run
15839    /// # use google_cloud_bigtable_admin_v2::model::Type;
15840    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
15841    /// let x = Type::new().set_bytes_type(Bytes::default()/* use setters */);
15842    /// assert!(x.bytes_type().is_some());
15843    /// assert!(x.string_type().is_none());
15844    /// assert!(x.int64_type().is_none());
15845    /// assert!(x.float32_type().is_none());
15846    /// assert!(x.float64_type().is_none());
15847    /// assert!(x.bool_type().is_none());
15848    /// assert!(x.timestamp_type().is_none());
15849    /// assert!(x.date_type().is_none());
15850    /// assert!(x.aggregate_type().is_none());
15851    /// assert!(x.struct_type().is_none());
15852    /// assert!(x.array_type().is_none());
15853    /// assert!(x.map_type().is_none());
15854    /// assert!(x.proto_type().is_none());
15855    /// assert!(x.enum_type().is_none());
15856    /// ```
15857    pub fn set_bytes_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bytes>>>(
15858        mut self,
15859        v: T,
15860    ) -> Self {
15861        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BytesType(v.into()));
15862        self
15863    }
15864
15865    /// The value of [kind][crate::model::Type::kind]
15866    /// if it holds a `StringType`, `None` if the field is not set or
15867    /// holds a different branch.
15868    pub fn string_type(
15869        &self,
15870    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::String>> {
15871        #[allow(unreachable_patterns)]
15872        self.kind.as_ref().and_then(|v| match v {
15873            crate::model::r#type::Kind::StringType(v) => std::option::Option::Some(v),
15874            _ => std::option::Option::None,
15875        })
15876    }
15877
15878    /// Sets the value of [kind][crate::model::Type::kind]
15879    /// to hold a `StringType`.
15880    ///
15881    /// Note that all the setters affecting `kind` are
15882    /// mutually exclusive.
15883    ///
15884    /// # Example
15885    /// ```ignore,no_run
15886    /// # use google_cloud_bigtable_admin_v2::model::Type;
15887    /// use google_cloud_bigtable_admin_v2::model::r#type::String;
15888    /// let x = Type::new().set_string_type(String::default()/* use setters */);
15889    /// assert!(x.string_type().is_some());
15890    /// assert!(x.bytes_type().is_none());
15891    /// assert!(x.int64_type().is_none());
15892    /// assert!(x.float32_type().is_none());
15893    /// assert!(x.float64_type().is_none());
15894    /// assert!(x.bool_type().is_none());
15895    /// assert!(x.timestamp_type().is_none());
15896    /// assert!(x.date_type().is_none());
15897    /// assert!(x.aggregate_type().is_none());
15898    /// assert!(x.struct_type().is_none());
15899    /// assert!(x.array_type().is_none());
15900    /// assert!(x.map_type().is_none());
15901    /// assert!(x.proto_type().is_none());
15902    /// assert!(x.enum_type().is_none());
15903    /// ```
15904    pub fn set_string_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::String>>>(
15905        mut self,
15906        v: T,
15907    ) -> Self {
15908        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StringType(v.into()));
15909        self
15910    }
15911
15912    /// The value of [kind][crate::model::Type::kind]
15913    /// if it holds a `Int64Type`, `None` if the field is not set or
15914    /// holds a different branch.
15915    pub fn int64_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Int64>> {
15916        #[allow(unreachable_patterns)]
15917        self.kind.as_ref().and_then(|v| match v {
15918            crate::model::r#type::Kind::Int64Type(v) => std::option::Option::Some(v),
15919            _ => std::option::Option::None,
15920        })
15921    }
15922
15923    /// Sets the value of [kind][crate::model::Type::kind]
15924    /// to hold a `Int64Type`.
15925    ///
15926    /// Note that all the setters affecting `kind` are
15927    /// mutually exclusive.
15928    ///
15929    /// # Example
15930    /// ```ignore,no_run
15931    /// # use google_cloud_bigtable_admin_v2::model::Type;
15932    /// use google_cloud_bigtable_admin_v2::model::r#type::Int64;
15933    /// let x = Type::new().set_int64_type(Int64::default()/* use setters */);
15934    /// assert!(x.int64_type().is_some());
15935    /// assert!(x.bytes_type().is_none());
15936    /// assert!(x.string_type().is_none());
15937    /// assert!(x.float32_type().is_none());
15938    /// assert!(x.float64_type().is_none());
15939    /// assert!(x.bool_type().is_none());
15940    /// assert!(x.timestamp_type().is_none());
15941    /// assert!(x.date_type().is_none());
15942    /// assert!(x.aggregate_type().is_none());
15943    /// assert!(x.struct_type().is_none());
15944    /// assert!(x.array_type().is_none());
15945    /// assert!(x.map_type().is_none());
15946    /// assert!(x.proto_type().is_none());
15947    /// assert!(x.enum_type().is_none());
15948    /// ```
15949    pub fn set_int64_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Int64>>>(
15950        mut self,
15951        v: T,
15952    ) -> Self {
15953        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Int64Type(v.into()));
15954        self
15955    }
15956
15957    /// The value of [kind][crate::model::Type::kind]
15958    /// if it holds a `Float32Type`, `None` if the field is not set or
15959    /// holds a different branch.
15960    pub fn float32_type(
15961        &self,
15962    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float32>> {
15963        #[allow(unreachable_patterns)]
15964        self.kind.as_ref().and_then(|v| match v {
15965            crate::model::r#type::Kind::Float32Type(v) => std::option::Option::Some(v),
15966            _ => std::option::Option::None,
15967        })
15968    }
15969
15970    /// Sets the value of [kind][crate::model::Type::kind]
15971    /// to hold a `Float32Type`.
15972    ///
15973    /// Note that all the setters affecting `kind` are
15974    /// mutually exclusive.
15975    ///
15976    /// # Example
15977    /// ```ignore,no_run
15978    /// # use google_cloud_bigtable_admin_v2::model::Type;
15979    /// use google_cloud_bigtable_admin_v2::model::r#type::Float32;
15980    /// let x = Type::new().set_float32_type(Float32::default()/* use setters */);
15981    /// assert!(x.float32_type().is_some());
15982    /// assert!(x.bytes_type().is_none());
15983    /// assert!(x.string_type().is_none());
15984    /// assert!(x.int64_type().is_none());
15985    /// assert!(x.float64_type().is_none());
15986    /// assert!(x.bool_type().is_none());
15987    /// assert!(x.timestamp_type().is_none());
15988    /// assert!(x.date_type().is_none());
15989    /// assert!(x.aggregate_type().is_none());
15990    /// assert!(x.struct_type().is_none());
15991    /// assert!(x.array_type().is_none());
15992    /// assert!(x.map_type().is_none());
15993    /// assert!(x.proto_type().is_none());
15994    /// assert!(x.enum_type().is_none());
15995    /// ```
15996    pub fn set_float32_type<
15997        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float32>>,
15998    >(
15999        mut self,
16000        v: T,
16001    ) -> Self {
16002        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float32Type(v.into()));
16003        self
16004    }
16005
16006    /// The value of [kind][crate::model::Type::kind]
16007    /// if it holds a `Float64Type`, `None` if the field is not set or
16008    /// holds a different branch.
16009    pub fn float64_type(
16010        &self,
16011    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float64>> {
16012        #[allow(unreachable_patterns)]
16013        self.kind.as_ref().and_then(|v| match v {
16014            crate::model::r#type::Kind::Float64Type(v) => std::option::Option::Some(v),
16015            _ => std::option::Option::None,
16016        })
16017    }
16018
16019    /// Sets the value of [kind][crate::model::Type::kind]
16020    /// to hold a `Float64Type`.
16021    ///
16022    /// Note that all the setters affecting `kind` are
16023    /// mutually exclusive.
16024    ///
16025    /// # Example
16026    /// ```ignore,no_run
16027    /// # use google_cloud_bigtable_admin_v2::model::Type;
16028    /// use google_cloud_bigtable_admin_v2::model::r#type::Float64;
16029    /// let x = Type::new().set_float64_type(Float64::default()/* use setters */);
16030    /// assert!(x.float64_type().is_some());
16031    /// assert!(x.bytes_type().is_none());
16032    /// assert!(x.string_type().is_none());
16033    /// assert!(x.int64_type().is_none());
16034    /// assert!(x.float32_type().is_none());
16035    /// assert!(x.bool_type().is_none());
16036    /// assert!(x.timestamp_type().is_none());
16037    /// assert!(x.date_type().is_none());
16038    /// assert!(x.aggregate_type().is_none());
16039    /// assert!(x.struct_type().is_none());
16040    /// assert!(x.array_type().is_none());
16041    /// assert!(x.map_type().is_none());
16042    /// assert!(x.proto_type().is_none());
16043    /// assert!(x.enum_type().is_none());
16044    /// ```
16045    pub fn set_float64_type<
16046        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float64>>,
16047    >(
16048        mut self,
16049        v: T,
16050    ) -> Self {
16051        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float64Type(v.into()));
16052        self
16053    }
16054
16055    /// The value of [kind][crate::model::Type::kind]
16056    /// if it holds a `BoolType`, `None` if the field is not set or
16057    /// holds a different branch.
16058    pub fn bool_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bool>> {
16059        #[allow(unreachable_patterns)]
16060        self.kind.as_ref().and_then(|v| match v {
16061            crate::model::r#type::Kind::BoolType(v) => std::option::Option::Some(v),
16062            _ => std::option::Option::None,
16063        })
16064    }
16065
16066    /// Sets the value of [kind][crate::model::Type::kind]
16067    /// to hold a `BoolType`.
16068    ///
16069    /// Note that all the setters affecting `kind` are
16070    /// mutually exclusive.
16071    ///
16072    /// # Example
16073    /// ```ignore,no_run
16074    /// # use google_cloud_bigtable_admin_v2::model::Type;
16075    /// use google_cloud_bigtable_admin_v2::model::r#type::Bool;
16076    /// let x = Type::new().set_bool_type(Bool::default()/* use setters */);
16077    /// assert!(x.bool_type().is_some());
16078    /// assert!(x.bytes_type().is_none());
16079    /// assert!(x.string_type().is_none());
16080    /// assert!(x.int64_type().is_none());
16081    /// assert!(x.float32_type().is_none());
16082    /// assert!(x.float64_type().is_none());
16083    /// assert!(x.timestamp_type().is_none());
16084    /// assert!(x.date_type().is_none());
16085    /// assert!(x.aggregate_type().is_none());
16086    /// assert!(x.struct_type().is_none());
16087    /// assert!(x.array_type().is_none());
16088    /// assert!(x.map_type().is_none());
16089    /// assert!(x.proto_type().is_none());
16090    /// assert!(x.enum_type().is_none());
16091    /// ```
16092    pub fn set_bool_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bool>>>(
16093        mut self,
16094        v: T,
16095    ) -> Self {
16096        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BoolType(v.into()));
16097        self
16098    }
16099
16100    /// The value of [kind][crate::model::Type::kind]
16101    /// if it holds a `TimestampType`, `None` if the field is not set or
16102    /// holds a different branch.
16103    pub fn timestamp_type(
16104        &self,
16105    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Timestamp>> {
16106        #[allow(unreachable_patterns)]
16107        self.kind.as_ref().and_then(|v| match v {
16108            crate::model::r#type::Kind::TimestampType(v) => std::option::Option::Some(v),
16109            _ => std::option::Option::None,
16110        })
16111    }
16112
16113    /// Sets the value of [kind][crate::model::Type::kind]
16114    /// to hold a `TimestampType`.
16115    ///
16116    /// Note that all the setters affecting `kind` are
16117    /// mutually exclusive.
16118    ///
16119    /// # Example
16120    /// ```ignore,no_run
16121    /// # use google_cloud_bigtable_admin_v2::model::Type;
16122    /// use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
16123    /// let x = Type::new().set_timestamp_type(Timestamp::default()/* use setters */);
16124    /// assert!(x.timestamp_type().is_some());
16125    /// assert!(x.bytes_type().is_none());
16126    /// assert!(x.string_type().is_none());
16127    /// assert!(x.int64_type().is_none());
16128    /// assert!(x.float32_type().is_none());
16129    /// assert!(x.float64_type().is_none());
16130    /// assert!(x.bool_type().is_none());
16131    /// assert!(x.date_type().is_none());
16132    /// assert!(x.aggregate_type().is_none());
16133    /// assert!(x.struct_type().is_none());
16134    /// assert!(x.array_type().is_none());
16135    /// assert!(x.map_type().is_none());
16136    /// assert!(x.proto_type().is_none());
16137    /// assert!(x.enum_type().is_none());
16138    /// ```
16139    pub fn set_timestamp_type<
16140        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Timestamp>>,
16141    >(
16142        mut self,
16143        v: T,
16144    ) -> Self {
16145        self.kind = std::option::Option::Some(crate::model::r#type::Kind::TimestampType(v.into()));
16146        self
16147    }
16148
16149    /// The value of [kind][crate::model::Type::kind]
16150    /// if it holds a `DateType`, `None` if the field is not set or
16151    /// holds a different branch.
16152    pub fn date_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Date>> {
16153        #[allow(unreachable_patterns)]
16154        self.kind.as_ref().and_then(|v| match v {
16155            crate::model::r#type::Kind::DateType(v) => std::option::Option::Some(v),
16156            _ => std::option::Option::None,
16157        })
16158    }
16159
16160    /// Sets the value of [kind][crate::model::Type::kind]
16161    /// to hold a `DateType`.
16162    ///
16163    /// Note that all the setters affecting `kind` are
16164    /// mutually exclusive.
16165    ///
16166    /// # Example
16167    /// ```ignore,no_run
16168    /// # use google_cloud_bigtable_admin_v2::model::Type;
16169    /// use google_cloud_bigtable_admin_v2::model::r#type::Date;
16170    /// let x = Type::new().set_date_type(Date::default()/* use setters */);
16171    /// assert!(x.date_type().is_some());
16172    /// assert!(x.bytes_type().is_none());
16173    /// assert!(x.string_type().is_none());
16174    /// assert!(x.int64_type().is_none());
16175    /// assert!(x.float32_type().is_none());
16176    /// assert!(x.float64_type().is_none());
16177    /// assert!(x.bool_type().is_none());
16178    /// assert!(x.timestamp_type().is_none());
16179    /// assert!(x.aggregate_type().is_none());
16180    /// assert!(x.struct_type().is_none());
16181    /// assert!(x.array_type().is_none());
16182    /// assert!(x.map_type().is_none());
16183    /// assert!(x.proto_type().is_none());
16184    /// assert!(x.enum_type().is_none());
16185    /// ```
16186    pub fn set_date_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Date>>>(
16187        mut self,
16188        v: T,
16189    ) -> Self {
16190        self.kind = std::option::Option::Some(crate::model::r#type::Kind::DateType(v.into()));
16191        self
16192    }
16193
16194    /// The value of [kind][crate::model::Type::kind]
16195    /// if it holds a `AggregateType`, `None` if the field is not set or
16196    /// holds a different branch.
16197    pub fn aggregate_type(
16198        &self,
16199    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Aggregate>> {
16200        #[allow(unreachable_patterns)]
16201        self.kind.as_ref().and_then(|v| match v {
16202            crate::model::r#type::Kind::AggregateType(v) => std::option::Option::Some(v),
16203            _ => std::option::Option::None,
16204        })
16205    }
16206
16207    /// Sets the value of [kind][crate::model::Type::kind]
16208    /// to hold a `AggregateType`.
16209    ///
16210    /// Note that all the setters affecting `kind` are
16211    /// mutually exclusive.
16212    ///
16213    /// # Example
16214    /// ```ignore,no_run
16215    /// # use google_cloud_bigtable_admin_v2::model::Type;
16216    /// use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
16217    /// let x = Type::new().set_aggregate_type(Aggregate::default()/* use setters */);
16218    /// assert!(x.aggregate_type().is_some());
16219    /// assert!(x.bytes_type().is_none());
16220    /// assert!(x.string_type().is_none());
16221    /// assert!(x.int64_type().is_none());
16222    /// assert!(x.float32_type().is_none());
16223    /// assert!(x.float64_type().is_none());
16224    /// assert!(x.bool_type().is_none());
16225    /// assert!(x.timestamp_type().is_none());
16226    /// assert!(x.date_type().is_none());
16227    /// assert!(x.struct_type().is_none());
16228    /// assert!(x.array_type().is_none());
16229    /// assert!(x.map_type().is_none());
16230    /// assert!(x.proto_type().is_none());
16231    /// assert!(x.enum_type().is_none());
16232    /// ```
16233    pub fn set_aggregate_type<
16234        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Aggregate>>,
16235    >(
16236        mut self,
16237        v: T,
16238    ) -> Self {
16239        self.kind = std::option::Option::Some(crate::model::r#type::Kind::AggregateType(v.into()));
16240        self
16241    }
16242
16243    /// The value of [kind][crate::model::Type::kind]
16244    /// if it holds a `StructType`, `None` if the field is not set or
16245    /// holds a different branch.
16246    pub fn struct_type(
16247        &self,
16248    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Struct>> {
16249        #[allow(unreachable_patterns)]
16250        self.kind.as_ref().and_then(|v| match v {
16251            crate::model::r#type::Kind::StructType(v) => std::option::Option::Some(v),
16252            _ => std::option::Option::None,
16253        })
16254    }
16255
16256    /// Sets the value of [kind][crate::model::Type::kind]
16257    /// to hold a `StructType`.
16258    ///
16259    /// Note that all the setters affecting `kind` are
16260    /// mutually exclusive.
16261    ///
16262    /// # Example
16263    /// ```ignore,no_run
16264    /// # use google_cloud_bigtable_admin_v2::model::Type;
16265    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
16266    /// let x = Type::new().set_struct_type(Struct::default()/* use setters */);
16267    /// assert!(x.struct_type().is_some());
16268    /// assert!(x.bytes_type().is_none());
16269    /// assert!(x.string_type().is_none());
16270    /// assert!(x.int64_type().is_none());
16271    /// assert!(x.float32_type().is_none());
16272    /// assert!(x.float64_type().is_none());
16273    /// assert!(x.bool_type().is_none());
16274    /// assert!(x.timestamp_type().is_none());
16275    /// assert!(x.date_type().is_none());
16276    /// assert!(x.aggregate_type().is_none());
16277    /// assert!(x.array_type().is_none());
16278    /// assert!(x.map_type().is_none());
16279    /// assert!(x.proto_type().is_none());
16280    /// assert!(x.enum_type().is_none());
16281    /// ```
16282    pub fn set_struct_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Struct>>>(
16283        mut self,
16284        v: T,
16285    ) -> Self {
16286        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StructType(v.into()));
16287        self
16288    }
16289
16290    /// The value of [kind][crate::model::Type::kind]
16291    /// if it holds a `ArrayType`, `None` if the field is not set or
16292    /// holds a different branch.
16293    pub fn array_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Array>> {
16294        #[allow(unreachable_patterns)]
16295        self.kind.as_ref().and_then(|v| match v {
16296            crate::model::r#type::Kind::ArrayType(v) => std::option::Option::Some(v),
16297            _ => std::option::Option::None,
16298        })
16299    }
16300
16301    /// Sets the value of [kind][crate::model::Type::kind]
16302    /// to hold a `ArrayType`.
16303    ///
16304    /// Note that all the setters affecting `kind` are
16305    /// mutually exclusive.
16306    ///
16307    /// # Example
16308    /// ```ignore,no_run
16309    /// # use google_cloud_bigtable_admin_v2::model::Type;
16310    /// use google_cloud_bigtable_admin_v2::model::r#type::Array;
16311    /// let x = Type::new().set_array_type(Array::default()/* use setters */);
16312    /// assert!(x.array_type().is_some());
16313    /// assert!(x.bytes_type().is_none());
16314    /// assert!(x.string_type().is_none());
16315    /// assert!(x.int64_type().is_none());
16316    /// assert!(x.float32_type().is_none());
16317    /// assert!(x.float64_type().is_none());
16318    /// assert!(x.bool_type().is_none());
16319    /// assert!(x.timestamp_type().is_none());
16320    /// assert!(x.date_type().is_none());
16321    /// assert!(x.aggregate_type().is_none());
16322    /// assert!(x.struct_type().is_none());
16323    /// assert!(x.map_type().is_none());
16324    /// assert!(x.proto_type().is_none());
16325    /// assert!(x.enum_type().is_none());
16326    /// ```
16327    pub fn set_array_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Array>>>(
16328        mut self,
16329        v: T,
16330    ) -> Self {
16331        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ArrayType(v.into()));
16332        self
16333    }
16334
16335    /// The value of [kind][crate::model::Type::kind]
16336    /// if it holds a `MapType`, `None` if the field is not set or
16337    /// holds a different branch.
16338    pub fn map_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Map>> {
16339        #[allow(unreachable_patterns)]
16340        self.kind.as_ref().and_then(|v| match v {
16341            crate::model::r#type::Kind::MapType(v) => std::option::Option::Some(v),
16342            _ => std::option::Option::None,
16343        })
16344    }
16345
16346    /// Sets the value of [kind][crate::model::Type::kind]
16347    /// to hold a `MapType`.
16348    ///
16349    /// Note that all the setters affecting `kind` are
16350    /// mutually exclusive.
16351    ///
16352    /// # Example
16353    /// ```ignore,no_run
16354    /// # use google_cloud_bigtable_admin_v2::model::Type;
16355    /// use google_cloud_bigtable_admin_v2::model::r#type::Map;
16356    /// let x = Type::new().set_map_type(Map::default()/* use setters */);
16357    /// assert!(x.map_type().is_some());
16358    /// assert!(x.bytes_type().is_none());
16359    /// assert!(x.string_type().is_none());
16360    /// assert!(x.int64_type().is_none());
16361    /// assert!(x.float32_type().is_none());
16362    /// assert!(x.float64_type().is_none());
16363    /// assert!(x.bool_type().is_none());
16364    /// assert!(x.timestamp_type().is_none());
16365    /// assert!(x.date_type().is_none());
16366    /// assert!(x.aggregate_type().is_none());
16367    /// assert!(x.struct_type().is_none());
16368    /// assert!(x.array_type().is_none());
16369    /// assert!(x.proto_type().is_none());
16370    /// assert!(x.enum_type().is_none());
16371    /// ```
16372    pub fn set_map_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Map>>>(
16373        mut self,
16374        v: T,
16375    ) -> Self {
16376        self.kind = std::option::Option::Some(crate::model::r#type::Kind::MapType(v.into()));
16377        self
16378    }
16379
16380    /// The value of [kind][crate::model::Type::kind]
16381    /// if it holds a `ProtoType`, `None` if the field is not set or
16382    /// holds a different branch.
16383    pub fn proto_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Proto>> {
16384        #[allow(unreachable_patterns)]
16385        self.kind.as_ref().and_then(|v| match v {
16386            crate::model::r#type::Kind::ProtoType(v) => std::option::Option::Some(v),
16387            _ => std::option::Option::None,
16388        })
16389    }
16390
16391    /// Sets the value of [kind][crate::model::Type::kind]
16392    /// to hold a `ProtoType`.
16393    ///
16394    /// Note that all the setters affecting `kind` are
16395    /// mutually exclusive.
16396    ///
16397    /// # Example
16398    /// ```ignore,no_run
16399    /// # use google_cloud_bigtable_admin_v2::model::Type;
16400    /// use google_cloud_bigtable_admin_v2::model::r#type::Proto;
16401    /// let x = Type::new().set_proto_type(Proto::default()/* use setters */);
16402    /// assert!(x.proto_type().is_some());
16403    /// assert!(x.bytes_type().is_none());
16404    /// assert!(x.string_type().is_none());
16405    /// assert!(x.int64_type().is_none());
16406    /// assert!(x.float32_type().is_none());
16407    /// assert!(x.float64_type().is_none());
16408    /// assert!(x.bool_type().is_none());
16409    /// assert!(x.timestamp_type().is_none());
16410    /// assert!(x.date_type().is_none());
16411    /// assert!(x.aggregate_type().is_none());
16412    /// assert!(x.struct_type().is_none());
16413    /// assert!(x.array_type().is_none());
16414    /// assert!(x.map_type().is_none());
16415    /// assert!(x.enum_type().is_none());
16416    /// ```
16417    pub fn set_proto_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Proto>>>(
16418        mut self,
16419        v: T,
16420    ) -> Self {
16421        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ProtoType(v.into()));
16422        self
16423    }
16424
16425    /// The value of [kind][crate::model::Type::kind]
16426    /// if it holds a `EnumType`, `None` if the field is not set or
16427    /// holds a different branch.
16428    pub fn enum_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Enum>> {
16429        #[allow(unreachable_patterns)]
16430        self.kind.as_ref().and_then(|v| match v {
16431            crate::model::r#type::Kind::EnumType(v) => std::option::Option::Some(v),
16432            _ => std::option::Option::None,
16433        })
16434    }
16435
16436    /// Sets the value of [kind][crate::model::Type::kind]
16437    /// to hold a `EnumType`.
16438    ///
16439    /// Note that all the setters affecting `kind` are
16440    /// mutually exclusive.
16441    ///
16442    /// # Example
16443    /// ```ignore,no_run
16444    /// # use google_cloud_bigtable_admin_v2::model::Type;
16445    /// use google_cloud_bigtable_admin_v2::model::r#type::Enum;
16446    /// let x = Type::new().set_enum_type(Enum::default()/* use setters */);
16447    /// assert!(x.enum_type().is_some());
16448    /// assert!(x.bytes_type().is_none());
16449    /// assert!(x.string_type().is_none());
16450    /// assert!(x.int64_type().is_none());
16451    /// assert!(x.float32_type().is_none());
16452    /// assert!(x.float64_type().is_none());
16453    /// assert!(x.bool_type().is_none());
16454    /// assert!(x.timestamp_type().is_none());
16455    /// assert!(x.date_type().is_none());
16456    /// assert!(x.aggregate_type().is_none());
16457    /// assert!(x.struct_type().is_none());
16458    /// assert!(x.array_type().is_none());
16459    /// assert!(x.map_type().is_none());
16460    /// assert!(x.proto_type().is_none());
16461    /// ```
16462    pub fn set_enum_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Enum>>>(
16463        mut self,
16464        v: T,
16465    ) -> Self {
16466        self.kind = std::option::Option::Some(crate::model::r#type::Kind::EnumType(v.into()));
16467        self
16468    }
16469}
16470
16471impl wkt::message::Message for Type {
16472    fn typename() -> &'static str {
16473        "type.googleapis.com/google.bigtable.admin.v2.Type"
16474    }
16475}
16476
16477/// Defines additional types related to [Type].
16478pub mod r#type {
16479    #[allow(unused_imports)]
16480    use super::*;
16481
16482    /// Bytes
16483    /// Values of type `Bytes` are stored in `Value.bytes_value`.
16484    #[derive(Clone, Default, PartialEq)]
16485    #[non_exhaustive]
16486    pub struct Bytes {
16487        /// The encoding to use when converting to or from lower level types.
16488        pub encoding: std::option::Option<crate::model::r#type::bytes::Encoding>,
16489
16490        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16491    }
16492
16493    impl Bytes {
16494        /// Creates a new default instance.
16495        pub fn new() -> Self {
16496            std::default::Default::default()
16497        }
16498
16499        /// Sets the value of [encoding][crate::model::r#type::Bytes::encoding].
16500        ///
16501        /// # Example
16502        /// ```ignore,no_run
16503        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16504        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16505        /// let x = Bytes::new().set_encoding(Encoding::default()/* use setters */);
16506        /// ```
16507        pub fn set_encoding<T>(mut self, v: T) -> Self
16508        where
16509            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
16510        {
16511            self.encoding = std::option::Option::Some(v.into());
16512            self
16513        }
16514
16515        /// Sets or clears the value of [encoding][crate::model::r#type::Bytes::encoding].
16516        ///
16517        /// # Example
16518        /// ```ignore,no_run
16519        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16520        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16521        /// let x = Bytes::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16522        /// let x = Bytes::new().set_or_clear_encoding(None::<Encoding>);
16523        /// ```
16524        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16525        where
16526            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
16527        {
16528            self.encoding = v.map(|x| x.into());
16529            self
16530        }
16531    }
16532
16533    impl wkt::message::Message for Bytes {
16534        fn typename() -> &'static str {
16535            "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes"
16536        }
16537    }
16538
16539    /// Defines additional types related to [Bytes].
16540    pub mod bytes {
16541        #[allow(unused_imports)]
16542        use super::*;
16543
16544        /// Rules used to convert to or from lower level types.
16545        #[derive(Clone, Default, PartialEq)]
16546        #[non_exhaustive]
16547        pub struct Encoding {
16548            /// Which encoding to use.
16549            pub encoding: std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16550
16551            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16552        }
16553
16554        impl Encoding {
16555            /// Creates a new default instance.
16556            pub fn new() -> Self {
16557                std::default::Default::default()
16558            }
16559
16560            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding].
16561            ///
16562            /// Note that all the setters affecting `encoding` are mutually
16563            /// exclusive.
16564            ///
16565            /// # Example
16566            /// ```ignore,no_run
16567            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16568            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16569            /// let x = Encoding::new().set_encoding(Some(
16570            ///     google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Encoding::Raw(Raw::default().into())));
16571            /// ```
16572            pub fn set_encoding<
16573                T: std::convert::Into<
16574                        std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16575                    >,
16576            >(
16577                mut self,
16578                v: T,
16579            ) -> Self {
16580                self.encoding = v.into();
16581                self
16582            }
16583
16584            /// The value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16585            /// if it holds a `Raw`, `None` if the field is not set or
16586            /// holds a different branch.
16587            pub fn raw(
16588                &self,
16589            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>
16590            {
16591                #[allow(unreachable_patterns)]
16592                self.encoding.as_ref().and_then(|v| match v {
16593                    crate::model::r#type::bytes::encoding::Encoding::Raw(v) => {
16594                        std::option::Option::Some(v)
16595                    }
16596                    _ => std::option::Option::None,
16597                })
16598            }
16599
16600            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16601            /// to hold a `Raw`.
16602            ///
16603            /// Note that all the setters affecting `encoding` are
16604            /// mutually exclusive.
16605            ///
16606            /// # Example
16607            /// ```ignore,no_run
16608            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16609            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16610            /// let x = Encoding::new().set_raw(Raw::default()/* use setters */);
16611            /// assert!(x.raw().is_some());
16612            /// ```
16613            pub fn set_raw<
16614                T: std::convert::Into<std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>,
16615            >(
16616                mut self,
16617                v: T,
16618            ) -> Self {
16619                self.encoding = std::option::Option::Some(
16620                    crate::model::r#type::bytes::encoding::Encoding::Raw(v.into()),
16621                );
16622                self
16623            }
16624        }
16625
16626        impl wkt::message::Message for Encoding {
16627            fn typename() -> &'static str {
16628                "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding"
16629            }
16630        }
16631
16632        /// Defines additional types related to [Encoding].
16633        pub mod encoding {
16634            #[allow(unused_imports)]
16635            use super::*;
16636
16637            /// Leaves the value as-is.
16638            ///
16639            /// Sorted mode: all values are supported.
16640            ///
16641            /// Distinct mode: all values are supported.
16642            #[derive(Clone, Default, PartialEq)]
16643            #[non_exhaustive]
16644            pub struct Raw {
16645                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16646            }
16647
16648            impl Raw {
16649                /// Creates a new default instance.
16650                pub fn new() -> Self {
16651                    std::default::Default::default()
16652                }
16653            }
16654
16655            impl wkt::message::Message for Raw {
16656                fn typename() -> &'static str {
16657                    "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding.Raw"
16658                }
16659            }
16660
16661            /// Which encoding to use.
16662            #[derive(Clone, Debug, PartialEq)]
16663            #[non_exhaustive]
16664            pub enum Encoding {
16665                /// Use `Raw` encoding.
16666                Raw(std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>),
16667            }
16668        }
16669    }
16670
16671    /// String
16672    /// Values of type `String` are stored in `Value.string_value`.
16673    #[derive(Clone, Default, PartialEq)]
16674    #[non_exhaustive]
16675    pub struct String {
16676        /// The encoding to use when converting to or from lower level types.
16677        pub encoding: std::option::Option<crate::model::r#type::string::Encoding>,
16678
16679        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16680    }
16681
16682    impl String {
16683        /// Creates a new default instance.
16684        pub fn new() -> Self {
16685            std::default::Default::default()
16686        }
16687
16688        /// Sets the value of [encoding][crate::model::r#type::String::encoding].
16689        ///
16690        /// # Example
16691        /// ```ignore,no_run
16692        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16693        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16694        /// let x = String::new().set_encoding(Encoding::default()/* use setters */);
16695        /// ```
16696        pub fn set_encoding<T>(mut self, v: T) -> Self
16697        where
16698            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16699        {
16700            self.encoding = std::option::Option::Some(v.into());
16701            self
16702        }
16703
16704        /// Sets or clears the value of [encoding][crate::model::r#type::String::encoding].
16705        ///
16706        /// # Example
16707        /// ```ignore,no_run
16708        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16709        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16710        /// let x = String::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16711        /// let x = String::new().set_or_clear_encoding(None::<Encoding>);
16712        /// ```
16713        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16714        where
16715            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16716        {
16717            self.encoding = v.map(|x| x.into());
16718            self
16719        }
16720    }
16721
16722    impl wkt::message::Message for String {
16723        fn typename() -> &'static str {
16724            "type.googleapis.com/google.bigtable.admin.v2.Type.String"
16725        }
16726    }
16727
16728    /// Defines additional types related to [String].
16729    pub mod string {
16730        #[allow(unused_imports)]
16731        use super::*;
16732
16733        /// Rules used to convert to or from lower level types.
16734        #[derive(Clone, Default, PartialEq)]
16735        #[non_exhaustive]
16736        pub struct Encoding {
16737            /// Which encoding to use.
16738            pub encoding: std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16739
16740            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16741        }
16742
16743        impl Encoding {
16744            /// Creates a new default instance.
16745            pub fn new() -> Self {
16746                std::default::Default::default()
16747            }
16748
16749            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding].
16750            ///
16751            /// Note that all the setters affecting `encoding` are mutually
16752            /// exclusive.
16753            ///
16754            /// # Example
16755            /// ```ignore,no_run
16756            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16757            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
16758            /// let x = Encoding::new().set_encoding(Some(
16759            ///     google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Encoding::Utf8Bytes(Utf8Bytes::default().into())));
16760            /// ```
16761            pub fn set_encoding<
16762                T: std::convert::Into<
16763                        std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16764                    >,
16765            >(
16766                mut self,
16767                v: T,
16768            ) -> Self {
16769                self.encoding = v.into();
16770                self
16771            }
16772
16773            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
16774            /// if it holds a `Utf8Raw`, `None` if the field is not set or
16775            /// holds a different branch.
16776            #[deprecated]
16777            pub fn utf8_raw(
16778                &self,
16779            ) -> std::option::Option<
16780                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
16781            > {
16782                #[allow(unreachable_patterns)]
16783                self.encoding.as_ref().and_then(|v| match v {
16784                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v) => {
16785                        std::option::Option::Some(v)
16786                    }
16787                    _ => std::option::Option::None,
16788                })
16789            }
16790
16791            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
16792            /// to hold a `Utf8Raw`.
16793            ///
16794            /// Note that all the setters affecting `encoding` are
16795            /// mutually exclusive.
16796            ///
16797            /// # Example
16798            /// ```ignore,no_run
16799            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16800            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Raw;
16801            /// let x = Encoding::new().set_utf8_raw(Utf8Raw::default()/* use setters */);
16802            /// assert!(x.utf8_raw().is_some());
16803            /// assert!(x.utf8_bytes().is_none());
16804            /// ```
16805            #[deprecated]
16806            pub fn set_utf8_raw<
16807                T: std::convert::Into<
16808                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
16809                    >,
16810            >(
16811                mut self,
16812                v: T,
16813            ) -> Self {
16814                self.encoding = std::option::Option::Some(
16815                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v.into()),
16816                );
16817                self
16818            }
16819
16820            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
16821            /// if it holds a `Utf8Bytes`, `None` if the field is not set or
16822            /// holds a different branch.
16823            pub fn utf8_bytes(
16824                &self,
16825            ) -> std::option::Option<
16826                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
16827            > {
16828                #[allow(unreachable_patterns)]
16829                self.encoding.as_ref().and_then(|v| match v {
16830                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v) => {
16831                        std::option::Option::Some(v)
16832                    }
16833                    _ => std::option::Option::None,
16834                })
16835            }
16836
16837            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
16838            /// to hold a `Utf8Bytes`.
16839            ///
16840            /// Note that all the setters affecting `encoding` are
16841            /// mutually exclusive.
16842            ///
16843            /// # Example
16844            /// ```ignore,no_run
16845            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16846            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
16847            /// let x = Encoding::new().set_utf8_bytes(Utf8Bytes::default()/* use setters */);
16848            /// assert!(x.utf8_bytes().is_some());
16849            /// assert!(x.utf8_raw().is_none());
16850            /// ```
16851            pub fn set_utf8_bytes<
16852                T: std::convert::Into<
16853                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
16854                    >,
16855            >(
16856                mut self,
16857                v: T,
16858            ) -> Self {
16859                self.encoding = std::option::Option::Some(
16860                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v.into()),
16861                );
16862                self
16863            }
16864        }
16865
16866        impl wkt::message::Message for Encoding {
16867            fn typename() -> &'static str {
16868                "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding"
16869            }
16870        }
16871
16872        /// Defines additional types related to [Encoding].
16873        pub mod encoding {
16874            #[allow(unused_imports)]
16875            use super::*;
16876
16877            /// Deprecated: prefer the equivalent `Utf8Bytes`.
16878            #[derive(Clone, Default, PartialEq)]
16879            #[non_exhaustive]
16880            #[deprecated]
16881            pub struct Utf8Raw {
16882                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16883            }
16884
16885            impl Utf8Raw {
16886                /// Creates a new default instance.
16887                pub fn new() -> Self {
16888                    std::default::Default::default()
16889                }
16890            }
16891
16892            impl wkt::message::Message for Utf8Raw {
16893                fn typename() -> &'static str {
16894                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw"
16895                }
16896            }
16897
16898            /// UTF-8 encoding.
16899            ///
16900            /// Sorted mode:
16901            ///
16902            /// - All values are supported.
16903            /// - Code point order is preserved.
16904            ///
16905            /// Distinct mode: all values are supported.
16906            ///
16907            /// Compatible with:
16908            ///
16909            /// - BigQuery `TEXT` encoding
16910            /// - HBase `Bytes.toBytes`
16911            /// - Java `String#getBytes(StandardCharsets.UTF_8)`
16912            #[derive(Clone, Default, PartialEq)]
16913            #[non_exhaustive]
16914            pub struct Utf8Bytes {
16915                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16916            }
16917
16918            impl Utf8Bytes {
16919                /// Creates a new default instance.
16920                pub fn new() -> Self {
16921                    std::default::Default::default()
16922                }
16923            }
16924
16925            impl wkt::message::Message for Utf8Bytes {
16926                fn typename() -> &'static str {
16927                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes"
16928                }
16929            }
16930
16931            /// Which encoding to use.
16932            #[derive(Clone, Debug, PartialEq)]
16933            #[non_exhaustive]
16934            pub enum Encoding {
16935                /// Deprecated: if set, converts to an empty `utf8_bytes`.
16936                #[deprecated]
16937                Utf8Raw(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>),
16938                /// Use `Utf8Bytes` encoding.
16939                Utf8Bytes(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>),
16940            }
16941        }
16942    }
16943
16944    /// Int64
16945    /// Values of type `Int64` are stored in `Value.int_value`.
16946    #[derive(Clone, Default, PartialEq)]
16947    #[non_exhaustive]
16948    pub struct Int64 {
16949        /// The encoding to use when converting to or from lower level types.
16950        pub encoding: std::option::Option<crate::model::r#type::int_64::Encoding>,
16951
16952        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16953    }
16954
16955    impl Int64 {
16956        /// Creates a new default instance.
16957        pub fn new() -> Self {
16958            std::default::Default::default()
16959        }
16960
16961        /// Sets the value of [encoding][crate::model::r#type::Int64::encoding].
16962        ///
16963        /// # Example
16964        /// ```ignore,no_run
16965        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
16966        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16967        /// let x = Int64::new().set_encoding(Encoding::default()/* use setters */);
16968        /// ```
16969        pub fn set_encoding<T>(mut self, v: T) -> Self
16970        where
16971            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
16972        {
16973            self.encoding = std::option::Option::Some(v.into());
16974            self
16975        }
16976
16977        /// Sets or clears the value of [encoding][crate::model::r#type::Int64::encoding].
16978        ///
16979        /// # Example
16980        /// ```ignore,no_run
16981        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
16982        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
16983        /// let x = Int64::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16984        /// let x = Int64::new().set_or_clear_encoding(None::<Encoding>);
16985        /// ```
16986        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16987        where
16988            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
16989        {
16990            self.encoding = v.map(|x| x.into());
16991            self
16992        }
16993    }
16994
16995    impl wkt::message::Message for Int64 {
16996        fn typename() -> &'static str {
16997            "type.googleapis.com/google.bigtable.admin.v2.Type.Int64"
16998        }
16999    }
17000
17001    /// Defines additional types related to [Int64].
17002    pub mod int_64 {
17003        #[allow(unused_imports)]
17004        use super::*;
17005
17006        /// Rules used to convert to or from lower level types.
17007        #[derive(Clone, Default, PartialEq)]
17008        #[non_exhaustive]
17009        pub struct Encoding {
17010            /// Which encoding to use.
17011            pub encoding: std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
17012
17013            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17014        }
17015
17016        impl Encoding {
17017            /// Creates a new default instance.
17018            pub fn new() -> Self {
17019                std::default::Default::default()
17020            }
17021
17022            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding].
17023            ///
17024            /// Note that all the setters affecting `encoding` are mutually
17025            /// exclusive.
17026            ///
17027            /// # Example
17028            /// ```ignore,no_run
17029            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17030            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17031            /// let x = Encoding::new().set_encoding(Some(
17032            ///     google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::Encoding::BigEndianBytes(BigEndianBytes::default().into())));
17033            /// ```
17034            pub fn set_encoding<
17035                T: std::convert::Into<
17036                        std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
17037                    >,
17038            >(
17039                mut self,
17040                v: T,
17041            ) -> Self {
17042                self.encoding = v.into();
17043                self
17044            }
17045
17046            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17047            /// if it holds a `BigEndianBytes`, `None` if the field is not set or
17048            /// holds a different branch.
17049            pub fn big_endian_bytes(
17050                &self,
17051            ) -> std::option::Option<
17052                &std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17053            > {
17054                #[allow(unreachable_patterns)]
17055                self.encoding.as_ref().and_then(|v| match v {
17056                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v) => {
17057                        std::option::Option::Some(v)
17058                    }
17059                    _ => std::option::Option::None,
17060                })
17061            }
17062
17063            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17064            /// to hold a `BigEndianBytes`.
17065            ///
17066            /// Note that all the setters affecting `encoding` are
17067            /// mutually exclusive.
17068            ///
17069            /// # Example
17070            /// ```ignore,no_run
17071            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17072            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17073            /// let x = Encoding::new().set_big_endian_bytes(BigEndianBytes::default()/* use setters */);
17074            /// assert!(x.big_endian_bytes().is_some());
17075            /// assert!(x.ordered_code_bytes().is_none());
17076            /// ```
17077            pub fn set_big_endian_bytes<
17078                T: std::convert::Into<
17079                        std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17080                    >,
17081            >(
17082                mut self,
17083                v: T,
17084            ) -> Self {
17085                self.encoding = std::option::Option::Some(
17086                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v.into()),
17087                );
17088                self
17089            }
17090
17091            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17092            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
17093            /// holds a different branch.
17094            pub fn ordered_code_bytes(
17095                &self,
17096            ) -> std::option::Option<
17097                &std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17098            > {
17099                #[allow(unreachable_patterns)]
17100                self.encoding.as_ref().and_then(|v| match v {
17101                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v) => {
17102                        std::option::Option::Some(v)
17103                    }
17104                    _ => std::option::Option::None,
17105                })
17106            }
17107
17108            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17109            /// to hold a `OrderedCodeBytes`.
17110            ///
17111            /// Note that all the setters affecting `encoding` are
17112            /// mutually exclusive.
17113            ///
17114            /// # Example
17115            /// ```ignore,no_run
17116            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17117            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::OrderedCodeBytes;
17118            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
17119            /// assert!(x.ordered_code_bytes().is_some());
17120            /// assert!(x.big_endian_bytes().is_none());
17121            /// ```
17122            pub fn set_ordered_code_bytes<
17123                T: std::convert::Into<
17124                        std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17125                    >,
17126            >(
17127                mut self,
17128                v: T,
17129            ) -> Self {
17130                self.encoding = std::option::Option::Some(
17131                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v.into()),
17132                );
17133                self
17134            }
17135        }
17136
17137        impl wkt::message::Message for Encoding {
17138            fn typename() -> &'static str {
17139                "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding"
17140            }
17141        }
17142
17143        /// Defines additional types related to [Encoding].
17144        pub mod encoding {
17145            #[allow(unused_imports)]
17146            use super::*;
17147
17148            /// Encodes the value as an 8-byte big-endian two's complement value.
17149            ///
17150            /// Sorted mode: non-negative values are supported.
17151            ///
17152            /// Distinct mode: all values are supported.
17153            ///
17154            /// Compatible with:
17155            ///
17156            /// - BigQuery `BINARY` encoding
17157            /// - HBase `Bytes.toBytes`
17158            /// - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
17159            #[derive(Clone, Default, PartialEq)]
17160            #[non_exhaustive]
17161            pub struct BigEndianBytes {
17162                /// Deprecated: ignored if set.
17163                #[deprecated]
17164                pub bytes_type: std::option::Option<crate::model::r#type::Bytes>,
17165
17166                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17167            }
17168
17169            impl BigEndianBytes {
17170                /// Creates a new default instance.
17171                pub fn new() -> Self {
17172                    std::default::Default::default()
17173                }
17174
17175                /// Sets the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
17176                ///
17177                /// # Example
17178                /// ```ignore,no_run
17179                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17180                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17181                /// let x = BigEndianBytes::new().set_bytes_type(Bytes::default()/* use setters */);
17182                /// ```
17183                #[deprecated]
17184                pub fn set_bytes_type<T>(mut self, v: T) -> Self
17185                where
17186                    T: std::convert::Into<crate::model::r#type::Bytes>,
17187                {
17188                    self.bytes_type = std::option::Option::Some(v.into());
17189                    self
17190                }
17191
17192                /// Sets or clears the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
17193                ///
17194                /// # Example
17195                /// ```ignore,no_run
17196                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17197                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17198                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(Some(Bytes::default()/* use setters */));
17199                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(None::<Bytes>);
17200                /// ```
17201                #[deprecated]
17202                pub fn set_or_clear_bytes_type<T>(mut self, v: std::option::Option<T>) -> Self
17203                where
17204                    T: std::convert::Into<crate::model::r#type::Bytes>,
17205                {
17206                    self.bytes_type = v.map(|x| x.into());
17207                    self
17208                }
17209            }
17210
17211            impl wkt::message::Message for BigEndianBytes {
17212                fn typename() -> &'static str {
17213                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes"
17214                }
17215            }
17216
17217            /// Encodes the value in a variable length binary format of up to 10 bytes.
17218            /// Values that are closer to zero use fewer bytes.
17219            ///
17220            /// Sorted mode: all values are supported.
17221            ///
17222            /// Distinct mode: all values are supported.
17223            #[derive(Clone, Default, PartialEq)]
17224            #[non_exhaustive]
17225            pub struct OrderedCodeBytes {
17226                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17227            }
17228
17229            impl OrderedCodeBytes {
17230                /// Creates a new default instance.
17231                pub fn new() -> Self {
17232                    std::default::Default::default()
17233                }
17234            }
17235
17236            impl wkt::message::Message for OrderedCodeBytes {
17237                fn typename() -> &'static str {
17238                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes"
17239                }
17240            }
17241
17242            /// Which encoding to use.
17243            #[derive(Clone, Debug, PartialEq)]
17244            #[non_exhaustive]
17245            pub enum Encoding {
17246                /// Use `BigEndianBytes` encoding.
17247                BigEndianBytes(
17248                    std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17249                ),
17250                /// Use `OrderedCodeBytes` encoding.
17251                OrderedCodeBytes(
17252                    std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17253                ),
17254            }
17255        }
17256    }
17257
17258    /// bool
17259    /// Values of type `Bool` are stored in `Value.bool_value`.
17260    #[derive(Clone, Default, PartialEq)]
17261    #[non_exhaustive]
17262    pub struct Bool {
17263        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17264    }
17265
17266    impl Bool {
17267        /// Creates a new default instance.
17268        pub fn new() -> Self {
17269            std::default::Default::default()
17270        }
17271    }
17272
17273    impl wkt::message::Message for Bool {
17274        fn typename() -> &'static str {
17275            "type.googleapis.com/google.bigtable.admin.v2.Type.Bool"
17276        }
17277    }
17278
17279    /// Float32
17280    /// Values of type `Float32` are stored in `Value.float_value`.
17281    #[derive(Clone, Default, PartialEq)]
17282    #[non_exhaustive]
17283    pub struct Float32 {
17284        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17285    }
17286
17287    impl Float32 {
17288        /// Creates a new default instance.
17289        pub fn new() -> Self {
17290            std::default::Default::default()
17291        }
17292    }
17293
17294    impl wkt::message::Message for Float32 {
17295        fn typename() -> &'static str {
17296            "type.googleapis.com/google.bigtable.admin.v2.Type.Float32"
17297        }
17298    }
17299
17300    /// Float64
17301    /// Values of type `Float64` are stored in `Value.float_value`.
17302    #[derive(Clone, Default, PartialEq)]
17303    #[non_exhaustive]
17304    pub struct Float64 {
17305        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17306    }
17307
17308    impl Float64 {
17309        /// Creates a new default instance.
17310        pub fn new() -> Self {
17311            std::default::Default::default()
17312        }
17313    }
17314
17315    impl wkt::message::Message for Float64 {
17316        fn typename() -> &'static str {
17317            "type.googleapis.com/google.bigtable.admin.v2.Type.Float64"
17318        }
17319    }
17320
17321    /// Timestamp
17322    /// Values of type `Timestamp` are stored in `Value.timestamp_value`.
17323    #[derive(Clone, Default, PartialEq)]
17324    #[non_exhaustive]
17325    pub struct Timestamp {
17326        /// The encoding to use when converting to or from lower level types.
17327        pub encoding: std::option::Option<crate::model::r#type::timestamp::Encoding>,
17328
17329        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17330    }
17331
17332    impl Timestamp {
17333        /// Creates a new default instance.
17334        pub fn new() -> Self {
17335            std::default::Default::default()
17336        }
17337
17338        /// Sets the value of [encoding][crate::model::r#type::Timestamp::encoding].
17339        ///
17340        /// # Example
17341        /// ```ignore,no_run
17342        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17343        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17344        /// let x = Timestamp::new().set_encoding(Encoding::default()/* use setters */);
17345        /// ```
17346        pub fn set_encoding<T>(mut self, v: T) -> Self
17347        where
17348            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
17349        {
17350            self.encoding = std::option::Option::Some(v.into());
17351            self
17352        }
17353
17354        /// Sets or clears the value of [encoding][crate::model::r#type::Timestamp::encoding].
17355        ///
17356        /// # Example
17357        /// ```ignore,no_run
17358        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17359        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17360        /// let x = Timestamp::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17361        /// let x = Timestamp::new().set_or_clear_encoding(None::<Encoding>);
17362        /// ```
17363        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17364        where
17365            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
17366        {
17367            self.encoding = v.map(|x| x.into());
17368            self
17369        }
17370    }
17371
17372    impl wkt::message::Message for Timestamp {
17373        fn typename() -> &'static str {
17374            "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp"
17375        }
17376    }
17377
17378    /// Defines additional types related to [Timestamp].
17379    pub mod timestamp {
17380        #[allow(unused_imports)]
17381        use super::*;
17382
17383        /// Rules used to convert to or from lower level types.
17384        #[derive(Clone, Default, PartialEq)]
17385        #[non_exhaustive]
17386        pub struct Encoding {
17387            /// Which encoding to use.
17388            pub encoding: std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
17389
17390            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17391        }
17392
17393        impl Encoding {
17394            /// Creates a new default instance.
17395            pub fn new() -> Self {
17396                std::default::Default::default()
17397            }
17398
17399            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding].
17400            ///
17401            /// Note that all the setters affecting `encoding` are mutually
17402            /// exclusive.
17403            ///
17404            /// # Example
17405            /// ```ignore,no_run
17406            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17407            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
17408            /// let x = Encoding::new().set_encoding(Some(
17409            ///     google_cloud_bigtable_admin_v2::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(UnixMicrosInt64::default().into())));
17410            /// ```
17411            pub fn set_encoding<
17412                T: std::convert::Into<
17413                        std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
17414                    >,
17415            >(
17416                mut self,
17417                v: T,
17418            ) -> Self {
17419                self.encoding = v.into();
17420                self
17421            }
17422
17423            /// The value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
17424            /// if it holds a `UnixMicrosInt64`, `None` if the field is not set or
17425            /// holds a different branch.
17426            pub fn unix_micros_int64(
17427                &self,
17428            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::int_64::Encoding>>
17429            {
17430                #[allow(unreachable_patterns)]
17431                self.encoding.as_ref().and_then(|v| match v {
17432                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v) => {
17433                        std::option::Option::Some(v)
17434                    }
17435                    _ => std::option::Option::None,
17436                })
17437            }
17438
17439            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
17440            /// to hold a `UnixMicrosInt64`.
17441            ///
17442            /// Note that all the setters affecting `encoding` are
17443            /// mutually exclusive.
17444            ///
17445            /// # Example
17446            /// ```ignore,no_run
17447            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17448            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
17449            /// let x = Encoding::new().set_unix_micros_int64(UnixMicrosInt64::default()/* use setters */);
17450            /// assert!(x.unix_micros_int64().is_some());
17451            /// ```
17452            pub fn set_unix_micros_int64<
17453                T: std::convert::Into<std::boxed::Box<crate::model::r#type::int_64::Encoding>>,
17454            >(
17455                mut self,
17456                v: T,
17457            ) -> Self {
17458                self.encoding = std::option::Option::Some(
17459                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v.into()),
17460                );
17461                self
17462            }
17463        }
17464
17465        impl wkt::message::Message for Encoding {
17466            fn typename() -> &'static str {
17467                "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp.Encoding"
17468            }
17469        }
17470
17471        /// Defines additional types related to [Encoding].
17472        pub mod encoding {
17473            #[allow(unused_imports)]
17474            use super::*;
17475
17476            /// Which encoding to use.
17477            #[derive(Clone, Debug, PartialEq)]
17478            #[non_exhaustive]
17479            pub enum Encoding {
17480                /// Encodes the number of microseconds since the Unix epoch using the
17481                /// given `Int64` encoding. Values must be microsecond-aligned.
17482                ///
17483                /// Compatible with:
17484                ///
17485                /// - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
17486                UnixMicrosInt64(std::boxed::Box<crate::model::r#type::int_64::Encoding>),
17487            }
17488        }
17489    }
17490
17491    /// Date
17492    /// Values of type `Date` are stored in `Value.date_value`.
17493    #[derive(Clone, Default, PartialEq)]
17494    #[non_exhaustive]
17495    pub struct Date {
17496        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17497    }
17498
17499    impl Date {
17500        /// Creates a new default instance.
17501        pub fn new() -> Self {
17502            std::default::Default::default()
17503        }
17504    }
17505
17506    impl wkt::message::Message for Date {
17507        fn typename() -> &'static str {
17508            "type.googleapis.com/google.bigtable.admin.v2.Type.Date"
17509        }
17510    }
17511
17512    /// A structured data value, consisting of fields which map to dynamically
17513    /// typed values.
17514    /// Values of type `Struct` are stored in `Value.array_value` where entries are
17515    /// in the same order and number as `field_types`.
17516    #[derive(Clone, Default, PartialEq)]
17517    #[non_exhaustive]
17518    pub struct Struct {
17519        /// The names and types of the fields in this struct.
17520        pub fields: std::vec::Vec<crate::model::r#type::r#struct::Field>,
17521
17522        /// The encoding to use when converting to or from lower level types.
17523        pub encoding: std::option::Option<crate::model::r#type::r#struct::Encoding>,
17524
17525        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17526    }
17527
17528    impl Struct {
17529        /// Creates a new default instance.
17530        pub fn new() -> Self {
17531            std::default::Default::default()
17532        }
17533
17534        /// Sets the value of [fields][crate::model::r#type::Struct::fields].
17535        ///
17536        /// # Example
17537        /// ```ignore,no_run
17538        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17539        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17540        /// let x = Struct::new()
17541        ///     .set_fields([
17542        ///         Field::default()/* use setters */,
17543        ///         Field::default()/* use (different) setters */,
17544        ///     ]);
17545        /// ```
17546        pub fn set_fields<T, V>(mut self, v: T) -> Self
17547        where
17548            T: std::iter::IntoIterator<Item = V>,
17549            V: std::convert::Into<crate::model::r#type::r#struct::Field>,
17550        {
17551            use std::iter::Iterator;
17552            self.fields = v.into_iter().map(|i| i.into()).collect();
17553            self
17554        }
17555
17556        /// Sets the value of [encoding][crate::model::r#type::Struct::encoding].
17557        ///
17558        /// # Example
17559        /// ```ignore,no_run
17560        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17561        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17562        /// let x = Struct::new().set_encoding(Encoding::default()/* use setters */);
17563        /// ```
17564        pub fn set_encoding<T>(mut self, v: T) -> Self
17565        where
17566            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17567        {
17568            self.encoding = std::option::Option::Some(v.into());
17569            self
17570        }
17571
17572        /// Sets or clears the value of [encoding][crate::model::r#type::Struct::encoding].
17573        ///
17574        /// # Example
17575        /// ```ignore,no_run
17576        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17577        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17578        /// let x = Struct::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17579        /// let x = Struct::new().set_or_clear_encoding(None::<Encoding>);
17580        /// ```
17581        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17582        where
17583            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17584        {
17585            self.encoding = v.map(|x| x.into());
17586            self
17587        }
17588    }
17589
17590    impl wkt::message::Message for Struct {
17591        fn typename() -> &'static str {
17592            "type.googleapis.com/google.bigtable.admin.v2.Type.Struct"
17593        }
17594    }
17595
17596    /// Defines additional types related to [Struct].
17597    pub mod r#struct {
17598        #[allow(unused_imports)]
17599        use super::*;
17600
17601        /// A struct field and its type.
17602        #[derive(Clone, Default, PartialEq)]
17603        #[non_exhaustive]
17604        pub struct Field {
17605            /// The field name (optional). Fields without a `field_name` are considered
17606            /// anonymous and cannot be referenced by name.
17607            pub field_name: std::string::String,
17608
17609            /// The type of values in this field.
17610            pub r#type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17611
17612            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17613        }
17614
17615        impl Field {
17616            /// Creates a new default instance.
17617            pub fn new() -> Self {
17618                std::default::Default::default()
17619            }
17620
17621            /// Sets the value of [field_name][crate::model::r#type::r#struct::Field::field_name].
17622            ///
17623            /// # Example
17624            /// ```ignore,no_run
17625            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17626            /// let x = Field::new().set_field_name("example");
17627            /// ```
17628            pub fn set_field_name<T: std::convert::Into<std::string::String>>(
17629                mut self,
17630                v: T,
17631            ) -> Self {
17632                self.field_name = v.into();
17633                self
17634            }
17635
17636            /// Sets the value of [r#type][crate::model::r#type::r#struct::Field::type].
17637            ///
17638            /// # Example
17639            /// ```ignore,no_run
17640            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17641            /// use google_cloud_bigtable_admin_v2::model::Type;
17642            /// let x = Field::new().set_type(Type::default()/* use setters */);
17643            /// ```
17644            pub fn set_type<T>(mut self, v: T) -> Self
17645            where
17646                T: std::convert::Into<crate::model::Type>,
17647            {
17648                self.r#type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17649                self
17650            }
17651
17652            /// Sets or clears the value of [r#type][crate::model::r#type::r#struct::Field::type].
17653            ///
17654            /// # Example
17655            /// ```ignore,no_run
17656            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17657            /// use google_cloud_bigtable_admin_v2::model::Type;
17658            /// let x = Field::new().set_or_clear_type(Some(Type::default()/* use setters */));
17659            /// let x = Field::new().set_or_clear_type(None::<Type>);
17660            /// ```
17661            pub fn set_or_clear_type<T>(mut self, v: std::option::Option<T>) -> Self
17662            where
17663                T: std::convert::Into<crate::model::Type>,
17664            {
17665                self.r#type = v.map(|x| std::boxed::Box::new(x.into()));
17666                self
17667            }
17668        }
17669
17670        impl wkt::message::Message for Field {
17671            fn typename() -> &'static str {
17672                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Field"
17673            }
17674        }
17675
17676        /// Rules used to convert to or from lower level types.
17677        #[derive(Clone, Default, PartialEq)]
17678        #[non_exhaustive]
17679        pub struct Encoding {
17680            /// Which encoding to use.
17681            pub encoding: std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17682
17683            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17684        }
17685
17686        impl Encoding {
17687            /// Creates a new default instance.
17688            pub fn new() -> Self {
17689                std::default::Default::default()
17690            }
17691
17692            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding].
17693            ///
17694            /// Note that all the setters affecting `encoding` are mutually
17695            /// exclusive.
17696            ///
17697            /// # Example
17698            /// ```ignore,no_run
17699            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17700            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17701            /// let x = Encoding::new().set_encoding(Some(
17702            ///     google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Encoding::Singleton(Singleton::default().into())));
17703            /// ```
17704            pub fn set_encoding<
17705                T: std::convert::Into<
17706                        std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17707                    >,
17708            >(
17709                mut self,
17710                v: T,
17711            ) -> Self {
17712                self.encoding = v.into();
17713                self
17714            }
17715
17716            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17717            /// if it holds a `Singleton`, `None` if the field is not set or
17718            /// holds a different branch.
17719            pub fn singleton(
17720                &self,
17721            ) -> std::option::Option<
17722                &std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17723            > {
17724                #[allow(unreachable_patterns)]
17725                self.encoding.as_ref().and_then(|v| match v {
17726                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v) => {
17727                        std::option::Option::Some(v)
17728                    }
17729                    _ => std::option::Option::None,
17730                })
17731            }
17732
17733            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17734            /// to hold a `Singleton`.
17735            ///
17736            /// Note that all the setters affecting `encoding` are
17737            /// mutually exclusive.
17738            ///
17739            /// # Example
17740            /// ```ignore,no_run
17741            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17742            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17743            /// let x = Encoding::new().set_singleton(Singleton::default()/* use setters */);
17744            /// assert!(x.singleton().is_some());
17745            /// assert!(x.delimited_bytes().is_none());
17746            /// assert!(x.ordered_code_bytes().is_none());
17747            /// ```
17748            pub fn set_singleton<
17749                T: std::convert::Into<
17750                        std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17751                    >,
17752            >(
17753                mut self,
17754                v: T,
17755            ) -> Self {
17756                self.encoding = std::option::Option::Some(
17757                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v.into()),
17758                );
17759                self
17760            }
17761
17762            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17763            /// if it holds a `DelimitedBytes`, `None` if the field is not set or
17764            /// holds a different branch.
17765            pub fn delimited_bytes(
17766                &self,
17767            ) -> std::option::Option<
17768                &std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17769            > {
17770                #[allow(unreachable_patterns)]
17771                self.encoding.as_ref().and_then(|v| match v {
17772                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v) => {
17773                        std::option::Option::Some(v)
17774                    }
17775                    _ => std::option::Option::None,
17776                })
17777            }
17778
17779            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17780            /// to hold a `DelimitedBytes`.
17781            ///
17782            /// Note that all the setters affecting `encoding` are
17783            /// mutually exclusive.
17784            ///
17785            /// # Example
17786            /// ```ignore,no_run
17787            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17788            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
17789            /// let x = Encoding::new().set_delimited_bytes(DelimitedBytes::default()/* use setters */);
17790            /// assert!(x.delimited_bytes().is_some());
17791            /// assert!(x.singleton().is_none());
17792            /// assert!(x.ordered_code_bytes().is_none());
17793            /// ```
17794            pub fn set_delimited_bytes<
17795                T: std::convert::Into<
17796                        std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17797                    >,
17798            >(
17799                mut self,
17800                v: T,
17801            ) -> Self {
17802                self.encoding = std::option::Option::Some(
17803                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v.into()),
17804                );
17805                self
17806            }
17807
17808            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17809            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
17810            /// holds a different branch.
17811            pub fn ordered_code_bytes(
17812                &self,
17813            ) -> std::option::Option<
17814                &std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
17815            > {
17816                #[allow(unreachable_patterns)]
17817                self.encoding.as_ref().and_then(|v| match v {
17818                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v) => {
17819                        std::option::Option::Some(v)
17820                    }
17821                    _ => std::option::Option::None,
17822                })
17823            }
17824
17825            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17826            /// to hold a `OrderedCodeBytes`.
17827            ///
17828            /// Note that all the setters affecting `encoding` are
17829            /// mutually exclusive.
17830            ///
17831            /// # Example
17832            /// ```ignore,no_run
17833            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17834            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::OrderedCodeBytes;
17835            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
17836            /// assert!(x.ordered_code_bytes().is_some());
17837            /// assert!(x.singleton().is_none());
17838            /// assert!(x.delimited_bytes().is_none());
17839            /// ```
17840            pub fn set_ordered_code_bytes<
17841                T: std::convert::Into<
17842                        std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
17843                    >,
17844            >(
17845                mut self,
17846                v: T,
17847            ) -> Self {
17848                self.encoding = std::option::Option::Some(
17849                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v.into()),
17850                );
17851                self
17852            }
17853        }
17854
17855        impl wkt::message::Message for Encoding {
17856            fn typename() -> &'static str {
17857                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding"
17858            }
17859        }
17860
17861        /// Defines additional types related to [Encoding].
17862        pub mod encoding {
17863            #[allow(unused_imports)]
17864            use super::*;
17865
17866            /// Uses the encoding of `fields[0].type` as-is.
17867            /// Only valid if `fields.size == 1`.
17868            #[derive(Clone, Default, PartialEq)]
17869            #[non_exhaustive]
17870            pub struct Singleton {
17871                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17872            }
17873
17874            impl Singleton {
17875                /// Creates a new default instance.
17876                pub fn new() -> Self {
17877                    std::default::Default::default()
17878                }
17879            }
17880
17881            impl wkt::message::Message for Singleton {
17882                fn typename() -> &'static str {
17883                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.Singleton"
17884                }
17885            }
17886
17887            /// Fields are encoded independently and concatenated with a configurable
17888            /// `delimiter` in between.
17889            ///
17890            /// A struct with no fields defined is encoded as a single `delimiter`.
17891            ///
17892            /// Sorted mode:
17893            ///
17894            /// - Fields are encoded in sorted mode.
17895            /// - Encoded field values must not contain any bytes <= `delimiter[0]`
17896            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
17897            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
17898            ///
17899            /// Distinct mode:
17900            ///
17901            /// - Fields are encoded in distinct mode.
17902            /// - Encoded field values must not contain `delimiter[0]`.
17903            #[derive(Clone, Default, PartialEq)]
17904            #[non_exhaustive]
17905            pub struct DelimitedBytes {
17906                /// Byte sequence used to delimit concatenated fields. The delimiter must
17907                /// contain at least 1 character and at most 50 characters.
17908                pub delimiter: ::bytes::Bytes,
17909
17910                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17911            }
17912
17913            impl DelimitedBytes {
17914                /// Creates a new default instance.
17915                pub fn new() -> Self {
17916                    std::default::Default::default()
17917                }
17918
17919                /// Sets the value of [delimiter][crate::model::r#type::r#struct::encoding::DelimitedBytes::delimiter].
17920                ///
17921                /// # Example
17922                /// ```ignore,no_run
17923                /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
17924                /// let x = DelimitedBytes::new().set_delimiter(bytes::Bytes::from_static(b"example"));
17925                /// ```
17926                pub fn set_delimiter<T: std::convert::Into<::bytes::Bytes>>(
17927                    mut self,
17928                    v: T,
17929                ) -> Self {
17930                    self.delimiter = v.into();
17931                    self
17932                }
17933            }
17934
17935            impl wkt::message::Message for DelimitedBytes {
17936                fn typename() -> &'static str {
17937                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes"
17938                }
17939            }
17940
17941            /// Fields are encoded independently and concatenated with the fixed byte
17942            /// pair {0x00, 0x01} in between.
17943            ///
17944            /// Any null (0x00) byte in an encoded field is replaced by the fixed byte
17945            /// pair {0x00, 0xFF}.
17946            ///
17947            /// Fields that encode to the empty string "" have special handling:
17948            ///
17949            /// - If *every* field encodes to "", or if the STRUCT has no fields
17950            ///   defined, then the STRUCT is encoded as the fixed byte pair
17951            ///   {0x00, 0x00}.
17952            /// - Otherwise, the STRUCT only encodes until the last non-empty field,
17953            ///   omitting any trailing empty fields. Any empty fields that aren't
17954            ///   omitted are replaced with the fixed byte pair {0x00, 0x00}.
17955            ///
17956            /// Examples:
17957            ///
17958            /// - STRUCT()             -> "\00\00"
17959            /// - STRUCT("")           -> "\00\00"
17960            /// - STRUCT("", "")       -> "\00\00"
17961            /// - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
17962            /// - STRUCT("A", "")      -> "A"
17963            /// - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
17964            /// - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
17965            ///
17966            /// Since null bytes are always escaped, this encoding can cause size
17967            /// blowup for encodings like `Int64.BigEndianBytes` that are likely to
17968            /// produce many such bytes.
17969            ///
17970            /// Sorted mode:
17971            ///
17972            /// - Fields are encoded in sorted mode.
17973            /// - All values supported by the field encodings are allowed
17974            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
17975            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
17976            ///
17977            /// Distinct mode:
17978            ///
17979            /// - Fields are encoded in distinct mode.
17980            /// - All values supported by the field encodings are allowed.
17981            #[derive(Clone, Default, PartialEq)]
17982            #[non_exhaustive]
17983            pub struct OrderedCodeBytes {
17984                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17985            }
17986
17987            impl OrderedCodeBytes {
17988                /// Creates a new default instance.
17989                pub fn new() -> Self {
17990                    std::default::Default::default()
17991                }
17992            }
17993
17994            impl wkt::message::Message for OrderedCodeBytes {
17995                fn typename() -> &'static str {
17996                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes"
17997                }
17998            }
17999
18000            /// Which encoding to use.
18001            #[derive(Clone, Debug, PartialEq)]
18002            #[non_exhaustive]
18003            pub enum Encoding {
18004                /// Use `Singleton` encoding.
18005                Singleton(std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>),
18006                /// Use `DelimitedBytes` encoding.
18007                DelimitedBytes(
18008                    std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
18009                ),
18010                /// User `OrderedCodeBytes` encoding.
18011                OrderedCodeBytes(
18012                    std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
18013                ),
18014            }
18015        }
18016    }
18017
18018    /// A protobuf message type.
18019    /// Values of type `Proto` are stored in `Value.bytes_value`.
18020    #[derive(Clone, Default, PartialEq)]
18021    #[non_exhaustive]
18022    pub struct Proto {
18023        /// The ID of the schema bundle that this proto is defined in.
18024        pub schema_bundle_id: std::string::String,
18025
18026        /// The fully qualified name of the protobuf message, including package. In
18027        /// the format of "foo.bar.Message".
18028        pub message_name: std::string::String,
18029
18030        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18031    }
18032
18033    impl Proto {
18034        /// Creates a new default instance.
18035        pub fn new() -> Self {
18036            std::default::Default::default()
18037        }
18038
18039        /// Sets the value of [schema_bundle_id][crate::model::r#type::Proto::schema_bundle_id].
18040        ///
18041        /// # Example
18042        /// ```ignore,no_run
18043        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
18044        /// let x = Proto::new().set_schema_bundle_id("example");
18045        /// ```
18046        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
18047            mut self,
18048            v: T,
18049        ) -> Self {
18050            self.schema_bundle_id = v.into();
18051            self
18052        }
18053
18054        /// Sets the value of [message_name][crate::model::r#type::Proto::message_name].
18055        ///
18056        /// # Example
18057        /// ```ignore,no_run
18058        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
18059        /// let x = Proto::new().set_message_name("example");
18060        /// ```
18061        pub fn set_message_name<T: std::convert::Into<std::string::String>>(
18062            mut self,
18063            v: T,
18064        ) -> Self {
18065            self.message_name = v.into();
18066            self
18067        }
18068    }
18069
18070    impl wkt::message::Message for Proto {
18071        fn typename() -> &'static str {
18072            "type.googleapis.com/google.bigtable.admin.v2.Type.Proto"
18073        }
18074    }
18075
18076    /// A protobuf enum type.
18077    /// Values of type `Enum` are stored in `Value.int_value`.
18078    #[derive(Clone, Default, PartialEq)]
18079    #[non_exhaustive]
18080    pub struct Enum {
18081        /// The ID of the schema bundle that this enum is defined in.
18082        pub schema_bundle_id: std::string::String,
18083
18084        /// The fully qualified name of the protobuf enum message, including package.
18085        /// In the format of "foo.bar.EnumMessage".
18086        pub enum_name: std::string::String,
18087
18088        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18089    }
18090
18091    impl Enum {
18092        /// Creates a new default instance.
18093        pub fn new() -> Self {
18094            std::default::Default::default()
18095        }
18096
18097        /// Sets the value of [schema_bundle_id][crate::model::r#type::Enum::schema_bundle_id].
18098        ///
18099        /// # Example
18100        /// ```ignore,no_run
18101        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
18102        /// let x = Enum::new().set_schema_bundle_id("example");
18103        /// ```
18104        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
18105            mut self,
18106            v: T,
18107        ) -> Self {
18108            self.schema_bundle_id = v.into();
18109            self
18110        }
18111
18112        /// Sets the value of [enum_name][crate::model::r#type::Enum::enum_name].
18113        ///
18114        /// # Example
18115        /// ```ignore,no_run
18116        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
18117        /// let x = Enum::new().set_enum_name("example");
18118        /// ```
18119        pub fn set_enum_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18120            self.enum_name = v.into();
18121            self
18122        }
18123    }
18124
18125    impl wkt::message::Message for Enum {
18126        fn typename() -> &'static str {
18127            "type.googleapis.com/google.bigtable.admin.v2.Type.Enum"
18128        }
18129    }
18130
18131    /// An ordered list of elements of a given type.
18132    /// Values of type `Array` are stored in `Value.array_value`.
18133    #[derive(Clone, Default, PartialEq)]
18134    #[non_exhaustive]
18135    pub struct Array {
18136        /// The type of the elements in the array. This must not be `Array`.
18137        pub element_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18138
18139        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18140    }
18141
18142    impl Array {
18143        /// Creates a new default instance.
18144        pub fn new() -> Self {
18145            std::default::Default::default()
18146        }
18147
18148        /// Sets the value of [element_type][crate::model::r#type::Array::element_type].
18149        ///
18150        /// # Example
18151        /// ```ignore,no_run
18152        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
18153        /// use google_cloud_bigtable_admin_v2::model::Type;
18154        /// let x = Array::new().set_element_type(Type::default()/* use setters */);
18155        /// ```
18156        pub fn set_element_type<T>(mut self, v: T) -> Self
18157        where
18158            T: std::convert::Into<crate::model::Type>,
18159        {
18160            self.element_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18161            self
18162        }
18163
18164        /// Sets or clears the value of [element_type][crate::model::r#type::Array::element_type].
18165        ///
18166        /// # Example
18167        /// ```ignore,no_run
18168        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
18169        /// use google_cloud_bigtable_admin_v2::model::Type;
18170        /// let x = Array::new().set_or_clear_element_type(Some(Type::default()/* use setters */));
18171        /// let x = Array::new().set_or_clear_element_type(None::<Type>);
18172        /// ```
18173        pub fn set_or_clear_element_type<T>(mut self, v: std::option::Option<T>) -> Self
18174        where
18175            T: std::convert::Into<crate::model::Type>,
18176        {
18177            self.element_type = v.map(|x| std::boxed::Box::new(x.into()));
18178            self
18179        }
18180    }
18181
18182    impl wkt::message::Message for Array {
18183        fn typename() -> &'static str {
18184            "type.googleapis.com/google.bigtable.admin.v2.Type.Array"
18185        }
18186    }
18187
18188    /// A mapping of keys to values of a given type.
18189    /// Values of type `Map` are stored in a `Value.array_value` where each entry
18190    /// is another `Value.array_value` with two elements (the key and the value,
18191    /// in that order).
18192    /// Normally encoded Map values won't have repeated keys, however, clients are
18193    /// expected to handle the case in which they do. If the same key appears
18194    /// multiple times, the _last_ value takes precedence.
18195    #[derive(Clone, Default, PartialEq)]
18196    #[non_exhaustive]
18197    pub struct Map {
18198        /// The type of a map key.
18199        /// Only `Bytes`, `String`, and `Int64` are allowed as key types.
18200        pub key_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18201
18202        /// The type of the values in a map.
18203        pub value_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18204
18205        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18206    }
18207
18208    impl Map {
18209        /// Creates a new default instance.
18210        pub fn new() -> Self {
18211            std::default::Default::default()
18212        }
18213
18214        /// Sets the value of [key_type][crate::model::r#type::Map::key_type].
18215        ///
18216        /// # Example
18217        /// ```ignore,no_run
18218        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18219        /// use google_cloud_bigtable_admin_v2::model::Type;
18220        /// let x = Map::new().set_key_type(Type::default()/* use setters */);
18221        /// ```
18222        pub fn set_key_type<T>(mut self, v: T) -> Self
18223        where
18224            T: std::convert::Into<crate::model::Type>,
18225        {
18226            self.key_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18227            self
18228        }
18229
18230        /// Sets or clears the value of [key_type][crate::model::r#type::Map::key_type].
18231        ///
18232        /// # Example
18233        /// ```ignore,no_run
18234        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18235        /// use google_cloud_bigtable_admin_v2::model::Type;
18236        /// let x = Map::new().set_or_clear_key_type(Some(Type::default()/* use setters */));
18237        /// let x = Map::new().set_or_clear_key_type(None::<Type>);
18238        /// ```
18239        pub fn set_or_clear_key_type<T>(mut self, v: std::option::Option<T>) -> Self
18240        where
18241            T: std::convert::Into<crate::model::Type>,
18242        {
18243            self.key_type = v.map(|x| std::boxed::Box::new(x.into()));
18244            self
18245        }
18246
18247        /// Sets the value of [value_type][crate::model::r#type::Map::value_type].
18248        ///
18249        /// # Example
18250        /// ```ignore,no_run
18251        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18252        /// use google_cloud_bigtable_admin_v2::model::Type;
18253        /// let x = Map::new().set_value_type(Type::default()/* use setters */);
18254        /// ```
18255        pub fn set_value_type<T>(mut self, v: T) -> Self
18256        where
18257            T: std::convert::Into<crate::model::Type>,
18258        {
18259            self.value_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18260            self
18261        }
18262
18263        /// Sets or clears the value of [value_type][crate::model::r#type::Map::value_type].
18264        ///
18265        /// # Example
18266        /// ```ignore,no_run
18267        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18268        /// use google_cloud_bigtable_admin_v2::model::Type;
18269        /// let x = Map::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
18270        /// let x = Map::new().set_or_clear_value_type(None::<Type>);
18271        /// ```
18272        pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
18273        where
18274            T: std::convert::Into<crate::model::Type>,
18275        {
18276            self.value_type = v.map(|x| std::boxed::Box::new(x.into()));
18277            self
18278        }
18279    }
18280
18281    impl wkt::message::Message for Map {
18282        fn typename() -> &'static str {
18283            "type.googleapis.com/google.bigtable.admin.v2.Type.Map"
18284        }
18285    }
18286
18287    /// A value that combines incremental updates into a summarized value.
18288    ///
18289    /// Data is never directly written or read using type `Aggregate`. Writes will
18290    /// provide either the `input_type` or `state_type`, and reads will always
18291    /// return the `state_type` .
18292    #[derive(Clone, Default, PartialEq)]
18293    #[non_exhaustive]
18294    pub struct Aggregate {
18295        /// Type of the inputs that are accumulated by this `Aggregate`, which must
18296        /// specify a full encoding.
18297        /// Use `AddInput` mutations to accumulate new inputs.
18298        pub input_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18299
18300        /// Output only. Type that holds the internal accumulator state for the
18301        /// `Aggregate`. This is a function of the `input_type` and `aggregator`
18302        /// chosen, and will always specify a full encoding.
18303        pub state_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18304
18305        /// Which aggregator function to use. The configured types must match.
18306        pub aggregator: std::option::Option<crate::model::r#type::aggregate::Aggregator>,
18307
18308        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18309    }
18310
18311    impl Aggregate {
18312        /// Creates a new default instance.
18313        pub fn new() -> Self {
18314            std::default::Default::default()
18315        }
18316
18317        /// Sets the value of [input_type][crate::model::r#type::Aggregate::input_type].
18318        ///
18319        /// # Example
18320        /// ```ignore,no_run
18321        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18322        /// use google_cloud_bigtable_admin_v2::model::Type;
18323        /// let x = Aggregate::new().set_input_type(Type::default()/* use setters */);
18324        /// ```
18325        pub fn set_input_type<T>(mut self, v: T) -> Self
18326        where
18327            T: std::convert::Into<crate::model::Type>,
18328        {
18329            self.input_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18330            self
18331        }
18332
18333        /// Sets or clears the value of [input_type][crate::model::r#type::Aggregate::input_type].
18334        ///
18335        /// # Example
18336        /// ```ignore,no_run
18337        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18338        /// use google_cloud_bigtable_admin_v2::model::Type;
18339        /// let x = Aggregate::new().set_or_clear_input_type(Some(Type::default()/* use setters */));
18340        /// let x = Aggregate::new().set_or_clear_input_type(None::<Type>);
18341        /// ```
18342        pub fn set_or_clear_input_type<T>(mut self, v: std::option::Option<T>) -> Self
18343        where
18344            T: std::convert::Into<crate::model::Type>,
18345        {
18346            self.input_type = v.map(|x| std::boxed::Box::new(x.into()));
18347            self
18348        }
18349
18350        /// Sets the value of [state_type][crate::model::r#type::Aggregate::state_type].
18351        ///
18352        /// # Example
18353        /// ```ignore,no_run
18354        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18355        /// use google_cloud_bigtable_admin_v2::model::Type;
18356        /// let x = Aggregate::new().set_state_type(Type::default()/* use setters */);
18357        /// ```
18358        pub fn set_state_type<T>(mut self, v: T) -> Self
18359        where
18360            T: std::convert::Into<crate::model::Type>,
18361        {
18362            self.state_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18363            self
18364        }
18365
18366        /// Sets or clears the value of [state_type][crate::model::r#type::Aggregate::state_type].
18367        ///
18368        /// # Example
18369        /// ```ignore,no_run
18370        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18371        /// use google_cloud_bigtable_admin_v2::model::Type;
18372        /// let x = Aggregate::new().set_or_clear_state_type(Some(Type::default()/* use setters */));
18373        /// let x = Aggregate::new().set_or_clear_state_type(None::<Type>);
18374        /// ```
18375        pub fn set_or_clear_state_type<T>(mut self, v: std::option::Option<T>) -> Self
18376        where
18377            T: std::convert::Into<crate::model::Type>,
18378        {
18379            self.state_type = v.map(|x| std::boxed::Box::new(x.into()));
18380            self
18381        }
18382
18383        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator].
18384        ///
18385        /// Note that all the setters affecting `aggregator` are mutually
18386        /// exclusive.
18387        ///
18388        /// # Example
18389        /// ```ignore,no_run
18390        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18391        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
18392        /// let x = Aggregate::new().set_aggregator(Some(
18393        ///     google_cloud_bigtable_admin_v2::model::r#type::aggregate::Aggregator::Sum(Sum::default().into())));
18394        /// ```
18395        pub fn set_aggregator<
18396            T: std::convert::Into<std::option::Option<crate::model::r#type::aggregate::Aggregator>>,
18397        >(
18398            mut self,
18399            v: T,
18400        ) -> Self {
18401            self.aggregator = v.into();
18402            self
18403        }
18404
18405        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18406        /// if it holds a `Sum`, `None` if the field is not set or
18407        /// holds a different branch.
18408        pub fn sum(
18409            &self,
18410        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Sum>> {
18411            #[allow(unreachable_patterns)]
18412            self.aggregator.as_ref().and_then(|v| match v {
18413                crate::model::r#type::aggregate::Aggregator::Sum(v) => std::option::Option::Some(v),
18414                _ => std::option::Option::None,
18415            })
18416        }
18417
18418        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18419        /// to hold a `Sum`.
18420        ///
18421        /// Note that all the setters affecting `aggregator` are
18422        /// mutually exclusive.
18423        ///
18424        /// # Example
18425        /// ```ignore,no_run
18426        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18427        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
18428        /// let x = Aggregate::new().set_sum(Sum::default()/* use setters */);
18429        /// assert!(x.sum().is_some());
18430        /// assert!(x.hllpp_unique_count().is_none());
18431        /// assert!(x.max().is_none());
18432        /// assert!(x.min().is_none());
18433        /// ```
18434        pub fn set_sum<
18435            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Sum>>,
18436        >(
18437            mut self,
18438            v: T,
18439        ) -> Self {
18440            self.aggregator = std::option::Option::Some(
18441                crate::model::r#type::aggregate::Aggregator::Sum(v.into()),
18442            );
18443            self
18444        }
18445
18446        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18447        /// if it holds a `HllppUniqueCount`, `None` if the field is not set or
18448        /// holds a different branch.
18449        pub fn hllpp_unique_count(
18450            &self,
18451        ) -> std::option::Option<
18452            &std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18453        > {
18454            #[allow(unreachable_patterns)]
18455            self.aggregator.as_ref().and_then(|v| match v {
18456                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v) => {
18457                    std::option::Option::Some(v)
18458                }
18459                _ => std::option::Option::None,
18460            })
18461        }
18462
18463        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18464        /// to hold a `HllppUniqueCount`.
18465        ///
18466        /// Note that all the setters affecting `aggregator` are
18467        /// mutually exclusive.
18468        ///
18469        /// # Example
18470        /// ```ignore,no_run
18471        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18472        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount;
18473        /// let x = Aggregate::new().set_hllpp_unique_count(HyperLogLogPlusPlusUniqueCount::default()/* use setters */);
18474        /// assert!(x.hllpp_unique_count().is_some());
18475        /// assert!(x.sum().is_none());
18476        /// assert!(x.max().is_none());
18477        /// assert!(x.min().is_none());
18478        /// ```
18479        pub fn set_hllpp_unique_count<
18480            T: std::convert::Into<
18481                    std::boxed::Box<
18482                        crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount,
18483                    >,
18484                >,
18485        >(
18486            mut self,
18487            v: T,
18488        ) -> Self {
18489            self.aggregator = std::option::Option::Some(
18490                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v.into()),
18491            );
18492            self
18493        }
18494
18495        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18496        /// if it holds a `Max`, `None` if the field is not set or
18497        /// holds a different branch.
18498        pub fn max(
18499            &self,
18500        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Max>> {
18501            #[allow(unreachable_patterns)]
18502            self.aggregator.as_ref().and_then(|v| match v {
18503                crate::model::r#type::aggregate::Aggregator::Max(v) => std::option::Option::Some(v),
18504                _ => std::option::Option::None,
18505            })
18506        }
18507
18508        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18509        /// to hold a `Max`.
18510        ///
18511        /// Note that all the setters affecting `aggregator` are
18512        /// mutually exclusive.
18513        ///
18514        /// # Example
18515        /// ```ignore,no_run
18516        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18517        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Max;
18518        /// let x = Aggregate::new().set_max(Max::default()/* use setters */);
18519        /// assert!(x.max().is_some());
18520        /// assert!(x.sum().is_none());
18521        /// assert!(x.hllpp_unique_count().is_none());
18522        /// assert!(x.min().is_none());
18523        /// ```
18524        pub fn set_max<
18525            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Max>>,
18526        >(
18527            mut self,
18528            v: T,
18529        ) -> Self {
18530            self.aggregator = std::option::Option::Some(
18531                crate::model::r#type::aggregate::Aggregator::Max(v.into()),
18532            );
18533            self
18534        }
18535
18536        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18537        /// if it holds a `Min`, `None` if the field is not set or
18538        /// holds a different branch.
18539        pub fn min(
18540            &self,
18541        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Min>> {
18542            #[allow(unreachable_patterns)]
18543            self.aggregator.as_ref().and_then(|v| match v {
18544                crate::model::r#type::aggregate::Aggregator::Min(v) => std::option::Option::Some(v),
18545                _ => std::option::Option::None,
18546            })
18547        }
18548
18549        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18550        /// to hold a `Min`.
18551        ///
18552        /// Note that all the setters affecting `aggregator` are
18553        /// mutually exclusive.
18554        ///
18555        /// # Example
18556        /// ```ignore,no_run
18557        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18558        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Min;
18559        /// let x = Aggregate::new().set_min(Min::default()/* use setters */);
18560        /// assert!(x.min().is_some());
18561        /// assert!(x.sum().is_none());
18562        /// assert!(x.hllpp_unique_count().is_none());
18563        /// assert!(x.max().is_none());
18564        /// ```
18565        pub fn set_min<
18566            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Min>>,
18567        >(
18568            mut self,
18569            v: T,
18570        ) -> Self {
18571            self.aggregator = std::option::Option::Some(
18572                crate::model::r#type::aggregate::Aggregator::Min(v.into()),
18573            );
18574            self
18575        }
18576    }
18577
18578    impl wkt::message::Message for Aggregate {
18579        fn typename() -> &'static str {
18580            "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate"
18581        }
18582    }
18583
18584    /// Defines additional types related to [Aggregate].
18585    pub mod aggregate {
18586        #[allow(unused_imports)]
18587        use super::*;
18588
18589        /// Computes the sum of the input values.
18590        /// Allowed input: `Int64`
18591        /// State: same as input
18592        #[derive(Clone, Default, PartialEq)]
18593        #[non_exhaustive]
18594        pub struct Sum {
18595            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18596        }
18597
18598        impl Sum {
18599            /// Creates a new default instance.
18600            pub fn new() -> Self {
18601                std::default::Default::default()
18602            }
18603        }
18604
18605        impl wkt::message::Message for Sum {
18606            fn typename() -> &'static str {
18607                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Sum"
18608            }
18609        }
18610
18611        /// Computes the max of the input values.
18612        /// Allowed input: `Int64`
18613        /// State: same as input
18614        #[derive(Clone, Default, PartialEq)]
18615        #[non_exhaustive]
18616        pub struct Max {
18617            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18618        }
18619
18620        impl Max {
18621            /// Creates a new default instance.
18622            pub fn new() -> Self {
18623                std::default::Default::default()
18624            }
18625        }
18626
18627        impl wkt::message::Message for Max {
18628            fn typename() -> &'static str {
18629                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Max"
18630            }
18631        }
18632
18633        /// Computes the min of the input values.
18634        /// Allowed input: `Int64`
18635        /// State: same as input
18636        #[derive(Clone, Default, PartialEq)]
18637        #[non_exhaustive]
18638        pub struct Min {
18639            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18640        }
18641
18642        impl Min {
18643            /// Creates a new default instance.
18644            pub fn new() -> Self {
18645                std::default::Default::default()
18646            }
18647        }
18648
18649        impl wkt::message::Message for Min {
18650            fn typename() -> &'static str {
18651                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Min"
18652            }
18653        }
18654
18655        /// Computes an approximate unique count over the input values. When using
18656        /// raw data as input, be careful to use a consistent encoding. Otherwise
18657        /// the same value encoded differently could count more than once, or two
18658        /// distinct values could count as identical.
18659        /// Input: Any, or omit for Raw
18660        /// State: TBD
18661        /// Special state conversions: `Int64` (the unique count estimate)
18662        #[derive(Clone, Default, PartialEq)]
18663        #[non_exhaustive]
18664        pub struct HyperLogLogPlusPlusUniqueCount {
18665            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18666        }
18667
18668        impl HyperLogLogPlusPlusUniqueCount {
18669            /// Creates a new default instance.
18670            pub fn new() -> Self {
18671                std::default::Default::default()
18672            }
18673        }
18674
18675        impl wkt::message::Message for HyperLogLogPlusPlusUniqueCount {
18676            fn typename() -> &'static str {
18677                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount"
18678            }
18679        }
18680
18681        /// Which aggregator function to use. The configured types must match.
18682        #[derive(Clone, Debug, PartialEq)]
18683        #[non_exhaustive]
18684        pub enum Aggregator {
18685            /// Sum aggregator.
18686            Sum(std::boxed::Box<crate::model::r#type::aggregate::Sum>),
18687            /// HyperLogLogPlusPlusUniqueCount aggregator.
18688            HllppUniqueCount(
18689                std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18690            ),
18691            /// Max aggregator.
18692            Max(std::boxed::Box<crate::model::r#type::aggregate::Max>),
18693            /// Min aggregator.
18694            Min(std::boxed::Box<crate::model::r#type::aggregate::Min>),
18695        }
18696    }
18697
18698    /// The kind of type that this represents.
18699    #[derive(Clone, Debug, PartialEq)]
18700    #[non_exhaustive]
18701    pub enum Kind {
18702        /// Bytes
18703        BytesType(std::boxed::Box<crate::model::r#type::Bytes>),
18704        /// String
18705        StringType(std::boxed::Box<crate::model::r#type::String>),
18706        /// Int64
18707        Int64Type(std::boxed::Box<crate::model::r#type::Int64>),
18708        /// Float32
18709        Float32Type(std::boxed::Box<crate::model::r#type::Float32>),
18710        /// Float64
18711        Float64Type(std::boxed::Box<crate::model::r#type::Float64>),
18712        /// Bool
18713        BoolType(std::boxed::Box<crate::model::r#type::Bool>),
18714        /// Timestamp
18715        TimestampType(std::boxed::Box<crate::model::r#type::Timestamp>),
18716        /// Date
18717        DateType(std::boxed::Box<crate::model::r#type::Date>),
18718        /// Aggregate
18719        AggregateType(std::boxed::Box<crate::model::r#type::Aggregate>),
18720        /// Struct
18721        StructType(std::boxed::Box<crate::model::r#type::Struct>),
18722        /// Array
18723        ArrayType(std::boxed::Box<crate::model::r#type::Array>),
18724        /// Map
18725        MapType(std::boxed::Box<crate::model::r#type::Map>),
18726        /// Proto
18727        ProtoType(std::boxed::Box<crate::model::r#type::Proto>),
18728        /// Enum
18729        EnumType(std::boxed::Box<crate::model::r#type::Enum>),
18730    }
18731}
18732
18733/// Storage media types for persisting Bigtable data.
18734///
18735/// # Working with unknown values
18736///
18737/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18738/// additional enum variants at any time. Adding new variants is not considered
18739/// a breaking change. Applications should write their code in anticipation of:
18740///
18741/// - New values appearing in future releases of the client library, **and**
18742/// - New values received dynamically, without application changes.
18743///
18744/// Please consult the [Working with enums] section in the user guide for some
18745/// guidelines.
18746///
18747/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18748#[derive(Clone, Debug, PartialEq)]
18749#[non_exhaustive]
18750pub enum StorageType {
18751    /// The user did not specify a storage type.
18752    Unspecified,
18753    /// Flash (SSD) storage should be used.
18754    Ssd,
18755    /// Magnetic drive (HDD) storage should be used.
18756    Hdd,
18757    /// If set, the enum was initialized with an unknown value.
18758    ///
18759    /// Applications can examine the value using [StorageType::value] or
18760    /// [StorageType::name].
18761    UnknownValue(storage_type::UnknownValue),
18762}
18763
18764#[doc(hidden)]
18765pub mod storage_type {
18766    #[allow(unused_imports)]
18767    use super::*;
18768    #[derive(Clone, Debug, PartialEq)]
18769    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18770}
18771
18772impl StorageType {
18773    /// Gets the enum value.
18774    ///
18775    /// Returns `None` if the enum contains an unknown value deserialized from
18776    /// the string representation of enums.
18777    pub fn value(&self) -> std::option::Option<i32> {
18778        match self {
18779            Self::Unspecified => std::option::Option::Some(0),
18780            Self::Ssd => std::option::Option::Some(1),
18781            Self::Hdd => std::option::Option::Some(2),
18782            Self::UnknownValue(u) => u.0.value(),
18783        }
18784    }
18785
18786    /// Gets the enum value as a string.
18787    ///
18788    /// Returns `None` if the enum contains an unknown value deserialized from
18789    /// the integer representation of enums.
18790    pub fn name(&self) -> std::option::Option<&str> {
18791        match self {
18792            Self::Unspecified => std::option::Option::Some("STORAGE_TYPE_UNSPECIFIED"),
18793            Self::Ssd => std::option::Option::Some("SSD"),
18794            Self::Hdd => std::option::Option::Some("HDD"),
18795            Self::UnknownValue(u) => u.0.name(),
18796        }
18797    }
18798}
18799
18800impl std::default::Default for StorageType {
18801    fn default() -> Self {
18802        use std::convert::From;
18803        Self::from(0)
18804    }
18805}
18806
18807impl std::fmt::Display for StorageType {
18808    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18809        wkt::internal::display_enum(f, self.name(), self.value())
18810    }
18811}
18812
18813impl std::convert::From<i32> for StorageType {
18814    fn from(value: i32) -> Self {
18815        match value {
18816            0 => Self::Unspecified,
18817            1 => Self::Ssd,
18818            2 => Self::Hdd,
18819            _ => Self::UnknownValue(storage_type::UnknownValue(
18820                wkt::internal::UnknownEnumValue::Integer(value),
18821            )),
18822        }
18823    }
18824}
18825
18826impl std::convert::From<&str> for StorageType {
18827    fn from(value: &str) -> Self {
18828        use std::string::ToString;
18829        match value {
18830            "STORAGE_TYPE_UNSPECIFIED" => Self::Unspecified,
18831            "SSD" => Self::Ssd,
18832            "HDD" => Self::Hdd,
18833            _ => Self::UnknownValue(storage_type::UnknownValue(
18834                wkt::internal::UnknownEnumValue::String(value.to_string()),
18835            )),
18836        }
18837    }
18838}
18839
18840impl serde::ser::Serialize for StorageType {
18841    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18842    where
18843        S: serde::Serializer,
18844    {
18845        match self {
18846            Self::Unspecified => serializer.serialize_i32(0),
18847            Self::Ssd => serializer.serialize_i32(1),
18848            Self::Hdd => serializer.serialize_i32(2),
18849            Self::UnknownValue(u) => u.0.serialize(serializer),
18850        }
18851    }
18852}
18853
18854impl<'de> serde::de::Deserialize<'de> for StorageType {
18855    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18856    where
18857        D: serde::Deserializer<'de>,
18858    {
18859        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageType>::new(
18860            ".google.bigtable.admin.v2.StorageType",
18861        ))
18862    }
18863}
18864
18865/// Indicates the type of the restore source.
18866///
18867/// # Working with unknown values
18868///
18869/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18870/// additional enum variants at any time. Adding new variants is not considered
18871/// a breaking change. Applications should write their code in anticipation of:
18872///
18873/// - New values appearing in future releases of the client library, **and**
18874/// - New values received dynamically, without application changes.
18875///
18876/// Please consult the [Working with enums] section in the user guide for some
18877/// guidelines.
18878///
18879/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18880#[derive(Clone, Debug, PartialEq)]
18881#[non_exhaustive]
18882pub enum RestoreSourceType {
18883    /// No restore associated.
18884    Unspecified,
18885    /// A backup was used as the source of the restore.
18886    Backup,
18887    /// If set, the enum was initialized with an unknown value.
18888    ///
18889    /// Applications can examine the value using [RestoreSourceType::value] or
18890    /// [RestoreSourceType::name].
18891    UnknownValue(restore_source_type::UnknownValue),
18892}
18893
18894#[doc(hidden)]
18895pub mod restore_source_type {
18896    #[allow(unused_imports)]
18897    use super::*;
18898    #[derive(Clone, Debug, PartialEq)]
18899    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18900}
18901
18902impl RestoreSourceType {
18903    /// Gets the enum value.
18904    ///
18905    /// Returns `None` if the enum contains an unknown value deserialized from
18906    /// the string representation of enums.
18907    pub fn value(&self) -> std::option::Option<i32> {
18908        match self {
18909            Self::Unspecified => std::option::Option::Some(0),
18910            Self::Backup => std::option::Option::Some(1),
18911            Self::UnknownValue(u) => u.0.value(),
18912        }
18913    }
18914
18915    /// Gets the enum value as a string.
18916    ///
18917    /// Returns `None` if the enum contains an unknown value deserialized from
18918    /// the integer representation of enums.
18919    pub fn name(&self) -> std::option::Option<&str> {
18920        match self {
18921            Self::Unspecified => std::option::Option::Some("RESTORE_SOURCE_TYPE_UNSPECIFIED"),
18922            Self::Backup => std::option::Option::Some("BACKUP"),
18923            Self::UnknownValue(u) => u.0.name(),
18924        }
18925    }
18926}
18927
18928impl std::default::Default for RestoreSourceType {
18929    fn default() -> Self {
18930        use std::convert::From;
18931        Self::from(0)
18932    }
18933}
18934
18935impl std::fmt::Display for RestoreSourceType {
18936    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18937        wkt::internal::display_enum(f, self.name(), self.value())
18938    }
18939}
18940
18941impl std::convert::From<i32> for RestoreSourceType {
18942    fn from(value: i32) -> Self {
18943        match value {
18944            0 => Self::Unspecified,
18945            1 => Self::Backup,
18946            _ => Self::UnknownValue(restore_source_type::UnknownValue(
18947                wkt::internal::UnknownEnumValue::Integer(value),
18948            )),
18949        }
18950    }
18951}
18952
18953impl std::convert::From<&str> for RestoreSourceType {
18954    fn from(value: &str) -> Self {
18955        use std::string::ToString;
18956        match value {
18957            "RESTORE_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
18958            "BACKUP" => Self::Backup,
18959            _ => Self::UnknownValue(restore_source_type::UnknownValue(
18960                wkt::internal::UnknownEnumValue::String(value.to_string()),
18961            )),
18962        }
18963    }
18964}
18965
18966impl serde::ser::Serialize for RestoreSourceType {
18967    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18968    where
18969        S: serde::Serializer,
18970    {
18971        match self {
18972            Self::Unspecified => serializer.serialize_i32(0),
18973            Self::Backup => serializer.serialize_i32(1),
18974            Self::UnknownValue(u) => u.0.serialize(serializer),
18975        }
18976    }
18977}
18978
18979impl<'de> serde::de::Deserialize<'de> for RestoreSourceType {
18980    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18981    where
18982        D: serde::Deserializer<'de>,
18983    {
18984        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RestoreSourceType>::new(
18985            ".google.bigtable.admin.v2.RestoreSourceType",
18986        ))
18987    }
18988}