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 project_id = "project_id";
180    /// # let instance_id = "instance_id";
181    /// let x = GetInstanceRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}"));
182    /// ```
183    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
184        self.name = v.into();
185        self
186    }
187}
188
189impl wkt::message::Message for GetInstanceRequest {
190    fn typename() -> &'static str {
191        "type.googleapis.com/google.bigtable.admin.v2.GetInstanceRequest"
192    }
193}
194
195/// Request message for BigtableInstanceAdmin.ListInstances.
196#[derive(Clone, Default, PartialEq)]
197#[non_exhaustive]
198pub struct ListInstancesRequest {
199    /// Required. The unique name of the project for which a list of instances is
200    /// requested. Values are of the form `projects/{project}`.
201    pub parent: std::string::String,
202
203    /// DEPRECATED: This field is unused and ignored.
204    pub page_token: std::string::String,
205
206    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
207}
208
209impl ListInstancesRequest {
210    /// Creates a new default instance.
211    pub fn new() -> Self {
212        std::default::Default::default()
213    }
214
215    /// Sets the value of [parent][crate::model::ListInstancesRequest::parent].
216    ///
217    /// # Example
218    /// ```ignore,no_run
219    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
220    /// let x = ListInstancesRequest::new().set_parent("example");
221    /// ```
222    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
223        self.parent = v.into();
224        self
225    }
226
227    /// Sets the value of [page_token][crate::model::ListInstancesRequest::page_token].
228    ///
229    /// # Example
230    /// ```ignore,no_run
231    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesRequest;
232    /// let x = ListInstancesRequest::new().set_page_token("example");
233    /// ```
234    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
235        self.page_token = v.into();
236        self
237    }
238}
239
240impl wkt::message::Message for ListInstancesRequest {
241    fn typename() -> &'static str {
242        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesRequest"
243    }
244}
245
246/// Response message for BigtableInstanceAdmin.ListInstances.
247#[derive(Clone, Default, PartialEq)]
248#[non_exhaustive]
249pub struct ListInstancesResponse {
250    /// The list of requested instances.
251    pub instances: std::vec::Vec<crate::model::Instance>,
252
253    /// Locations from which Instance information could not be retrieved,
254    /// due to an outage or some other transient condition.
255    /// Instances whose Clusters are all in one of the failed locations
256    /// may be missing from `instances`, and Instances with at least one
257    /// Cluster in a failed location may only have partial information returned.
258    /// Values are of the form `projects/<project>/locations/<zone_id>`
259    pub failed_locations: std::vec::Vec<std::string::String>,
260
261    /// DEPRECATED: This field is unused and ignored.
262    pub next_page_token: std::string::String,
263
264    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
265}
266
267impl ListInstancesResponse {
268    /// Creates a new default instance.
269    pub fn new() -> Self {
270        std::default::Default::default()
271    }
272
273    /// Sets the value of [instances][crate::model::ListInstancesResponse::instances].
274    ///
275    /// # Example
276    /// ```ignore,no_run
277    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
278    /// use google_cloud_bigtable_admin_v2::model::Instance;
279    /// let x = ListInstancesResponse::new()
280    ///     .set_instances([
281    ///         Instance::default()/* use setters */,
282    ///         Instance::default()/* use (different) setters */,
283    ///     ]);
284    /// ```
285    pub fn set_instances<T, V>(mut self, v: T) -> Self
286    where
287        T: std::iter::IntoIterator<Item = V>,
288        V: std::convert::Into<crate::model::Instance>,
289    {
290        use std::iter::Iterator;
291        self.instances = v.into_iter().map(|i| i.into()).collect();
292        self
293    }
294
295    /// Sets the value of [failed_locations][crate::model::ListInstancesResponse::failed_locations].
296    ///
297    /// # Example
298    /// ```ignore,no_run
299    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
300    /// let x = ListInstancesResponse::new().set_failed_locations(["a", "b", "c"]);
301    /// ```
302    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
303    where
304        T: std::iter::IntoIterator<Item = V>,
305        V: std::convert::Into<std::string::String>,
306    {
307        use std::iter::Iterator;
308        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
309        self
310    }
311
312    /// Sets the value of [next_page_token][crate::model::ListInstancesResponse::next_page_token].
313    ///
314    /// # Example
315    /// ```ignore,no_run
316    /// # use google_cloud_bigtable_admin_v2::model::ListInstancesResponse;
317    /// let x = ListInstancesResponse::new().set_next_page_token("example");
318    /// ```
319    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
320        self.next_page_token = v.into();
321        self
322    }
323}
324
325impl wkt::message::Message for ListInstancesResponse {
326    fn typename() -> &'static str {
327        "type.googleapis.com/google.bigtable.admin.v2.ListInstancesResponse"
328    }
329}
330
331/// Request message for BigtableInstanceAdmin.PartialUpdateInstance.
332#[derive(Clone, Default, PartialEq)]
333#[non_exhaustive]
334pub struct PartialUpdateInstanceRequest {
335    /// Required. The Instance which will (partially) replace the current value.
336    pub instance: std::option::Option<crate::model::Instance>,
337
338    /// Required. The subset of Instance fields which should be replaced.
339    /// Must be explicitly set.
340    pub update_mask: std::option::Option<wkt::FieldMask>,
341
342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
343}
344
345impl PartialUpdateInstanceRequest {
346    /// Creates a new default instance.
347    pub fn new() -> Self {
348        std::default::Default::default()
349    }
350
351    /// Sets the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
352    ///
353    /// # Example
354    /// ```ignore,no_run
355    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
356    /// use google_cloud_bigtable_admin_v2::model::Instance;
357    /// let x = PartialUpdateInstanceRequest::new().set_instance(Instance::default()/* use setters */);
358    /// ```
359    pub fn set_instance<T>(mut self, v: T) -> Self
360    where
361        T: std::convert::Into<crate::model::Instance>,
362    {
363        self.instance = std::option::Option::Some(v.into());
364        self
365    }
366
367    /// Sets or clears the value of [instance][crate::model::PartialUpdateInstanceRequest::instance].
368    ///
369    /// # Example
370    /// ```ignore,no_run
371    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
372    /// use google_cloud_bigtable_admin_v2::model::Instance;
373    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(Some(Instance::default()/* use setters */));
374    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_instance(None::<Instance>);
375    /// ```
376    pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
377    where
378        T: std::convert::Into<crate::model::Instance>,
379    {
380        self.instance = v.map(|x| x.into());
381        self
382    }
383
384    /// Sets the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
385    ///
386    /// # Example
387    /// ```ignore,no_run
388    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
389    /// use wkt::FieldMask;
390    /// let x = PartialUpdateInstanceRequest::new().set_update_mask(FieldMask::default()/* use setters */);
391    /// ```
392    pub fn set_update_mask<T>(mut self, v: T) -> Self
393    where
394        T: std::convert::Into<wkt::FieldMask>,
395    {
396        self.update_mask = std::option::Option::Some(v.into());
397        self
398    }
399
400    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateInstanceRequest::update_mask].
401    ///
402    /// # Example
403    /// ```ignore,no_run
404    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
405    /// use wkt::FieldMask;
406    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
407    /// let x = PartialUpdateInstanceRequest::new().set_or_clear_update_mask(None::<FieldMask>);
408    /// ```
409    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
410    where
411        T: std::convert::Into<wkt::FieldMask>,
412    {
413        self.update_mask = v.map(|x| x.into());
414        self
415    }
416}
417
418impl wkt::message::Message for PartialUpdateInstanceRequest {
419    fn typename() -> &'static str {
420        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateInstanceRequest"
421    }
422}
423
424/// Request message for BigtableInstanceAdmin.DeleteInstance.
425#[derive(Clone, Default, PartialEq)]
426#[non_exhaustive]
427pub struct DeleteInstanceRequest {
428    /// Required. The unique name of the instance to be deleted.
429    /// Values are of the form `projects/{project}/instances/{instance}`.
430    pub name: std::string::String,
431
432    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
433}
434
435impl DeleteInstanceRequest {
436    /// Creates a new default instance.
437    pub fn new() -> Self {
438        std::default::Default::default()
439    }
440
441    /// Sets the value of [name][crate::model::DeleteInstanceRequest::name].
442    ///
443    /// # Example
444    /// ```ignore,no_run
445    /// # use google_cloud_bigtable_admin_v2::model::DeleteInstanceRequest;
446    /// # let project_id = "project_id";
447    /// # let instance_id = "instance_id";
448    /// let x = DeleteInstanceRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}"));
449    /// ```
450    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
451        self.name = v.into();
452        self
453    }
454}
455
456impl wkt::message::Message for DeleteInstanceRequest {
457    fn typename() -> &'static str {
458        "type.googleapis.com/google.bigtable.admin.v2.DeleteInstanceRequest"
459    }
460}
461
462/// Request message for BigtableInstanceAdmin.CreateCluster.
463#[derive(Clone, Default, PartialEq)]
464#[non_exhaustive]
465pub struct CreateClusterRequest {
466    /// Required. The unique name of the instance in which to create the new
467    /// cluster. Values are of the form `projects/{project}/instances/{instance}`.
468    pub parent: std::string::String,
469
470    /// Required. The ID to be used when referring to the new cluster within its
471    /// instance, e.g., just `mycluster` rather than
472    /// `projects/myproject/instances/myinstance/clusters/mycluster`.
473    pub cluster_id: std::string::String,
474
475    /// Required. The cluster to be created.
476    /// Fields marked `OutputOnly` must be left blank.
477    pub cluster: std::option::Option<crate::model::Cluster>,
478
479    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
480}
481
482impl CreateClusterRequest {
483    /// Creates a new default instance.
484    pub fn new() -> Self {
485        std::default::Default::default()
486    }
487
488    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
489    ///
490    /// # Example
491    /// ```ignore,no_run
492    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
493    /// # let project_id = "project_id";
494    /// # let instance_id = "instance_id";
495    /// let x = CreateClusterRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
496    /// ```
497    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
498        self.parent = v.into();
499        self
500    }
501
502    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
503    ///
504    /// # Example
505    /// ```ignore,no_run
506    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
507    /// let x = CreateClusterRequest::new().set_cluster_id("example");
508    /// ```
509    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
510        self.cluster_id = v.into();
511        self
512    }
513
514    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
515    ///
516    /// # Example
517    /// ```ignore,no_run
518    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
519    /// use google_cloud_bigtable_admin_v2::model::Cluster;
520    /// let x = CreateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
521    /// ```
522    pub fn set_cluster<T>(mut self, v: T) -> Self
523    where
524        T: std::convert::Into<crate::model::Cluster>,
525    {
526        self.cluster = std::option::Option::Some(v.into());
527        self
528    }
529
530    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
531    ///
532    /// # Example
533    /// ```ignore,no_run
534    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
535    /// use google_cloud_bigtable_admin_v2::model::Cluster;
536    /// let x = CreateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
537    /// let x = CreateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
538    /// ```
539    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
540    where
541        T: std::convert::Into<crate::model::Cluster>,
542    {
543        self.cluster = v.map(|x| x.into());
544        self
545    }
546}
547
548impl wkt::message::Message for CreateClusterRequest {
549    fn typename() -> &'static str {
550        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterRequest"
551    }
552}
553
554/// Request message for BigtableInstanceAdmin.GetCluster.
555#[derive(Clone, Default, PartialEq)]
556#[non_exhaustive]
557pub struct GetClusterRequest {
558    /// Required. The unique name of the requested cluster. Values are of the form
559    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
560    pub name: std::string::String,
561
562    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
563}
564
565impl GetClusterRequest {
566    /// Creates a new default instance.
567    pub fn new() -> Self {
568        std::default::Default::default()
569    }
570
571    /// Sets the value of [name][crate::model::GetClusterRequest::name].
572    ///
573    /// # Example
574    /// ```ignore,no_run
575    /// # use google_cloud_bigtable_admin_v2::model::GetClusterRequest;
576    /// # let project_id = "project_id";
577    /// # let instance_id = "instance_id";
578    /// # let cluster_id = "cluster_id";
579    /// let x = GetClusterRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
580    /// ```
581    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
582        self.name = v.into();
583        self
584    }
585}
586
587impl wkt::message::Message for GetClusterRequest {
588    fn typename() -> &'static str {
589        "type.googleapis.com/google.bigtable.admin.v2.GetClusterRequest"
590    }
591}
592
593/// Request message for BigtableInstanceAdmin.ListClusters.
594#[derive(Clone, Default, PartialEq)]
595#[non_exhaustive]
596pub struct ListClustersRequest {
597    /// Required. The unique name of the instance for which a list of clusters is
598    /// requested. Values are of the form
599    /// `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list
600    /// Clusters for all Instances in a project, e.g.,
601    /// `projects/myproject/instances/-`.
602    pub parent: std::string::String,
603
604    /// DEPRECATED: This field is unused and ignored.
605    pub page_token: std::string::String,
606
607    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
608}
609
610impl ListClustersRequest {
611    /// Creates a new default instance.
612    pub fn new() -> Self {
613        std::default::Default::default()
614    }
615
616    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
617    ///
618    /// # Example
619    /// ```ignore,no_run
620    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
621    /// # let project_id = "project_id";
622    /// # let instance_id = "instance_id";
623    /// let x = ListClustersRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
624    /// ```
625    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
626        self.parent = v.into();
627        self
628    }
629
630    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
631    ///
632    /// # Example
633    /// ```ignore,no_run
634    /// # use google_cloud_bigtable_admin_v2::model::ListClustersRequest;
635    /// let x = ListClustersRequest::new().set_page_token("example");
636    /// ```
637    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
638        self.page_token = v.into();
639        self
640    }
641}
642
643impl wkt::message::Message for ListClustersRequest {
644    fn typename() -> &'static str {
645        "type.googleapis.com/google.bigtable.admin.v2.ListClustersRequest"
646    }
647}
648
649/// Response message for BigtableInstanceAdmin.ListClusters.
650#[derive(Clone, Default, PartialEq)]
651#[non_exhaustive]
652pub struct ListClustersResponse {
653    /// The list of requested clusters.
654    pub clusters: std::vec::Vec<crate::model::Cluster>,
655
656    /// Locations from which Cluster information could not be retrieved,
657    /// due to an outage or some other transient condition.
658    /// Clusters from these locations may be missing from `clusters`,
659    /// or may only have partial information returned.
660    /// Values are of the form `projects/<project>/locations/<zone_id>`
661    pub failed_locations: std::vec::Vec<std::string::String>,
662
663    /// DEPRECATED: This field is unused and ignored.
664    pub next_page_token: std::string::String,
665
666    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
667}
668
669impl ListClustersResponse {
670    /// Creates a new default instance.
671    pub fn new() -> Self {
672        std::default::Default::default()
673    }
674
675    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
676    ///
677    /// # Example
678    /// ```ignore,no_run
679    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
680    /// use google_cloud_bigtable_admin_v2::model::Cluster;
681    /// let x = ListClustersResponse::new()
682    ///     .set_clusters([
683    ///         Cluster::default()/* use setters */,
684    ///         Cluster::default()/* use (different) setters */,
685    ///     ]);
686    /// ```
687    pub fn set_clusters<T, V>(mut self, v: T) -> Self
688    where
689        T: std::iter::IntoIterator<Item = V>,
690        V: std::convert::Into<crate::model::Cluster>,
691    {
692        use std::iter::Iterator;
693        self.clusters = v.into_iter().map(|i| i.into()).collect();
694        self
695    }
696
697    /// Sets the value of [failed_locations][crate::model::ListClustersResponse::failed_locations].
698    ///
699    /// # Example
700    /// ```ignore,no_run
701    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
702    /// let x = ListClustersResponse::new().set_failed_locations(["a", "b", "c"]);
703    /// ```
704    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
705    where
706        T: std::iter::IntoIterator<Item = V>,
707        V: std::convert::Into<std::string::String>,
708    {
709        use std::iter::Iterator;
710        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
711        self
712    }
713
714    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
715    ///
716    /// # Example
717    /// ```ignore,no_run
718    /// # use google_cloud_bigtable_admin_v2::model::ListClustersResponse;
719    /// let x = ListClustersResponse::new().set_next_page_token("example");
720    /// ```
721    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
722        self.next_page_token = v.into();
723        self
724    }
725}
726
727impl wkt::message::Message for ListClustersResponse {
728    fn typename() -> &'static str {
729        "type.googleapis.com/google.bigtable.admin.v2.ListClustersResponse"
730    }
731}
732
733/// Request message for BigtableInstanceAdmin.DeleteCluster.
734#[derive(Clone, Default, PartialEq)]
735#[non_exhaustive]
736pub struct DeleteClusterRequest {
737    /// Required. The unique name of the cluster to be deleted. Values are of the
738    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
739    pub name: std::string::String,
740
741    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
742}
743
744impl DeleteClusterRequest {
745    /// Creates a new default instance.
746    pub fn new() -> Self {
747        std::default::Default::default()
748    }
749
750    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
751    ///
752    /// # Example
753    /// ```ignore,no_run
754    /// # use google_cloud_bigtable_admin_v2::model::DeleteClusterRequest;
755    /// # let project_id = "project_id";
756    /// # let instance_id = "instance_id";
757    /// # let cluster_id = "cluster_id";
758    /// let x = DeleteClusterRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
759    /// ```
760    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
761        self.name = v.into();
762        self
763    }
764}
765
766impl wkt::message::Message for DeleteClusterRequest {
767    fn typename() -> &'static str {
768        "type.googleapis.com/google.bigtable.admin.v2.DeleteClusterRequest"
769    }
770}
771
772/// The metadata for the Operation returned by CreateInstance.
773#[derive(Clone, Default, PartialEq)]
774#[non_exhaustive]
775pub struct CreateInstanceMetadata {
776    /// The request that prompted the initiation of this CreateInstance operation.
777    pub original_request: std::option::Option<crate::model::CreateInstanceRequest>,
778
779    /// The time at which the original request was received.
780    pub request_time: std::option::Option<wkt::Timestamp>,
781
782    /// The time at which the operation failed or was completed successfully.
783    pub finish_time: std::option::Option<wkt::Timestamp>,
784
785    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
786}
787
788impl CreateInstanceMetadata {
789    /// Creates a new default instance.
790    pub fn new() -> Self {
791        std::default::Default::default()
792    }
793
794    /// Sets the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
795    ///
796    /// # Example
797    /// ```ignore,no_run
798    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
799    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
800    /// let x = CreateInstanceMetadata::new().set_original_request(CreateInstanceRequest::default()/* use setters */);
801    /// ```
802    pub fn set_original_request<T>(mut self, v: T) -> Self
803    where
804        T: std::convert::Into<crate::model::CreateInstanceRequest>,
805    {
806        self.original_request = std::option::Option::Some(v.into());
807        self
808    }
809
810    /// Sets or clears the value of [original_request][crate::model::CreateInstanceMetadata::original_request].
811    ///
812    /// # Example
813    /// ```ignore,no_run
814    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
815    /// use google_cloud_bigtable_admin_v2::model::CreateInstanceRequest;
816    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(Some(CreateInstanceRequest::default()/* use setters */));
817    /// let x = CreateInstanceMetadata::new().set_or_clear_original_request(None::<CreateInstanceRequest>);
818    /// ```
819    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
820    where
821        T: std::convert::Into<crate::model::CreateInstanceRequest>,
822    {
823        self.original_request = v.map(|x| x.into());
824        self
825    }
826
827    /// Sets the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
828    ///
829    /// # Example
830    /// ```ignore,no_run
831    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
832    /// use wkt::Timestamp;
833    /// let x = CreateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
834    /// ```
835    pub fn set_request_time<T>(mut self, v: T) -> Self
836    where
837        T: std::convert::Into<wkt::Timestamp>,
838    {
839        self.request_time = std::option::Option::Some(v.into());
840        self
841    }
842
843    /// Sets or clears the value of [request_time][crate::model::CreateInstanceMetadata::request_time].
844    ///
845    /// # Example
846    /// ```ignore,no_run
847    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
848    /// use wkt::Timestamp;
849    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
850    /// let x = CreateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
851    /// ```
852    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
853    where
854        T: std::convert::Into<wkt::Timestamp>,
855    {
856        self.request_time = v.map(|x| x.into());
857        self
858    }
859
860    /// Sets the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
861    ///
862    /// # Example
863    /// ```ignore,no_run
864    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
865    /// use wkt::Timestamp;
866    /// let x = CreateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
867    /// ```
868    pub fn set_finish_time<T>(mut self, v: T) -> Self
869    where
870        T: std::convert::Into<wkt::Timestamp>,
871    {
872        self.finish_time = std::option::Option::Some(v.into());
873        self
874    }
875
876    /// Sets or clears the value of [finish_time][crate::model::CreateInstanceMetadata::finish_time].
877    ///
878    /// # Example
879    /// ```ignore,no_run
880    /// # use google_cloud_bigtable_admin_v2::model::CreateInstanceMetadata;
881    /// use wkt::Timestamp;
882    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
883    /// let x = CreateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
884    /// ```
885    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
886    where
887        T: std::convert::Into<wkt::Timestamp>,
888    {
889        self.finish_time = v.map(|x| x.into());
890        self
891    }
892}
893
894impl wkt::message::Message for CreateInstanceMetadata {
895    fn typename() -> &'static str {
896        "type.googleapis.com/google.bigtable.admin.v2.CreateInstanceMetadata"
897    }
898}
899
900/// The metadata for the Operation returned by UpdateInstance.
901#[derive(Clone, Default, PartialEq)]
902#[non_exhaustive]
903pub struct UpdateInstanceMetadata {
904    /// The request that prompted the initiation of this UpdateInstance operation.
905    pub original_request: std::option::Option<crate::model::PartialUpdateInstanceRequest>,
906
907    /// The time at which the original request was received.
908    pub request_time: std::option::Option<wkt::Timestamp>,
909
910    /// The time at which the operation failed or was completed successfully.
911    pub finish_time: std::option::Option<wkt::Timestamp>,
912
913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
914}
915
916impl UpdateInstanceMetadata {
917    /// Creates a new default instance.
918    pub fn new() -> Self {
919        std::default::Default::default()
920    }
921
922    /// Sets the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
923    ///
924    /// # Example
925    /// ```ignore,no_run
926    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
927    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
928    /// let x = UpdateInstanceMetadata::new().set_original_request(PartialUpdateInstanceRequest::default()/* use setters */);
929    /// ```
930    pub fn set_original_request<T>(mut self, v: T) -> Self
931    where
932        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
933    {
934        self.original_request = std::option::Option::Some(v.into());
935        self
936    }
937
938    /// Sets or clears the value of [original_request][crate::model::UpdateInstanceMetadata::original_request].
939    ///
940    /// # Example
941    /// ```ignore,no_run
942    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
943    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateInstanceRequest;
944    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(Some(PartialUpdateInstanceRequest::default()/* use setters */));
945    /// let x = UpdateInstanceMetadata::new().set_or_clear_original_request(None::<PartialUpdateInstanceRequest>);
946    /// ```
947    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
948    where
949        T: std::convert::Into<crate::model::PartialUpdateInstanceRequest>,
950    {
951        self.original_request = v.map(|x| x.into());
952        self
953    }
954
955    /// Sets the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
956    ///
957    /// # Example
958    /// ```ignore,no_run
959    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
960    /// use wkt::Timestamp;
961    /// let x = UpdateInstanceMetadata::new().set_request_time(Timestamp::default()/* use setters */);
962    /// ```
963    pub fn set_request_time<T>(mut self, v: T) -> Self
964    where
965        T: std::convert::Into<wkt::Timestamp>,
966    {
967        self.request_time = std::option::Option::Some(v.into());
968        self
969    }
970
971    /// Sets or clears the value of [request_time][crate::model::UpdateInstanceMetadata::request_time].
972    ///
973    /// # Example
974    /// ```ignore,no_run
975    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
976    /// use wkt::Timestamp;
977    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
978    /// let x = UpdateInstanceMetadata::new().set_or_clear_request_time(None::<Timestamp>);
979    /// ```
980    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
981    where
982        T: std::convert::Into<wkt::Timestamp>,
983    {
984        self.request_time = v.map(|x| x.into());
985        self
986    }
987
988    /// Sets the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
989    ///
990    /// # Example
991    /// ```ignore,no_run
992    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
993    /// use wkt::Timestamp;
994    /// let x = UpdateInstanceMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
995    /// ```
996    pub fn set_finish_time<T>(mut self, v: T) -> Self
997    where
998        T: std::convert::Into<wkt::Timestamp>,
999    {
1000        self.finish_time = std::option::Option::Some(v.into());
1001        self
1002    }
1003
1004    /// Sets or clears the value of [finish_time][crate::model::UpdateInstanceMetadata::finish_time].
1005    ///
1006    /// # Example
1007    /// ```ignore,no_run
1008    /// # use google_cloud_bigtable_admin_v2::model::UpdateInstanceMetadata;
1009    /// use wkt::Timestamp;
1010    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1011    /// let x = UpdateInstanceMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1012    /// ```
1013    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1014    where
1015        T: std::convert::Into<wkt::Timestamp>,
1016    {
1017        self.finish_time = v.map(|x| x.into());
1018        self
1019    }
1020}
1021
1022impl wkt::message::Message for UpdateInstanceMetadata {
1023    fn typename() -> &'static str {
1024        "type.googleapis.com/google.bigtable.admin.v2.UpdateInstanceMetadata"
1025    }
1026}
1027
1028/// The metadata for the Operation returned by CreateCluster.
1029#[derive(Clone, Default, PartialEq)]
1030#[non_exhaustive]
1031pub struct CreateClusterMetadata {
1032    /// The request that prompted the initiation of this CreateCluster operation.
1033    pub original_request: std::option::Option<crate::model::CreateClusterRequest>,
1034
1035    /// The time at which the original request was received.
1036    pub request_time: std::option::Option<wkt::Timestamp>,
1037
1038    /// The time at which the operation failed or was completed successfully.
1039    pub finish_time: std::option::Option<wkt::Timestamp>,
1040
1041    /// Keys: the full `name` of each table that existed in the instance when
1042    /// CreateCluster was first called, i.e.
1043    /// `projects/<project>/instances/<instance>/tables/<table>`. Any table added
1044    /// to the instance by a later API call will be created in the new cluster by
1045    /// that API call, not this one.
1046    ///
1047    /// Values: information on how much of a table's data has been copied to the
1048    /// newly-created cluster so far.
1049    pub tables: std::collections::HashMap<
1050        std::string::String,
1051        crate::model::create_cluster_metadata::TableProgress,
1052    >,
1053
1054    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1055}
1056
1057impl CreateClusterMetadata {
1058    /// Creates a new default instance.
1059    pub fn new() -> Self {
1060        std::default::Default::default()
1061    }
1062
1063    /// Sets the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1064    ///
1065    /// # Example
1066    /// ```ignore,no_run
1067    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1068    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1069    /// let x = CreateClusterMetadata::new().set_original_request(CreateClusterRequest::default()/* use setters */);
1070    /// ```
1071    pub fn set_original_request<T>(mut self, v: T) -> Self
1072    where
1073        T: std::convert::Into<crate::model::CreateClusterRequest>,
1074    {
1075        self.original_request = std::option::Option::Some(v.into());
1076        self
1077    }
1078
1079    /// Sets or clears the value of [original_request][crate::model::CreateClusterMetadata::original_request].
1080    ///
1081    /// # Example
1082    /// ```ignore,no_run
1083    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1084    /// use google_cloud_bigtable_admin_v2::model::CreateClusterRequest;
1085    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(Some(CreateClusterRequest::default()/* use setters */));
1086    /// let x = CreateClusterMetadata::new().set_or_clear_original_request(None::<CreateClusterRequest>);
1087    /// ```
1088    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1089    where
1090        T: std::convert::Into<crate::model::CreateClusterRequest>,
1091    {
1092        self.original_request = v.map(|x| x.into());
1093        self
1094    }
1095
1096    /// Sets the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1097    ///
1098    /// # Example
1099    /// ```ignore,no_run
1100    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1101    /// use wkt::Timestamp;
1102    /// let x = CreateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1103    /// ```
1104    pub fn set_request_time<T>(mut self, v: T) -> Self
1105    where
1106        T: std::convert::Into<wkt::Timestamp>,
1107    {
1108        self.request_time = std::option::Option::Some(v.into());
1109        self
1110    }
1111
1112    /// Sets or clears the value of [request_time][crate::model::CreateClusterMetadata::request_time].
1113    ///
1114    /// # Example
1115    /// ```ignore,no_run
1116    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1117    /// use wkt::Timestamp;
1118    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1119    /// let x = CreateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1120    /// ```
1121    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1122    where
1123        T: std::convert::Into<wkt::Timestamp>,
1124    {
1125        self.request_time = v.map(|x| x.into());
1126        self
1127    }
1128
1129    /// Sets the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1130    ///
1131    /// # Example
1132    /// ```ignore,no_run
1133    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1134    /// use wkt::Timestamp;
1135    /// let x = CreateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1136    /// ```
1137    pub fn set_finish_time<T>(mut self, v: T) -> Self
1138    where
1139        T: std::convert::Into<wkt::Timestamp>,
1140    {
1141        self.finish_time = std::option::Option::Some(v.into());
1142        self
1143    }
1144
1145    /// Sets or clears the value of [finish_time][crate::model::CreateClusterMetadata::finish_time].
1146    ///
1147    /// # Example
1148    /// ```ignore,no_run
1149    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1150    /// use wkt::Timestamp;
1151    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1152    /// let x = CreateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1153    /// ```
1154    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1155    where
1156        T: std::convert::Into<wkt::Timestamp>,
1157    {
1158        self.finish_time = v.map(|x| x.into());
1159        self
1160    }
1161
1162    /// Sets the value of [tables][crate::model::CreateClusterMetadata::tables].
1163    ///
1164    /// # Example
1165    /// ```ignore,no_run
1166    /// # use google_cloud_bigtable_admin_v2::model::CreateClusterMetadata;
1167    /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1168    /// let x = CreateClusterMetadata::new().set_tables([
1169    ///     ("key0", TableProgress::default()/* use setters */),
1170    ///     ("key1", TableProgress::default()/* use (different) setters */),
1171    /// ]);
1172    /// ```
1173    pub fn set_tables<T, K, V>(mut self, v: T) -> Self
1174    where
1175        T: std::iter::IntoIterator<Item = (K, V)>,
1176        K: std::convert::Into<std::string::String>,
1177        V: std::convert::Into<crate::model::create_cluster_metadata::TableProgress>,
1178    {
1179        use std::iter::Iterator;
1180        self.tables = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1181        self
1182    }
1183}
1184
1185impl wkt::message::Message for CreateClusterMetadata {
1186    fn typename() -> &'static str {
1187        "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata"
1188    }
1189}
1190
1191/// Defines additional types related to [CreateClusterMetadata].
1192pub mod create_cluster_metadata {
1193    #[allow(unused_imports)]
1194    use super::*;
1195
1196    /// Progress info for copying a table's data to the new cluster.
1197    #[derive(Clone, Default, PartialEq)]
1198    #[non_exhaustive]
1199    pub struct TableProgress {
1200        /// Estimate of the size of the table to be copied.
1201        pub estimated_size_bytes: i64,
1202
1203        /// Estimate of the number of bytes copied so far for this table.
1204        /// This will eventually reach 'estimated_size_bytes' unless the table copy
1205        /// is CANCELLED.
1206        pub estimated_copied_bytes: i64,
1207
1208        #[allow(missing_docs)]
1209        pub state: crate::model::create_cluster_metadata::table_progress::State,
1210
1211        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1212    }
1213
1214    impl TableProgress {
1215        /// Creates a new default instance.
1216        pub fn new() -> Self {
1217            std::default::Default::default()
1218        }
1219
1220        /// Sets the value of [estimated_size_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_size_bytes].
1221        ///
1222        /// # Example
1223        /// ```ignore,no_run
1224        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1225        /// let x = TableProgress::new().set_estimated_size_bytes(42);
1226        /// ```
1227        pub fn set_estimated_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1228            self.estimated_size_bytes = v.into();
1229            self
1230        }
1231
1232        /// Sets the value of [estimated_copied_bytes][crate::model::create_cluster_metadata::TableProgress::estimated_copied_bytes].
1233        ///
1234        /// # Example
1235        /// ```ignore,no_run
1236        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1237        /// let x = TableProgress::new().set_estimated_copied_bytes(42);
1238        /// ```
1239        pub fn set_estimated_copied_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
1240            self.estimated_copied_bytes = v.into();
1241            self
1242        }
1243
1244        /// Sets the value of [state][crate::model::create_cluster_metadata::TableProgress::state].
1245        ///
1246        /// # Example
1247        /// ```ignore,no_run
1248        /// # use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::TableProgress;
1249        /// use google_cloud_bigtable_admin_v2::model::create_cluster_metadata::table_progress::State;
1250        /// let x0 = TableProgress::new().set_state(State::Pending);
1251        /// let x1 = TableProgress::new().set_state(State::Copying);
1252        /// let x2 = TableProgress::new().set_state(State::Completed);
1253        /// ```
1254        pub fn set_state<
1255            T: std::convert::Into<crate::model::create_cluster_metadata::table_progress::State>,
1256        >(
1257            mut self,
1258            v: T,
1259        ) -> Self {
1260            self.state = v.into();
1261            self
1262        }
1263    }
1264
1265    impl wkt::message::Message for TableProgress {
1266        fn typename() -> &'static str {
1267            "type.googleapis.com/google.bigtable.admin.v2.CreateClusterMetadata.TableProgress"
1268        }
1269    }
1270
1271    /// Defines additional types related to [TableProgress].
1272    pub mod table_progress {
1273        #[allow(unused_imports)]
1274        use super::*;
1275
1276        /// Enum for [State].
1277        ///
1278        /// # Working with unknown values
1279        ///
1280        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1281        /// additional enum variants at any time. Adding new variants is not considered
1282        /// a breaking change. Applications should write their code in anticipation of:
1283        ///
1284        /// - New values appearing in future releases of the client library, **and**
1285        /// - New values received dynamically, without application changes.
1286        ///
1287        /// Please consult the [Working with enums] section in the user guide for some
1288        /// guidelines.
1289        ///
1290        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1291        #[derive(Clone, Debug, PartialEq)]
1292        #[non_exhaustive]
1293        pub enum State {
1294            #[allow(missing_docs)]
1295            Unspecified,
1296            /// The table has not yet begun copying to the new cluster.
1297            Pending,
1298            /// The table is actively being copied to the new cluster.
1299            Copying,
1300            /// The table has been fully copied to the new cluster.
1301            Completed,
1302            /// The table was deleted before it finished copying to the new cluster.
1303            /// Note that tables deleted after completion will stay marked as
1304            /// COMPLETED, not CANCELLED.
1305            Cancelled,
1306            /// If set, the enum was initialized with an unknown value.
1307            ///
1308            /// Applications can examine the value using [State::value] or
1309            /// [State::name].
1310            UnknownValue(state::UnknownValue),
1311        }
1312
1313        #[doc(hidden)]
1314        pub mod state {
1315            #[allow(unused_imports)]
1316            use super::*;
1317            #[derive(Clone, Debug, PartialEq)]
1318            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1319        }
1320
1321        impl State {
1322            /// Gets the enum value.
1323            ///
1324            /// Returns `None` if the enum contains an unknown value deserialized from
1325            /// the string representation of enums.
1326            pub fn value(&self) -> std::option::Option<i32> {
1327                match self {
1328                    Self::Unspecified => std::option::Option::Some(0),
1329                    Self::Pending => std::option::Option::Some(1),
1330                    Self::Copying => std::option::Option::Some(2),
1331                    Self::Completed => std::option::Option::Some(3),
1332                    Self::Cancelled => std::option::Option::Some(4),
1333                    Self::UnknownValue(u) => u.0.value(),
1334                }
1335            }
1336
1337            /// Gets the enum value as a string.
1338            ///
1339            /// Returns `None` if the enum contains an unknown value deserialized from
1340            /// the integer representation of enums.
1341            pub fn name(&self) -> std::option::Option<&str> {
1342                match self {
1343                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1344                    Self::Pending => std::option::Option::Some("PENDING"),
1345                    Self::Copying => std::option::Option::Some("COPYING"),
1346                    Self::Completed => std::option::Option::Some("COMPLETED"),
1347                    Self::Cancelled => std::option::Option::Some("CANCELLED"),
1348                    Self::UnknownValue(u) => u.0.name(),
1349                }
1350            }
1351        }
1352
1353        impl std::default::Default for State {
1354            fn default() -> Self {
1355                use std::convert::From;
1356                Self::from(0)
1357            }
1358        }
1359
1360        impl std::fmt::Display for State {
1361            fn fmt(
1362                &self,
1363                f: &mut std::fmt::Formatter<'_>,
1364            ) -> std::result::Result<(), std::fmt::Error> {
1365                wkt::internal::display_enum(f, self.name(), self.value())
1366            }
1367        }
1368
1369        impl std::convert::From<i32> for State {
1370            fn from(value: i32) -> Self {
1371                match value {
1372                    0 => Self::Unspecified,
1373                    1 => Self::Pending,
1374                    2 => Self::Copying,
1375                    3 => Self::Completed,
1376                    4 => Self::Cancelled,
1377                    _ => Self::UnknownValue(state::UnknownValue(
1378                        wkt::internal::UnknownEnumValue::Integer(value),
1379                    )),
1380                }
1381            }
1382        }
1383
1384        impl std::convert::From<&str> for State {
1385            fn from(value: &str) -> Self {
1386                use std::string::ToString;
1387                match value {
1388                    "STATE_UNSPECIFIED" => Self::Unspecified,
1389                    "PENDING" => Self::Pending,
1390                    "COPYING" => Self::Copying,
1391                    "COMPLETED" => Self::Completed,
1392                    "CANCELLED" => Self::Cancelled,
1393                    _ => Self::UnknownValue(state::UnknownValue(
1394                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1395                    )),
1396                }
1397            }
1398        }
1399
1400        impl serde::ser::Serialize for State {
1401            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1402            where
1403                S: serde::Serializer,
1404            {
1405                match self {
1406                    Self::Unspecified => serializer.serialize_i32(0),
1407                    Self::Pending => serializer.serialize_i32(1),
1408                    Self::Copying => serializer.serialize_i32(2),
1409                    Self::Completed => serializer.serialize_i32(3),
1410                    Self::Cancelled => serializer.serialize_i32(4),
1411                    Self::UnknownValue(u) => u.0.serialize(serializer),
1412                }
1413            }
1414        }
1415
1416        impl<'de> serde::de::Deserialize<'de> for State {
1417            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1418            where
1419                D: serde::Deserializer<'de>,
1420            {
1421                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1422                    ".google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State",
1423                ))
1424            }
1425        }
1426    }
1427}
1428
1429/// The metadata for the Operation returned by UpdateCluster.
1430#[derive(Clone, Default, PartialEq)]
1431#[non_exhaustive]
1432pub struct UpdateClusterMetadata {
1433    /// The request that prompted the initiation of this UpdateCluster operation.
1434    pub original_request: std::option::Option<crate::model::Cluster>,
1435
1436    /// The time at which the original request was received.
1437    pub request_time: std::option::Option<wkt::Timestamp>,
1438
1439    /// The time at which the operation failed or was completed successfully.
1440    pub finish_time: std::option::Option<wkt::Timestamp>,
1441
1442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1443}
1444
1445impl UpdateClusterMetadata {
1446    /// Creates a new default instance.
1447    pub fn new() -> Self {
1448        std::default::Default::default()
1449    }
1450
1451    /// Sets the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1452    ///
1453    /// # Example
1454    /// ```ignore,no_run
1455    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1456    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1457    /// let x = UpdateClusterMetadata::new().set_original_request(Cluster::default()/* use setters */);
1458    /// ```
1459    pub fn set_original_request<T>(mut self, v: T) -> Self
1460    where
1461        T: std::convert::Into<crate::model::Cluster>,
1462    {
1463        self.original_request = std::option::Option::Some(v.into());
1464        self
1465    }
1466
1467    /// Sets or clears the value of [original_request][crate::model::UpdateClusterMetadata::original_request].
1468    ///
1469    /// # Example
1470    /// ```ignore,no_run
1471    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1472    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1473    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(Some(Cluster::default()/* use setters */));
1474    /// let x = UpdateClusterMetadata::new().set_or_clear_original_request(None::<Cluster>);
1475    /// ```
1476    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1477    where
1478        T: std::convert::Into<crate::model::Cluster>,
1479    {
1480        self.original_request = v.map(|x| x.into());
1481        self
1482    }
1483
1484    /// Sets the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1485    ///
1486    /// # Example
1487    /// ```ignore,no_run
1488    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1489    /// use wkt::Timestamp;
1490    /// let x = UpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1491    /// ```
1492    pub fn set_request_time<T>(mut self, v: T) -> Self
1493    where
1494        T: std::convert::Into<wkt::Timestamp>,
1495    {
1496        self.request_time = std::option::Option::Some(v.into());
1497        self
1498    }
1499
1500    /// Sets or clears the value of [request_time][crate::model::UpdateClusterMetadata::request_time].
1501    ///
1502    /// # Example
1503    /// ```ignore,no_run
1504    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1505    /// use wkt::Timestamp;
1506    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1507    /// let x = UpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1508    /// ```
1509    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1510    where
1511        T: std::convert::Into<wkt::Timestamp>,
1512    {
1513        self.request_time = v.map(|x| x.into());
1514        self
1515    }
1516
1517    /// Sets the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1518    ///
1519    /// # Example
1520    /// ```ignore,no_run
1521    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1522    /// use wkt::Timestamp;
1523    /// let x = UpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1524    /// ```
1525    pub fn set_finish_time<T>(mut self, v: T) -> Self
1526    where
1527        T: std::convert::Into<wkt::Timestamp>,
1528    {
1529        self.finish_time = std::option::Option::Some(v.into());
1530        self
1531    }
1532
1533    /// Sets or clears the value of [finish_time][crate::model::UpdateClusterMetadata::finish_time].
1534    ///
1535    /// # Example
1536    /// ```ignore,no_run
1537    /// # use google_cloud_bigtable_admin_v2::model::UpdateClusterMetadata;
1538    /// use wkt::Timestamp;
1539    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1540    /// let x = UpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1541    /// ```
1542    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1543    where
1544        T: std::convert::Into<wkt::Timestamp>,
1545    {
1546        self.finish_time = v.map(|x| x.into());
1547        self
1548    }
1549}
1550
1551impl wkt::message::Message for UpdateClusterMetadata {
1552    fn typename() -> &'static str {
1553        "type.googleapis.com/google.bigtable.admin.v2.UpdateClusterMetadata"
1554    }
1555}
1556
1557/// The metadata for the Operation returned by PartialUpdateCluster.
1558#[derive(Clone, Default, PartialEq)]
1559#[non_exhaustive]
1560pub struct PartialUpdateClusterMetadata {
1561    /// The time at which the original request was received.
1562    pub request_time: std::option::Option<wkt::Timestamp>,
1563
1564    /// The time at which the operation failed or was completed successfully.
1565    pub finish_time: std::option::Option<wkt::Timestamp>,
1566
1567    /// The original request for PartialUpdateCluster.
1568    pub original_request: std::option::Option<crate::model::PartialUpdateClusterRequest>,
1569
1570    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1571}
1572
1573impl PartialUpdateClusterMetadata {
1574    /// Creates a new default instance.
1575    pub fn new() -> Self {
1576        std::default::Default::default()
1577    }
1578
1579    /// Sets the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1580    ///
1581    /// # Example
1582    /// ```ignore,no_run
1583    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1584    /// use wkt::Timestamp;
1585    /// let x = PartialUpdateClusterMetadata::new().set_request_time(Timestamp::default()/* use setters */);
1586    /// ```
1587    pub fn set_request_time<T>(mut self, v: T) -> Self
1588    where
1589        T: std::convert::Into<wkt::Timestamp>,
1590    {
1591        self.request_time = std::option::Option::Some(v.into());
1592        self
1593    }
1594
1595    /// Sets or clears the value of [request_time][crate::model::PartialUpdateClusterMetadata::request_time].
1596    ///
1597    /// # Example
1598    /// ```ignore,no_run
1599    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1600    /// use wkt::Timestamp;
1601    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
1602    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_request_time(None::<Timestamp>);
1603    /// ```
1604    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
1605    where
1606        T: std::convert::Into<wkt::Timestamp>,
1607    {
1608        self.request_time = v.map(|x| x.into());
1609        self
1610    }
1611
1612    /// Sets the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1613    ///
1614    /// # Example
1615    /// ```ignore,no_run
1616    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1617    /// use wkt::Timestamp;
1618    /// let x = PartialUpdateClusterMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
1619    /// ```
1620    pub fn set_finish_time<T>(mut self, v: T) -> Self
1621    where
1622        T: std::convert::Into<wkt::Timestamp>,
1623    {
1624        self.finish_time = std::option::Option::Some(v.into());
1625        self
1626    }
1627
1628    /// Sets or clears the value of [finish_time][crate::model::PartialUpdateClusterMetadata::finish_time].
1629    ///
1630    /// # Example
1631    /// ```ignore,no_run
1632    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1633    /// use wkt::Timestamp;
1634    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
1635    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
1636    /// ```
1637    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
1638    where
1639        T: std::convert::Into<wkt::Timestamp>,
1640    {
1641        self.finish_time = v.map(|x| x.into());
1642        self
1643    }
1644
1645    /// Sets the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1646    ///
1647    /// # Example
1648    /// ```ignore,no_run
1649    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1650    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1651    /// let x = PartialUpdateClusterMetadata::new().set_original_request(PartialUpdateClusterRequest::default()/* use setters */);
1652    /// ```
1653    pub fn set_original_request<T>(mut self, v: T) -> Self
1654    where
1655        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1656    {
1657        self.original_request = std::option::Option::Some(v.into());
1658        self
1659    }
1660
1661    /// Sets or clears the value of [original_request][crate::model::PartialUpdateClusterMetadata::original_request].
1662    ///
1663    /// # Example
1664    /// ```ignore,no_run
1665    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterMetadata;
1666    /// use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1667    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(Some(PartialUpdateClusterRequest::default()/* use setters */));
1668    /// let x = PartialUpdateClusterMetadata::new().set_or_clear_original_request(None::<PartialUpdateClusterRequest>);
1669    /// ```
1670    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
1671    where
1672        T: std::convert::Into<crate::model::PartialUpdateClusterRequest>,
1673    {
1674        self.original_request = v.map(|x| x.into());
1675        self
1676    }
1677}
1678
1679impl wkt::message::Message for PartialUpdateClusterMetadata {
1680    fn typename() -> &'static str {
1681        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterMetadata"
1682    }
1683}
1684
1685/// Request message for BigtableInstanceAdmin.PartialUpdateCluster.
1686#[derive(Clone, Default, PartialEq)]
1687#[non_exhaustive]
1688pub struct PartialUpdateClusterRequest {
1689    /// Required. The Cluster which contains the partial updates to be applied,
1690    /// subject to the update_mask.
1691    pub cluster: std::option::Option<crate::model::Cluster>,
1692
1693    /// Required. The subset of Cluster fields which should be replaced.
1694    pub update_mask: std::option::Option<wkt::FieldMask>,
1695
1696    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1697}
1698
1699impl PartialUpdateClusterRequest {
1700    /// Creates a new default instance.
1701    pub fn new() -> Self {
1702        std::default::Default::default()
1703    }
1704
1705    /// Sets the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1706    ///
1707    /// # Example
1708    /// ```ignore,no_run
1709    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1710    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1711    /// let x = PartialUpdateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
1712    /// ```
1713    pub fn set_cluster<T>(mut self, v: T) -> Self
1714    where
1715        T: std::convert::Into<crate::model::Cluster>,
1716    {
1717        self.cluster = std::option::Option::Some(v.into());
1718        self
1719    }
1720
1721    /// Sets or clears the value of [cluster][crate::model::PartialUpdateClusterRequest::cluster].
1722    ///
1723    /// # Example
1724    /// ```ignore,no_run
1725    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1726    /// use google_cloud_bigtable_admin_v2::model::Cluster;
1727    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
1728    /// let x = PartialUpdateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
1729    /// ```
1730    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1731    where
1732        T: std::convert::Into<crate::model::Cluster>,
1733    {
1734        self.cluster = v.map(|x| x.into());
1735        self
1736    }
1737
1738    /// Sets the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1739    ///
1740    /// # Example
1741    /// ```ignore,no_run
1742    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1743    /// use wkt::FieldMask;
1744    /// let x = PartialUpdateClusterRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1745    /// ```
1746    pub fn set_update_mask<T>(mut self, v: T) -> Self
1747    where
1748        T: std::convert::Into<wkt::FieldMask>,
1749    {
1750        self.update_mask = std::option::Option::Some(v.into());
1751        self
1752    }
1753
1754    /// Sets or clears the value of [update_mask][crate::model::PartialUpdateClusterRequest::update_mask].
1755    ///
1756    /// # Example
1757    /// ```ignore,no_run
1758    /// # use google_cloud_bigtable_admin_v2::model::PartialUpdateClusterRequest;
1759    /// use wkt::FieldMask;
1760    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1761    /// let x = PartialUpdateClusterRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1762    /// ```
1763    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1764    where
1765        T: std::convert::Into<wkt::FieldMask>,
1766    {
1767        self.update_mask = v.map(|x| x.into());
1768        self
1769    }
1770}
1771
1772impl wkt::message::Message for PartialUpdateClusterRequest {
1773    fn typename() -> &'static str {
1774        "type.googleapis.com/google.bigtable.admin.v2.PartialUpdateClusterRequest"
1775    }
1776}
1777
1778/// Request message for BigtableInstanceAdmin.CreateAppProfile.
1779#[derive(Clone, Default, PartialEq)]
1780#[non_exhaustive]
1781pub struct CreateAppProfileRequest {
1782    /// Required. The unique name of the instance in which to create the new app
1783    /// profile. Values are of the form `projects/{project}/instances/{instance}`.
1784    pub parent: std::string::String,
1785
1786    /// Required. The ID to be used when referring to the new app profile within
1787    /// its instance, e.g., just `myprofile` rather than
1788    /// `projects/myproject/instances/myinstance/appProfiles/myprofile`.
1789    pub app_profile_id: std::string::String,
1790
1791    /// Required. The app profile to be created.
1792    /// Fields marked `OutputOnly` will be ignored.
1793    pub app_profile: std::option::Option<crate::model::AppProfile>,
1794
1795    /// If true, ignore safety checks when creating the app profile.
1796    pub ignore_warnings: bool,
1797
1798    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1799}
1800
1801impl CreateAppProfileRequest {
1802    /// Creates a new default instance.
1803    pub fn new() -> Self {
1804        std::default::Default::default()
1805    }
1806
1807    /// Sets the value of [parent][crate::model::CreateAppProfileRequest::parent].
1808    ///
1809    /// # Example
1810    /// ```ignore,no_run
1811    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1812    /// # let project_id = "project_id";
1813    /// # let instance_id = "instance_id";
1814    /// let x = CreateAppProfileRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
1815    /// ```
1816    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1817        self.parent = v.into();
1818        self
1819    }
1820
1821    /// Sets the value of [app_profile_id][crate::model::CreateAppProfileRequest::app_profile_id].
1822    ///
1823    /// # Example
1824    /// ```ignore,no_run
1825    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1826    /// let x = CreateAppProfileRequest::new().set_app_profile_id("example");
1827    /// ```
1828    pub fn set_app_profile_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1829        self.app_profile_id = v.into();
1830        self
1831    }
1832
1833    /// Sets 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_app_profile(AppProfile::default()/* use setters */);
1840    /// ```
1841    pub fn set_app_profile<T>(mut self, v: T) -> Self
1842    where
1843        T: std::convert::Into<crate::model::AppProfile>,
1844    {
1845        self.app_profile = std::option::Option::Some(v.into());
1846        self
1847    }
1848
1849    /// Sets or clears the value of [app_profile][crate::model::CreateAppProfileRequest::app_profile].
1850    ///
1851    /// # Example
1852    /// ```ignore,no_run
1853    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1854    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
1855    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
1856    /// let x = CreateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
1857    /// ```
1858    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
1859    where
1860        T: std::convert::Into<crate::model::AppProfile>,
1861    {
1862        self.app_profile = v.map(|x| x.into());
1863        self
1864    }
1865
1866    /// Sets the value of [ignore_warnings][crate::model::CreateAppProfileRequest::ignore_warnings].
1867    ///
1868    /// # Example
1869    /// ```ignore,no_run
1870    /// # use google_cloud_bigtable_admin_v2::model::CreateAppProfileRequest;
1871    /// let x = CreateAppProfileRequest::new().set_ignore_warnings(true);
1872    /// ```
1873    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1874        self.ignore_warnings = v.into();
1875        self
1876    }
1877}
1878
1879impl wkt::message::Message for CreateAppProfileRequest {
1880    fn typename() -> &'static str {
1881        "type.googleapis.com/google.bigtable.admin.v2.CreateAppProfileRequest"
1882    }
1883}
1884
1885/// Request message for BigtableInstanceAdmin.GetAppProfile.
1886#[derive(Clone, Default, PartialEq)]
1887#[non_exhaustive]
1888pub struct GetAppProfileRequest {
1889    /// Required. The unique name of the requested app profile. Values are of the
1890    /// form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
1891    pub name: std::string::String,
1892
1893    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1894}
1895
1896impl GetAppProfileRequest {
1897    /// Creates a new default instance.
1898    pub fn new() -> Self {
1899        std::default::Default::default()
1900    }
1901
1902    /// Sets the value of [name][crate::model::GetAppProfileRequest::name].
1903    ///
1904    /// # Example
1905    /// ```ignore,no_run
1906    /// # use google_cloud_bigtable_admin_v2::model::GetAppProfileRequest;
1907    /// # let project_id = "project_id";
1908    /// # let instance_id = "instance_id";
1909    /// # let app_profile_id = "app_profile_id";
1910    /// let x = GetAppProfileRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"));
1911    /// ```
1912    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1913        self.name = v.into();
1914        self
1915    }
1916}
1917
1918impl wkt::message::Message for GetAppProfileRequest {
1919    fn typename() -> &'static str {
1920        "type.googleapis.com/google.bigtable.admin.v2.GetAppProfileRequest"
1921    }
1922}
1923
1924/// Request message for BigtableInstanceAdmin.ListAppProfiles.
1925#[derive(Clone, Default, PartialEq)]
1926#[non_exhaustive]
1927pub struct ListAppProfilesRequest {
1928    /// Required. The unique name of the instance for which a list of app profiles
1929    /// is requested. Values are of the form
1930    /// `projects/{project}/instances/{instance}`.
1931    /// Use `{instance} = '-'` to list AppProfiles for all Instances in a project,
1932    /// e.g., `projects/myproject/instances/-`.
1933    pub parent: std::string::String,
1934
1935    /// Maximum number of results per page.
1936    ///
1937    /// A page_size of zero lets the server choose the number of items to return.
1938    /// A page_size which is strictly positive will return at most that many items.
1939    /// A negative page_size will cause an error.
1940    ///
1941    /// Following the first request, subsequent paginated calls are not required
1942    /// to pass a page_size. If a page_size is set in subsequent calls, it must
1943    /// match the page_size given in the first request.
1944    pub page_size: i32,
1945
1946    /// The value of `next_page_token` returned by a previous call.
1947    pub page_token: std::string::String,
1948
1949    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1950}
1951
1952impl ListAppProfilesRequest {
1953    /// Creates a new default instance.
1954    pub fn new() -> Self {
1955        std::default::Default::default()
1956    }
1957
1958    /// Sets the value of [parent][crate::model::ListAppProfilesRequest::parent].
1959    ///
1960    /// # Example
1961    /// ```ignore,no_run
1962    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1963    /// # let project_id = "project_id";
1964    /// # let instance_id = "instance_id";
1965    /// let x = ListAppProfilesRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
1966    /// ```
1967    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1968        self.parent = v.into();
1969        self
1970    }
1971
1972    /// Sets the value of [page_size][crate::model::ListAppProfilesRequest::page_size].
1973    ///
1974    /// # Example
1975    /// ```ignore,no_run
1976    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1977    /// let x = ListAppProfilesRequest::new().set_page_size(42);
1978    /// ```
1979    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1980        self.page_size = v.into();
1981        self
1982    }
1983
1984    /// Sets the value of [page_token][crate::model::ListAppProfilesRequest::page_token].
1985    ///
1986    /// # Example
1987    /// ```ignore,no_run
1988    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesRequest;
1989    /// let x = ListAppProfilesRequest::new().set_page_token("example");
1990    /// ```
1991    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1992        self.page_token = v.into();
1993        self
1994    }
1995}
1996
1997impl wkt::message::Message for ListAppProfilesRequest {
1998    fn typename() -> &'static str {
1999        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesRequest"
2000    }
2001}
2002
2003/// Response message for BigtableInstanceAdmin.ListAppProfiles.
2004#[derive(Clone, Default, PartialEq)]
2005#[non_exhaustive]
2006pub struct ListAppProfilesResponse {
2007    /// The list of requested app profiles.
2008    pub app_profiles: std::vec::Vec<crate::model::AppProfile>,
2009
2010    /// Set if not all app profiles could be returned in a single response.
2011    /// Pass this value to `page_token` in another request to get the next
2012    /// page of results.
2013    pub next_page_token: std::string::String,
2014
2015    /// Locations from which AppProfile information could not be retrieved,
2016    /// due to an outage or some other transient condition.
2017    /// AppProfiles from these locations may be missing from `app_profiles`.
2018    /// Values are of the form `projects/<project>/locations/<zone_id>`
2019    pub failed_locations: std::vec::Vec<std::string::String>,
2020
2021    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2022}
2023
2024impl ListAppProfilesResponse {
2025    /// Creates a new default instance.
2026    pub fn new() -> Self {
2027        std::default::Default::default()
2028    }
2029
2030    /// Sets the value of [app_profiles][crate::model::ListAppProfilesResponse::app_profiles].
2031    ///
2032    /// # Example
2033    /// ```ignore,no_run
2034    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2035    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2036    /// let x = ListAppProfilesResponse::new()
2037    ///     .set_app_profiles([
2038    ///         AppProfile::default()/* use setters */,
2039    ///         AppProfile::default()/* use (different) setters */,
2040    ///     ]);
2041    /// ```
2042    pub fn set_app_profiles<T, V>(mut self, v: T) -> Self
2043    where
2044        T: std::iter::IntoIterator<Item = V>,
2045        V: std::convert::Into<crate::model::AppProfile>,
2046    {
2047        use std::iter::Iterator;
2048        self.app_profiles = v.into_iter().map(|i| i.into()).collect();
2049        self
2050    }
2051
2052    /// Sets the value of [next_page_token][crate::model::ListAppProfilesResponse::next_page_token].
2053    ///
2054    /// # Example
2055    /// ```ignore,no_run
2056    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2057    /// let x = ListAppProfilesResponse::new().set_next_page_token("example");
2058    /// ```
2059    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2060        self.next_page_token = v.into();
2061        self
2062    }
2063
2064    /// Sets the value of [failed_locations][crate::model::ListAppProfilesResponse::failed_locations].
2065    ///
2066    /// # Example
2067    /// ```ignore,no_run
2068    /// # use google_cloud_bigtable_admin_v2::model::ListAppProfilesResponse;
2069    /// let x = ListAppProfilesResponse::new().set_failed_locations(["a", "b", "c"]);
2070    /// ```
2071    pub fn set_failed_locations<T, V>(mut self, v: T) -> Self
2072    where
2073        T: std::iter::IntoIterator<Item = V>,
2074        V: std::convert::Into<std::string::String>,
2075    {
2076        use std::iter::Iterator;
2077        self.failed_locations = v.into_iter().map(|i| i.into()).collect();
2078        self
2079    }
2080}
2081
2082impl wkt::message::Message for ListAppProfilesResponse {
2083    fn typename() -> &'static str {
2084        "type.googleapis.com/google.bigtable.admin.v2.ListAppProfilesResponse"
2085    }
2086}
2087
2088#[doc(hidden)]
2089impl google_cloud_gax::paginator::internal::PageableResponse for ListAppProfilesResponse {
2090    type PageItem = crate::model::AppProfile;
2091
2092    fn items(self) -> std::vec::Vec<Self::PageItem> {
2093        self.app_profiles
2094    }
2095
2096    fn next_page_token(&self) -> std::string::String {
2097        use std::clone::Clone;
2098        self.next_page_token.clone()
2099    }
2100}
2101
2102/// Request message for BigtableInstanceAdmin.UpdateAppProfile.
2103#[derive(Clone, Default, PartialEq)]
2104#[non_exhaustive]
2105pub struct UpdateAppProfileRequest {
2106    /// Required. The app profile which will (partially) replace the current value.
2107    pub app_profile: std::option::Option<crate::model::AppProfile>,
2108
2109    /// Required. The subset of app profile fields which should be replaced.
2110    /// If unset, all fields will be replaced.
2111    pub update_mask: std::option::Option<wkt::FieldMask>,
2112
2113    /// If true, ignore safety checks when updating the app profile.
2114    pub ignore_warnings: bool,
2115
2116    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2117}
2118
2119impl UpdateAppProfileRequest {
2120    /// Creates a new default instance.
2121    pub fn new() -> Self {
2122        std::default::Default::default()
2123    }
2124
2125    /// Sets the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2126    ///
2127    /// # Example
2128    /// ```ignore,no_run
2129    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2130    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2131    /// let x = UpdateAppProfileRequest::new().set_app_profile(AppProfile::default()/* use setters */);
2132    /// ```
2133    pub fn set_app_profile<T>(mut self, v: T) -> Self
2134    where
2135        T: std::convert::Into<crate::model::AppProfile>,
2136    {
2137        self.app_profile = std::option::Option::Some(v.into());
2138        self
2139    }
2140
2141    /// Sets or clears the value of [app_profile][crate::model::UpdateAppProfileRequest::app_profile].
2142    ///
2143    /// # Example
2144    /// ```ignore,no_run
2145    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2146    /// use google_cloud_bigtable_admin_v2::model::AppProfile;
2147    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(Some(AppProfile::default()/* use setters */));
2148    /// let x = UpdateAppProfileRequest::new().set_or_clear_app_profile(None::<AppProfile>);
2149    /// ```
2150    pub fn set_or_clear_app_profile<T>(mut self, v: std::option::Option<T>) -> Self
2151    where
2152        T: std::convert::Into<crate::model::AppProfile>,
2153    {
2154        self.app_profile = v.map(|x| x.into());
2155        self
2156    }
2157
2158    /// Sets the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2159    ///
2160    /// # Example
2161    /// ```ignore,no_run
2162    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2163    /// use wkt::FieldMask;
2164    /// let x = UpdateAppProfileRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2165    /// ```
2166    pub fn set_update_mask<T>(mut self, v: T) -> Self
2167    where
2168        T: std::convert::Into<wkt::FieldMask>,
2169    {
2170        self.update_mask = std::option::Option::Some(v.into());
2171        self
2172    }
2173
2174    /// Sets or clears the value of [update_mask][crate::model::UpdateAppProfileRequest::update_mask].
2175    ///
2176    /// # Example
2177    /// ```ignore,no_run
2178    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2179    /// use wkt::FieldMask;
2180    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2181    /// let x = UpdateAppProfileRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2182    /// ```
2183    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2184    where
2185        T: std::convert::Into<wkt::FieldMask>,
2186    {
2187        self.update_mask = v.map(|x| x.into());
2188        self
2189    }
2190
2191    /// Sets the value of [ignore_warnings][crate::model::UpdateAppProfileRequest::ignore_warnings].
2192    ///
2193    /// # Example
2194    /// ```ignore,no_run
2195    /// # use google_cloud_bigtable_admin_v2::model::UpdateAppProfileRequest;
2196    /// let x = UpdateAppProfileRequest::new().set_ignore_warnings(true);
2197    /// ```
2198    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2199        self.ignore_warnings = v.into();
2200        self
2201    }
2202}
2203
2204impl wkt::message::Message for UpdateAppProfileRequest {
2205    fn typename() -> &'static str {
2206        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileRequest"
2207    }
2208}
2209
2210/// Request message for BigtableInstanceAdmin.DeleteAppProfile.
2211#[derive(Clone, Default, PartialEq)]
2212#[non_exhaustive]
2213pub struct DeleteAppProfileRequest {
2214    /// Required. The unique name of the app profile to be deleted. Values are of
2215    /// the form
2216    /// `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
2217    pub name: std::string::String,
2218
2219    /// Required. If true, ignore safety checks when deleting the app profile.
2220    pub ignore_warnings: bool,
2221
2222    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2223}
2224
2225impl DeleteAppProfileRequest {
2226    /// Creates a new default instance.
2227    pub fn new() -> Self {
2228        std::default::Default::default()
2229    }
2230
2231    /// Sets the value of [name][crate::model::DeleteAppProfileRequest::name].
2232    ///
2233    /// # Example
2234    /// ```ignore,no_run
2235    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2236    /// # let project_id = "project_id";
2237    /// # let instance_id = "instance_id";
2238    /// # let app_profile_id = "app_profile_id";
2239    /// let x = DeleteAppProfileRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"));
2240    /// ```
2241    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2242        self.name = v.into();
2243        self
2244    }
2245
2246    /// Sets the value of [ignore_warnings][crate::model::DeleteAppProfileRequest::ignore_warnings].
2247    ///
2248    /// # Example
2249    /// ```ignore,no_run
2250    /// # use google_cloud_bigtable_admin_v2::model::DeleteAppProfileRequest;
2251    /// let x = DeleteAppProfileRequest::new().set_ignore_warnings(true);
2252    /// ```
2253    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2254        self.ignore_warnings = v.into();
2255        self
2256    }
2257}
2258
2259impl wkt::message::Message for DeleteAppProfileRequest {
2260    fn typename() -> &'static str {
2261        "type.googleapis.com/google.bigtable.admin.v2.DeleteAppProfileRequest"
2262    }
2263}
2264
2265/// The metadata for the Operation returned by UpdateAppProfile.
2266#[derive(Clone, Default, PartialEq)]
2267#[non_exhaustive]
2268pub struct UpdateAppProfileMetadata {
2269    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2270}
2271
2272impl UpdateAppProfileMetadata {
2273    /// Creates a new default instance.
2274    pub fn new() -> Self {
2275        std::default::Default::default()
2276    }
2277}
2278
2279impl wkt::message::Message for UpdateAppProfileMetadata {
2280    fn typename() -> &'static str {
2281        "type.googleapis.com/google.bigtable.admin.v2.UpdateAppProfileMetadata"
2282    }
2283}
2284
2285/// Request message for BigtableInstanceAdmin.ListHotTablets.
2286#[derive(Clone, Default, PartialEq)]
2287#[non_exhaustive]
2288pub struct ListHotTabletsRequest {
2289    /// Required. The cluster name to list hot tablets.
2290    /// Value is in the following form:
2291    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
2292    pub parent: std::string::String,
2293
2294    /// The start time to list hot tablets. The hot tablets in the response will
2295    /// have start times between the requested start time and end time. Start time
2296    /// defaults to Now if it is unset, and end time defaults to Now - 24 hours if
2297    /// it is unset. The start time should be less than the end time, and the
2298    /// maximum allowed time range between start time and end time is 48 hours.
2299    /// Start time and end time should have values between Now and Now - 14 days.
2300    pub start_time: std::option::Option<wkt::Timestamp>,
2301
2302    /// The end time to list hot tablets.
2303    pub end_time: std::option::Option<wkt::Timestamp>,
2304
2305    /// Maximum number of results per page.
2306    ///
2307    /// A page_size that is empty or zero lets the server choose the number of
2308    /// items to return. A page_size which is strictly positive will return at most
2309    /// that many items. A negative page_size will cause an error.
2310    ///
2311    /// Following the first request, subsequent paginated calls do not need a
2312    /// page_size field. If a page_size is set in subsequent calls, it must match
2313    /// the page_size given in the first request.
2314    pub page_size: i32,
2315
2316    /// The value of `next_page_token` returned by a previous call.
2317    pub page_token: std::string::String,
2318
2319    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2320}
2321
2322impl ListHotTabletsRequest {
2323    /// Creates a new default instance.
2324    pub fn new() -> Self {
2325        std::default::Default::default()
2326    }
2327
2328    /// Sets the value of [parent][crate::model::ListHotTabletsRequest::parent].
2329    ///
2330    /// # Example
2331    /// ```ignore,no_run
2332    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2333    /// # let project_id = "project_id";
2334    /// # let instance_id = "instance_id";
2335    /// # let cluster_id = "cluster_id";
2336    /// let x = ListHotTabletsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
2337    /// ```
2338    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2339        self.parent = v.into();
2340        self
2341    }
2342
2343    /// Sets the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2344    ///
2345    /// # Example
2346    /// ```ignore,no_run
2347    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2348    /// use wkt::Timestamp;
2349    /// let x = ListHotTabletsRequest::new().set_start_time(Timestamp::default()/* use setters */);
2350    /// ```
2351    pub fn set_start_time<T>(mut self, v: T) -> Self
2352    where
2353        T: std::convert::Into<wkt::Timestamp>,
2354    {
2355        self.start_time = std::option::Option::Some(v.into());
2356        self
2357    }
2358
2359    /// Sets or clears the value of [start_time][crate::model::ListHotTabletsRequest::start_time].
2360    ///
2361    /// # Example
2362    /// ```ignore,no_run
2363    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2364    /// use wkt::Timestamp;
2365    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2366    /// let x = ListHotTabletsRequest::new().set_or_clear_start_time(None::<Timestamp>);
2367    /// ```
2368    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2369    where
2370        T: std::convert::Into<wkt::Timestamp>,
2371    {
2372        self.start_time = v.map(|x| x.into());
2373        self
2374    }
2375
2376    /// Sets the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2377    ///
2378    /// # Example
2379    /// ```ignore,no_run
2380    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2381    /// use wkt::Timestamp;
2382    /// let x = ListHotTabletsRequest::new().set_end_time(Timestamp::default()/* use setters */);
2383    /// ```
2384    pub fn set_end_time<T>(mut self, v: T) -> Self
2385    where
2386        T: std::convert::Into<wkt::Timestamp>,
2387    {
2388        self.end_time = std::option::Option::Some(v.into());
2389        self
2390    }
2391
2392    /// Sets or clears the value of [end_time][crate::model::ListHotTabletsRequest::end_time].
2393    ///
2394    /// # Example
2395    /// ```ignore,no_run
2396    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2397    /// use wkt::Timestamp;
2398    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2399    /// let x = ListHotTabletsRequest::new().set_or_clear_end_time(None::<Timestamp>);
2400    /// ```
2401    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2402    where
2403        T: std::convert::Into<wkt::Timestamp>,
2404    {
2405        self.end_time = v.map(|x| x.into());
2406        self
2407    }
2408
2409    /// Sets the value of [page_size][crate::model::ListHotTabletsRequest::page_size].
2410    ///
2411    /// # Example
2412    /// ```ignore,no_run
2413    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2414    /// let x = ListHotTabletsRequest::new().set_page_size(42);
2415    /// ```
2416    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2417        self.page_size = v.into();
2418        self
2419    }
2420
2421    /// Sets the value of [page_token][crate::model::ListHotTabletsRequest::page_token].
2422    ///
2423    /// # Example
2424    /// ```ignore,no_run
2425    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsRequest;
2426    /// let x = ListHotTabletsRequest::new().set_page_token("example");
2427    /// ```
2428    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2429        self.page_token = v.into();
2430        self
2431    }
2432}
2433
2434impl wkt::message::Message for ListHotTabletsRequest {
2435    fn typename() -> &'static str {
2436        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsRequest"
2437    }
2438}
2439
2440/// Response message for BigtableInstanceAdmin.ListHotTablets.
2441#[derive(Clone, Default, PartialEq)]
2442#[non_exhaustive]
2443pub struct ListHotTabletsResponse {
2444    /// List of hot tablets in the tables of the requested cluster that fall
2445    /// within the requested time range. Hot tablets are ordered by node cpu usage
2446    /// percent. If there are multiple hot tablets that correspond to the same
2447    /// tablet within a 15-minute interval, only the hot tablet with the highest
2448    /// node cpu usage will be included in the response.
2449    pub hot_tablets: std::vec::Vec<crate::model::HotTablet>,
2450
2451    /// Set if not all hot tablets could be returned in a single response.
2452    /// Pass this value to `page_token` in another request to get the next
2453    /// page of results.
2454    pub next_page_token: std::string::String,
2455
2456    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2457}
2458
2459impl ListHotTabletsResponse {
2460    /// Creates a new default instance.
2461    pub fn new() -> Self {
2462        std::default::Default::default()
2463    }
2464
2465    /// Sets the value of [hot_tablets][crate::model::ListHotTabletsResponse::hot_tablets].
2466    ///
2467    /// # Example
2468    /// ```ignore,no_run
2469    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2470    /// use google_cloud_bigtable_admin_v2::model::HotTablet;
2471    /// let x = ListHotTabletsResponse::new()
2472    ///     .set_hot_tablets([
2473    ///         HotTablet::default()/* use setters */,
2474    ///         HotTablet::default()/* use (different) setters */,
2475    ///     ]);
2476    /// ```
2477    pub fn set_hot_tablets<T, V>(mut self, v: T) -> Self
2478    where
2479        T: std::iter::IntoIterator<Item = V>,
2480        V: std::convert::Into<crate::model::HotTablet>,
2481    {
2482        use std::iter::Iterator;
2483        self.hot_tablets = v.into_iter().map(|i| i.into()).collect();
2484        self
2485    }
2486
2487    /// Sets the value of [next_page_token][crate::model::ListHotTabletsResponse::next_page_token].
2488    ///
2489    /// # Example
2490    /// ```ignore,no_run
2491    /// # use google_cloud_bigtable_admin_v2::model::ListHotTabletsResponse;
2492    /// let x = ListHotTabletsResponse::new().set_next_page_token("example");
2493    /// ```
2494    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2495        self.next_page_token = v.into();
2496        self
2497    }
2498}
2499
2500impl wkt::message::Message for ListHotTabletsResponse {
2501    fn typename() -> &'static str {
2502        "type.googleapis.com/google.bigtable.admin.v2.ListHotTabletsResponse"
2503    }
2504}
2505
2506#[doc(hidden)]
2507impl google_cloud_gax::paginator::internal::PageableResponse for ListHotTabletsResponse {
2508    type PageItem = crate::model::HotTablet;
2509
2510    fn items(self) -> std::vec::Vec<Self::PageItem> {
2511        self.hot_tablets
2512    }
2513
2514    fn next_page_token(&self) -> std::string::String {
2515        use std::clone::Clone;
2516        self.next_page_token.clone()
2517    }
2518}
2519
2520/// Request message for BigtableInstanceAdmin.CreateLogicalView.
2521#[derive(Clone, Default, PartialEq)]
2522#[non_exhaustive]
2523pub struct CreateLogicalViewRequest {
2524    /// Required. The parent instance where this logical view will be created.
2525    /// Format: `projects/{project}/instances/{instance}`.
2526    pub parent: std::string::String,
2527
2528    /// Required. The ID to use for the logical view, which will become the final
2529    /// component of the logical view's resource name.
2530    pub logical_view_id: std::string::String,
2531
2532    /// Required. The logical view to create.
2533    pub logical_view: std::option::Option<crate::model::LogicalView>,
2534
2535    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2536}
2537
2538impl CreateLogicalViewRequest {
2539    /// Creates a new default instance.
2540    pub fn new() -> Self {
2541        std::default::Default::default()
2542    }
2543
2544    /// Sets the value of [parent][crate::model::CreateLogicalViewRequest::parent].
2545    ///
2546    /// # Example
2547    /// ```ignore,no_run
2548    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2549    /// # let project_id = "project_id";
2550    /// # let instance_id = "instance_id";
2551    /// let x = CreateLogicalViewRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
2552    /// ```
2553    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2554        self.parent = v.into();
2555        self
2556    }
2557
2558    /// Sets the value of [logical_view_id][crate::model::CreateLogicalViewRequest::logical_view_id].
2559    ///
2560    /// # Example
2561    /// ```ignore,no_run
2562    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2563    /// let x = CreateLogicalViewRequest::new().set_logical_view_id("example");
2564    /// ```
2565    pub fn set_logical_view_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2566        self.logical_view_id = v.into();
2567        self
2568    }
2569
2570    /// Sets the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2571    ///
2572    /// # Example
2573    /// ```ignore,no_run
2574    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2575    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2576    /// let x = CreateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
2577    /// ```
2578    pub fn set_logical_view<T>(mut self, v: T) -> Self
2579    where
2580        T: std::convert::Into<crate::model::LogicalView>,
2581    {
2582        self.logical_view = std::option::Option::Some(v.into());
2583        self
2584    }
2585
2586    /// Sets or clears the value of [logical_view][crate::model::CreateLogicalViewRequest::logical_view].
2587    ///
2588    /// # Example
2589    /// ```ignore,no_run
2590    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2591    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2592    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
2593    /// let x = CreateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
2594    /// ```
2595    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2596    where
2597        T: std::convert::Into<crate::model::LogicalView>,
2598    {
2599        self.logical_view = v.map(|x| x.into());
2600        self
2601    }
2602}
2603
2604impl wkt::message::Message for CreateLogicalViewRequest {
2605    fn typename() -> &'static str {
2606        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewRequest"
2607    }
2608}
2609
2610/// The metadata for the Operation returned by CreateLogicalView.
2611#[derive(Clone, Default, PartialEq)]
2612#[non_exhaustive]
2613pub struct CreateLogicalViewMetadata {
2614    /// The request that prompted the initiation of this CreateLogicalView
2615    /// operation.
2616    pub original_request: std::option::Option<crate::model::CreateLogicalViewRequest>,
2617
2618    /// The time at which this operation started.
2619    pub start_time: std::option::Option<wkt::Timestamp>,
2620
2621    /// If set, the time at which this operation finished or was canceled.
2622    pub end_time: std::option::Option<wkt::Timestamp>,
2623
2624    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2625}
2626
2627impl CreateLogicalViewMetadata {
2628    /// Creates a new default instance.
2629    pub fn new() -> Self {
2630        std::default::Default::default()
2631    }
2632
2633    /// Sets the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
2634    ///
2635    /// # Example
2636    /// ```ignore,no_run
2637    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2638    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2639    /// let x = CreateLogicalViewMetadata::new().set_original_request(CreateLogicalViewRequest::default()/* use setters */);
2640    /// ```
2641    pub fn set_original_request<T>(mut self, v: T) -> Self
2642    where
2643        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
2644    {
2645        self.original_request = std::option::Option::Some(v.into());
2646        self
2647    }
2648
2649    /// Sets or clears the value of [original_request][crate::model::CreateLogicalViewMetadata::original_request].
2650    ///
2651    /// # Example
2652    /// ```ignore,no_run
2653    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2654    /// use google_cloud_bigtable_admin_v2::model::CreateLogicalViewRequest;
2655    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(Some(CreateLogicalViewRequest::default()/* use setters */));
2656    /// let x = CreateLogicalViewMetadata::new().set_or_clear_original_request(None::<CreateLogicalViewRequest>);
2657    /// ```
2658    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
2659    where
2660        T: std::convert::Into<crate::model::CreateLogicalViewRequest>,
2661    {
2662        self.original_request = v.map(|x| x.into());
2663        self
2664    }
2665
2666    /// Sets the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
2667    ///
2668    /// # Example
2669    /// ```ignore,no_run
2670    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2671    /// use wkt::Timestamp;
2672    /// let x = CreateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
2673    /// ```
2674    pub fn set_start_time<T>(mut self, v: T) -> Self
2675    where
2676        T: std::convert::Into<wkt::Timestamp>,
2677    {
2678        self.start_time = std::option::Option::Some(v.into());
2679        self
2680    }
2681
2682    /// Sets or clears the value of [start_time][crate::model::CreateLogicalViewMetadata::start_time].
2683    ///
2684    /// # Example
2685    /// ```ignore,no_run
2686    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2687    /// use wkt::Timestamp;
2688    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
2689    /// let x = CreateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
2690    /// ```
2691    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
2692    where
2693        T: std::convert::Into<wkt::Timestamp>,
2694    {
2695        self.start_time = v.map(|x| x.into());
2696        self
2697    }
2698
2699    /// Sets the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
2700    ///
2701    /// # Example
2702    /// ```ignore,no_run
2703    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2704    /// use wkt::Timestamp;
2705    /// let x = CreateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
2706    /// ```
2707    pub fn set_end_time<T>(mut self, v: T) -> Self
2708    where
2709        T: std::convert::Into<wkt::Timestamp>,
2710    {
2711        self.end_time = std::option::Option::Some(v.into());
2712        self
2713    }
2714
2715    /// Sets or clears the value of [end_time][crate::model::CreateLogicalViewMetadata::end_time].
2716    ///
2717    /// # Example
2718    /// ```ignore,no_run
2719    /// # use google_cloud_bigtable_admin_v2::model::CreateLogicalViewMetadata;
2720    /// use wkt::Timestamp;
2721    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2722    /// let x = CreateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
2723    /// ```
2724    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2725    where
2726        T: std::convert::Into<wkt::Timestamp>,
2727    {
2728        self.end_time = v.map(|x| x.into());
2729        self
2730    }
2731}
2732
2733impl wkt::message::Message for CreateLogicalViewMetadata {
2734    fn typename() -> &'static str {
2735        "type.googleapis.com/google.bigtable.admin.v2.CreateLogicalViewMetadata"
2736    }
2737}
2738
2739/// Request message for BigtableInstanceAdmin.GetLogicalView.
2740#[derive(Clone, Default, PartialEq)]
2741#[non_exhaustive]
2742pub struct GetLogicalViewRequest {
2743    /// Required. The unique name of the requested logical view. Values are of the
2744    /// form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2745    pub name: std::string::String,
2746
2747    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2748}
2749
2750impl GetLogicalViewRequest {
2751    /// Creates a new default instance.
2752    pub fn new() -> Self {
2753        std::default::Default::default()
2754    }
2755
2756    /// Sets the value of [name][crate::model::GetLogicalViewRequest::name].
2757    ///
2758    /// # Example
2759    /// ```ignore,no_run
2760    /// # use google_cloud_bigtable_admin_v2::model::GetLogicalViewRequest;
2761    /// # let project_id = "project_id";
2762    /// # let instance_id = "instance_id";
2763    /// # let logical_view_id = "logical_view_id";
2764    /// let x = GetLogicalViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"));
2765    /// ```
2766    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2767        self.name = v.into();
2768        self
2769    }
2770}
2771
2772impl wkt::message::Message for GetLogicalViewRequest {
2773    fn typename() -> &'static str {
2774        "type.googleapis.com/google.bigtable.admin.v2.GetLogicalViewRequest"
2775    }
2776}
2777
2778/// Request message for BigtableInstanceAdmin.ListLogicalViews.
2779#[derive(Clone, Default, PartialEq)]
2780#[non_exhaustive]
2781pub struct ListLogicalViewsRequest {
2782    /// Required. The unique name of the instance for which the list of logical
2783    /// views is requested. Values are of the form
2784    /// `projects/{project}/instances/{instance}`.
2785    pub parent: std::string::String,
2786
2787    /// Optional. The maximum number of logical views to return. The service may
2788    /// return fewer than this value
2789    pub page_size: i32,
2790
2791    /// Optional. A page token, received from a previous `ListLogicalViews` call.
2792    /// Provide this to retrieve the subsequent page.
2793    ///
2794    /// When paginating, all other parameters provided to `ListLogicalViews` must
2795    /// match the call that provided the page token.
2796    pub page_token: std::string::String,
2797
2798    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2799}
2800
2801impl ListLogicalViewsRequest {
2802    /// Creates a new default instance.
2803    pub fn new() -> Self {
2804        std::default::Default::default()
2805    }
2806
2807    /// Sets the value of [parent][crate::model::ListLogicalViewsRequest::parent].
2808    ///
2809    /// # Example
2810    /// ```ignore,no_run
2811    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2812    /// # let project_id = "project_id";
2813    /// # let instance_id = "instance_id";
2814    /// let x = ListLogicalViewsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
2815    /// ```
2816    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2817        self.parent = v.into();
2818        self
2819    }
2820
2821    /// Sets the value of [page_size][crate::model::ListLogicalViewsRequest::page_size].
2822    ///
2823    /// # Example
2824    /// ```ignore,no_run
2825    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2826    /// let x = ListLogicalViewsRequest::new().set_page_size(42);
2827    /// ```
2828    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2829        self.page_size = v.into();
2830        self
2831    }
2832
2833    /// Sets the value of [page_token][crate::model::ListLogicalViewsRequest::page_token].
2834    ///
2835    /// # Example
2836    /// ```ignore,no_run
2837    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsRequest;
2838    /// let x = ListLogicalViewsRequest::new().set_page_token("example");
2839    /// ```
2840    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2841        self.page_token = v.into();
2842        self
2843    }
2844}
2845
2846impl wkt::message::Message for ListLogicalViewsRequest {
2847    fn typename() -> &'static str {
2848        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsRequest"
2849    }
2850}
2851
2852/// Response message for BigtableInstanceAdmin.ListLogicalViews.
2853#[derive(Clone, Default, PartialEq)]
2854#[non_exhaustive]
2855pub struct ListLogicalViewsResponse {
2856    /// The list of requested logical views.
2857    pub logical_views: std::vec::Vec<crate::model::LogicalView>,
2858
2859    /// A token, which can be sent as `page_token` to retrieve the next page.
2860    /// If this field is omitted, there are no subsequent pages.
2861    pub next_page_token: std::string::String,
2862
2863    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2864}
2865
2866impl ListLogicalViewsResponse {
2867    /// Creates a new default instance.
2868    pub fn new() -> Self {
2869        std::default::Default::default()
2870    }
2871
2872    /// Sets the value of [logical_views][crate::model::ListLogicalViewsResponse::logical_views].
2873    ///
2874    /// # Example
2875    /// ```ignore,no_run
2876    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
2877    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2878    /// let x = ListLogicalViewsResponse::new()
2879    ///     .set_logical_views([
2880    ///         LogicalView::default()/* use setters */,
2881    ///         LogicalView::default()/* use (different) setters */,
2882    ///     ]);
2883    /// ```
2884    pub fn set_logical_views<T, V>(mut self, v: T) -> Self
2885    where
2886        T: std::iter::IntoIterator<Item = V>,
2887        V: std::convert::Into<crate::model::LogicalView>,
2888    {
2889        use std::iter::Iterator;
2890        self.logical_views = v.into_iter().map(|i| i.into()).collect();
2891        self
2892    }
2893
2894    /// Sets the value of [next_page_token][crate::model::ListLogicalViewsResponse::next_page_token].
2895    ///
2896    /// # Example
2897    /// ```ignore,no_run
2898    /// # use google_cloud_bigtable_admin_v2::model::ListLogicalViewsResponse;
2899    /// let x = ListLogicalViewsResponse::new().set_next_page_token("example");
2900    /// ```
2901    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2902        self.next_page_token = v.into();
2903        self
2904    }
2905}
2906
2907impl wkt::message::Message for ListLogicalViewsResponse {
2908    fn typename() -> &'static str {
2909        "type.googleapis.com/google.bigtable.admin.v2.ListLogicalViewsResponse"
2910    }
2911}
2912
2913#[doc(hidden)]
2914impl google_cloud_gax::paginator::internal::PageableResponse for ListLogicalViewsResponse {
2915    type PageItem = crate::model::LogicalView;
2916
2917    fn items(self) -> std::vec::Vec<Self::PageItem> {
2918        self.logical_views
2919    }
2920
2921    fn next_page_token(&self) -> std::string::String {
2922        use std::clone::Clone;
2923        self.next_page_token.clone()
2924    }
2925}
2926
2927/// Request message for BigtableInstanceAdmin.UpdateLogicalView.
2928#[derive(Clone, Default, PartialEq)]
2929#[non_exhaustive]
2930pub struct UpdateLogicalViewRequest {
2931    /// Required. The logical view to update.
2932    ///
2933    /// The logical view's `name` field is used to identify the view to update.
2934    /// Format:
2935    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2936    pub logical_view: std::option::Option<crate::model::LogicalView>,
2937
2938    /// Optional. The list of fields to update.
2939    pub update_mask: std::option::Option<wkt::FieldMask>,
2940
2941    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2942}
2943
2944impl UpdateLogicalViewRequest {
2945    /// Creates a new default instance.
2946    pub fn new() -> Self {
2947        std::default::Default::default()
2948    }
2949
2950    /// Sets the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2951    ///
2952    /// # Example
2953    /// ```ignore,no_run
2954    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2955    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2956    /// let x = UpdateLogicalViewRequest::new().set_logical_view(LogicalView::default()/* use setters */);
2957    /// ```
2958    pub fn set_logical_view<T>(mut self, v: T) -> Self
2959    where
2960        T: std::convert::Into<crate::model::LogicalView>,
2961    {
2962        self.logical_view = std::option::Option::Some(v.into());
2963        self
2964    }
2965
2966    /// Sets or clears the value of [logical_view][crate::model::UpdateLogicalViewRequest::logical_view].
2967    ///
2968    /// # Example
2969    /// ```ignore,no_run
2970    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2971    /// use google_cloud_bigtable_admin_v2::model::LogicalView;
2972    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(Some(LogicalView::default()/* use setters */));
2973    /// let x = UpdateLogicalViewRequest::new().set_or_clear_logical_view(None::<LogicalView>);
2974    /// ```
2975    pub fn set_or_clear_logical_view<T>(mut self, v: std::option::Option<T>) -> Self
2976    where
2977        T: std::convert::Into<crate::model::LogicalView>,
2978    {
2979        self.logical_view = v.map(|x| x.into());
2980        self
2981    }
2982
2983    /// Sets the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
2984    ///
2985    /// # Example
2986    /// ```ignore,no_run
2987    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
2988    /// use wkt::FieldMask;
2989    /// let x = UpdateLogicalViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2990    /// ```
2991    pub fn set_update_mask<T>(mut self, v: T) -> Self
2992    where
2993        T: std::convert::Into<wkt::FieldMask>,
2994    {
2995        self.update_mask = std::option::Option::Some(v.into());
2996        self
2997    }
2998
2999    /// Sets or clears the value of [update_mask][crate::model::UpdateLogicalViewRequest::update_mask].
3000    ///
3001    /// # Example
3002    /// ```ignore,no_run
3003    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3004    /// use wkt::FieldMask;
3005    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3006    /// let x = UpdateLogicalViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3007    /// ```
3008    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3009    where
3010        T: std::convert::Into<wkt::FieldMask>,
3011    {
3012        self.update_mask = v.map(|x| x.into());
3013        self
3014    }
3015}
3016
3017impl wkt::message::Message for UpdateLogicalViewRequest {
3018    fn typename() -> &'static str {
3019        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewRequest"
3020    }
3021}
3022
3023/// The metadata for the Operation returned by UpdateLogicalView.
3024#[derive(Clone, Default, PartialEq)]
3025#[non_exhaustive]
3026pub struct UpdateLogicalViewMetadata {
3027    /// The request that prompted the initiation of this UpdateLogicalView
3028    /// operation.
3029    pub original_request: std::option::Option<crate::model::UpdateLogicalViewRequest>,
3030
3031    /// The time at which this operation was started.
3032    pub start_time: std::option::Option<wkt::Timestamp>,
3033
3034    /// If set, the time at which this operation finished or was canceled.
3035    pub end_time: std::option::Option<wkt::Timestamp>,
3036
3037    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3038}
3039
3040impl UpdateLogicalViewMetadata {
3041    /// Creates a new default instance.
3042    pub fn new() -> Self {
3043        std::default::Default::default()
3044    }
3045
3046    /// Sets the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
3047    ///
3048    /// # Example
3049    /// ```ignore,no_run
3050    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3051    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3052    /// let x = UpdateLogicalViewMetadata::new().set_original_request(UpdateLogicalViewRequest::default()/* use setters */);
3053    /// ```
3054    pub fn set_original_request<T>(mut self, v: T) -> Self
3055    where
3056        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
3057    {
3058        self.original_request = std::option::Option::Some(v.into());
3059        self
3060    }
3061
3062    /// Sets or clears the value of [original_request][crate::model::UpdateLogicalViewMetadata::original_request].
3063    ///
3064    /// # Example
3065    /// ```ignore,no_run
3066    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3067    /// use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewRequest;
3068    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(Some(UpdateLogicalViewRequest::default()/* use setters */));
3069    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_original_request(None::<UpdateLogicalViewRequest>);
3070    /// ```
3071    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3072    where
3073        T: std::convert::Into<crate::model::UpdateLogicalViewRequest>,
3074    {
3075        self.original_request = v.map(|x| x.into());
3076        self
3077    }
3078
3079    /// Sets the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3080    ///
3081    /// # Example
3082    /// ```ignore,no_run
3083    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3084    /// use wkt::Timestamp;
3085    /// let x = UpdateLogicalViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3086    /// ```
3087    pub fn set_start_time<T>(mut self, v: T) -> Self
3088    where
3089        T: std::convert::Into<wkt::Timestamp>,
3090    {
3091        self.start_time = std::option::Option::Some(v.into());
3092        self
3093    }
3094
3095    /// Sets or clears the value of [start_time][crate::model::UpdateLogicalViewMetadata::start_time].
3096    ///
3097    /// # Example
3098    /// ```ignore,no_run
3099    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3100    /// use wkt::Timestamp;
3101    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3102    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3103    /// ```
3104    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3105    where
3106        T: std::convert::Into<wkt::Timestamp>,
3107    {
3108        self.start_time = v.map(|x| x.into());
3109        self
3110    }
3111
3112    /// Sets the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3113    ///
3114    /// # Example
3115    /// ```ignore,no_run
3116    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3117    /// use wkt::Timestamp;
3118    /// let x = UpdateLogicalViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3119    /// ```
3120    pub fn set_end_time<T>(mut self, v: T) -> Self
3121    where
3122        T: std::convert::Into<wkt::Timestamp>,
3123    {
3124        self.end_time = std::option::Option::Some(v.into());
3125        self
3126    }
3127
3128    /// Sets or clears the value of [end_time][crate::model::UpdateLogicalViewMetadata::end_time].
3129    ///
3130    /// # Example
3131    /// ```ignore,no_run
3132    /// # use google_cloud_bigtable_admin_v2::model::UpdateLogicalViewMetadata;
3133    /// use wkt::Timestamp;
3134    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3135    /// let x = UpdateLogicalViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3136    /// ```
3137    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3138    where
3139        T: std::convert::Into<wkt::Timestamp>,
3140    {
3141        self.end_time = v.map(|x| x.into());
3142        self
3143    }
3144}
3145
3146impl wkt::message::Message for UpdateLogicalViewMetadata {
3147    fn typename() -> &'static str {
3148        "type.googleapis.com/google.bigtable.admin.v2.UpdateLogicalViewMetadata"
3149    }
3150}
3151
3152/// Request message for BigtableInstanceAdmin.DeleteLogicalView.
3153#[derive(Clone, Default, PartialEq)]
3154#[non_exhaustive]
3155pub struct DeleteLogicalViewRequest {
3156    /// Required. The unique name of the logical view to be deleted.
3157    /// Format:
3158    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
3159    pub name: std::string::String,
3160
3161    /// Optional. The current etag of the logical view.
3162    /// If an etag is provided and does not match the current etag of the
3163    /// logical view, deletion will be blocked and an ABORTED error will be
3164    /// returned.
3165    pub etag: std::string::String,
3166
3167    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3168}
3169
3170impl DeleteLogicalViewRequest {
3171    /// Creates a new default instance.
3172    pub fn new() -> Self {
3173        std::default::Default::default()
3174    }
3175
3176    /// Sets the value of [name][crate::model::DeleteLogicalViewRequest::name].
3177    ///
3178    /// # Example
3179    /// ```ignore,no_run
3180    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3181    /// # let project_id = "project_id";
3182    /// # let instance_id = "instance_id";
3183    /// # let logical_view_id = "logical_view_id";
3184    /// let x = DeleteLogicalViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"));
3185    /// ```
3186    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3187        self.name = v.into();
3188        self
3189    }
3190
3191    /// Sets the value of [etag][crate::model::DeleteLogicalViewRequest::etag].
3192    ///
3193    /// # Example
3194    /// ```ignore,no_run
3195    /// # use google_cloud_bigtable_admin_v2::model::DeleteLogicalViewRequest;
3196    /// let x = DeleteLogicalViewRequest::new().set_etag("example");
3197    /// ```
3198    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3199        self.etag = v.into();
3200        self
3201    }
3202}
3203
3204impl wkt::message::Message for DeleteLogicalViewRequest {
3205    fn typename() -> &'static str {
3206        "type.googleapis.com/google.bigtable.admin.v2.DeleteLogicalViewRequest"
3207    }
3208}
3209
3210/// Request message for BigtableInstanceAdmin.CreateMaterializedView.
3211#[derive(Clone, Default, PartialEq)]
3212#[non_exhaustive]
3213pub struct CreateMaterializedViewRequest {
3214    /// Required. The parent instance where this materialized view will be created.
3215    /// Format: `projects/{project}/instances/{instance}`.
3216    pub parent: std::string::String,
3217
3218    /// Required. The ID to use for the materialized view, which will become the
3219    /// final component of the materialized view's resource name.
3220    pub materialized_view_id: std::string::String,
3221
3222    /// Required. The materialized view to create.
3223    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3224
3225    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3226}
3227
3228impl CreateMaterializedViewRequest {
3229    /// Creates a new default instance.
3230    pub fn new() -> Self {
3231        std::default::Default::default()
3232    }
3233
3234    /// Sets the value of [parent][crate::model::CreateMaterializedViewRequest::parent].
3235    ///
3236    /// # Example
3237    /// ```ignore,no_run
3238    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3239    /// # let project_id = "project_id";
3240    /// # let instance_id = "instance_id";
3241    /// let x = CreateMaterializedViewRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
3242    /// ```
3243    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3244        self.parent = v.into();
3245        self
3246    }
3247
3248    /// Sets the value of [materialized_view_id][crate::model::CreateMaterializedViewRequest::materialized_view_id].
3249    ///
3250    /// # Example
3251    /// ```ignore,no_run
3252    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3253    /// let x = CreateMaterializedViewRequest::new().set_materialized_view_id("example");
3254    /// ```
3255    pub fn set_materialized_view_id<T: std::convert::Into<std::string::String>>(
3256        mut self,
3257        v: T,
3258    ) -> Self {
3259        self.materialized_view_id = v.into();
3260        self
3261    }
3262
3263    /// Sets the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3264    ///
3265    /// # Example
3266    /// ```ignore,no_run
3267    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3268    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3269    /// let x = CreateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3270    /// ```
3271    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3272    where
3273        T: std::convert::Into<crate::model::MaterializedView>,
3274    {
3275        self.materialized_view = std::option::Option::Some(v.into());
3276        self
3277    }
3278
3279    /// Sets or clears the value of [materialized_view][crate::model::CreateMaterializedViewRequest::materialized_view].
3280    ///
3281    /// # Example
3282    /// ```ignore,no_run
3283    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3284    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3285    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3286    /// let x = CreateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3287    /// ```
3288    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3289    where
3290        T: std::convert::Into<crate::model::MaterializedView>,
3291    {
3292        self.materialized_view = v.map(|x| x.into());
3293        self
3294    }
3295}
3296
3297impl wkt::message::Message for CreateMaterializedViewRequest {
3298    fn typename() -> &'static str {
3299        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewRequest"
3300    }
3301}
3302
3303/// The metadata for the Operation returned by CreateMaterializedView.
3304#[derive(Clone, Default, PartialEq)]
3305#[non_exhaustive]
3306pub struct CreateMaterializedViewMetadata {
3307    /// The request that prompted the initiation of this CreateMaterializedView
3308    /// operation.
3309    pub original_request: std::option::Option<crate::model::CreateMaterializedViewRequest>,
3310
3311    /// The time at which this operation started.
3312    pub start_time: std::option::Option<wkt::Timestamp>,
3313
3314    /// If set, the time at which this operation finished or was canceled.
3315    pub end_time: std::option::Option<wkt::Timestamp>,
3316
3317    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3318}
3319
3320impl CreateMaterializedViewMetadata {
3321    /// Creates a new default instance.
3322    pub fn new() -> Self {
3323        std::default::Default::default()
3324    }
3325
3326    /// Sets the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3327    ///
3328    /// # Example
3329    /// ```ignore,no_run
3330    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3331    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3332    /// let x = CreateMaterializedViewMetadata::new().set_original_request(CreateMaterializedViewRequest::default()/* use setters */);
3333    /// ```
3334    pub fn set_original_request<T>(mut self, v: T) -> Self
3335    where
3336        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3337    {
3338        self.original_request = std::option::Option::Some(v.into());
3339        self
3340    }
3341
3342    /// Sets or clears the value of [original_request][crate::model::CreateMaterializedViewMetadata::original_request].
3343    ///
3344    /// # Example
3345    /// ```ignore,no_run
3346    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3347    /// use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewRequest;
3348    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(Some(CreateMaterializedViewRequest::default()/* use setters */));
3349    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_original_request(None::<CreateMaterializedViewRequest>);
3350    /// ```
3351    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3352    where
3353        T: std::convert::Into<crate::model::CreateMaterializedViewRequest>,
3354    {
3355        self.original_request = v.map(|x| x.into());
3356        self
3357    }
3358
3359    /// Sets the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3360    ///
3361    /// # Example
3362    /// ```ignore,no_run
3363    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3364    /// use wkt::Timestamp;
3365    /// let x = CreateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3366    /// ```
3367    pub fn set_start_time<T>(mut self, v: T) -> Self
3368    where
3369        T: std::convert::Into<wkt::Timestamp>,
3370    {
3371        self.start_time = std::option::Option::Some(v.into());
3372        self
3373    }
3374
3375    /// Sets or clears the value of [start_time][crate::model::CreateMaterializedViewMetadata::start_time].
3376    ///
3377    /// # Example
3378    /// ```ignore,no_run
3379    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3380    /// use wkt::Timestamp;
3381    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3382    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3383    /// ```
3384    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3385    where
3386        T: std::convert::Into<wkt::Timestamp>,
3387    {
3388        self.start_time = v.map(|x| x.into());
3389        self
3390    }
3391
3392    /// Sets the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3393    ///
3394    /// # Example
3395    /// ```ignore,no_run
3396    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3397    /// use wkt::Timestamp;
3398    /// let x = CreateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3399    /// ```
3400    pub fn set_end_time<T>(mut self, v: T) -> Self
3401    where
3402        T: std::convert::Into<wkt::Timestamp>,
3403    {
3404        self.end_time = std::option::Option::Some(v.into());
3405        self
3406    }
3407
3408    /// Sets or clears the value of [end_time][crate::model::CreateMaterializedViewMetadata::end_time].
3409    ///
3410    /// # Example
3411    /// ```ignore,no_run
3412    /// # use google_cloud_bigtable_admin_v2::model::CreateMaterializedViewMetadata;
3413    /// use wkt::Timestamp;
3414    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3415    /// let x = CreateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3416    /// ```
3417    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3418    where
3419        T: std::convert::Into<wkt::Timestamp>,
3420    {
3421        self.end_time = v.map(|x| x.into());
3422        self
3423    }
3424}
3425
3426impl wkt::message::Message for CreateMaterializedViewMetadata {
3427    fn typename() -> &'static str {
3428        "type.googleapis.com/google.bigtable.admin.v2.CreateMaterializedViewMetadata"
3429    }
3430}
3431
3432/// Request message for BigtableInstanceAdmin.GetMaterializedView.
3433#[derive(Clone, Default, PartialEq)]
3434#[non_exhaustive]
3435pub struct GetMaterializedViewRequest {
3436    /// Required. The unique name of the requested materialized view. Values are of
3437    /// the form
3438    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3439    pub name: std::string::String,
3440
3441    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3442}
3443
3444impl GetMaterializedViewRequest {
3445    /// Creates a new default instance.
3446    pub fn new() -> Self {
3447        std::default::Default::default()
3448    }
3449
3450    /// Sets the value of [name][crate::model::GetMaterializedViewRequest::name].
3451    ///
3452    /// # Example
3453    /// ```ignore,no_run
3454    /// # use google_cloud_bigtable_admin_v2::model::GetMaterializedViewRequest;
3455    /// # let project_id = "project_id";
3456    /// # let instance_id = "instance_id";
3457    /// # let materialized_view_id = "materialized_view_id";
3458    /// let x = GetMaterializedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"));
3459    /// ```
3460    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3461        self.name = v.into();
3462        self
3463    }
3464}
3465
3466impl wkt::message::Message for GetMaterializedViewRequest {
3467    fn typename() -> &'static str {
3468        "type.googleapis.com/google.bigtable.admin.v2.GetMaterializedViewRequest"
3469    }
3470}
3471
3472/// Request message for BigtableInstanceAdmin.ListMaterializedViews.
3473#[derive(Clone, Default, PartialEq)]
3474#[non_exhaustive]
3475pub struct ListMaterializedViewsRequest {
3476    /// Required. The unique name of the instance for which the list of
3477    /// materialized views is requested. Values are of the form
3478    /// `projects/{project}/instances/{instance}`.
3479    pub parent: std::string::String,
3480
3481    /// Optional. The maximum number of materialized views to return. The service
3482    /// may return fewer than this value
3483    pub page_size: i32,
3484
3485    /// Optional. A page token, received from a previous `ListMaterializedViews`
3486    /// call. Provide this to retrieve the subsequent page.
3487    ///
3488    /// When paginating, all other parameters provided to `ListMaterializedViews`
3489    /// must match the call that provided the page token.
3490    pub page_token: std::string::String,
3491
3492    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3493}
3494
3495impl ListMaterializedViewsRequest {
3496    /// Creates a new default instance.
3497    pub fn new() -> Self {
3498        std::default::Default::default()
3499    }
3500
3501    /// Sets the value of [parent][crate::model::ListMaterializedViewsRequest::parent].
3502    ///
3503    /// # Example
3504    /// ```ignore,no_run
3505    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3506    /// # let project_id = "project_id";
3507    /// # let instance_id = "instance_id";
3508    /// let x = ListMaterializedViewsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
3509    /// ```
3510    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3511        self.parent = v.into();
3512        self
3513    }
3514
3515    /// Sets the value of [page_size][crate::model::ListMaterializedViewsRequest::page_size].
3516    ///
3517    /// # Example
3518    /// ```ignore,no_run
3519    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3520    /// let x = ListMaterializedViewsRequest::new().set_page_size(42);
3521    /// ```
3522    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3523        self.page_size = v.into();
3524        self
3525    }
3526
3527    /// Sets the value of [page_token][crate::model::ListMaterializedViewsRequest::page_token].
3528    ///
3529    /// # Example
3530    /// ```ignore,no_run
3531    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsRequest;
3532    /// let x = ListMaterializedViewsRequest::new().set_page_token("example");
3533    /// ```
3534    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3535        self.page_token = v.into();
3536        self
3537    }
3538}
3539
3540impl wkt::message::Message for ListMaterializedViewsRequest {
3541    fn typename() -> &'static str {
3542        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsRequest"
3543    }
3544}
3545
3546/// Response message for BigtableInstanceAdmin.ListMaterializedViews.
3547#[derive(Clone, Default, PartialEq)]
3548#[non_exhaustive]
3549pub struct ListMaterializedViewsResponse {
3550    /// The list of requested materialized views.
3551    pub materialized_views: std::vec::Vec<crate::model::MaterializedView>,
3552
3553    /// A token, which can be sent as `page_token` to retrieve the next page.
3554    /// If this field is omitted, there are no subsequent pages.
3555    pub next_page_token: std::string::String,
3556
3557    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3558}
3559
3560impl ListMaterializedViewsResponse {
3561    /// Creates a new default instance.
3562    pub fn new() -> Self {
3563        std::default::Default::default()
3564    }
3565
3566    /// Sets the value of [materialized_views][crate::model::ListMaterializedViewsResponse::materialized_views].
3567    ///
3568    /// # Example
3569    /// ```ignore,no_run
3570    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
3571    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3572    /// let x = ListMaterializedViewsResponse::new()
3573    ///     .set_materialized_views([
3574    ///         MaterializedView::default()/* use setters */,
3575    ///         MaterializedView::default()/* use (different) setters */,
3576    ///     ]);
3577    /// ```
3578    pub fn set_materialized_views<T, V>(mut self, v: T) -> Self
3579    where
3580        T: std::iter::IntoIterator<Item = V>,
3581        V: std::convert::Into<crate::model::MaterializedView>,
3582    {
3583        use std::iter::Iterator;
3584        self.materialized_views = v.into_iter().map(|i| i.into()).collect();
3585        self
3586    }
3587
3588    /// Sets the value of [next_page_token][crate::model::ListMaterializedViewsResponse::next_page_token].
3589    ///
3590    /// # Example
3591    /// ```ignore,no_run
3592    /// # use google_cloud_bigtable_admin_v2::model::ListMaterializedViewsResponse;
3593    /// let x = ListMaterializedViewsResponse::new().set_next_page_token("example");
3594    /// ```
3595    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3596        self.next_page_token = v.into();
3597        self
3598    }
3599}
3600
3601impl wkt::message::Message for ListMaterializedViewsResponse {
3602    fn typename() -> &'static str {
3603        "type.googleapis.com/google.bigtable.admin.v2.ListMaterializedViewsResponse"
3604    }
3605}
3606
3607#[doc(hidden)]
3608impl google_cloud_gax::paginator::internal::PageableResponse for ListMaterializedViewsResponse {
3609    type PageItem = crate::model::MaterializedView;
3610
3611    fn items(self) -> std::vec::Vec<Self::PageItem> {
3612        self.materialized_views
3613    }
3614
3615    fn next_page_token(&self) -> std::string::String {
3616        use std::clone::Clone;
3617        self.next_page_token.clone()
3618    }
3619}
3620
3621/// Request message for BigtableInstanceAdmin.UpdateMaterializedView.
3622#[derive(Clone, Default, PartialEq)]
3623#[non_exhaustive]
3624pub struct UpdateMaterializedViewRequest {
3625    /// Required. The materialized view to update.
3626    ///
3627    /// The materialized view's `name` field is used to identify the view to
3628    /// update. Format:
3629    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3630    pub materialized_view: std::option::Option<crate::model::MaterializedView>,
3631
3632    /// Optional. The list of fields to update.
3633    pub update_mask: std::option::Option<wkt::FieldMask>,
3634
3635    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3636}
3637
3638impl UpdateMaterializedViewRequest {
3639    /// Creates a new default instance.
3640    pub fn new() -> Self {
3641        std::default::Default::default()
3642    }
3643
3644    /// Sets the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3645    ///
3646    /// # Example
3647    /// ```ignore,no_run
3648    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3649    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3650    /// let x = UpdateMaterializedViewRequest::new().set_materialized_view(MaterializedView::default()/* use setters */);
3651    /// ```
3652    pub fn set_materialized_view<T>(mut self, v: T) -> Self
3653    where
3654        T: std::convert::Into<crate::model::MaterializedView>,
3655    {
3656        self.materialized_view = std::option::Option::Some(v.into());
3657        self
3658    }
3659
3660    /// Sets or clears the value of [materialized_view][crate::model::UpdateMaterializedViewRequest::materialized_view].
3661    ///
3662    /// # Example
3663    /// ```ignore,no_run
3664    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3665    /// use google_cloud_bigtable_admin_v2::model::MaterializedView;
3666    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(Some(MaterializedView::default()/* use setters */));
3667    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_materialized_view(None::<MaterializedView>);
3668    /// ```
3669    pub fn set_or_clear_materialized_view<T>(mut self, v: std::option::Option<T>) -> Self
3670    where
3671        T: std::convert::Into<crate::model::MaterializedView>,
3672    {
3673        self.materialized_view = v.map(|x| x.into());
3674        self
3675    }
3676
3677    /// Sets the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3678    ///
3679    /// # Example
3680    /// ```ignore,no_run
3681    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3682    /// use wkt::FieldMask;
3683    /// let x = UpdateMaterializedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3684    /// ```
3685    pub fn set_update_mask<T>(mut self, v: T) -> Self
3686    where
3687        T: std::convert::Into<wkt::FieldMask>,
3688    {
3689        self.update_mask = std::option::Option::Some(v.into());
3690        self
3691    }
3692
3693    /// Sets or clears the value of [update_mask][crate::model::UpdateMaterializedViewRequest::update_mask].
3694    ///
3695    /// # Example
3696    /// ```ignore,no_run
3697    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3698    /// use wkt::FieldMask;
3699    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3700    /// let x = UpdateMaterializedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3701    /// ```
3702    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3703    where
3704        T: std::convert::Into<wkt::FieldMask>,
3705    {
3706        self.update_mask = v.map(|x| x.into());
3707        self
3708    }
3709}
3710
3711impl wkt::message::Message for UpdateMaterializedViewRequest {
3712    fn typename() -> &'static str {
3713        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewRequest"
3714    }
3715}
3716
3717/// The metadata for the Operation returned by UpdateMaterializedView.
3718#[derive(Clone, Default, PartialEq)]
3719#[non_exhaustive]
3720pub struct UpdateMaterializedViewMetadata {
3721    /// The request that prompted the initiation of this UpdateMaterializedView
3722    /// operation.
3723    pub original_request: std::option::Option<crate::model::UpdateMaterializedViewRequest>,
3724
3725    /// The time at which this operation was started.
3726    pub start_time: std::option::Option<wkt::Timestamp>,
3727
3728    /// If set, the time at which this operation finished or was canceled.
3729    pub end_time: std::option::Option<wkt::Timestamp>,
3730
3731    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3732}
3733
3734impl UpdateMaterializedViewMetadata {
3735    /// Creates a new default instance.
3736    pub fn new() -> Self {
3737        std::default::Default::default()
3738    }
3739
3740    /// Sets the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
3741    ///
3742    /// # Example
3743    /// ```ignore,no_run
3744    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3745    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3746    /// let x = UpdateMaterializedViewMetadata::new().set_original_request(UpdateMaterializedViewRequest::default()/* use setters */);
3747    /// ```
3748    pub fn set_original_request<T>(mut self, v: T) -> Self
3749    where
3750        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
3751    {
3752        self.original_request = std::option::Option::Some(v.into());
3753        self
3754    }
3755
3756    /// Sets or clears the value of [original_request][crate::model::UpdateMaterializedViewMetadata::original_request].
3757    ///
3758    /// # Example
3759    /// ```ignore,no_run
3760    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3761    /// use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewRequest;
3762    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(Some(UpdateMaterializedViewRequest::default()/* use setters */));
3763    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_original_request(None::<UpdateMaterializedViewRequest>);
3764    /// ```
3765    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
3766    where
3767        T: std::convert::Into<crate::model::UpdateMaterializedViewRequest>,
3768    {
3769        self.original_request = v.map(|x| x.into());
3770        self
3771    }
3772
3773    /// Sets the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
3774    ///
3775    /// # Example
3776    /// ```ignore,no_run
3777    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3778    /// use wkt::Timestamp;
3779    /// let x = UpdateMaterializedViewMetadata::new().set_start_time(Timestamp::default()/* use setters */);
3780    /// ```
3781    pub fn set_start_time<T>(mut self, v: T) -> Self
3782    where
3783        T: std::convert::Into<wkt::Timestamp>,
3784    {
3785        self.start_time = std::option::Option::Some(v.into());
3786        self
3787    }
3788
3789    /// Sets or clears the value of [start_time][crate::model::UpdateMaterializedViewMetadata::start_time].
3790    ///
3791    /// # Example
3792    /// ```ignore,no_run
3793    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3794    /// use wkt::Timestamp;
3795    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
3796    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_start_time(None::<Timestamp>);
3797    /// ```
3798    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
3799    where
3800        T: std::convert::Into<wkt::Timestamp>,
3801    {
3802        self.start_time = v.map(|x| x.into());
3803        self
3804    }
3805
3806    /// Sets the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
3807    ///
3808    /// # Example
3809    /// ```ignore,no_run
3810    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3811    /// use wkt::Timestamp;
3812    /// let x = UpdateMaterializedViewMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3813    /// ```
3814    pub fn set_end_time<T>(mut self, v: T) -> Self
3815    where
3816        T: std::convert::Into<wkt::Timestamp>,
3817    {
3818        self.end_time = std::option::Option::Some(v.into());
3819        self
3820    }
3821
3822    /// Sets or clears the value of [end_time][crate::model::UpdateMaterializedViewMetadata::end_time].
3823    ///
3824    /// # Example
3825    /// ```ignore,no_run
3826    /// # use google_cloud_bigtable_admin_v2::model::UpdateMaterializedViewMetadata;
3827    /// use wkt::Timestamp;
3828    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3829    /// let x = UpdateMaterializedViewMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3830    /// ```
3831    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3832    where
3833        T: std::convert::Into<wkt::Timestamp>,
3834    {
3835        self.end_time = v.map(|x| x.into());
3836        self
3837    }
3838}
3839
3840impl wkt::message::Message for UpdateMaterializedViewMetadata {
3841    fn typename() -> &'static str {
3842        "type.googleapis.com/google.bigtable.admin.v2.UpdateMaterializedViewMetadata"
3843    }
3844}
3845
3846/// Request message for BigtableInstanceAdmin.DeleteMaterializedView.
3847#[derive(Clone, Default, PartialEq)]
3848#[non_exhaustive]
3849pub struct DeleteMaterializedViewRequest {
3850    /// Required. The unique name of the materialized view to be deleted.
3851    /// Format:
3852    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3853    pub name: std::string::String,
3854
3855    /// Optional. The current etag of the materialized view.
3856    /// If an etag is provided and does not match the current etag of the
3857    /// materialized view, deletion will be blocked and an ABORTED error will be
3858    /// returned.
3859    pub etag: std::string::String,
3860
3861    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3862}
3863
3864impl DeleteMaterializedViewRequest {
3865    /// Creates a new default instance.
3866    pub fn new() -> Self {
3867        std::default::Default::default()
3868    }
3869
3870    /// Sets the value of [name][crate::model::DeleteMaterializedViewRequest::name].
3871    ///
3872    /// # Example
3873    /// ```ignore,no_run
3874    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
3875    /// # let project_id = "project_id";
3876    /// # let instance_id = "instance_id";
3877    /// # let materialized_view_id = "materialized_view_id";
3878    /// let x = DeleteMaterializedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"));
3879    /// ```
3880    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3881        self.name = v.into();
3882        self
3883    }
3884
3885    /// Sets the value of [etag][crate::model::DeleteMaterializedViewRequest::etag].
3886    ///
3887    /// # Example
3888    /// ```ignore,no_run
3889    /// # use google_cloud_bigtable_admin_v2::model::DeleteMaterializedViewRequest;
3890    /// let x = DeleteMaterializedViewRequest::new().set_etag("example");
3891    /// ```
3892    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3893        self.etag = v.into();
3894        self
3895    }
3896}
3897
3898impl wkt::message::Message for DeleteMaterializedViewRequest {
3899    fn typename() -> &'static str {
3900        "type.googleapis.com/google.bigtable.admin.v2.DeleteMaterializedViewRequest"
3901    }
3902}
3903
3904/// The request for
3905/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
3906///
3907/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
3908#[derive(Clone, Default, PartialEq)]
3909#[non_exhaustive]
3910pub struct RestoreTableRequest {
3911    /// Required. The name of the instance in which to create the restored
3912    /// table. Values are of the form `projects/<project>/instances/<instance>`.
3913    pub parent: std::string::String,
3914
3915    /// Required. The id of the table to create and restore to. This
3916    /// table must not already exist. The `table_id` appended to
3917    /// `parent` forms the full table name of the form
3918    /// `projects/<project>/instances/<instance>/tables/<table_id>`.
3919    pub table_id: std::string::String,
3920
3921    /// Required. The source from which to restore.
3922    pub source: std::option::Option<crate::model::restore_table_request::Source>,
3923
3924    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3925}
3926
3927impl RestoreTableRequest {
3928    /// Creates a new default instance.
3929    pub fn new() -> Self {
3930        std::default::Default::default()
3931    }
3932
3933    /// Sets the value of [parent][crate::model::RestoreTableRequest::parent].
3934    ///
3935    /// # Example
3936    /// ```ignore,no_run
3937    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3938    /// # let project_id = "project_id";
3939    /// # let instance_id = "instance_id";
3940    /// let x = RestoreTableRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
3941    /// ```
3942    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3943        self.parent = v.into();
3944        self
3945    }
3946
3947    /// Sets the value of [table_id][crate::model::RestoreTableRequest::table_id].
3948    ///
3949    /// # Example
3950    /// ```ignore,no_run
3951    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3952    /// let x = RestoreTableRequest::new().set_table_id("example");
3953    /// ```
3954    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3955        self.table_id = v.into();
3956        self
3957    }
3958
3959    /// Sets the value of [source][crate::model::RestoreTableRequest::source].
3960    ///
3961    /// Note that all the setters affecting `source` are mutually
3962    /// exclusive.
3963    ///
3964    /// # Example
3965    /// ```ignore,no_run
3966    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
3967    /// use google_cloud_bigtable_admin_v2::model::restore_table_request::Source;
3968    /// let x = RestoreTableRequest::new().set_source(Some(Source::Backup("example".to_string())));
3969    /// ```
3970    pub fn set_source<
3971        T: std::convert::Into<std::option::Option<crate::model::restore_table_request::Source>>,
3972    >(
3973        mut self,
3974        v: T,
3975    ) -> Self {
3976        self.source = v.into();
3977        self
3978    }
3979
3980    /// The value of [source][crate::model::RestoreTableRequest::source]
3981    /// if it holds a `Backup`, `None` if the field is not set or
3982    /// holds a different branch.
3983    pub fn backup(&self) -> std::option::Option<&std::string::String> {
3984        #[allow(unreachable_patterns)]
3985        self.source.as_ref().and_then(|v| match v {
3986            crate::model::restore_table_request::Source::Backup(v) => std::option::Option::Some(v),
3987            _ => std::option::Option::None,
3988        })
3989    }
3990
3991    /// Sets the value of [source][crate::model::RestoreTableRequest::source]
3992    /// to hold a `Backup`.
3993    ///
3994    /// Note that all the setters affecting `source` are
3995    /// mutually exclusive.
3996    ///
3997    /// # Example
3998    /// ```ignore,no_run
3999    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableRequest;
4000    /// # let project_id = "project_id";
4001    /// # let instance_id = "instance_id";
4002    /// # let cluster_id = "cluster_id";
4003    /// # let backup_id = "backup_id";
4004    /// let x = RestoreTableRequest::new().set_backup(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
4005    /// assert!(x.backup().is_some());
4006    /// ```
4007    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4008        self.source = std::option::Option::Some(
4009            crate::model::restore_table_request::Source::Backup(v.into()),
4010        );
4011        self
4012    }
4013}
4014
4015impl wkt::message::Message for RestoreTableRequest {
4016    fn typename() -> &'static str {
4017        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableRequest"
4018    }
4019}
4020
4021/// Defines additional types related to [RestoreTableRequest].
4022pub mod restore_table_request {
4023    #[allow(unused_imports)]
4024    use super::*;
4025
4026    /// Required. The source from which to restore.
4027    #[derive(Clone, Debug, PartialEq)]
4028    #[non_exhaustive]
4029    pub enum Source {
4030        /// Name of the backup from which to restore.  Values are of the form
4031        /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
4032        Backup(std::string::String),
4033    }
4034}
4035
4036/// Metadata type for the long-running operation returned by
4037/// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable].
4038///
4039/// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
4040#[derive(Clone, Default, PartialEq)]
4041#[non_exhaustive]
4042pub struct RestoreTableMetadata {
4043    /// Name of the table being created and restored to.
4044    pub name: std::string::String,
4045
4046    /// The type of the restore source.
4047    pub source_type: crate::model::RestoreSourceType,
4048
4049    /// If exists, the name of the long-running operation that will be used to
4050    /// track the post-restore optimization process to optimize the performance of
4051    /// the restored table. The metadata type of the long-running operation is
4052    /// [OptimizeRestoreTableMetadata][]. The response type is
4053    /// [Empty][google.protobuf.Empty]. This long-running operation may be
4054    /// automatically created by the system if applicable after the
4055    /// RestoreTable long-running operation completes successfully. This operation
4056    /// may not be created if the table is already optimized or the restore was
4057    /// not successful.
4058    pub optimize_table_operation_name: std::string::String,
4059
4060    /// The progress of the
4061    /// [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]
4062    /// operation.
4063    ///
4064    /// [google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable]: crate::client::BigtableTableAdmin::restore_table
4065    pub progress: std::option::Option<crate::model::OperationProgress>,
4066
4067    /// Information about the source used to restore the table, as specified by
4068    /// `source` in
4069    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
4070    ///
4071    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
4072    pub source_info: std::option::Option<crate::model::restore_table_metadata::SourceInfo>,
4073
4074    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4075}
4076
4077impl RestoreTableMetadata {
4078    /// Creates a new default instance.
4079    pub fn new() -> Self {
4080        std::default::Default::default()
4081    }
4082
4083    /// Sets the value of [name][crate::model::RestoreTableMetadata::name].
4084    ///
4085    /// # Example
4086    /// ```ignore,no_run
4087    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4088    /// let x = RestoreTableMetadata::new().set_name("example");
4089    /// ```
4090    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4091        self.name = v.into();
4092        self
4093    }
4094
4095    /// Sets the value of [source_type][crate::model::RestoreTableMetadata::source_type].
4096    ///
4097    /// # Example
4098    /// ```ignore,no_run
4099    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4100    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
4101    /// let x0 = RestoreTableMetadata::new().set_source_type(RestoreSourceType::Backup);
4102    /// ```
4103    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
4104        mut self,
4105        v: T,
4106    ) -> Self {
4107        self.source_type = v.into();
4108        self
4109    }
4110
4111    /// Sets the value of [optimize_table_operation_name][crate::model::RestoreTableMetadata::optimize_table_operation_name].
4112    ///
4113    /// # Example
4114    /// ```ignore,no_run
4115    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4116    /// let x = RestoreTableMetadata::new().set_optimize_table_operation_name("example");
4117    /// ```
4118    pub fn set_optimize_table_operation_name<T: std::convert::Into<std::string::String>>(
4119        mut self,
4120        v: T,
4121    ) -> Self {
4122        self.optimize_table_operation_name = v.into();
4123        self
4124    }
4125
4126    /// Sets the value of [progress][crate::model::RestoreTableMetadata::progress].
4127    ///
4128    /// # Example
4129    /// ```ignore,no_run
4130    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4131    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4132    /// let x = RestoreTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4133    /// ```
4134    pub fn set_progress<T>(mut self, v: T) -> Self
4135    where
4136        T: std::convert::Into<crate::model::OperationProgress>,
4137    {
4138        self.progress = std::option::Option::Some(v.into());
4139        self
4140    }
4141
4142    /// Sets or clears the value of [progress][crate::model::RestoreTableMetadata::progress].
4143    ///
4144    /// # Example
4145    /// ```ignore,no_run
4146    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4147    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4148    /// let x = RestoreTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4149    /// let x = RestoreTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4150    /// ```
4151    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4152    where
4153        T: std::convert::Into<crate::model::OperationProgress>,
4154    {
4155        self.progress = v.map(|x| x.into());
4156        self
4157    }
4158
4159    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info].
4160    ///
4161    /// Note that all the setters affecting `source_info` are mutually
4162    /// exclusive.
4163    ///
4164    /// # Example
4165    /// ```ignore,no_run
4166    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4167    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4168    /// let x = RestoreTableMetadata::new().set_source_info(Some(
4169    ///     google_cloud_bigtable_admin_v2::model::restore_table_metadata::SourceInfo::BackupInfo(BackupInfo::default().into())));
4170    /// ```
4171    pub fn set_source_info<
4172        T: std::convert::Into<std::option::Option<crate::model::restore_table_metadata::SourceInfo>>,
4173    >(
4174        mut self,
4175        v: T,
4176    ) -> Self {
4177        self.source_info = v.into();
4178        self
4179    }
4180
4181    /// The value of [source_info][crate::model::RestoreTableMetadata::source_info]
4182    /// if it holds a `BackupInfo`, `None` if the field is not set or
4183    /// holds a different branch.
4184    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
4185        #[allow(unreachable_patterns)]
4186        self.source_info.as_ref().and_then(|v| match v {
4187            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v) => {
4188                std::option::Option::Some(v)
4189            }
4190            _ => std::option::Option::None,
4191        })
4192    }
4193
4194    /// Sets the value of [source_info][crate::model::RestoreTableMetadata::source_info]
4195    /// to hold a `BackupInfo`.
4196    ///
4197    /// Note that all the setters affecting `source_info` are
4198    /// mutually exclusive.
4199    ///
4200    /// # Example
4201    /// ```ignore,no_run
4202    /// # use google_cloud_bigtable_admin_v2::model::RestoreTableMetadata;
4203    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
4204    /// let x = RestoreTableMetadata::new().set_backup_info(BackupInfo::default()/* use setters */);
4205    /// assert!(x.backup_info().is_some());
4206    /// ```
4207    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
4208        mut self,
4209        v: T,
4210    ) -> Self {
4211        self.source_info = std::option::Option::Some(
4212            crate::model::restore_table_metadata::SourceInfo::BackupInfo(v.into()),
4213        );
4214        self
4215    }
4216}
4217
4218impl wkt::message::Message for RestoreTableMetadata {
4219    fn typename() -> &'static str {
4220        "type.googleapis.com/google.bigtable.admin.v2.RestoreTableMetadata"
4221    }
4222}
4223
4224/// Defines additional types related to [RestoreTableMetadata].
4225pub mod restore_table_metadata {
4226    #[allow(unused_imports)]
4227    use super::*;
4228
4229    /// Information about the source used to restore the table, as specified by
4230    /// `source` in
4231    /// [RestoreTableRequest][google.bigtable.admin.v2.RestoreTableRequest].
4232    ///
4233    /// [google.bigtable.admin.v2.RestoreTableRequest]: crate::model::RestoreTableRequest
4234    #[derive(Clone, Debug, PartialEq)]
4235    #[non_exhaustive]
4236    pub enum SourceInfo {
4237        #[allow(missing_docs)]
4238        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
4239    }
4240}
4241
4242/// Metadata type for the long-running operation used to track the progress
4243/// of optimizations performed on a newly restored table. This long-running
4244/// operation is automatically created by the system after the successful
4245/// completion of a table restore, and cannot be cancelled.
4246#[derive(Clone, Default, PartialEq)]
4247#[non_exhaustive]
4248pub struct OptimizeRestoredTableMetadata {
4249    /// Name of the restored table being optimized.
4250    pub name: std::string::String,
4251
4252    /// The progress of the post-restore optimizations.
4253    pub progress: std::option::Option<crate::model::OperationProgress>,
4254
4255    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4256}
4257
4258impl OptimizeRestoredTableMetadata {
4259    /// Creates a new default instance.
4260    pub fn new() -> Self {
4261        std::default::Default::default()
4262    }
4263
4264    /// Sets the value of [name][crate::model::OptimizeRestoredTableMetadata::name].
4265    ///
4266    /// # Example
4267    /// ```ignore,no_run
4268    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4269    /// let x = OptimizeRestoredTableMetadata::new().set_name("example");
4270    /// ```
4271    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4272        self.name = v.into();
4273        self
4274    }
4275
4276    /// Sets the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4277    ///
4278    /// # Example
4279    /// ```ignore,no_run
4280    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4281    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4282    /// let x = OptimizeRestoredTableMetadata::new().set_progress(OperationProgress::default()/* use setters */);
4283    /// ```
4284    pub fn set_progress<T>(mut self, v: T) -> Self
4285    where
4286        T: std::convert::Into<crate::model::OperationProgress>,
4287    {
4288        self.progress = std::option::Option::Some(v.into());
4289        self
4290    }
4291
4292    /// Sets or clears the value of [progress][crate::model::OptimizeRestoredTableMetadata::progress].
4293    ///
4294    /// # Example
4295    /// ```ignore,no_run
4296    /// # use google_cloud_bigtable_admin_v2::model::OptimizeRestoredTableMetadata;
4297    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
4298    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
4299    /// let x = OptimizeRestoredTableMetadata::new().set_or_clear_progress(None::<OperationProgress>);
4300    /// ```
4301    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
4302    where
4303        T: std::convert::Into<crate::model::OperationProgress>,
4304    {
4305        self.progress = v.map(|x| x.into());
4306        self
4307    }
4308}
4309
4310impl wkt::message::Message for OptimizeRestoredTableMetadata {
4311    fn typename() -> &'static str {
4312        "type.googleapis.com/google.bigtable.admin.v2.OptimizeRestoredTableMetadata"
4313    }
4314}
4315
4316/// Request message for
4317/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable][google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]
4318///
4319/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTable]: crate::client::BigtableTableAdmin::create_table
4320#[derive(Clone, Default, PartialEq)]
4321#[non_exhaustive]
4322pub struct CreateTableRequest {
4323    /// Required. The unique name of the instance in which to create the table.
4324    /// Values are of the form `projects/{project}/instances/{instance}`.
4325    pub parent: std::string::String,
4326
4327    /// Required. The name by which the new table should be referred to within the
4328    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4329    /// Maximum 50 characters.
4330    pub table_id: std::string::String,
4331
4332    /// Required. The Table to create.
4333    pub table: std::option::Option<crate::model::Table>,
4334
4335    /// The optional list of row keys that will be used to initially split the
4336    /// table into several tablets (tablets are similar to HBase regions).
4337    /// Given two split keys, `s1` and `s2`, three tablets will be created,
4338    /// spanning the key ranges: `[, s1), [s1, s2), [s2, )`.
4339    ///
4340    /// Example:
4341    ///
4342    /// * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",`
4343    ///   `"other", "zz"]`
4344    /// * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]`
4345    /// * Key assignment:
4346    ///   - Tablet 1 `[, apple)                => {"a"}.`
4347    ///   - Tablet 2 `[apple, customer_1)      => {"apple", "custom"}.`
4348    ///   - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.`
4349    ///   - Tablet 4 `[customer_2, other)      => {"customer_2"}.`
4350    ///   - Tablet 5 `[other, )                => {"other", "zz"}.`
4351    pub initial_splits: std::vec::Vec<crate::model::create_table_request::Split>,
4352
4353    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4354}
4355
4356impl CreateTableRequest {
4357    /// Creates a new default instance.
4358    pub fn new() -> Self {
4359        std::default::Default::default()
4360    }
4361
4362    /// Sets the value of [parent][crate::model::CreateTableRequest::parent].
4363    ///
4364    /// # Example
4365    /// ```ignore,no_run
4366    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4367    /// # let project_id = "project_id";
4368    /// # let instance_id = "instance_id";
4369    /// let x = CreateTableRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
4370    /// ```
4371    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4372        self.parent = v.into();
4373        self
4374    }
4375
4376    /// Sets the value of [table_id][crate::model::CreateTableRequest::table_id].
4377    ///
4378    /// # Example
4379    /// ```ignore,no_run
4380    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4381    /// let x = CreateTableRequest::new().set_table_id("example");
4382    /// ```
4383    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4384        self.table_id = v.into();
4385        self
4386    }
4387
4388    /// Sets the value of [table][crate::model::CreateTableRequest::table].
4389    ///
4390    /// # Example
4391    /// ```ignore,no_run
4392    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4393    /// use google_cloud_bigtable_admin_v2::model::Table;
4394    /// let x = CreateTableRequest::new().set_table(Table::default()/* use setters */);
4395    /// ```
4396    pub fn set_table<T>(mut self, v: T) -> Self
4397    where
4398        T: std::convert::Into<crate::model::Table>,
4399    {
4400        self.table = std::option::Option::Some(v.into());
4401        self
4402    }
4403
4404    /// Sets or clears the value of [table][crate::model::CreateTableRequest::table].
4405    ///
4406    /// # Example
4407    /// ```ignore,no_run
4408    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4409    /// use google_cloud_bigtable_admin_v2::model::Table;
4410    /// let x = CreateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
4411    /// let x = CreateTableRequest::new().set_or_clear_table(None::<Table>);
4412    /// ```
4413    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
4414    where
4415        T: std::convert::Into<crate::model::Table>,
4416    {
4417        self.table = v.map(|x| x.into());
4418        self
4419    }
4420
4421    /// Sets the value of [initial_splits][crate::model::CreateTableRequest::initial_splits].
4422    ///
4423    /// # Example
4424    /// ```ignore,no_run
4425    /// # use google_cloud_bigtable_admin_v2::model::CreateTableRequest;
4426    /// use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4427    /// let x = CreateTableRequest::new()
4428    ///     .set_initial_splits([
4429    ///         Split::default()/* use setters */,
4430    ///         Split::default()/* use (different) setters */,
4431    ///     ]);
4432    /// ```
4433    pub fn set_initial_splits<T, V>(mut self, v: T) -> Self
4434    where
4435        T: std::iter::IntoIterator<Item = V>,
4436        V: std::convert::Into<crate::model::create_table_request::Split>,
4437    {
4438        use std::iter::Iterator;
4439        self.initial_splits = v.into_iter().map(|i| i.into()).collect();
4440        self
4441    }
4442}
4443
4444impl wkt::message::Message for CreateTableRequest {
4445    fn typename() -> &'static str {
4446        "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest"
4447    }
4448}
4449
4450/// Defines additional types related to [CreateTableRequest].
4451pub mod create_table_request {
4452    #[allow(unused_imports)]
4453    use super::*;
4454
4455    /// An initial split point for a newly created table.
4456    #[derive(Clone, Default, PartialEq)]
4457    #[non_exhaustive]
4458    pub struct Split {
4459        /// Row key to use as an initial tablet boundary.
4460        pub key: ::bytes::Bytes,
4461
4462        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4463    }
4464
4465    impl Split {
4466        /// Creates a new default instance.
4467        pub fn new() -> Self {
4468            std::default::Default::default()
4469        }
4470
4471        /// Sets the value of [key][crate::model::create_table_request::Split::key].
4472        ///
4473        /// # Example
4474        /// ```ignore,no_run
4475        /// # use google_cloud_bigtable_admin_v2::model::create_table_request::Split;
4476        /// let x = Split::new().set_key(bytes::Bytes::from_static(b"example"));
4477        /// ```
4478        pub fn set_key<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4479            self.key = v.into();
4480            self
4481        }
4482    }
4483
4484    impl wkt::message::Message for Split {
4485        fn typename() -> &'static str {
4486            "type.googleapis.com/google.bigtable.admin.v2.CreateTableRequest.Split"
4487        }
4488    }
4489}
4490
4491/// Request message for
4492/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]
4493///
4494/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
4495/// feature is not currently available to most Cloud Bigtable customers. This
4496/// feature might be changed in backward-incompatible ways and is not recommended
4497/// for production use. It is not subject to any SLA or deprecation policy.
4498///
4499/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateTableFromSnapshot]: crate::client::BigtableTableAdmin::create_table_from_snapshot
4500#[derive(Clone, Default, PartialEq)]
4501#[non_exhaustive]
4502pub struct CreateTableFromSnapshotRequest {
4503    /// Required. The unique name of the instance in which to create the table.
4504    /// Values are of the form `projects/{project}/instances/{instance}`.
4505    pub parent: std::string::String,
4506
4507    /// Required. The name by which the new table should be referred to within the
4508    /// parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
4509    pub table_id: std::string::String,
4510
4511    /// Required. The unique name of the snapshot from which to restore the table.
4512    /// The snapshot and the table must be in the same instance. Values are of the
4513    /// form
4514    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
4515    pub source_snapshot: std::string::String,
4516
4517    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4518}
4519
4520impl CreateTableFromSnapshotRequest {
4521    /// Creates a new default instance.
4522    pub fn new() -> Self {
4523        std::default::Default::default()
4524    }
4525
4526    /// Sets the value of [parent][crate::model::CreateTableFromSnapshotRequest::parent].
4527    ///
4528    /// # Example
4529    /// ```ignore,no_run
4530    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4531    /// # let project_id = "project_id";
4532    /// # let instance_id = "instance_id";
4533    /// let x = CreateTableFromSnapshotRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
4534    /// ```
4535    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4536        self.parent = v.into();
4537        self
4538    }
4539
4540    /// Sets the value of [table_id][crate::model::CreateTableFromSnapshotRequest::table_id].
4541    ///
4542    /// # Example
4543    /// ```ignore,no_run
4544    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4545    /// let x = CreateTableFromSnapshotRequest::new().set_table_id("example");
4546    /// ```
4547    pub fn set_table_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4548        self.table_id = v.into();
4549        self
4550    }
4551
4552    /// Sets the value of [source_snapshot][crate::model::CreateTableFromSnapshotRequest::source_snapshot].
4553    ///
4554    /// # Example
4555    /// ```ignore,no_run
4556    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
4557    /// # let project_id = "project_id";
4558    /// # let instance_id = "instance_id";
4559    /// # let cluster_id = "cluster_id";
4560    /// # let snapshot_id = "snapshot_id";
4561    /// let x = CreateTableFromSnapshotRequest::new().set_source_snapshot(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
4562    /// ```
4563    pub fn set_source_snapshot<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4564        self.source_snapshot = v.into();
4565        self
4566    }
4567}
4568
4569impl wkt::message::Message for CreateTableFromSnapshotRequest {
4570    fn typename() -> &'static str {
4571        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotRequest"
4572    }
4573}
4574
4575/// Request message for
4576/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange][google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]
4577///
4578/// [google.bigtable.admin.v2.BigtableTableAdmin.DropRowRange]: crate::client::BigtableTableAdmin::drop_row_range
4579#[derive(Clone, Default, PartialEq)]
4580#[non_exhaustive]
4581pub struct DropRowRangeRequest {
4582    /// Required. The unique name of the table on which to drop a range of rows.
4583    /// Values are of the form
4584    /// `projects/{project}/instances/{instance}/tables/{table}`.
4585    pub name: std::string::String,
4586
4587    /// Delete all rows or by prefix.
4588    pub target: std::option::Option<crate::model::drop_row_range_request::Target>,
4589
4590    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4591}
4592
4593impl DropRowRangeRequest {
4594    /// Creates a new default instance.
4595    pub fn new() -> Self {
4596        std::default::Default::default()
4597    }
4598
4599    /// Sets the value of [name][crate::model::DropRowRangeRequest::name].
4600    ///
4601    /// # Example
4602    /// ```ignore,no_run
4603    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4604    /// # let project_id = "project_id";
4605    /// # let instance_id = "instance_id";
4606    /// # let table_id = "table_id";
4607    /// let x = DropRowRangeRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
4608    /// ```
4609    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4610        self.name = v.into();
4611        self
4612    }
4613
4614    /// Sets the value of [target][crate::model::DropRowRangeRequest::target].
4615    ///
4616    /// Note that all the setters affecting `target` are mutually
4617    /// exclusive.
4618    ///
4619    /// # Example
4620    /// ```ignore,no_run
4621    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4622    /// use google_cloud_bigtable_admin_v2::model::drop_row_range_request::Target;
4623    /// let x = DropRowRangeRequest::new().set_target(Some(Target::RowKeyPrefix(bytes::Bytes::from_static(b"example"))));
4624    /// ```
4625    pub fn set_target<
4626        T: std::convert::Into<std::option::Option<crate::model::drop_row_range_request::Target>>,
4627    >(
4628        mut self,
4629        v: T,
4630    ) -> Self {
4631        self.target = v.into();
4632        self
4633    }
4634
4635    /// The value of [target][crate::model::DropRowRangeRequest::target]
4636    /// if it holds a `RowKeyPrefix`, `None` if the field is not set or
4637    /// holds a different branch.
4638    pub fn row_key_prefix(&self) -> std::option::Option<&::bytes::Bytes> {
4639        #[allow(unreachable_patterns)]
4640        self.target.as_ref().and_then(|v| match v {
4641            crate::model::drop_row_range_request::Target::RowKeyPrefix(v) => {
4642                std::option::Option::Some(v)
4643            }
4644            _ => std::option::Option::None,
4645        })
4646    }
4647
4648    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
4649    /// to hold a `RowKeyPrefix`.
4650    ///
4651    /// Note that all the setters affecting `target` are
4652    /// mutually exclusive.
4653    ///
4654    /// # Example
4655    /// ```ignore,no_run
4656    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4657    /// let x = DropRowRangeRequest::new().set_row_key_prefix(bytes::Bytes::from_static(b"example"));
4658    /// assert!(x.row_key_prefix().is_some());
4659    /// assert!(x.delete_all_data_from_table().is_none());
4660    /// ```
4661    pub fn set_row_key_prefix<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
4662        self.target = std::option::Option::Some(
4663            crate::model::drop_row_range_request::Target::RowKeyPrefix(v.into()),
4664        );
4665        self
4666    }
4667
4668    /// The value of [target][crate::model::DropRowRangeRequest::target]
4669    /// if it holds a `DeleteAllDataFromTable`, `None` if the field is not set or
4670    /// holds a different branch.
4671    pub fn delete_all_data_from_table(&self) -> std::option::Option<&bool> {
4672        #[allow(unreachable_patterns)]
4673        self.target.as_ref().and_then(|v| match v {
4674            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v) => {
4675                std::option::Option::Some(v)
4676            }
4677            _ => std::option::Option::None,
4678        })
4679    }
4680
4681    /// Sets the value of [target][crate::model::DropRowRangeRequest::target]
4682    /// to hold a `DeleteAllDataFromTable`.
4683    ///
4684    /// Note that all the setters affecting `target` are
4685    /// mutually exclusive.
4686    ///
4687    /// # Example
4688    /// ```ignore,no_run
4689    /// # use google_cloud_bigtable_admin_v2::model::DropRowRangeRequest;
4690    /// let x = DropRowRangeRequest::new().set_delete_all_data_from_table(true);
4691    /// assert!(x.delete_all_data_from_table().is_some());
4692    /// assert!(x.row_key_prefix().is_none());
4693    /// ```
4694    pub fn set_delete_all_data_from_table<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4695        self.target = std::option::Option::Some(
4696            crate::model::drop_row_range_request::Target::DeleteAllDataFromTable(v.into()),
4697        );
4698        self
4699    }
4700}
4701
4702impl wkt::message::Message for DropRowRangeRequest {
4703    fn typename() -> &'static str {
4704        "type.googleapis.com/google.bigtable.admin.v2.DropRowRangeRequest"
4705    }
4706}
4707
4708/// Defines additional types related to [DropRowRangeRequest].
4709pub mod drop_row_range_request {
4710    #[allow(unused_imports)]
4711    use super::*;
4712
4713    /// Delete all rows or by prefix.
4714    #[derive(Clone, Debug, PartialEq)]
4715    #[non_exhaustive]
4716    pub enum Target {
4717        /// Delete all rows that start with this row key prefix. Prefix cannot be
4718        /// zero length.
4719        RowKeyPrefix(::bytes::Bytes),
4720        /// Delete all rows in the table. Setting this to false is a no-op.
4721        DeleteAllDataFromTable(bool),
4722    }
4723}
4724
4725/// Request message for
4726/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
4727///
4728/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
4729#[derive(Clone, Default, PartialEq)]
4730#[non_exhaustive]
4731pub struct ListTablesRequest {
4732    /// Required. The unique name of the instance for which tables should be
4733    /// listed. Values are of the form `projects/{project}/instances/{instance}`.
4734    pub parent: std::string::String,
4735
4736    /// The view to be applied to the returned tables' fields.
4737    /// NAME_ONLY view (default) and REPLICATION_VIEW are supported.
4738    pub view: crate::model::table::View,
4739
4740    /// Maximum number of results per page.
4741    ///
4742    /// A page_size of zero lets the server choose the number of items to return.
4743    /// A page_size which is strictly positive will return at most that many items.
4744    /// A negative page_size will cause an error.
4745    ///
4746    /// Following the first request, subsequent paginated calls are not required
4747    /// to pass a page_size. If a page_size is set in subsequent calls, it must
4748    /// match the page_size given in the first request.
4749    pub page_size: i32,
4750
4751    /// The value of `next_page_token` returned by a previous call.
4752    pub page_token: std::string::String,
4753
4754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4755}
4756
4757impl ListTablesRequest {
4758    /// Creates a new default instance.
4759    pub fn new() -> Self {
4760        std::default::Default::default()
4761    }
4762
4763    /// Sets the value of [parent][crate::model::ListTablesRequest::parent].
4764    ///
4765    /// # Example
4766    /// ```ignore,no_run
4767    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4768    /// # let project_id = "project_id";
4769    /// # let instance_id = "instance_id";
4770    /// let x = ListTablesRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}"));
4771    /// ```
4772    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4773        self.parent = v.into();
4774        self
4775    }
4776
4777    /// Sets the value of [view][crate::model::ListTablesRequest::view].
4778    ///
4779    /// # Example
4780    /// ```ignore,no_run
4781    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4782    /// use google_cloud_bigtable_admin_v2::model::table::View;
4783    /// let x0 = ListTablesRequest::new().set_view(View::NameOnly);
4784    /// let x1 = ListTablesRequest::new().set_view(View::SchemaView);
4785    /// let x2 = ListTablesRequest::new().set_view(View::ReplicationView);
4786    /// ```
4787    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
4788        self.view = v.into();
4789        self
4790    }
4791
4792    /// Sets the value of [page_size][crate::model::ListTablesRequest::page_size].
4793    ///
4794    /// # Example
4795    /// ```ignore,no_run
4796    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4797    /// let x = ListTablesRequest::new().set_page_size(42);
4798    /// ```
4799    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4800        self.page_size = v.into();
4801        self
4802    }
4803
4804    /// Sets the value of [page_token][crate::model::ListTablesRequest::page_token].
4805    ///
4806    /// # Example
4807    /// ```ignore,no_run
4808    /// # use google_cloud_bigtable_admin_v2::model::ListTablesRequest;
4809    /// let x = ListTablesRequest::new().set_page_token("example");
4810    /// ```
4811    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4812        self.page_token = v.into();
4813        self
4814    }
4815}
4816
4817impl wkt::message::Message for ListTablesRequest {
4818    fn typename() -> &'static str {
4819        "type.googleapis.com/google.bigtable.admin.v2.ListTablesRequest"
4820    }
4821}
4822
4823/// Response message for
4824/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables][google.bigtable.admin.v2.BigtableTableAdmin.ListTables]
4825///
4826/// [google.bigtable.admin.v2.BigtableTableAdmin.ListTables]: crate::client::BigtableTableAdmin::list_tables
4827#[derive(Clone, Default, PartialEq)]
4828#[non_exhaustive]
4829pub struct ListTablesResponse {
4830    /// The tables present in the requested instance.
4831    pub tables: std::vec::Vec<crate::model::Table>,
4832
4833    /// Set if not all tables could be returned in a single response.
4834    /// Pass this value to `page_token` in another request to get the next
4835    /// page of results.
4836    pub next_page_token: std::string::String,
4837
4838    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4839}
4840
4841impl ListTablesResponse {
4842    /// Creates a new default instance.
4843    pub fn new() -> Self {
4844        std::default::Default::default()
4845    }
4846
4847    /// Sets the value of [tables][crate::model::ListTablesResponse::tables].
4848    ///
4849    /// # Example
4850    /// ```ignore,no_run
4851    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
4852    /// use google_cloud_bigtable_admin_v2::model::Table;
4853    /// let x = ListTablesResponse::new()
4854    ///     .set_tables([
4855    ///         Table::default()/* use setters */,
4856    ///         Table::default()/* use (different) setters */,
4857    ///     ]);
4858    /// ```
4859    pub fn set_tables<T, V>(mut self, v: T) -> Self
4860    where
4861        T: std::iter::IntoIterator<Item = V>,
4862        V: std::convert::Into<crate::model::Table>,
4863    {
4864        use std::iter::Iterator;
4865        self.tables = v.into_iter().map(|i| i.into()).collect();
4866        self
4867    }
4868
4869    /// Sets the value of [next_page_token][crate::model::ListTablesResponse::next_page_token].
4870    ///
4871    /// # Example
4872    /// ```ignore,no_run
4873    /// # use google_cloud_bigtable_admin_v2::model::ListTablesResponse;
4874    /// let x = ListTablesResponse::new().set_next_page_token("example");
4875    /// ```
4876    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4877        self.next_page_token = v.into();
4878        self
4879    }
4880}
4881
4882impl wkt::message::Message for ListTablesResponse {
4883    fn typename() -> &'static str {
4884        "type.googleapis.com/google.bigtable.admin.v2.ListTablesResponse"
4885    }
4886}
4887
4888#[doc(hidden)]
4889impl google_cloud_gax::paginator::internal::PageableResponse for ListTablesResponse {
4890    type PageItem = crate::model::Table;
4891
4892    fn items(self) -> std::vec::Vec<Self::PageItem> {
4893        self.tables
4894    }
4895
4896    fn next_page_token(&self) -> std::string::String {
4897        use std::clone::Clone;
4898        self.next_page_token.clone()
4899    }
4900}
4901
4902/// Request message for
4903/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable][google.bigtable.admin.v2.BigtableTableAdmin.GetTable]
4904///
4905/// [google.bigtable.admin.v2.BigtableTableAdmin.GetTable]: crate::client::BigtableTableAdmin::get_table
4906#[derive(Clone, Default, PartialEq)]
4907#[non_exhaustive]
4908pub struct GetTableRequest {
4909    /// Required. The unique name of the requested table.
4910    /// Values are of the form
4911    /// `projects/{project}/instances/{instance}/tables/{table}`.
4912    pub name: std::string::String,
4913
4914    /// The view to be applied to the returned table's fields.
4915    /// Defaults to `SCHEMA_VIEW` if unspecified.
4916    pub view: crate::model::table::View,
4917
4918    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4919}
4920
4921impl GetTableRequest {
4922    /// Creates a new default instance.
4923    pub fn new() -> Self {
4924        std::default::Default::default()
4925    }
4926
4927    /// Sets the value of [name][crate::model::GetTableRequest::name].
4928    ///
4929    /// # Example
4930    /// ```ignore,no_run
4931    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
4932    /// # let project_id = "project_id";
4933    /// # let instance_id = "instance_id";
4934    /// # let table_id = "table_id";
4935    /// let x = GetTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
4936    /// ```
4937    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4938        self.name = v.into();
4939        self
4940    }
4941
4942    /// Sets the value of [view][crate::model::GetTableRequest::view].
4943    ///
4944    /// # Example
4945    /// ```ignore,no_run
4946    /// # use google_cloud_bigtable_admin_v2::model::GetTableRequest;
4947    /// use google_cloud_bigtable_admin_v2::model::table::View;
4948    /// let x0 = GetTableRequest::new().set_view(View::NameOnly);
4949    /// let x1 = GetTableRequest::new().set_view(View::SchemaView);
4950    /// let x2 = GetTableRequest::new().set_view(View::ReplicationView);
4951    /// ```
4952    pub fn set_view<T: std::convert::Into<crate::model::table::View>>(mut self, v: T) -> Self {
4953        self.view = v.into();
4954        self
4955    }
4956}
4957
4958impl wkt::message::Message for GetTableRequest {
4959    fn typename() -> &'static str {
4960        "type.googleapis.com/google.bigtable.admin.v2.GetTableRequest"
4961    }
4962}
4963
4964/// The request for
4965/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
4966///
4967/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
4968#[derive(Clone, Default, PartialEq)]
4969#[non_exhaustive]
4970pub struct UpdateTableRequest {
4971    /// Required. The table to update.
4972    /// The table's `name` field is used to identify the table to update.
4973    pub table: std::option::Option<crate::model::Table>,
4974
4975    /// Required. The list of fields to update.
4976    /// A mask specifying which fields (e.g. `change_stream_config`) in the `table`
4977    /// field should be updated. This mask is relative to the `table` field, not to
4978    /// the request message. The wildcard (*) path is currently not supported.
4979    /// Currently UpdateTable is only supported for the following fields:
4980    ///
4981    /// * `change_stream_config`
4982    /// * `change_stream_config.retention_period`
4983    /// * `deletion_protection`
4984    /// * `row_key_schema`
4985    ///
4986    /// If `column_families` is set in `update_mask`, it will return an
4987    /// UNIMPLEMENTED error.
4988    pub update_mask: std::option::Option<wkt::FieldMask>,
4989
4990    /// Optional. If true, ignore safety checks when updating the table.
4991    pub ignore_warnings: bool,
4992
4993    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4994}
4995
4996impl UpdateTableRequest {
4997    /// Creates a new default instance.
4998    pub fn new() -> Self {
4999        std::default::Default::default()
5000    }
5001
5002    /// Sets the value of [table][crate::model::UpdateTableRequest::table].
5003    ///
5004    /// # Example
5005    /// ```ignore,no_run
5006    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5007    /// use google_cloud_bigtable_admin_v2::model::Table;
5008    /// let x = UpdateTableRequest::new().set_table(Table::default()/* use setters */);
5009    /// ```
5010    pub fn set_table<T>(mut self, v: T) -> Self
5011    where
5012        T: std::convert::Into<crate::model::Table>,
5013    {
5014        self.table = std::option::Option::Some(v.into());
5015        self
5016    }
5017
5018    /// Sets or clears the value of [table][crate::model::UpdateTableRequest::table].
5019    ///
5020    /// # Example
5021    /// ```ignore,no_run
5022    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5023    /// use google_cloud_bigtable_admin_v2::model::Table;
5024    /// let x = UpdateTableRequest::new().set_or_clear_table(Some(Table::default()/* use setters */));
5025    /// let x = UpdateTableRequest::new().set_or_clear_table(None::<Table>);
5026    /// ```
5027    pub fn set_or_clear_table<T>(mut self, v: std::option::Option<T>) -> Self
5028    where
5029        T: std::convert::Into<crate::model::Table>,
5030    {
5031        self.table = v.map(|x| x.into());
5032        self
5033    }
5034
5035    /// Sets the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
5036    ///
5037    /// # Example
5038    /// ```ignore,no_run
5039    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5040    /// use wkt::FieldMask;
5041    /// let x = UpdateTableRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5042    /// ```
5043    pub fn set_update_mask<T>(mut self, v: T) -> Self
5044    where
5045        T: std::convert::Into<wkt::FieldMask>,
5046    {
5047        self.update_mask = std::option::Option::Some(v.into());
5048        self
5049    }
5050
5051    /// Sets or clears the value of [update_mask][crate::model::UpdateTableRequest::update_mask].
5052    ///
5053    /// # Example
5054    /// ```ignore,no_run
5055    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5056    /// use wkt::FieldMask;
5057    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5058    /// let x = UpdateTableRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5059    /// ```
5060    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5061    where
5062        T: std::convert::Into<wkt::FieldMask>,
5063    {
5064        self.update_mask = v.map(|x| x.into());
5065        self
5066    }
5067
5068    /// Sets the value of [ignore_warnings][crate::model::UpdateTableRequest::ignore_warnings].
5069    ///
5070    /// # Example
5071    /// ```ignore,no_run
5072    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableRequest;
5073    /// let x = UpdateTableRequest::new().set_ignore_warnings(true);
5074    /// ```
5075    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5076        self.ignore_warnings = v.into();
5077        self
5078    }
5079}
5080
5081impl wkt::message::Message for UpdateTableRequest {
5082    fn typename() -> &'static str {
5083        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableRequest"
5084    }
5085}
5086
5087/// Metadata type for the operation returned by
5088/// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
5089///
5090/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]: crate::client::BigtableTableAdmin::update_table
5091#[derive(Clone, Default, PartialEq)]
5092#[non_exhaustive]
5093pub struct UpdateTableMetadata {
5094    /// The name of the table being updated.
5095    pub name: std::string::String,
5096
5097    /// The time at which this operation started.
5098    pub start_time: std::option::Option<wkt::Timestamp>,
5099
5100    /// If set, the time at which this operation finished or was canceled.
5101    pub end_time: std::option::Option<wkt::Timestamp>,
5102
5103    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5104}
5105
5106impl UpdateTableMetadata {
5107    /// Creates a new default instance.
5108    pub fn new() -> Self {
5109        std::default::Default::default()
5110    }
5111
5112    /// Sets the value of [name][crate::model::UpdateTableMetadata::name].
5113    ///
5114    /// # Example
5115    /// ```ignore,no_run
5116    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5117    /// let x = UpdateTableMetadata::new().set_name("example");
5118    /// ```
5119    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5120        self.name = v.into();
5121        self
5122    }
5123
5124    /// Sets the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5125    ///
5126    /// # Example
5127    /// ```ignore,no_run
5128    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5129    /// use wkt::Timestamp;
5130    /// let x = UpdateTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5131    /// ```
5132    pub fn set_start_time<T>(mut self, v: T) -> Self
5133    where
5134        T: std::convert::Into<wkt::Timestamp>,
5135    {
5136        self.start_time = std::option::Option::Some(v.into());
5137        self
5138    }
5139
5140    /// Sets or clears the value of [start_time][crate::model::UpdateTableMetadata::start_time].
5141    ///
5142    /// # Example
5143    /// ```ignore,no_run
5144    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5145    /// use wkt::Timestamp;
5146    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5147    /// let x = UpdateTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5148    /// ```
5149    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5150    where
5151        T: std::convert::Into<wkt::Timestamp>,
5152    {
5153        self.start_time = v.map(|x| x.into());
5154        self
5155    }
5156
5157    /// Sets the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5158    ///
5159    /// # Example
5160    /// ```ignore,no_run
5161    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5162    /// use wkt::Timestamp;
5163    /// let x = UpdateTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5164    /// ```
5165    pub fn set_end_time<T>(mut self, v: T) -> Self
5166    where
5167        T: std::convert::Into<wkt::Timestamp>,
5168    {
5169        self.end_time = std::option::Option::Some(v.into());
5170        self
5171    }
5172
5173    /// Sets or clears the value of [end_time][crate::model::UpdateTableMetadata::end_time].
5174    ///
5175    /// # Example
5176    /// ```ignore,no_run
5177    /// # use google_cloud_bigtable_admin_v2::model::UpdateTableMetadata;
5178    /// use wkt::Timestamp;
5179    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5180    /// let x = UpdateTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5181    /// ```
5182    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5183    where
5184        T: std::convert::Into<wkt::Timestamp>,
5185    {
5186        self.end_time = v.map(|x| x.into());
5187        self
5188    }
5189}
5190
5191impl wkt::message::Message for UpdateTableMetadata {
5192    fn typename() -> &'static str {
5193        "type.googleapis.com/google.bigtable.admin.v2.UpdateTableMetadata"
5194    }
5195}
5196
5197/// Request message for
5198/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]
5199///
5200/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable]: crate::client::BigtableTableAdmin::delete_table
5201#[derive(Clone, Default, PartialEq)]
5202#[non_exhaustive]
5203pub struct DeleteTableRequest {
5204    /// Required. The unique name of the table to be deleted.
5205    /// Values are of the form
5206    /// `projects/{project}/instances/{instance}/tables/{table}`.
5207    pub name: std::string::String,
5208
5209    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5210}
5211
5212impl DeleteTableRequest {
5213    /// Creates a new default instance.
5214    pub fn new() -> Self {
5215        std::default::Default::default()
5216    }
5217
5218    /// Sets the value of [name][crate::model::DeleteTableRequest::name].
5219    ///
5220    /// # Example
5221    /// ```ignore,no_run
5222    /// # use google_cloud_bigtable_admin_v2::model::DeleteTableRequest;
5223    /// # let project_id = "project_id";
5224    /// # let instance_id = "instance_id";
5225    /// # let table_id = "table_id";
5226    /// let x = DeleteTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5227    /// ```
5228    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5229        self.name = v.into();
5230        self
5231    }
5232}
5233
5234impl wkt::message::Message for DeleteTableRequest {
5235    fn typename() -> &'static str {
5236        "type.googleapis.com/google.bigtable.admin.v2.DeleteTableRequest"
5237    }
5238}
5239
5240/// Request message for
5241/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]
5242///
5243/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5244#[derive(Clone, Default, PartialEq)]
5245#[non_exhaustive]
5246pub struct UndeleteTableRequest {
5247    /// Required. The unique name of the table to be restored.
5248    /// Values are of the form
5249    /// `projects/{project}/instances/{instance}/tables/{table}`.
5250    pub name: std::string::String,
5251
5252    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5253}
5254
5255impl UndeleteTableRequest {
5256    /// Creates a new default instance.
5257    pub fn new() -> Self {
5258        std::default::Default::default()
5259    }
5260
5261    /// Sets the value of [name][crate::model::UndeleteTableRequest::name].
5262    ///
5263    /// # Example
5264    /// ```ignore,no_run
5265    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableRequest;
5266    /// # let project_id = "project_id";
5267    /// # let instance_id = "instance_id";
5268    /// # let table_id = "table_id";
5269    /// let x = UndeleteTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5270    /// ```
5271    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5272        self.name = v.into();
5273        self
5274    }
5275}
5276
5277impl wkt::message::Message for UndeleteTableRequest {
5278    fn typename() -> &'static str {
5279        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableRequest"
5280    }
5281}
5282
5283/// Metadata type for the operation returned by
5284/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable].
5285///
5286/// [google.bigtable.admin.v2.BigtableTableAdmin.UndeleteTable]: crate::client::BigtableTableAdmin::undelete_table
5287#[derive(Clone, Default, PartialEq)]
5288#[non_exhaustive]
5289pub struct UndeleteTableMetadata {
5290    /// The name of the table being restored.
5291    pub name: std::string::String,
5292
5293    /// The time at which this operation started.
5294    pub start_time: std::option::Option<wkt::Timestamp>,
5295
5296    /// If set, the time at which this operation finished or was cancelled.
5297    pub end_time: std::option::Option<wkt::Timestamp>,
5298
5299    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5300}
5301
5302impl UndeleteTableMetadata {
5303    /// Creates a new default instance.
5304    pub fn new() -> Self {
5305        std::default::Default::default()
5306    }
5307
5308    /// Sets the value of [name][crate::model::UndeleteTableMetadata::name].
5309    ///
5310    /// # Example
5311    /// ```ignore,no_run
5312    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5313    /// let x = UndeleteTableMetadata::new().set_name("example");
5314    /// ```
5315    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5316        self.name = v.into();
5317        self
5318    }
5319
5320    /// Sets the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5321    ///
5322    /// # Example
5323    /// ```ignore,no_run
5324    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5325    /// use wkt::Timestamp;
5326    /// let x = UndeleteTableMetadata::new().set_start_time(Timestamp::default()/* use setters */);
5327    /// ```
5328    pub fn set_start_time<T>(mut self, v: T) -> Self
5329    where
5330        T: std::convert::Into<wkt::Timestamp>,
5331    {
5332        self.start_time = std::option::Option::Some(v.into());
5333        self
5334    }
5335
5336    /// Sets or clears the value of [start_time][crate::model::UndeleteTableMetadata::start_time].
5337    ///
5338    /// # Example
5339    /// ```ignore,no_run
5340    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5341    /// use wkt::Timestamp;
5342    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
5343    /// let x = UndeleteTableMetadata::new().set_or_clear_start_time(None::<Timestamp>);
5344    /// ```
5345    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
5346    where
5347        T: std::convert::Into<wkt::Timestamp>,
5348    {
5349        self.start_time = v.map(|x| x.into());
5350        self
5351    }
5352
5353    /// Sets the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5354    ///
5355    /// # Example
5356    /// ```ignore,no_run
5357    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5358    /// use wkt::Timestamp;
5359    /// let x = UndeleteTableMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5360    /// ```
5361    pub fn set_end_time<T>(mut self, v: T) -> Self
5362    where
5363        T: std::convert::Into<wkt::Timestamp>,
5364    {
5365        self.end_time = std::option::Option::Some(v.into());
5366        self
5367    }
5368
5369    /// Sets or clears the value of [end_time][crate::model::UndeleteTableMetadata::end_time].
5370    ///
5371    /// # Example
5372    /// ```ignore,no_run
5373    /// # use google_cloud_bigtable_admin_v2::model::UndeleteTableMetadata;
5374    /// use wkt::Timestamp;
5375    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5376    /// let x = UndeleteTableMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5377    /// ```
5378    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5379    where
5380        T: std::convert::Into<wkt::Timestamp>,
5381    {
5382        self.end_time = v.map(|x| x.into());
5383        self
5384    }
5385}
5386
5387impl wkt::message::Message for UndeleteTableMetadata {
5388    fn typename() -> &'static str {
5389        "type.googleapis.com/google.bigtable.admin.v2.UndeleteTableMetadata"
5390    }
5391}
5392
5393/// Request message for
5394/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies][google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]
5395///
5396/// [google.bigtable.admin.v2.BigtableTableAdmin.ModifyColumnFamilies]: crate::client::BigtableTableAdmin::modify_column_families
5397#[derive(Clone, Default, PartialEq)]
5398#[non_exhaustive]
5399pub struct ModifyColumnFamiliesRequest {
5400    /// Required. The unique name of the table whose families should be modified.
5401    /// Values are of the form
5402    /// `projects/{project}/instances/{instance}/tables/{table}`.
5403    pub name: std::string::String,
5404
5405    /// Required. Modifications to be atomically applied to the specified table's
5406    /// families. Entries are applied in order, meaning that earlier modifications
5407    /// can be masked by later ones (in the case of repeated updates to the same
5408    /// family, for example).
5409    pub modifications: std::vec::Vec<crate::model::modify_column_families_request::Modification>,
5410
5411    /// Optional. If true, ignore safety checks when modifying the column families.
5412    pub ignore_warnings: bool,
5413
5414    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5415}
5416
5417impl ModifyColumnFamiliesRequest {
5418    /// Creates a new default instance.
5419    pub fn new() -> Self {
5420        std::default::Default::default()
5421    }
5422
5423    /// Sets the value of [name][crate::model::ModifyColumnFamiliesRequest::name].
5424    ///
5425    /// # Example
5426    /// ```ignore,no_run
5427    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5428    /// # let project_id = "project_id";
5429    /// # let instance_id = "instance_id";
5430    /// # let table_id = "table_id";
5431    /// let x = ModifyColumnFamiliesRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5432    /// ```
5433    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5434        self.name = v.into();
5435        self
5436    }
5437
5438    /// Sets the value of [modifications][crate::model::ModifyColumnFamiliesRequest::modifications].
5439    ///
5440    /// # Example
5441    /// ```ignore,no_run
5442    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5443    /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5444    /// let x = ModifyColumnFamiliesRequest::new()
5445    ///     .set_modifications([
5446    ///         Modification::default()/* use setters */,
5447    ///         Modification::default()/* use (different) setters */,
5448    ///     ]);
5449    /// ```
5450    pub fn set_modifications<T, V>(mut self, v: T) -> Self
5451    where
5452        T: std::iter::IntoIterator<Item = V>,
5453        V: std::convert::Into<crate::model::modify_column_families_request::Modification>,
5454    {
5455        use std::iter::Iterator;
5456        self.modifications = v.into_iter().map(|i| i.into()).collect();
5457        self
5458    }
5459
5460    /// Sets the value of [ignore_warnings][crate::model::ModifyColumnFamiliesRequest::ignore_warnings].
5461    ///
5462    /// # Example
5463    /// ```ignore,no_run
5464    /// # use google_cloud_bigtable_admin_v2::model::ModifyColumnFamiliesRequest;
5465    /// let x = ModifyColumnFamiliesRequest::new().set_ignore_warnings(true);
5466    /// ```
5467    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5468        self.ignore_warnings = v.into();
5469        self
5470    }
5471}
5472
5473impl wkt::message::Message for ModifyColumnFamiliesRequest {
5474    fn typename() -> &'static str {
5475        "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest"
5476    }
5477}
5478
5479/// Defines additional types related to [ModifyColumnFamiliesRequest].
5480pub mod modify_column_families_request {
5481    #[allow(unused_imports)]
5482    use super::*;
5483
5484    /// A create, update, or delete of a particular column family.
5485    #[derive(Clone, Default, PartialEq)]
5486    #[non_exhaustive]
5487    pub struct Modification {
5488        /// The ID of the column family to be modified.
5489        pub id: std::string::String,
5490
5491        /// Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update`
5492        /// mod should be updated, ignored for other modification types. If unset or
5493        /// empty, we treat it as updating `gc_rule` to be backward compatible.
5494        pub update_mask: std::option::Option<wkt::FieldMask>,
5495
5496        /// Column family modifications.
5497        pub r#mod:
5498            std::option::Option<crate::model::modify_column_families_request::modification::Mod>,
5499
5500        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5501    }
5502
5503    impl Modification {
5504        /// Creates a new default instance.
5505        pub fn new() -> Self {
5506            std::default::Default::default()
5507        }
5508
5509        /// Sets the value of [id][crate::model::modify_column_families_request::Modification::id].
5510        ///
5511        /// # Example
5512        /// ```ignore,no_run
5513        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5514        /// let x = Modification::new().set_id("example");
5515        /// ```
5516        pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5517            self.id = v.into();
5518            self
5519        }
5520
5521        /// Sets the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5522        ///
5523        /// # Example
5524        /// ```ignore,no_run
5525        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5526        /// use wkt::FieldMask;
5527        /// let x = Modification::new().set_update_mask(FieldMask::default()/* use setters */);
5528        /// ```
5529        pub fn set_update_mask<T>(mut self, v: T) -> Self
5530        where
5531            T: std::convert::Into<wkt::FieldMask>,
5532        {
5533            self.update_mask = std::option::Option::Some(v.into());
5534            self
5535        }
5536
5537        /// Sets or clears the value of [update_mask][crate::model::modify_column_families_request::Modification::update_mask].
5538        ///
5539        /// # Example
5540        /// ```ignore,no_run
5541        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5542        /// use wkt::FieldMask;
5543        /// let x = Modification::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5544        /// let x = Modification::new().set_or_clear_update_mask(None::<FieldMask>);
5545        /// ```
5546        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5547        where
5548            T: std::convert::Into<wkt::FieldMask>,
5549        {
5550            self.update_mask = v.map(|x| x.into());
5551            self
5552        }
5553
5554        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::mod].
5555        ///
5556        /// Note that all the setters affecting `r#mod` are mutually
5557        /// exclusive.
5558        ///
5559        /// # Example
5560        /// ```ignore,no_run
5561        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5562        /// use google_cloud_bigtable_admin_v2::model::modify_column_families_request::modification::Mod;
5563        /// let x = Modification::new().set_mod(Some(Mod::Drop(true)));
5564        /// ```
5565        pub fn set_mod<
5566            T: std::convert::Into<
5567                    std::option::Option<
5568                        crate::model::modify_column_families_request::modification::Mod,
5569                    >,
5570                >,
5571        >(
5572            mut self,
5573            v: T,
5574        ) -> Self {
5575            self.r#mod = v.into();
5576            self
5577        }
5578
5579        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5580        /// if it holds a `Create`, `None` if the field is not set or
5581        /// holds a different branch.
5582        pub fn create(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
5583            #[allow(unreachable_patterns)]
5584            self.r#mod.as_ref().and_then(|v| match v {
5585                crate::model::modify_column_families_request::modification::Mod::Create(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 `Create`.
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        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
5602        /// let x = Modification::new().set_create(ColumnFamily::default()/* use setters */);
5603        /// assert!(x.create().is_some());
5604        /// assert!(x.update().is_none());
5605        /// assert!(x.drop().is_none());
5606        /// ```
5607        pub fn set_create<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
5608            mut self,
5609            v: T,
5610        ) -> Self {
5611            self.r#mod = std::option::Option::Some(
5612                crate::model::modify_column_families_request::modification::Mod::Create(v.into()),
5613            );
5614            self
5615        }
5616
5617        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5618        /// if it holds a `Update`, `None` if the field is not set or
5619        /// holds a different branch.
5620        pub fn update(&self) -> std::option::Option<&std::boxed::Box<crate::model::ColumnFamily>> {
5621            #[allow(unreachable_patterns)]
5622            self.r#mod.as_ref().and_then(|v| match v {
5623                crate::model::modify_column_families_request::modification::Mod::Update(v) => {
5624                    std::option::Option::Some(v)
5625                }
5626                _ => std::option::Option::None,
5627            })
5628        }
5629
5630        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5631        /// to hold a `Update`.
5632        ///
5633        /// Note that all the setters affecting `r#mod` are
5634        /// mutually exclusive.
5635        ///
5636        /// # Example
5637        /// ```ignore,no_run
5638        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5639        /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
5640        /// let x = Modification::new().set_update(ColumnFamily::default()/* use setters */);
5641        /// assert!(x.update().is_some());
5642        /// assert!(x.create().is_none());
5643        /// assert!(x.drop().is_none());
5644        /// ```
5645        pub fn set_update<T: std::convert::Into<std::boxed::Box<crate::model::ColumnFamily>>>(
5646            mut self,
5647            v: T,
5648        ) -> Self {
5649            self.r#mod = std::option::Option::Some(
5650                crate::model::modify_column_families_request::modification::Mod::Update(v.into()),
5651            );
5652            self
5653        }
5654
5655        /// The value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5656        /// if it holds a `Drop`, `None` if the field is not set or
5657        /// holds a different branch.
5658        pub fn drop(&self) -> std::option::Option<&bool> {
5659            #[allow(unreachable_patterns)]
5660            self.r#mod.as_ref().and_then(|v| match v {
5661                crate::model::modify_column_families_request::modification::Mod::Drop(v) => {
5662                    std::option::Option::Some(v)
5663                }
5664                _ => std::option::Option::None,
5665            })
5666        }
5667
5668        /// Sets the value of [r#mod][crate::model::modify_column_families_request::Modification::r#mod]
5669        /// to hold a `Drop`.
5670        ///
5671        /// Note that all the setters affecting `r#mod` are
5672        /// mutually exclusive.
5673        ///
5674        /// # Example
5675        /// ```ignore,no_run
5676        /// # use google_cloud_bigtable_admin_v2::model::modify_column_families_request::Modification;
5677        /// let x = Modification::new().set_drop(true);
5678        /// assert!(x.drop().is_some());
5679        /// assert!(x.create().is_none());
5680        /// assert!(x.update().is_none());
5681        /// ```
5682        pub fn set_drop<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5683            self.r#mod = std::option::Option::Some(
5684                crate::model::modify_column_families_request::modification::Mod::Drop(v.into()),
5685            );
5686            self
5687        }
5688    }
5689
5690    impl wkt::message::Message for Modification {
5691        fn typename() -> &'static str {
5692            "type.googleapis.com/google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification"
5693        }
5694    }
5695
5696    /// Defines additional types related to [Modification].
5697    pub mod modification {
5698        #[allow(unused_imports)]
5699        use super::*;
5700
5701        /// Column family modifications.
5702        #[derive(Clone, Debug, PartialEq)]
5703        #[non_exhaustive]
5704        pub enum Mod {
5705            /// Create a new column family with the specified schema, or fail if
5706            /// one already exists with the given ID.
5707            Create(std::boxed::Box<crate::model::ColumnFamily>),
5708            /// Update an existing column family to the specified schema, or fail
5709            /// if no column family exists with the given ID.
5710            Update(std::boxed::Box<crate::model::ColumnFamily>),
5711            /// Drop (delete) the column family with the given ID, or fail if no such
5712            /// family exists.
5713            Drop(bool),
5714        }
5715    }
5716}
5717
5718/// Request message for
5719/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
5720///
5721/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
5722#[derive(Clone, Default, PartialEq)]
5723#[non_exhaustive]
5724pub struct GenerateConsistencyTokenRequest {
5725    /// Required. The unique name of the Table for which to create a consistency
5726    /// token. Values are of the form
5727    /// `projects/{project}/instances/{instance}/tables/{table}`.
5728    pub name: std::string::String,
5729
5730    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5731}
5732
5733impl GenerateConsistencyTokenRequest {
5734    /// Creates a new default instance.
5735    pub fn new() -> Self {
5736        std::default::Default::default()
5737    }
5738
5739    /// Sets the value of [name][crate::model::GenerateConsistencyTokenRequest::name].
5740    ///
5741    /// # Example
5742    /// ```ignore,no_run
5743    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenRequest;
5744    /// # let project_id = "project_id";
5745    /// # let instance_id = "instance_id";
5746    /// # let table_id = "table_id";
5747    /// let x = GenerateConsistencyTokenRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5748    /// ```
5749    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5750        self.name = v.into();
5751        self
5752    }
5753}
5754
5755impl wkt::message::Message for GenerateConsistencyTokenRequest {
5756    fn typename() -> &'static str {
5757        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenRequest"
5758    }
5759}
5760
5761/// Response message for
5762/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken][google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]
5763///
5764/// [google.bigtable.admin.v2.BigtableTableAdmin.GenerateConsistencyToken]: crate::client::BigtableTableAdmin::generate_consistency_token
5765#[derive(Clone, Default, PartialEq)]
5766#[non_exhaustive]
5767pub struct GenerateConsistencyTokenResponse {
5768    /// The generated consistency token.
5769    pub consistency_token: std::string::String,
5770
5771    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5772}
5773
5774impl GenerateConsistencyTokenResponse {
5775    /// Creates a new default instance.
5776    pub fn new() -> Self {
5777        std::default::Default::default()
5778    }
5779
5780    /// Sets the value of [consistency_token][crate::model::GenerateConsistencyTokenResponse::consistency_token].
5781    ///
5782    /// # Example
5783    /// ```ignore,no_run
5784    /// # use google_cloud_bigtable_admin_v2::model::GenerateConsistencyTokenResponse;
5785    /// let x = GenerateConsistencyTokenResponse::new().set_consistency_token("example");
5786    /// ```
5787    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
5788        mut self,
5789        v: T,
5790    ) -> Self {
5791        self.consistency_token = v.into();
5792        self
5793    }
5794}
5795
5796impl wkt::message::Message for GenerateConsistencyTokenResponse {
5797    fn typename() -> &'static str {
5798        "type.googleapis.com/google.bigtable.admin.v2.GenerateConsistencyTokenResponse"
5799    }
5800}
5801
5802/// Request message for
5803/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
5804///
5805/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
5806#[derive(Clone, Default, PartialEq)]
5807#[non_exhaustive]
5808pub struct CheckConsistencyRequest {
5809    /// Required. The unique name of the Table for which to check replication
5810    /// consistency. Values are of the form
5811    /// `projects/{project}/instances/{instance}/tables/{table}`.
5812    pub name: std::string::String,
5813
5814    /// Required. The token created using GenerateConsistencyToken for the Table.
5815    pub consistency_token: std::string::String,
5816
5817    /// Which type of read needs to consistently observe which type of write?
5818    /// Default: `standard_read_remote_writes`
5819    pub mode: std::option::Option<crate::model::check_consistency_request::Mode>,
5820
5821    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5822}
5823
5824impl CheckConsistencyRequest {
5825    /// Creates a new default instance.
5826    pub fn new() -> Self {
5827        std::default::Default::default()
5828    }
5829
5830    /// Sets the value of [name][crate::model::CheckConsistencyRequest::name].
5831    ///
5832    /// # Example
5833    /// ```ignore,no_run
5834    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5835    /// # let project_id = "project_id";
5836    /// # let instance_id = "instance_id";
5837    /// # let table_id = "table_id";
5838    /// let x = CheckConsistencyRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
5839    /// ```
5840    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5841        self.name = v.into();
5842        self
5843    }
5844
5845    /// Sets the value of [consistency_token][crate::model::CheckConsistencyRequest::consistency_token].
5846    ///
5847    /// # Example
5848    /// ```ignore,no_run
5849    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5850    /// let x = CheckConsistencyRequest::new().set_consistency_token("example");
5851    /// ```
5852    pub fn set_consistency_token<T: std::convert::Into<std::string::String>>(
5853        mut self,
5854        v: T,
5855    ) -> Self {
5856        self.consistency_token = v.into();
5857        self
5858    }
5859
5860    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode].
5861    ///
5862    /// Note that all the setters affecting `mode` are mutually
5863    /// exclusive.
5864    ///
5865    /// # Example
5866    /// ```ignore,no_run
5867    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5868    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
5869    /// let x = CheckConsistencyRequest::new().set_mode(Some(
5870    ///     google_cloud_bigtable_admin_v2::model::check_consistency_request::Mode::StandardReadRemoteWrites(StandardReadRemoteWrites::default().into())));
5871    /// ```
5872    pub fn set_mode<
5873        T: std::convert::Into<std::option::Option<crate::model::check_consistency_request::Mode>>,
5874    >(
5875        mut self,
5876        v: T,
5877    ) -> Self {
5878        self.mode = v.into();
5879        self
5880    }
5881
5882    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
5883    /// if it holds a `StandardReadRemoteWrites`, `None` if the field is not set or
5884    /// holds a different branch.
5885    pub fn standard_read_remote_writes(
5886        &self,
5887    ) -> std::option::Option<&std::boxed::Box<crate::model::StandardReadRemoteWrites>> {
5888        #[allow(unreachable_patterns)]
5889        self.mode.as_ref().and_then(|v| match v {
5890            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v) => {
5891                std::option::Option::Some(v)
5892            }
5893            _ => std::option::Option::None,
5894        })
5895    }
5896
5897    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5898    /// to hold a `StandardReadRemoteWrites`.
5899    ///
5900    /// Note that all the setters affecting `mode` are
5901    /// mutually exclusive.
5902    ///
5903    /// # Example
5904    /// ```ignore,no_run
5905    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5906    /// use google_cloud_bigtable_admin_v2::model::StandardReadRemoteWrites;
5907    /// let x = CheckConsistencyRequest::new().set_standard_read_remote_writes(StandardReadRemoteWrites::default()/* use setters */);
5908    /// assert!(x.standard_read_remote_writes().is_some());
5909    /// assert!(x.data_boost_read_local_writes().is_none());
5910    /// ```
5911    pub fn set_standard_read_remote_writes<
5912        T: std::convert::Into<std::boxed::Box<crate::model::StandardReadRemoteWrites>>,
5913    >(
5914        mut self,
5915        v: T,
5916    ) -> Self {
5917        self.mode = std::option::Option::Some(
5918            crate::model::check_consistency_request::Mode::StandardReadRemoteWrites(v.into()),
5919        );
5920        self
5921    }
5922
5923    /// The value of [mode][crate::model::CheckConsistencyRequest::mode]
5924    /// if it holds a `DataBoostReadLocalWrites`, `None` if the field is not set or
5925    /// holds a different branch.
5926    pub fn data_boost_read_local_writes(
5927        &self,
5928    ) -> std::option::Option<&std::boxed::Box<crate::model::DataBoostReadLocalWrites>> {
5929        #[allow(unreachable_patterns)]
5930        self.mode.as_ref().and_then(|v| match v {
5931            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v) => {
5932                std::option::Option::Some(v)
5933            }
5934            _ => std::option::Option::None,
5935        })
5936    }
5937
5938    /// Sets the value of [mode][crate::model::CheckConsistencyRequest::mode]
5939    /// to hold a `DataBoostReadLocalWrites`.
5940    ///
5941    /// Note that all the setters affecting `mode` are
5942    /// mutually exclusive.
5943    ///
5944    /// # Example
5945    /// ```ignore,no_run
5946    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyRequest;
5947    /// use google_cloud_bigtable_admin_v2::model::DataBoostReadLocalWrites;
5948    /// let x = CheckConsistencyRequest::new().set_data_boost_read_local_writes(DataBoostReadLocalWrites::default()/* use setters */);
5949    /// assert!(x.data_boost_read_local_writes().is_some());
5950    /// assert!(x.standard_read_remote_writes().is_none());
5951    /// ```
5952    pub fn set_data_boost_read_local_writes<
5953        T: std::convert::Into<std::boxed::Box<crate::model::DataBoostReadLocalWrites>>,
5954    >(
5955        mut self,
5956        v: T,
5957    ) -> Self {
5958        self.mode = std::option::Option::Some(
5959            crate::model::check_consistency_request::Mode::DataBoostReadLocalWrites(v.into()),
5960        );
5961        self
5962    }
5963}
5964
5965impl wkt::message::Message for CheckConsistencyRequest {
5966    fn typename() -> &'static str {
5967        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyRequest"
5968    }
5969}
5970
5971/// Defines additional types related to [CheckConsistencyRequest].
5972pub mod check_consistency_request {
5973    #[allow(unused_imports)]
5974    use super::*;
5975
5976    /// Which type of read needs to consistently observe which type of write?
5977    /// Default: `standard_read_remote_writes`
5978    #[derive(Clone, Debug, PartialEq)]
5979    #[non_exhaustive]
5980    pub enum Mode {
5981        /// Checks that reads using an app profile with `StandardIsolation` can
5982        /// see all writes committed before the token was created, even if the
5983        /// read and write target different clusters.
5984        StandardReadRemoteWrites(std::boxed::Box<crate::model::StandardReadRemoteWrites>),
5985        /// Checks that reads using an app profile with `DataBoostIsolationReadOnly`
5986        /// can see all writes committed before the token was created, but only if
5987        /// the read and write target the same cluster.
5988        DataBoostReadLocalWrites(std::boxed::Box<crate::model::DataBoostReadLocalWrites>),
5989    }
5990}
5991
5992/// Checks that all writes before the consistency token was generated are
5993/// replicated in every cluster and readable.
5994#[derive(Clone, Default, PartialEq)]
5995#[non_exhaustive]
5996pub struct StandardReadRemoteWrites {
5997    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5998}
5999
6000impl StandardReadRemoteWrites {
6001    /// Creates a new default instance.
6002    pub fn new() -> Self {
6003        std::default::Default::default()
6004    }
6005}
6006
6007impl wkt::message::Message for StandardReadRemoteWrites {
6008    fn typename() -> &'static str {
6009        "type.googleapis.com/google.bigtable.admin.v2.StandardReadRemoteWrites"
6010    }
6011}
6012
6013/// Checks that all writes before the consistency token was generated in the same
6014/// cluster are readable by Databoost.
6015#[derive(Clone, Default, PartialEq)]
6016#[non_exhaustive]
6017pub struct DataBoostReadLocalWrites {
6018    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6019}
6020
6021impl DataBoostReadLocalWrites {
6022    /// Creates a new default instance.
6023    pub fn new() -> Self {
6024        std::default::Default::default()
6025    }
6026}
6027
6028impl wkt::message::Message for DataBoostReadLocalWrites {
6029    fn typename() -> &'static str {
6030        "type.googleapis.com/google.bigtable.admin.v2.DataBoostReadLocalWrites"
6031    }
6032}
6033
6034/// Response message for
6035/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency][google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]
6036///
6037/// [google.bigtable.admin.v2.BigtableTableAdmin.CheckConsistency]: crate::client::BigtableTableAdmin::check_consistency
6038#[derive(Clone, Default, PartialEq)]
6039#[non_exhaustive]
6040pub struct CheckConsistencyResponse {
6041    /// True only if the token is consistent. A token is consistent if replication
6042    /// has caught up with the restrictions specified in the request.
6043    pub consistent: bool,
6044
6045    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6046}
6047
6048impl CheckConsistencyResponse {
6049    /// Creates a new default instance.
6050    pub fn new() -> Self {
6051        std::default::Default::default()
6052    }
6053
6054    /// Sets the value of [consistent][crate::model::CheckConsistencyResponse::consistent].
6055    ///
6056    /// # Example
6057    /// ```ignore,no_run
6058    /// # use google_cloud_bigtable_admin_v2::model::CheckConsistencyResponse;
6059    /// let x = CheckConsistencyResponse::new().set_consistent(true);
6060    /// ```
6061    pub fn set_consistent<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
6062        self.consistent = v.into();
6063        self
6064    }
6065}
6066
6067impl wkt::message::Message for CheckConsistencyResponse {
6068    fn typename() -> &'static str {
6069        "type.googleapis.com/google.bigtable.admin.v2.CheckConsistencyResponse"
6070    }
6071}
6072
6073/// Request message for
6074/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable][google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]
6075///
6076/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6077/// feature is not currently available to most Cloud Bigtable customers. This
6078/// feature might be changed in backward-incompatible ways and is not recommended
6079/// for production use. It is not subject to any SLA or deprecation policy.
6080///
6081/// [google.bigtable.admin.v2.BigtableTableAdmin.SnapshotTable]: crate::client::BigtableTableAdmin::snapshot_table
6082#[derive(Clone, Default, PartialEq)]
6083#[non_exhaustive]
6084pub struct SnapshotTableRequest {
6085    /// Required. The unique name of the table to have the snapshot taken.
6086    /// Values are of the form
6087    /// `projects/{project}/instances/{instance}/tables/{table}`.
6088    pub name: std::string::String,
6089
6090    /// Required. The name of the cluster where the snapshot will be created in.
6091    /// Values are of the form
6092    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
6093    pub cluster: std::string::String,
6094
6095    /// Required. The ID by which the new snapshot should be referred to within the
6096    /// parent cluster, e.g., `mysnapshot` of the form:
6097    /// `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than
6098    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
6099    pub snapshot_id: std::string::String,
6100
6101    /// The amount of time that the new snapshot can stay active after it is
6102    /// created. Once 'ttl' expires, the snapshot will get deleted. The maximum
6103    /// amount of time a snapshot can stay active is 7 days. If 'ttl' is not
6104    /// specified, the default value of 24 hours will be used.
6105    pub ttl: std::option::Option<wkt::Duration>,
6106
6107    /// Description of the snapshot.
6108    pub description: std::string::String,
6109
6110    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6111}
6112
6113impl SnapshotTableRequest {
6114    /// Creates a new default instance.
6115    pub fn new() -> Self {
6116        std::default::Default::default()
6117    }
6118
6119    /// Sets the value of [name][crate::model::SnapshotTableRequest::name].
6120    ///
6121    /// # Example
6122    /// ```ignore,no_run
6123    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6124    /// # let project_id = "project_id";
6125    /// # let instance_id = "instance_id";
6126    /// # let table_id = "table_id";
6127    /// let x = SnapshotTableRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
6128    /// ```
6129    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6130        self.name = v.into();
6131        self
6132    }
6133
6134    /// Sets the value of [cluster][crate::model::SnapshotTableRequest::cluster].
6135    ///
6136    /// # Example
6137    /// ```ignore,no_run
6138    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6139    /// # let project_id = "project_id";
6140    /// # let instance_id = "instance_id";
6141    /// # let cluster_id = "cluster_id";
6142    /// let x = SnapshotTableRequest::new().set_cluster(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
6143    /// ```
6144    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6145        self.cluster = v.into();
6146        self
6147    }
6148
6149    /// Sets the value of [snapshot_id][crate::model::SnapshotTableRequest::snapshot_id].
6150    ///
6151    /// # Example
6152    /// ```ignore,no_run
6153    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6154    /// let x = SnapshotTableRequest::new().set_snapshot_id("example");
6155    /// ```
6156    pub fn set_snapshot_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6157        self.snapshot_id = v.into();
6158        self
6159    }
6160
6161    /// Sets the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6162    ///
6163    /// # Example
6164    /// ```ignore,no_run
6165    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6166    /// use wkt::Duration;
6167    /// let x = SnapshotTableRequest::new().set_ttl(Duration::default()/* use setters */);
6168    /// ```
6169    pub fn set_ttl<T>(mut self, v: T) -> Self
6170    where
6171        T: std::convert::Into<wkt::Duration>,
6172    {
6173        self.ttl = std::option::Option::Some(v.into());
6174        self
6175    }
6176
6177    /// Sets or clears the value of [ttl][crate::model::SnapshotTableRequest::ttl].
6178    ///
6179    /// # Example
6180    /// ```ignore,no_run
6181    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6182    /// use wkt::Duration;
6183    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(Some(Duration::default()/* use setters */));
6184    /// let x = SnapshotTableRequest::new().set_or_clear_ttl(None::<Duration>);
6185    /// ```
6186    pub fn set_or_clear_ttl<T>(mut self, v: std::option::Option<T>) -> Self
6187    where
6188        T: std::convert::Into<wkt::Duration>,
6189    {
6190        self.ttl = v.map(|x| x.into());
6191        self
6192    }
6193
6194    /// Sets the value of [description][crate::model::SnapshotTableRequest::description].
6195    ///
6196    /// # Example
6197    /// ```ignore,no_run
6198    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6199    /// let x = SnapshotTableRequest::new().set_description("example");
6200    /// ```
6201    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6202        self.description = v.into();
6203        self
6204    }
6205}
6206
6207impl wkt::message::Message for SnapshotTableRequest {
6208    fn typename() -> &'static str {
6209        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableRequest"
6210    }
6211}
6212
6213/// Request message for
6214/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]
6215///
6216/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6217/// feature is not currently available to most Cloud Bigtable customers. This
6218/// feature might be changed in backward-incompatible ways and is not recommended
6219/// for production use. It is not subject to any SLA or deprecation policy.
6220///
6221/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSnapshot]: crate::client::BigtableTableAdmin::get_snapshot
6222#[derive(Clone, Default, PartialEq)]
6223#[non_exhaustive]
6224pub struct GetSnapshotRequest {
6225    /// Required. The unique name of the requested snapshot.
6226    /// Values are of the form
6227    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6228    pub name: std::string::String,
6229
6230    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6231}
6232
6233impl GetSnapshotRequest {
6234    /// Creates a new default instance.
6235    pub fn new() -> Self {
6236        std::default::Default::default()
6237    }
6238
6239    /// Sets the value of [name][crate::model::GetSnapshotRequest::name].
6240    ///
6241    /// # Example
6242    /// ```ignore,no_run
6243    /// # use google_cloud_bigtable_admin_v2::model::GetSnapshotRequest;
6244    /// # let project_id = "project_id";
6245    /// # let instance_id = "instance_id";
6246    /// # let cluster_id = "cluster_id";
6247    /// # let snapshot_id = "snapshot_id";
6248    /// let x = GetSnapshotRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
6249    /// ```
6250    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6251        self.name = v.into();
6252        self
6253    }
6254}
6255
6256impl wkt::message::Message for GetSnapshotRequest {
6257    fn typename() -> &'static str {
6258        "type.googleapis.com/google.bigtable.admin.v2.GetSnapshotRequest"
6259    }
6260}
6261
6262/// Request message for
6263/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6264///
6265/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6266/// feature is not currently available to most Cloud Bigtable customers. This
6267/// feature might be changed in backward-incompatible ways and is not recommended
6268/// for production use. It is not subject to any SLA or deprecation policy.
6269///
6270/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6271#[derive(Clone, Default, PartialEq)]
6272#[non_exhaustive]
6273pub struct ListSnapshotsRequest {
6274    /// Required. The unique name of the cluster for which snapshots should be
6275    /// listed. Values are of the form
6276    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
6277    /// Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
6278    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
6279    pub parent: std::string::String,
6280
6281    /// The maximum number of snapshots to return per page.
6282    /// CURRENTLY UNIMPLEMENTED AND IGNORED.
6283    pub page_size: i32,
6284
6285    /// The value of `next_page_token` returned by a previous call.
6286    pub page_token: std::string::String,
6287
6288    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6289}
6290
6291impl ListSnapshotsRequest {
6292    /// Creates a new default instance.
6293    pub fn new() -> Self {
6294        std::default::Default::default()
6295    }
6296
6297    /// Sets the value of [parent][crate::model::ListSnapshotsRequest::parent].
6298    ///
6299    /// # Example
6300    /// ```ignore,no_run
6301    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6302    /// # let project_id = "project_id";
6303    /// # let instance_id = "instance_id";
6304    /// # let cluster_id = "cluster_id";
6305    /// let x = ListSnapshotsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
6306    /// ```
6307    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6308        self.parent = v.into();
6309        self
6310    }
6311
6312    /// Sets the value of [page_size][crate::model::ListSnapshotsRequest::page_size].
6313    ///
6314    /// # Example
6315    /// ```ignore,no_run
6316    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6317    /// let x = ListSnapshotsRequest::new().set_page_size(42);
6318    /// ```
6319    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6320        self.page_size = v.into();
6321        self
6322    }
6323
6324    /// Sets the value of [page_token][crate::model::ListSnapshotsRequest::page_token].
6325    ///
6326    /// # Example
6327    /// ```ignore,no_run
6328    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsRequest;
6329    /// let x = ListSnapshotsRequest::new().set_page_token("example");
6330    /// ```
6331    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6332        self.page_token = v.into();
6333        self
6334    }
6335}
6336
6337impl wkt::message::Message for ListSnapshotsRequest {
6338    fn typename() -> &'static str {
6339        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsRequest"
6340    }
6341}
6342
6343/// Response message for
6344/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots][google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]
6345///
6346/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6347/// feature is not currently available to most Cloud Bigtable customers. This
6348/// feature might be changed in backward-incompatible ways and is not recommended
6349/// for production use. It is not subject to any SLA or deprecation policy.
6350///
6351/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSnapshots]: crate::client::BigtableTableAdmin::list_snapshots
6352#[derive(Clone, Default, PartialEq)]
6353#[non_exhaustive]
6354pub struct ListSnapshotsResponse {
6355    /// The snapshots present in the requested cluster.
6356    pub snapshots: std::vec::Vec<crate::model::Snapshot>,
6357
6358    /// Set if not all snapshots could be returned in a single response.
6359    /// Pass this value to `page_token` in another request to get the next
6360    /// page of results.
6361    pub next_page_token: std::string::String,
6362
6363    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6364}
6365
6366impl ListSnapshotsResponse {
6367    /// Creates a new default instance.
6368    pub fn new() -> Self {
6369        std::default::Default::default()
6370    }
6371
6372    /// Sets the value of [snapshots][crate::model::ListSnapshotsResponse::snapshots].
6373    ///
6374    /// # Example
6375    /// ```ignore,no_run
6376    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6377    /// use google_cloud_bigtable_admin_v2::model::Snapshot;
6378    /// let x = ListSnapshotsResponse::new()
6379    ///     .set_snapshots([
6380    ///         Snapshot::default()/* use setters */,
6381    ///         Snapshot::default()/* use (different) setters */,
6382    ///     ]);
6383    /// ```
6384    pub fn set_snapshots<T, V>(mut self, v: T) -> Self
6385    where
6386        T: std::iter::IntoIterator<Item = V>,
6387        V: std::convert::Into<crate::model::Snapshot>,
6388    {
6389        use std::iter::Iterator;
6390        self.snapshots = v.into_iter().map(|i| i.into()).collect();
6391        self
6392    }
6393
6394    /// Sets the value of [next_page_token][crate::model::ListSnapshotsResponse::next_page_token].
6395    ///
6396    /// # Example
6397    /// ```ignore,no_run
6398    /// # use google_cloud_bigtable_admin_v2::model::ListSnapshotsResponse;
6399    /// let x = ListSnapshotsResponse::new().set_next_page_token("example");
6400    /// ```
6401    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6402        self.next_page_token = v.into();
6403        self
6404    }
6405}
6406
6407impl wkt::message::Message for ListSnapshotsResponse {
6408    fn typename() -> &'static str {
6409        "type.googleapis.com/google.bigtable.admin.v2.ListSnapshotsResponse"
6410    }
6411}
6412
6413#[doc(hidden)]
6414impl google_cloud_gax::paginator::internal::PageableResponse for ListSnapshotsResponse {
6415    type PageItem = crate::model::Snapshot;
6416
6417    fn items(self) -> std::vec::Vec<Self::PageItem> {
6418        self.snapshots
6419    }
6420
6421    fn next_page_token(&self) -> std::string::String {
6422        use std::clone::Clone;
6423        self.next_page_token.clone()
6424    }
6425}
6426
6427/// Request message for
6428/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]
6429///
6430/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6431/// feature is not currently available to most Cloud Bigtable customers. This
6432/// feature might be changed in backward-incompatible ways and is not recommended
6433/// for production use. It is not subject to any SLA or deprecation policy.
6434///
6435/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSnapshot]: crate::client::BigtableTableAdmin::delete_snapshot
6436#[derive(Clone, Default, PartialEq)]
6437#[non_exhaustive]
6438pub struct DeleteSnapshotRequest {
6439    /// Required. The unique name of the snapshot to be deleted.
6440    /// Values are of the form
6441    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
6442    pub name: std::string::String,
6443
6444    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6445}
6446
6447impl DeleteSnapshotRequest {
6448    /// Creates a new default instance.
6449    pub fn new() -> Self {
6450        std::default::Default::default()
6451    }
6452
6453    /// Sets the value of [name][crate::model::DeleteSnapshotRequest::name].
6454    ///
6455    /// # Example
6456    /// ```ignore,no_run
6457    /// # use google_cloud_bigtable_admin_v2::model::DeleteSnapshotRequest;
6458    /// # let project_id = "project_id";
6459    /// # let instance_id = "instance_id";
6460    /// # let cluster_id = "cluster_id";
6461    /// # let snapshot_id = "snapshot_id";
6462    /// let x = DeleteSnapshotRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
6463    /// ```
6464    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6465        self.name = v.into();
6466        self
6467    }
6468}
6469
6470impl wkt::message::Message for DeleteSnapshotRequest {
6471    fn typename() -> &'static str {
6472        "type.googleapis.com/google.bigtable.admin.v2.DeleteSnapshotRequest"
6473    }
6474}
6475
6476/// The metadata for the Operation returned by SnapshotTable.
6477///
6478/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6479/// feature is not currently available to most Cloud Bigtable customers. This
6480/// feature might be changed in backward-incompatible ways and is not recommended
6481/// for production use. It is not subject to any SLA or deprecation policy.
6482#[derive(Clone, Default, PartialEq)]
6483#[non_exhaustive]
6484pub struct SnapshotTableMetadata {
6485    /// The request that prompted the initiation of this SnapshotTable operation.
6486    pub original_request: std::option::Option<crate::model::SnapshotTableRequest>,
6487
6488    /// The time at which the original request was received.
6489    pub request_time: std::option::Option<wkt::Timestamp>,
6490
6491    /// The time at which the operation failed or was completed successfully.
6492    pub finish_time: std::option::Option<wkt::Timestamp>,
6493
6494    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6495}
6496
6497impl SnapshotTableMetadata {
6498    /// Creates a new default instance.
6499    pub fn new() -> Self {
6500        std::default::Default::default()
6501    }
6502
6503    /// Sets the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6504    ///
6505    /// # Example
6506    /// ```ignore,no_run
6507    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6508    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6509    /// let x = SnapshotTableMetadata::new().set_original_request(SnapshotTableRequest::default()/* use setters */);
6510    /// ```
6511    pub fn set_original_request<T>(mut self, v: T) -> Self
6512    where
6513        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6514    {
6515        self.original_request = std::option::Option::Some(v.into());
6516        self
6517    }
6518
6519    /// Sets or clears the value of [original_request][crate::model::SnapshotTableMetadata::original_request].
6520    ///
6521    /// # Example
6522    /// ```ignore,no_run
6523    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6524    /// use google_cloud_bigtable_admin_v2::model::SnapshotTableRequest;
6525    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(Some(SnapshotTableRequest::default()/* use setters */));
6526    /// let x = SnapshotTableMetadata::new().set_or_clear_original_request(None::<SnapshotTableRequest>);
6527    /// ```
6528    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6529    where
6530        T: std::convert::Into<crate::model::SnapshotTableRequest>,
6531    {
6532        self.original_request = v.map(|x| x.into());
6533        self
6534    }
6535
6536    /// Sets the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6537    ///
6538    /// # Example
6539    /// ```ignore,no_run
6540    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6541    /// use wkt::Timestamp;
6542    /// let x = SnapshotTableMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6543    /// ```
6544    pub fn set_request_time<T>(mut self, v: T) -> Self
6545    where
6546        T: std::convert::Into<wkt::Timestamp>,
6547    {
6548        self.request_time = std::option::Option::Some(v.into());
6549        self
6550    }
6551
6552    /// Sets or clears the value of [request_time][crate::model::SnapshotTableMetadata::request_time].
6553    ///
6554    /// # Example
6555    /// ```ignore,no_run
6556    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6557    /// use wkt::Timestamp;
6558    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
6559    /// let x = SnapshotTableMetadata::new().set_or_clear_request_time(None::<Timestamp>);
6560    /// ```
6561    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
6562    where
6563        T: std::convert::Into<wkt::Timestamp>,
6564    {
6565        self.request_time = v.map(|x| x.into());
6566        self
6567    }
6568
6569    /// Sets the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
6570    ///
6571    /// # Example
6572    /// ```ignore,no_run
6573    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6574    /// use wkt::Timestamp;
6575    /// let x = SnapshotTableMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
6576    /// ```
6577    pub fn set_finish_time<T>(mut self, v: T) -> Self
6578    where
6579        T: std::convert::Into<wkt::Timestamp>,
6580    {
6581        self.finish_time = std::option::Option::Some(v.into());
6582        self
6583    }
6584
6585    /// Sets or clears the value of [finish_time][crate::model::SnapshotTableMetadata::finish_time].
6586    ///
6587    /// # Example
6588    /// ```ignore,no_run
6589    /// # use google_cloud_bigtable_admin_v2::model::SnapshotTableMetadata;
6590    /// use wkt::Timestamp;
6591    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
6592    /// let x = SnapshotTableMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
6593    /// ```
6594    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
6595    where
6596        T: std::convert::Into<wkt::Timestamp>,
6597    {
6598        self.finish_time = v.map(|x| x.into());
6599        self
6600    }
6601}
6602
6603impl wkt::message::Message for SnapshotTableMetadata {
6604    fn typename() -> &'static str {
6605        "type.googleapis.com/google.bigtable.admin.v2.SnapshotTableMetadata"
6606    }
6607}
6608
6609/// The metadata for the Operation returned by CreateTableFromSnapshot.
6610///
6611/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
6612/// feature is not currently available to most Cloud Bigtable customers. This
6613/// feature might be changed in backward-incompatible ways and is not recommended
6614/// for production use. It is not subject to any SLA or deprecation policy.
6615#[derive(Clone, Default, PartialEq)]
6616#[non_exhaustive]
6617pub struct CreateTableFromSnapshotMetadata {
6618    /// The request that prompted the initiation of this CreateTableFromSnapshot
6619    /// operation.
6620    pub original_request: std::option::Option<crate::model::CreateTableFromSnapshotRequest>,
6621
6622    /// The time at which the original request was received.
6623    pub request_time: std::option::Option<wkt::Timestamp>,
6624
6625    /// The time at which the operation failed or was completed successfully.
6626    pub finish_time: std::option::Option<wkt::Timestamp>,
6627
6628    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6629}
6630
6631impl CreateTableFromSnapshotMetadata {
6632    /// Creates a new default instance.
6633    pub fn new() -> Self {
6634        std::default::Default::default()
6635    }
6636
6637    /// Sets the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
6638    ///
6639    /// # Example
6640    /// ```ignore,no_run
6641    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6642    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
6643    /// let x = CreateTableFromSnapshotMetadata::new().set_original_request(CreateTableFromSnapshotRequest::default()/* use setters */);
6644    /// ```
6645    pub fn set_original_request<T>(mut self, v: T) -> Self
6646    where
6647        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
6648    {
6649        self.original_request = std::option::Option::Some(v.into());
6650        self
6651    }
6652
6653    /// Sets or clears the value of [original_request][crate::model::CreateTableFromSnapshotMetadata::original_request].
6654    ///
6655    /// # Example
6656    /// ```ignore,no_run
6657    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6658    /// use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotRequest;
6659    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(Some(CreateTableFromSnapshotRequest::default()/* use setters */));
6660    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_original_request(None::<CreateTableFromSnapshotRequest>);
6661    /// ```
6662    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
6663    where
6664        T: std::convert::Into<crate::model::CreateTableFromSnapshotRequest>,
6665    {
6666        self.original_request = v.map(|x| x.into());
6667        self
6668    }
6669
6670    /// Sets the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
6671    ///
6672    /// # Example
6673    /// ```ignore,no_run
6674    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6675    /// use wkt::Timestamp;
6676    /// let x = CreateTableFromSnapshotMetadata::new().set_request_time(Timestamp::default()/* use setters */);
6677    /// ```
6678    pub fn set_request_time<T>(mut self, v: T) -> Self
6679    where
6680        T: std::convert::Into<wkt::Timestamp>,
6681    {
6682        self.request_time = std::option::Option::Some(v.into());
6683        self
6684    }
6685
6686    /// Sets or clears the value of [request_time][crate::model::CreateTableFromSnapshotMetadata::request_time].
6687    ///
6688    /// # Example
6689    /// ```ignore,no_run
6690    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6691    /// use wkt::Timestamp;
6692    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
6693    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_request_time(None::<Timestamp>);
6694    /// ```
6695    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
6696    where
6697        T: std::convert::Into<wkt::Timestamp>,
6698    {
6699        self.request_time = v.map(|x| x.into());
6700        self
6701    }
6702
6703    /// Sets the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
6704    ///
6705    /// # Example
6706    /// ```ignore,no_run
6707    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6708    /// use wkt::Timestamp;
6709    /// let x = CreateTableFromSnapshotMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
6710    /// ```
6711    pub fn set_finish_time<T>(mut self, v: T) -> Self
6712    where
6713        T: std::convert::Into<wkt::Timestamp>,
6714    {
6715        self.finish_time = std::option::Option::Some(v.into());
6716        self
6717    }
6718
6719    /// Sets or clears the value of [finish_time][crate::model::CreateTableFromSnapshotMetadata::finish_time].
6720    ///
6721    /// # Example
6722    /// ```ignore,no_run
6723    /// # use google_cloud_bigtable_admin_v2::model::CreateTableFromSnapshotMetadata;
6724    /// use wkt::Timestamp;
6725    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
6726    /// let x = CreateTableFromSnapshotMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
6727    /// ```
6728    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
6729    where
6730        T: std::convert::Into<wkt::Timestamp>,
6731    {
6732        self.finish_time = v.map(|x| x.into());
6733        self
6734    }
6735}
6736
6737impl wkt::message::Message for CreateTableFromSnapshotMetadata {
6738    fn typename() -> &'static str {
6739        "type.googleapis.com/google.bigtable.admin.v2.CreateTableFromSnapshotMetadata"
6740    }
6741}
6742
6743/// The request for
6744/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
6745///
6746/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
6747#[derive(Clone, Default, PartialEq)]
6748#[non_exhaustive]
6749pub struct CreateBackupRequest {
6750    /// Required. This must be one of the clusters in the instance in which this
6751    /// table is located. The backup will be stored in this cluster. Values are
6752    /// of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.
6753    pub parent: std::string::String,
6754
6755    /// Required. The id of the backup to be created. The `backup_id` along with
6756    /// the parent `parent` are combined as {parent}/backups/{backup_id} to create
6757    /// the full backup name, of the form:
6758    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
6759    /// This string must be between 1 and 50 characters in length and match the
6760    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
6761    pub backup_id: std::string::String,
6762
6763    /// Required. The backup to create.
6764    pub backup: std::option::Option<crate::model::Backup>,
6765
6766    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6767}
6768
6769impl CreateBackupRequest {
6770    /// Creates a new default instance.
6771    pub fn new() -> Self {
6772        std::default::Default::default()
6773    }
6774
6775    /// Sets the value of [parent][crate::model::CreateBackupRequest::parent].
6776    ///
6777    /// # Example
6778    /// ```ignore,no_run
6779    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6780    /// # let project_id = "project_id";
6781    /// # let instance_id = "instance_id";
6782    /// # let cluster_id = "cluster_id";
6783    /// let x = CreateBackupRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
6784    /// ```
6785    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6786        self.parent = v.into();
6787        self
6788    }
6789
6790    /// Sets the value of [backup_id][crate::model::CreateBackupRequest::backup_id].
6791    ///
6792    /// # Example
6793    /// ```ignore,no_run
6794    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6795    /// let x = CreateBackupRequest::new().set_backup_id("example");
6796    /// ```
6797    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6798        self.backup_id = v.into();
6799        self
6800    }
6801
6802    /// Sets the value of [backup][crate::model::CreateBackupRequest::backup].
6803    ///
6804    /// # Example
6805    /// ```ignore,no_run
6806    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6807    /// use google_cloud_bigtable_admin_v2::model::Backup;
6808    /// let x = CreateBackupRequest::new().set_backup(Backup::default()/* use setters */);
6809    /// ```
6810    pub fn set_backup<T>(mut self, v: T) -> Self
6811    where
6812        T: std::convert::Into<crate::model::Backup>,
6813    {
6814        self.backup = std::option::Option::Some(v.into());
6815        self
6816    }
6817
6818    /// Sets or clears the value of [backup][crate::model::CreateBackupRequest::backup].
6819    ///
6820    /// # Example
6821    /// ```ignore,no_run
6822    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupRequest;
6823    /// use google_cloud_bigtable_admin_v2::model::Backup;
6824    /// let x = CreateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
6825    /// let x = CreateBackupRequest::new().set_or_clear_backup(None::<Backup>);
6826    /// ```
6827    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6828    where
6829        T: std::convert::Into<crate::model::Backup>,
6830    {
6831        self.backup = v.map(|x| x.into());
6832        self
6833    }
6834}
6835
6836impl wkt::message::Message for CreateBackupRequest {
6837    fn typename() -> &'static str {
6838        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupRequest"
6839    }
6840}
6841
6842/// Metadata type for the operation returned by
6843/// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup].
6844///
6845/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
6846#[derive(Clone, Default, PartialEq)]
6847#[non_exhaustive]
6848pub struct CreateBackupMetadata {
6849    /// The name of the backup being created.
6850    pub name: std::string::String,
6851
6852    /// The name of the table the backup is created from.
6853    pub source_table: std::string::String,
6854
6855    /// The time at which this operation started.
6856    pub start_time: std::option::Option<wkt::Timestamp>,
6857
6858    /// If set, the time at which this operation finished or was cancelled.
6859    pub end_time: std::option::Option<wkt::Timestamp>,
6860
6861    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6862}
6863
6864impl CreateBackupMetadata {
6865    /// Creates a new default instance.
6866    pub fn new() -> Self {
6867        std::default::Default::default()
6868    }
6869
6870    /// Sets the value of [name][crate::model::CreateBackupMetadata::name].
6871    ///
6872    /// # Example
6873    /// ```ignore,no_run
6874    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6875    /// let x = CreateBackupMetadata::new().set_name("example");
6876    /// ```
6877    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6878        self.name = v.into();
6879        self
6880    }
6881
6882    /// Sets the value of [source_table][crate::model::CreateBackupMetadata::source_table].
6883    ///
6884    /// # Example
6885    /// ```ignore,no_run
6886    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6887    /// let x = CreateBackupMetadata::new().set_source_table("example");
6888    /// ```
6889    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6890        self.source_table = v.into();
6891        self
6892    }
6893
6894    /// Sets the value of [start_time][crate::model::CreateBackupMetadata::start_time].
6895    ///
6896    /// # Example
6897    /// ```ignore,no_run
6898    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6899    /// use wkt::Timestamp;
6900    /// let x = CreateBackupMetadata::new().set_start_time(Timestamp::default()/* use setters */);
6901    /// ```
6902    pub fn set_start_time<T>(mut self, v: T) -> Self
6903    where
6904        T: std::convert::Into<wkt::Timestamp>,
6905    {
6906        self.start_time = std::option::Option::Some(v.into());
6907        self
6908    }
6909
6910    /// Sets or clears the value of [start_time][crate::model::CreateBackupMetadata::start_time].
6911    ///
6912    /// # Example
6913    /// ```ignore,no_run
6914    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6915    /// use wkt::Timestamp;
6916    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
6917    /// let x = CreateBackupMetadata::new().set_or_clear_start_time(None::<Timestamp>);
6918    /// ```
6919    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
6920    where
6921        T: std::convert::Into<wkt::Timestamp>,
6922    {
6923        self.start_time = v.map(|x| x.into());
6924        self
6925    }
6926
6927    /// Sets the value of [end_time][crate::model::CreateBackupMetadata::end_time].
6928    ///
6929    /// # Example
6930    /// ```ignore,no_run
6931    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6932    /// use wkt::Timestamp;
6933    /// let x = CreateBackupMetadata::new().set_end_time(Timestamp::default()/* use setters */);
6934    /// ```
6935    pub fn set_end_time<T>(mut self, v: T) -> Self
6936    where
6937        T: std::convert::Into<wkt::Timestamp>,
6938    {
6939        self.end_time = std::option::Option::Some(v.into());
6940        self
6941    }
6942
6943    /// Sets or clears the value of [end_time][crate::model::CreateBackupMetadata::end_time].
6944    ///
6945    /// # Example
6946    /// ```ignore,no_run
6947    /// # use google_cloud_bigtable_admin_v2::model::CreateBackupMetadata;
6948    /// use wkt::Timestamp;
6949    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
6950    /// let x = CreateBackupMetadata::new().set_or_clear_end_time(None::<Timestamp>);
6951    /// ```
6952    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
6953    where
6954        T: std::convert::Into<wkt::Timestamp>,
6955    {
6956        self.end_time = v.map(|x| x.into());
6957        self
6958    }
6959}
6960
6961impl wkt::message::Message for CreateBackupMetadata {
6962    fn typename() -> &'static str {
6963        "type.googleapis.com/google.bigtable.admin.v2.CreateBackupMetadata"
6964    }
6965}
6966
6967/// The request for
6968/// [UpdateBackup][google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup].
6969///
6970/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateBackup]: crate::client::BigtableTableAdmin::update_backup
6971#[derive(Clone, Default, PartialEq)]
6972#[non_exhaustive]
6973pub struct UpdateBackupRequest {
6974    /// Required. The backup to update. `backup.name`, and the fields to be updated
6975    /// as specified by `update_mask` are required. Other fields are ignored.
6976    /// Update is only supported for the following fields:
6977    ///
6978    /// * `backup.expire_time`.
6979    pub backup: std::option::Option<crate::model::Backup>,
6980
6981    /// Required. A mask specifying which fields (e.g. `expire_time`) in the
6982    /// Backup resource should be updated. This mask is relative to the Backup
6983    /// resource, not to the request message. The field mask must always be
6984    /// specified; this prevents any future fields from being erased accidentally
6985    /// by clients that do not know about them.
6986    pub update_mask: std::option::Option<wkt::FieldMask>,
6987
6988    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6989}
6990
6991impl UpdateBackupRequest {
6992    /// Creates a new default instance.
6993    pub fn new() -> Self {
6994        std::default::Default::default()
6995    }
6996
6997    /// Sets the value of [backup][crate::model::UpdateBackupRequest::backup].
6998    ///
6999    /// # Example
7000    /// ```ignore,no_run
7001    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7002    /// use google_cloud_bigtable_admin_v2::model::Backup;
7003    /// let x = UpdateBackupRequest::new().set_backup(Backup::default()/* use setters */);
7004    /// ```
7005    pub fn set_backup<T>(mut self, v: T) -> Self
7006    where
7007        T: std::convert::Into<crate::model::Backup>,
7008    {
7009        self.backup = std::option::Option::Some(v.into());
7010        self
7011    }
7012
7013    /// Sets or clears the value of [backup][crate::model::UpdateBackupRequest::backup].
7014    ///
7015    /// # Example
7016    /// ```ignore,no_run
7017    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7018    /// use google_cloud_bigtable_admin_v2::model::Backup;
7019    /// let x = UpdateBackupRequest::new().set_or_clear_backup(Some(Backup::default()/* use setters */));
7020    /// let x = UpdateBackupRequest::new().set_or_clear_backup(None::<Backup>);
7021    /// ```
7022    pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
7023    where
7024        T: std::convert::Into<crate::model::Backup>,
7025    {
7026        self.backup = v.map(|x| x.into());
7027        self
7028    }
7029
7030    /// Sets the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
7031    ///
7032    /// # Example
7033    /// ```ignore,no_run
7034    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7035    /// use wkt::FieldMask;
7036    /// let x = UpdateBackupRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7037    /// ```
7038    pub fn set_update_mask<T>(mut self, v: T) -> Self
7039    where
7040        T: std::convert::Into<wkt::FieldMask>,
7041    {
7042        self.update_mask = std::option::Option::Some(v.into());
7043        self
7044    }
7045
7046    /// Sets or clears the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
7047    ///
7048    /// # Example
7049    /// ```ignore,no_run
7050    /// # use google_cloud_bigtable_admin_v2::model::UpdateBackupRequest;
7051    /// use wkt::FieldMask;
7052    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7053    /// let x = UpdateBackupRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7054    /// ```
7055    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7056    where
7057        T: std::convert::Into<wkt::FieldMask>,
7058    {
7059        self.update_mask = v.map(|x| x.into());
7060        self
7061    }
7062}
7063
7064impl wkt::message::Message for UpdateBackupRequest {
7065    fn typename() -> &'static str {
7066        "type.googleapis.com/google.bigtable.admin.v2.UpdateBackupRequest"
7067    }
7068}
7069
7070/// The request for
7071/// [GetBackup][google.bigtable.admin.v2.BigtableTableAdmin.GetBackup].
7072///
7073/// [google.bigtable.admin.v2.BigtableTableAdmin.GetBackup]: crate::client::BigtableTableAdmin::get_backup
7074#[derive(Clone, Default, PartialEq)]
7075#[non_exhaustive]
7076pub struct GetBackupRequest {
7077    /// Required. Name of the backup.
7078    /// Values are of the form
7079    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
7080    pub name: std::string::String,
7081
7082    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7083}
7084
7085impl GetBackupRequest {
7086    /// Creates a new default instance.
7087    pub fn new() -> Self {
7088        std::default::Default::default()
7089    }
7090
7091    /// Sets the value of [name][crate::model::GetBackupRequest::name].
7092    ///
7093    /// # Example
7094    /// ```ignore,no_run
7095    /// # use google_cloud_bigtable_admin_v2::model::GetBackupRequest;
7096    /// # let project_id = "project_id";
7097    /// # let instance_id = "instance_id";
7098    /// # let cluster_id = "cluster_id";
7099    /// # let backup_id = "backup_id";
7100    /// let x = GetBackupRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7101    /// ```
7102    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7103        self.name = v.into();
7104        self
7105    }
7106}
7107
7108impl wkt::message::Message for GetBackupRequest {
7109    fn typename() -> &'static str {
7110        "type.googleapis.com/google.bigtable.admin.v2.GetBackupRequest"
7111    }
7112}
7113
7114/// The request for
7115/// [DeleteBackup][google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup].
7116///
7117/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteBackup]: crate::client::BigtableTableAdmin::delete_backup
7118#[derive(Clone, Default, PartialEq)]
7119#[non_exhaustive]
7120pub struct DeleteBackupRequest {
7121    /// Required. Name of the backup to delete.
7122    /// Values are of the form
7123    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
7124    pub name: std::string::String,
7125
7126    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7127}
7128
7129impl DeleteBackupRequest {
7130    /// Creates a new default instance.
7131    pub fn new() -> Self {
7132        std::default::Default::default()
7133    }
7134
7135    /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
7136    ///
7137    /// # Example
7138    /// ```ignore,no_run
7139    /// # use google_cloud_bigtable_admin_v2::model::DeleteBackupRequest;
7140    /// # let project_id = "project_id";
7141    /// # let instance_id = "instance_id";
7142    /// # let cluster_id = "cluster_id";
7143    /// # let backup_id = "backup_id";
7144    /// let x = DeleteBackupRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7145    /// ```
7146    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7147        self.name = v.into();
7148        self
7149    }
7150}
7151
7152impl wkt::message::Message for DeleteBackupRequest {
7153    fn typename() -> &'static str {
7154        "type.googleapis.com/google.bigtable.admin.v2.DeleteBackupRequest"
7155    }
7156}
7157
7158/// The request for
7159/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
7160///
7161/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7162#[derive(Clone, Default, PartialEq)]
7163#[non_exhaustive]
7164pub struct ListBackupsRequest {
7165    /// Required. The cluster to list backups from.  Values are of the
7166    /// form `projects/{project}/instances/{instance}/clusters/{cluster}`.
7167    /// Use `{cluster} = '-'` to list backups for all clusters in an instance,
7168    /// e.g., `projects/{project}/instances/{instance}/clusters/-`.
7169    pub parent: std::string::String,
7170
7171    /// A filter expression that filters backups listed in the response.
7172    /// The expression must specify the field name, a comparison operator,
7173    /// and the value that you want to use for filtering. The value must be a
7174    /// string, a number, or a boolean. The comparison operator must be
7175    /// <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is
7176    /// roughly synonymous with equality. Filter rules are case insensitive.
7177    ///
7178    /// The fields eligible for filtering are:
7179    ///
7180    /// * `name`
7181    /// * `source_table`
7182    /// * `state`
7183    /// * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7184    /// * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7185    /// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
7186    /// * `size_bytes`
7187    ///
7188    /// To filter on multiple expressions, provide each separate expression within
7189    /// parentheses. By default, each expression is an AND expression. However,
7190    /// you can include AND, OR, and NOT expressions explicitly.
7191    ///
7192    /// Some examples of using filters are:
7193    ///
7194    /// * `name:"exact"` --> The backup's name is the string "exact".
7195    /// * `name:howl` --> The backup's name contains the string "howl".
7196    /// * `source_table:prod`
7197    ///   --> The source_table's name contains the string "prod".
7198    /// * `state:CREATING` --> The backup is pending creation.
7199    /// * `state:READY` --> The backup is fully created and ready for use.
7200    /// * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")`
7201    ///   --> The backup name contains the string "howl" and start_time
7202    ///   of the backup is before 2018-03-28T14:50:00Z.
7203    /// * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
7204    pub filter: std::string::String,
7205
7206    /// An expression for specifying the sort order of the results of the request.
7207    /// The string value should specify one or more fields in
7208    /// [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at
7209    /// <https://aip.dev/132#ordering>.
7210    ///
7211    /// Fields supported are:
7212    ///
7213    /// * name
7214    /// * source_table
7215    /// * expire_time
7216    /// * start_time
7217    /// * end_time
7218    /// * size_bytes
7219    /// * state
7220    ///
7221    /// For example, "start_time". The default sorting order is ascending.
7222    /// To specify descending order for the field, a suffix " desc" should
7223    /// be appended to the field name. For example, "start_time desc".
7224    /// Redundant space characters in the syntax are insigificant.
7225    ///
7226    /// If order_by is empty, results will be sorted by `start_time` in descending
7227    /// order starting from the most recently created backup.
7228    ///
7229    /// [google.bigtable.admin.v2.Backup]: crate::model::Backup
7230    pub order_by: std::string::String,
7231
7232    /// Number of backups to be returned in the response. If 0 or
7233    /// less, defaults to the server's maximum allowed page size.
7234    pub page_size: i32,
7235
7236    /// If non-empty, `page_token` should contain a
7237    /// [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token]
7238    /// from a previous
7239    /// [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the
7240    /// same `parent` and with the same `filter`.
7241    ///
7242    /// [google.bigtable.admin.v2.ListBackupsResponse]: crate::model::ListBackupsResponse
7243    /// [google.bigtable.admin.v2.ListBackupsResponse.next_page_token]: crate::model::ListBackupsResponse::next_page_token
7244    pub page_token: std::string::String,
7245
7246    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7247}
7248
7249impl ListBackupsRequest {
7250    /// Creates a new default instance.
7251    pub fn new() -> Self {
7252        std::default::Default::default()
7253    }
7254
7255    /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
7256    ///
7257    /// # Example
7258    /// ```ignore,no_run
7259    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7260    /// # let project_id = "project_id";
7261    /// # let instance_id = "instance_id";
7262    /// # let cluster_id = "cluster_id";
7263    /// let x = ListBackupsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
7264    /// ```
7265    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7266        self.parent = v.into();
7267        self
7268    }
7269
7270    /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
7271    ///
7272    /// # Example
7273    /// ```ignore,no_run
7274    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7275    /// let x = ListBackupsRequest::new().set_filter("example");
7276    /// ```
7277    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7278        self.filter = v.into();
7279        self
7280    }
7281
7282    /// Sets the value of [order_by][crate::model::ListBackupsRequest::order_by].
7283    ///
7284    /// # Example
7285    /// ```ignore,no_run
7286    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7287    /// let x = ListBackupsRequest::new().set_order_by("example");
7288    /// ```
7289    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7290        self.order_by = v.into();
7291        self
7292    }
7293
7294    /// Sets the value of [page_size][crate::model::ListBackupsRequest::page_size].
7295    ///
7296    /// # Example
7297    /// ```ignore,no_run
7298    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7299    /// let x = ListBackupsRequest::new().set_page_size(42);
7300    /// ```
7301    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7302        self.page_size = v.into();
7303        self
7304    }
7305
7306    /// Sets the value of [page_token][crate::model::ListBackupsRequest::page_token].
7307    ///
7308    /// # Example
7309    /// ```ignore,no_run
7310    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsRequest;
7311    /// let x = ListBackupsRequest::new().set_page_token("example");
7312    /// ```
7313    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7314        self.page_token = v.into();
7315        self
7316    }
7317}
7318
7319impl wkt::message::Message for ListBackupsRequest {
7320    fn typename() -> &'static str {
7321        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsRequest"
7322    }
7323}
7324
7325/// The response for
7326/// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups].
7327///
7328/// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7329#[derive(Clone, Default, PartialEq)]
7330#[non_exhaustive]
7331pub struct ListBackupsResponse {
7332    /// The list of matching backups.
7333    pub backups: std::vec::Vec<crate::model::Backup>,
7334
7335    /// `next_page_token` can be sent in a subsequent
7336    /// [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call
7337    /// to fetch more of the matching backups.
7338    ///
7339    /// [google.bigtable.admin.v2.BigtableTableAdmin.ListBackups]: crate::client::BigtableTableAdmin::list_backups
7340    pub next_page_token: std::string::String,
7341
7342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7343}
7344
7345impl ListBackupsResponse {
7346    /// Creates a new default instance.
7347    pub fn new() -> Self {
7348        std::default::Default::default()
7349    }
7350
7351    /// Sets the value of [backups][crate::model::ListBackupsResponse::backups].
7352    ///
7353    /// # Example
7354    /// ```ignore,no_run
7355    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7356    /// use google_cloud_bigtable_admin_v2::model::Backup;
7357    /// let x = ListBackupsResponse::new()
7358    ///     .set_backups([
7359    ///         Backup::default()/* use setters */,
7360    ///         Backup::default()/* use (different) setters */,
7361    ///     ]);
7362    /// ```
7363    pub fn set_backups<T, V>(mut self, v: T) -> Self
7364    where
7365        T: std::iter::IntoIterator<Item = V>,
7366        V: std::convert::Into<crate::model::Backup>,
7367    {
7368        use std::iter::Iterator;
7369        self.backups = v.into_iter().map(|i| i.into()).collect();
7370        self
7371    }
7372
7373    /// Sets the value of [next_page_token][crate::model::ListBackupsResponse::next_page_token].
7374    ///
7375    /// # Example
7376    /// ```ignore,no_run
7377    /// # use google_cloud_bigtable_admin_v2::model::ListBackupsResponse;
7378    /// let x = ListBackupsResponse::new().set_next_page_token("example");
7379    /// ```
7380    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7381        self.next_page_token = v.into();
7382        self
7383    }
7384}
7385
7386impl wkt::message::Message for ListBackupsResponse {
7387    fn typename() -> &'static str {
7388        "type.googleapis.com/google.bigtable.admin.v2.ListBackupsResponse"
7389    }
7390}
7391
7392#[doc(hidden)]
7393impl google_cloud_gax::paginator::internal::PageableResponse for ListBackupsResponse {
7394    type PageItem = crate::model::Backup;
7395
7396    fn items(self) -> std::vec::Vec<Self::PageItem> {
7397        self.backups
7398    }
7399
7400    fn next_page_token(&self) -> std::string::String {
7401        use std::clone::Clone;
7402        self.next_page_token.clone()
7403    }
7404}
7405
7406/// The request for
7407/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7408///
7409/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7410#[derive(Clone, Default, PartialEq)]
7411#[non_exhaustive]
7412pub struct CopyBackupRequest {
7413    /// Required. The name of the destination cluster that will contain the backup
7414    /// copy. The cluster must already exist. Values are of the form:
7415    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
7416    pub parent: std::string::String,
7417
7418    /// Required. The id of the new backup. The `backup_id` along with `parent`
7419    /// are combined as {parent}/backups/{backup_id} to create the full backup
7420    /// name, of the form:
7421    /// `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`.
7422    /// This string must be between 1 and 50 characters in length and match the
7423    /// regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*.
7424    pub backup_id: std::string::String,
7425
7426    /// Required. The source backup to be copied from.
7427    /// The source backup needs to be in READY state for it to be copied.
7428    /// Copying a copied backup is not allowed.
7429    /// Once CopyBackup is in progress, the source backup cannot be deleted or
7430    /// cleaned up on expiration until CopyBackup is finished.
7431    /// Values are of the form:
7432    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7433    pub source_backup: std::string::String,
7434
7435    /// Required. Required. The expiration time of the copied backup with
7436    /// microsecond granularity that must be at least 6 hours and at most 30 days
7437    /// from the time the request is received. Once the `expire_time` has
7438    /// passed, Cloud Bigtable will delete the backup and free the resources used
7439    /// by the backup.
7440    pub expire_time: std::option::Option<wkt::Timestamp>,
7441
7442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7443}
7444
7445impl CopyBackupRequest {
7446    /// Creates a new default instance.
7447    pub fn new() -> Self {
7448        std::default::Default::default()
7449    }
7450
7451    /// Sets the value of [parent][crate::model::CopyBackupRequest::parent].
7452    ///
7453    /// # Example
7454    /// ```ignore,no_run
7455    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7456    /// # let project_id = "project_id";
7457    /// # let instance_id = "instance_id";
7458    /// # let cluster_id = "cluster_id";
7459    /// let x = CopyBackupRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
7460    /// ```
7461    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7462        self.parent = v.into();
7463        self
7464    }
7465
7466    /// Sets the value of [backup_id][crate::model::CopyBackupRequest::backup_id].
7467    ///
7468    /// # Example
7469    /// ```ignore,no_run
7470    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7471    /// let x = CopyBackupRequest::new().set_backup_id("example");
7472    /// ```
7473    pub fn set_backup_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7474        self.backup_id = v.into();
7475        self
7476    }
7477
7478    /// Sets the value of [source_backup][crate::model::CopyBackupRequest::source_backup].
7479    ///
7480    /// # Example
7481    /// ```ignore,no_run
7482    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7483    /// # let project_id = "project_id";
7484    /// # let instance_id = "instance_id";
7485    /// # let cluster_id = "cluster_id";
7486    /// # let backup_id = "backup_id";
7487    /// let x = CopyBackupRequest::new().set_source_backup(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7488    /// ```
7489    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7490        self.source_backup = v.into();
7491        self
7492    }
7493
7494    /// Sets the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7495    ///
7496    /// # Example
7497    /// ```ignore,no_run
7498    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7499    /// use wkt::Timestamp;
7500    /// let x = CopyBackupRequest::new().set_expire_time(Timestamp::default()/* use setters */);
7501    /// ```
7502    pub fn set_expire_time<T>(mut self, v: T) -> Self
7503    where
7504        T: std::convert::Into<wkt::Timestamp>,
7505    {
7506        self.expire_time = std::option::Option::Some(v.into());
7507        self
7508    }
7509
7510    /// Sets or clears the value of [expire_time][crate::model::CopyBackupRequest::expire_time].
7511    ///
7512    /// # Example
7513    /// ```ignore,no_run
7514    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupRequest;
7515    /// use wkt::Timestamp;
7516    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
7517    /// let x = CopyBackupRequest::new().set_or_clear_expire_time(None::<Timestamp>);
7518    /// ```
7519    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
7520    where
7521        T: std::convert::Into<wkt::Timestamp>,
7522    {
7523        self.expire_time = v.map(|x| x.into());
7524        self
7525    }
7526}
7527
7528impl wkt::message::Message for CopyBackupRequest {
7529    fn typename() -> &'static str {
7530        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupRequest"
7531    }
7532}
7533
7534/// Metadata type for the google.longrunning.Operation returned by
7535/// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup].
7536///
7537/// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7538#[derive(Clone, Default, PartialEq)]
7539#[non_exhaustive]
7540pub struct CopyBackupMetadata {
7541    /// The name of the backup being created through the copy operation.
7542    /// Values are of the form
7543    /// `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
7544    pub name: std::string::String,
7545
7546    /// Information about the source backup that is being copied from.
7547    pub source_backup_info: std::option::Option<crate::model::BackupInfo>,
7548
7549    /// The progress of the
7550    /// [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]
7551    /// operation.
7552    ///
7553    /// [google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup]: crate::client::BigtableTableAdmin::copy_backup
7554    pub progress: std::option::Option<crate::model::OperationProgress>,
7555
7556    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7557}
7558
7559impl CopyBackupMetadata {
7560    /// Creates a new default instance.
7561    pub fn new() -> Self {
7562        std::default::Default::default()
7563    }
7564
7565    /// Sets the value of [name][crate::model::CopyBackupMetadata::name].
7566    ///
7567    /// # Example
7568    /// ```ignore,no_run
7569    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7570    /// # let project_id = "project_id";
7571    /// # let instance_id = "instance_id";
7572    /// # let cluster_id = "cluster_id";
7573    /// # let backup_id = "backup_id";
7574    /// let x = CopyBackupMetadata::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
7575    /// ```
7576    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7577        self.name = v.into();
7578        self
7579    }
7580
7581    /// Sets the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
7582    ///
7583    /// # Example
7584    /// ```ignore,no_run
7585    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7586    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
7587    /// let x = CopyBackupMetadata::new().set_source_backup_info(BackupInfo::default()/* use setters */);
7588    /// ```
7589    pub fn set_source_backup_info<T>(mut self, v: T) -> Self
7590    where
7591        T: std::convert::Into<crate::model::BackupInfo>,
7592    {
7593        self.source_backup_info = std::option::Option::Some(v.into());
7594        self
7595    }
7596
7597    /// Sets or clears the value of [source_backup_info][crate::model::CopyBackupMetadata::source_backup_info].
7598    ///
7599    /// # Example
7600    /// ```ignore,no_run
7601    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7602    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
7603    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(Some(BackupInfo::default()/* use setters */));
7604    /// let x = CopyBackupMetadata::new().set_or_clear_source_backup_info(None::<BackupInfo>);
7605    /// ```
7606    pub fn set_or_clear_source_backup_info<T>(mut self, v: std::option::Option<T>) -> Self
7607    where
7608        T: std::convert::Into<crate::model::BackupInfo>,
7609    {
7610        self.source_backup_info = v.map(|x| x.into());
7611        self
7612    }
7613
7614    /// Sets the value of [progress][crate::model::CopyBackupMetadata::progress].
7615    ///
7616    /// # Example
7617    /// ```ignore,no_run
7618    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7619    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
7620    /// let x = CopyBackupMetadata::new().set_progress(OperationProgress::default()/* use setters */);
7621    /// ```
7622    pub fn set_progress<T>(mut self, v: T) -> Self
7623    where
7624        T: std::convert::Into<crate::model::OperationProgress>,
7625    {
7626        self.progress = std::option::Option::Some(v.into());
7627        self
7628    }
7629
7630    /// Sets or clears the value of [progress][crate::model::CopyBackupMetadata::progress].
7631    ///
7632    /// # Example
7633    /// ```ignore,no_run
7634    /// # use google_cloud_bigtable_admin_v2::model::CopyBackupMetadata;
7635    /// use google_cloud_bigtable_admin_v2::model::OperationProgress;
7636    /// let x = CopyBackupMetadata::new().set_or_clear_progress(Some(OperationProgress::default()/* use setters */));
7637    /// let x = CopyBackupMetadata::new().set_or_clear_progress(None::<OperationProgress>);
7638    /// ```
7639    pub fn set_or_clear_progress<T>(mut self, v: std::option::Option<T>) -> Self
7640    where
7641        T: std::convert::Into<crate::model::OperationProgress>,
7642    {
7643        self.progress = v.map(|x| x.into());
7644        self
7645    }
7646}
7647
7648impl wkt::message::Message for CopyBackupMetadata {
7649    fn typename() -> &'static str {
7650        "type.googleapis.com/google.bigtable.admin.v2.CopyBackupMetadata"
7651    }
7652}
7653
7654/// The request for
7655/// [CreateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]
7656///
7657/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateAuthorizedView]: crate::client::BigtableTableAdmin::create_authorized_view
7658#[derive(Clone, Default, PartialEq)]
7659#[non_exhaustive]
7660pub struct CreateAuthorizedViewRequest {
7661    /// Required. This is the name of the table the AuthorizedView belongs to.
7662    /// Values are of the form
7663    /// `projects/{project}/instances/{instance}/tables/{table}`.
7664    pub parent: std::string::String,
7665
7666    /// Required. The id of the AuthorizedView to create. This AuthorizedView must
7667    /// not already exist. The `authorized_view_id` appended to `parent` forms the
7668    /// full AuthorizedView name of the form
7669    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
7670    pub authorized_view_id: std::string::String,
7671
7672    /// Required. The AuthorizedView to create.
7673    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
7674
7675    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7676}
7677
7678impl CreateAuthorizedViewRequest {
7679    /// Creates a new default instance.
7680    pub fn new() -> Self {
7681        std::default::Default::default()
7682    }
7683
7684    /// Sets the value of [parent][crate::model::CreateAuthorizedViewRequest::parent].
7685    ///
7686    /// # Example
7687    /// ```ignore,no_run
7688    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7689    /// # let project_id = "project_id";
7690    /// # let instance_id = "instance_id";
7691    /// # let table_id = "table_id";
7692    /// let x = CreateAuthorizedViewRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
7693    /// ```
7694    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7695        self.parent = v.into();
7696        self
7697    }
7698
7699    /// Sets the value of [authorized_view_id][crate::model::CreateAuthorizedViewRequest::authorized_view_id].
7700    ///
7701    /// # Example
7702    /// ```ignore,no_run
7703    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7704    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view_id("example");
7705    /// ```
7706    pub fn set_authorized_view_id<T: std::convert::Into<std::string::String>>(
7707        mut self,
7708        v: T,
7709    ) -> Self {
7710        self.authorized_view_id = v.into();
7711        self
7712    }
7713
7714    /// Sets the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
7715    ///
7716    /// # Example
7717    /// ```ignore,no_run
7718    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7719    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7720    /// let x = CreateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
7721    /// ```
7722    pub fn set_authorized_view<T>(mut self, v: T) -> Self
7723    where
7724        T: std::convert::Into<crate::model::AuthorizedView>,
7725    {
7726        self.authorized_view = std::option::Option::Some(v.into());
7727        self
7728    }
7729
7730    /// Sets or clears the value of [authorized_view][crate::model::CreateAuthorizedViewRequest::authorized_view].
7731    ///
7732    /// # Example
7733    /// ```ignore,no_run
7734    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7735    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
7736    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
7737    /// let x = CreateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
7738    /// ```
7739    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
7740    where
7741        T: std::convert::Into<crate::model::AuthorizedView>,
7742    {
7743        self.authorized_view = v.map(|x| x.into());
7744        self
7745    }
7746}
7747
7748impl wkt::message::Message for CreateAuthorizedViewRequest {
7749    fn typename() -> &'static str {
7750        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewRequest"
7751    }
7752}
7753
7754/// The metadata for the Operation returned by CreateAuthorizedView.
7755#[derive(Clone, Default, PartialEq)]
7756#[non_exhaustive]
7757pub struct CreateAuthorizedViewMetadata {
7758    /// The request that prompted the initiation of this CreateAuthorizedView
7759    /// operation.
7760    pub original_request: std::option::Option<crate::model::CreateAuthorizedViewRequest>,
7761
7762    /// The time at which the original request was received.
7763    pub request_time: std::option::Option<wkt::Timestamp>,
7764
7765    /// The time at which the operation failed or was completed successfully.
7766    pub finish_time: std::option::Option<wkt::Timestamp>,
7767
7768    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7769}
7770
7771impl CreateAuthorizedViewMetadata {
7772    /// Creates a new default instance.
7773    pub fn new() -> Self {
7774        std::default::Default::default()
7775    }
7776
7777    /// Sets the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
7778    ///
7779    /// # Example
7780    /// ```ignore,no_run
7781    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7782    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7783    /// let x = CreateAuthorizedViewMetadata::new().set_original_request(CreateAuthorizedViewRequest::default()/* use setters */);
7784    /// ```
7785    pub fn set_original_request<T>(mut self, v: T) -> Self
7786    where
7787        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
7788    {
7789        self.original_request = std::option::Option::Some(v.into());
7790        self
7791    }
7792
7793    /// Sets or clears the value of [original_request][crate::model::CreateAuthorizedViewMetadata::original_request].
7794    ///
7795    /// # Example
7796    /// ```ignore,no_run
7797    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7798    /// use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewRequest;
7799    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(CreateAuthorizedViewRequest::default()/* use setters */));
7800    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<CreateAuthorizedViewRequest>);
7801    /// ```
7802    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
7803    where
7804        T: std::convert::Into<crate::model::CreateAuthorizedViewRequest>,
7805    {
7806        self.original_request = v.map(|x| x.into());
7807        self
7808    }
7809
7810    /// Sets the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
7811    ///
7812    /// # Example
7813    /// ```ignore,no_run
7814    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7815    /// use wkt::Timestamp;
7816    /// let x = CreateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
7817    /// ```
7818    pub fn set_request_time<T>(mut self, v: T) -> Self
7819    where
7820        T: std::convert::Into<wkt::Timestamp>,
7821    {
7822        self.request_time = std::option::Option::Some(v.into());
7823        self
7824    }
7825
7826    /// Sets or clears the value of [request_time][crate::model::CreateAuthorizedViewMetadata::request_time].
7827    ///
7828    /// # Example
7829    /// ```ignore,no_run
7830    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7831    /// use wkt::Timestamp;
7832    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
7833    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
7834    /// ```
7835    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
7836    where
7837        T: std::convert::Into<wkt::Timestamp>,
7838    {
7839        self.request_time = v.map(|x| x.into());
7840        self
7841    }
7842
7843    /// Sets the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
7844    ///
7845    /// # Example
7846    /// ```ignore,no_run
7847    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7848    /// use wkt::Timestamp;
7849    /// let x = CreateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
7850    /// ```
7851    pub fn set_finish_time<T>(mut self, v: T) -> Self
7852    where
7853        T: std::convert::Into<wkt::Timestamp>,
7854    {
7855        self.finish_time = std::option::Option::Some(v.into());
7856        self
7857    }
7858
7859    /// Sets or clears the value of [finish_time][crate::model::CreateAuthorizedViewMetadata::finish_time].
7860    ///
7861    /// # Example
7862    /// ```ignore,no_run
7863    /// # use google_cloud_bigtable_admin_v2::model::CreateAuthorizedViewMetadata;
7864    /// use wkt::Timestamp;
7865    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
7866    /// let x = CreateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
7867    /// ```
7868    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
7869    where
7870        T: std::convert::Into<wkt::Timestamp>,
7871    {
7872        self.finish_time = v.map(|x| x.into());
7873        self
7874    }
7875}
7876
7877impl wkt::message::Message for CreateAuthorizedViewMetadata {
7878    fn typename() -> &'static str {
7879        "type.googleapis.com/google.bigtable.admin.v2.CreateAuthorizedViewMetadata"
7880    }
7881}
7882
7883/// Request message for
7884/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
7885///
7886/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
7887#[derive(Clone, Default, PartialEq)]
7888#[non_exhaustive]
7889pub struct ListAuthorizedViewsRequest {
7890    /// Required. The unique name of the table for which AuthorizedViews should be
7891    /// listed. Values are of the form
7892    /// `projects/{project}/instances/{instance}/tables/{table}`.
7893    pub parent: std::string::String,
7894
7895    /// Optional. Maximum number of results per page.
7896    ///
7897    /// A page_size of zero lets the server choose the number of items to return.
7898    /// A page_size which is strictly positive will return at most that many items.
7899    /// A negative page_size will cause an error.
7900    ///
7901    /// Following the first request, subsequent paginated calls are not required
7902    /// to pass a page_size. If a page_size is set in subsequent calls, it must
7903    /// match the page_size given in the first request.
7904    pub page_size: i32,
7905
7906    /// Optional. The value of `next_page_token` returned by a previous call.
7907    pub page_token: std::string::String,
7908
7909    /// Optional. The resource_view to be applied to the returned AuthorizedViews'
7910    /// fields. Default to NAME_ONLY.
7911    pub view: crate::model::authorized_view::ResponseView,
7912
7913    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7914}
7915
7916impl ListAuthorizedViewsRequest {
7917    /// Creates a new default instance.
7918    pub fn new() -> Self {
7919        std::default::Default::default()
7920    }
7921
7922    /// Sets the value of [parent][crate::model::ListAuthorizedViewsRequest::parent].
7923    ///
7924    /// # Example
7925    /// ```ignore,no_run
7926    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7927    /// # let project_id = "project_id";
7928    /// # let instance_id = "instance_id";
7929    /// # let table_id = "table_id";
7930    /// let x = ListAuthorizedViewsRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
7931    /// ```
7932    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7933        self.parent = v.into();
7934        self
7935    }
7936
7937    /// Sets the value of [page_size][crate::model::ListAuthorizedViewsRequest::page_size].
7938    ///
7939    /// # Example
7940    /// ```ignore,no_run
7941    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7942    /// let x = ListAuthorizedViewsRequest::new().set_page_size(42);
7943    /// ```
7944    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7945        self.page_size = v.into();
7946        self
7947    }
7948
7949    /// Sets the value of [page_token][crate::model::ListAuthorizedViewsRequest::page_token].
7950    ///
7951    /// # Example
7952    /// ```ignore,no_run
7953    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7954    /// let x = ListAuthorizedViewsRequest::new().set_page_token("example");
7955    /// ```
7956    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7957        self.page_token = v.into();
7958        self
7959    }
7960
7961    /// Sets the value of [view][crate::model::ListAuthorizedViewsRequest::view].
7962    ///
7963    /// # Example
7964    /// ```ignore,no_run
7965    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsRequest;
7966    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
7967    /// let x0 = ListAuthorizedViewsRequest::new().set_view(ResponseView::NameOnly);
7968    /// let x1 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Basic);
7969    /// let x2 = ListAuthorizedViewsRequest::new().set_view(ResponseView::Full);
7970    /// ```
7971    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
7972        mut self,
7973        v: T,
7974    ) -> Self {
7975        self.view = v.into();
7976        self
7977    }
7978}
7979
7980impl wkt::message::Message for ListAuthorizedViewsRequest {
7981    fn typename() -> &'static str {
7982        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsRequest"
7983    }
7984}
7985
7986/// Response message for
7987/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews][google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]
7988///
7989/// [google.bigtable.admin.v2.BigtableTableAdmin.ListAuthorizedViews]: crate::client::BigtableTableAdmin::list_authorized_views
7990#[derive(Clone, Default, PartialEq)]
7991#[non_exhaustive]
7992pub struct ListAuthorizedViewsResponse {
7993    /// The AuthorizedViews present in the requested table.
7994    pub authorized_views: std::vec::Vec<crate::model::AuthorizedView>,
7995
7996    /// Set if not all tables could be returned in a single response.
7997    /// Pass this value to `page_token` in another request to get the next
7998    /// page of results.
7999    pub next_page_token: std::string::String,
8000
8001    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8002}
8003
8004impl ListAuthorizedViewsResponse {
8005    /// Creates a new default instance.
8006    pub fn new() -> Self {
8007        std::default::Default::default()
8008    }
8009
8010    /// Sets the value of [authorized_views][crate::model::ListAuthorizedViewsResponse::authorized_views].
8011    ///
8012    /// # Example
8013    /// ```ignore,no_run
8014    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
8015    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8016    /// let x = ListAuthorizedViewsResponse::new()
8017    ///     .set_authorized_views([
8018    ///         AuthorizedView::default()/* use setters */,
8019    ///         AuthorizedView::default()/* use (different) setters */,
8020    ///     ]);
8021    /// ```
8022    pub fn set_authorized_views<T, V>(mut self, v: T) -> Self
8023    where
8024        T: std::iter::IntoIterator<Item = V>,
8025        V: std::convert::Into<crate::model::AuthorizedView>,
8026    {
8027        use std::iter::Iterator;
8028        self.authorized_views = v.into_iter().map(|i| i.into()).collect();
8029        self
8030    }
8031
8032    /// Sets the value of [next_page_token][crate::model::ListAuthorizedViewsResponse::next_page_token].
8033    ///
8034    /// # Example
8035    /// ```ignore,no_run
8036    /// # use google_cloud_bigtable_admin_v2::model::ListAuthorizedViewsResponse;
8037    /// let x = ListAuthorizedViewsResponse::new().set_next_page_token("example");
8038    /// ```
8039    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8040        self.next_page_token = v.into();
8041        self
8042    }
8043}
8044
8045impl wkt::message::Message for ListAuthorizedViewsResponse {
8046    fn typename() -> &'static str {
8047        "type.googleapis.com/google.bigtable.admin.v2.ListAuthorizedViewsResponse"
8048    }
8049}
8050
8051#[doc(hidden)]
8052impl google_cloud_gax::paginator::internal::PageableResponse for ListAuthorizedViewsResponse {
8053    type PageItem = crate::model::AuthorizedView;
8054
8055    fn items(self) -> std::vec::Vec<Self::PageItem> {
8056        self.authorized_views
8057    }
8058
8059    fn next_page_token(&self) -> std::string::String {
8060        use std::clone::Clone;
8061        self.next_page_token.clone()
8062    }
8063}
8064
8065/// Request message for
8066/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]
8067///
8068/// [google.bigtable.admin.v2.BigtableTableAdmin.GetAuthorizedView]: crate::client::BigtableTableAdmin::get_authorized_view
8069#[derive(Clone, Default, PartialEq)]
8070#[non_exhaustive]
8071pub struct GetAuthorizedViewRequest {
8072    /// Required. The unique name of the requested AuthorizedView.
8073    /// Values are of the form
8074    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8075    pub name: std::string::String,
8076
8077    /// Optional. The resource_view to be applied to the returned AuthorizedView's
8078    /// fields. Default to BASIC.
8079    pub view: crate::model::authorized_view::ResponseView,
8080
8081    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8082}
8083
8084impl GetAuthorizedViewRequest {
8085    /// Creates a new default instance.
8086    pub fn new() -> Self {
8087        std::default::Default::default()
8088    }
8089
8090    /// Sets the value of [name][crate::model::GetAuthorizedViewRequest::name].
8091    ///
8092    /// # Example
8093    /// ```ignore,no_run
8094    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
8095    /// # let project_id = "project_id";
8096    /// # let instance_id = "instance_id";
8097    /// # let table_id = "table_id";
8098    /// # let authorized_view_id = "authorized_view_id";
8099    /// let x = GetAuthorizedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"));
8100    /// ```
8101    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8102        self.name = v.into();
8103        self
8104    }
8105
8106    /// Sets the value of [view][crate::model::GetAuthorizedViewRequest::view].
8107    ///
8108    /// # Example
8109    /// ```ignore,no_run
8110    /// # use google_cloud_bigtable_admin_v2::model::GetAuthorizedViewRequest;
8111    /// use google_cloud_bigtable_admin_v2::model::authorized_view::ResponseView;
8112    /// let x0 = GetAuthorizedViewRequest::new().set_view(ResponseView::NameOnly);
8113    /// let x1 = GetAuthorizedViewRequest::new().set_view(ResponseView::Basic);
8114    /// let x2 = GetAuthorizedViewRequest::new().set_view(ResponseView::Full);
8115    /// ```
8116    pub fn set_view<T: std::convert::Into<crate::model::authorized_view::ResponseView>>(
8117        mut self,
8118        v: T,
8119    ) -> Self {
8120        self.view = v.into();
8121        self
8122    }
8123}
8124
8125impl wkt::message::Message for GetAuthorizedViewRequest {
8126    fn typename() -> &'static str {
8127        "type.googleapis.com/google.bigtable.admin.v2.GetAuthorizedViewRequest"
8128    }
8129}
8130
8131/// The request for
8132/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
8133///
8134/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
8135#[derive(Clone, Default, PartialEq)]
8136#[non_exhaustive]
8137pub struct UpdateAuthorizedViewRequest {
8138    /// Required. The AuthorizedView to update. The `name` in `authorized_view` is
8139    /// used to identify the AuthorizedView. AuthorizedView name must in this
8140    /// format:
8141    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8142    pub authorized_view: std::option::Option<crate::model::AuthorizedView>,
8143
8144    /// Optional. The list of fields to update.
8145    /// A mask specifying which fields in the AuthorizedView resource should be
8146    /// updated. This mask is relative to the AuthorizedView resource, not to the
8147    /// request message. A field will be overwritten if it is in the mask. If
8148    /// empty, all fields set in the request will be overwritten. A special value
8149    /// `*` means to overwrite all fields (including fields not set in the
8150    /// request).
8151    pub update_mask: std::option::Option<wkt::FieldMask>,
8152
8153    /// Optional. If true, ignore the safety checks when updating the
8154    /// AuthorizedView.
8155    pub ignore_warnings: bool,
8156
8157    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8158}
8159
8160impl UpdateAuthorizedViewRequest {
8161    /// Creates a new default instance.
8162    pub fn new() -> Self {
8163        std::default::Default::default()
8164    }
8165
8166    /// Sets the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
8167    ///
8168    /// # Example
8169    /// ```ignore,no_run
8170    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8171    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8172    /// let x = UpdateAuthorizedViewRequest::new().set_authorized_view(AuthorizedView::default()/* use setters */);
8173    /// ```
8174    pub fn set_authorized_view<T>(mut self, v: T) -> Self
8175    where
8176        T: std::convert::Into<crate::model::AuthorizedView>,
8177    {
8178        self.authorized_view = std::option::Option::Some(v.into());
8179        self
8180    }
8181
8182    /// Sets or clears the value of [authorized_view][crate::model::UpdateAuthorizedViewRequest::authorized_view].
8183    ///
8184    /// # Example
8185    /// ```ignore,no_run
8186    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8187    /// use google_cloud_bigtable_admin_v2::model::AuthorizedView;
8188    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(Some(AuthorizedView::default()/* use setters */));
8189    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_authorized_view(None::<AuthorizedView>);
8190    /// ```
8191    pub fn set_or_clear_authorized_view<T>(mut self, v: std::option::Option<T>) -> Self
8192    where
8193        T: std::convert::Into<crate::model::AuthorizedView>,
8194    {
8195        self.authorized_view = v.map(|x| x.into());
8196        self
8197    }
8198
8199    /// Sets the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
8200    ///
8201    /// # Example
8202    /// ```ignore,no_run
8203    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8204    /// use wkt::FieldMask;
8205    /// let x = UpdateAuthorizedViewRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8206    /// ```
8207    pub fn set_update_mask<T>(mut self, v: T) -> Self
8208    where
8209        T: std::convert::Into<wkt::FieldMask>,
8210    {
8211        self.update_mask = std::option::Option::Some(v.into());
8212        self
8213    }
8214
8215    /// Sets or clears the value of [update_mask][crate::model::UpdateAuthorizedViewRequest::update_mask].
8216    ///
8217    /// # Example
8218    /// ```ignore,no_run
8219    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8220    /// use wkt::FieldMask;
8221    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8222    /// let x = UpdateAuthorizedViewRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8223    /// ```
8224    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8225    where
8226        T: std::convert::Into<wkt::FieldMask>,
8227    {
8228        self.update_mask = v.map(|x| x.into());
8229        self
8230    }
8231
8232    /// Sets the value of [ignore_warnings][crate::model::UpdateAuthorizedViewRequest::ignore_warnings].
8233    ///
8234    /// # Example
8235    /// ```ignore,no_run
8236    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8237    /// let x = UpdateAuthorizedViewRequest::new().set_ignore_warnings(true);
8238    /// ```
8239    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8240        self.ignore_warnings = v.into();
8241        self
8242    }
8243}
8244
8245impl wkt::message::Message for UpdateAuthorizedViewRequest {
8246    fn typename() -> &'static str {
8247        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewRequest"
8248    }
8249}
8250
8251/// Metadata for the google.longrunning.Operation returned by
8252/// [UpdateAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView].
8253///
8254/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateAuthorizedView]: crate::client::BigtableTableAdmin::update_authorized_view
8255#[derive(Clone, Default, PartialEq)]
8256#[non_exhaustive]
8257pub struct UpdateAuthorizedViewMetadata {
8258    /// The request that prompted the initiation of this UpdateAuthorizedView
8259    /// operation.
8260    pub original_request: std::option::Option<crate::model::UpdateAuthorizedViewRequest>,
8261
8262    /// The time at which the original request was received.
8263    pub request_time: std::option::Option<wkt::Timestamp>,
8264
8265    /// The time at which the operation failed or was completed successfully.
8266    pub finish_time: std::option::Option<wkt::Timestamp>,
8267
8268    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8269}
8270
8271impl UpdateAuthorizedViewMetadata {
8272    /// Creates a new default instance.
8273    pub fn new() -> Self {
8274        std::default::Default::default()
8275    }
8276
8277    /// Sets the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8278    ///
8279    /// # Example
8280    /// ```ignore,no_run
8281    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8282    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8283    /// let x = UpdateAuthorizedViewMetadata::new().set_original_request(UpdateAuthorizedViewRequest::default()/* use setters */);
8284    /// ```
8285    pub fn set_original_request<T>(mut self, v: T) -> Self
8286    where
8287        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8288    {
8289        self.original_request = std::option::Option::Some(v.into());
8290        self
8291    }
8292
8293    /// Sets or clears the value of [original_request][crate::model::UpdateAuthorizedViewMetadata::original_request].
8294    ///
8295    /// # Example
8296    /// ```ignore,no_run
8297    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8298    /// use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewRequest;
8299    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(Some(UpdateAuthorizedViewRequest::default()/* use setters */));
8300    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_original_request(None::<UpdateAuthorizedViewRequest>);
8301    /// ```
8302    pub fn set_or_clear_original_request<T>(mut self, v: std::option::Option<T>) -> Self
8303    where
8304        T: std::convert::Into<crate::model::UpdateAuthorizedViewRequest>,
8305    {
8306        self.original_request = v.map(|x| x.into());
8307        self
8308    }
8309
8310    /// Sets the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8311    ///
8312    /// # Example
8313    /// ```ignore,no_run
8314    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8315    /// use wkt::Timestamp;
8316    /// let x = UpdateAuthorizedViewMetadata::new().set_request_time(Timestamp::default()/* use setters */);
8317    /// ```
8318    pub fn set_request_time<T>(mut self, v: T) -> Self
8319    where
8320        T: std::convert::Into<wkt::Timestamp>,
8321    {
8322        self.request_time = std::option::Option::Some(v.into());
8323        self
8324    }
8325
8326    /// Sets or clears the value of [request_time][crate::model::UpdateAuthorizedViewMetadata::request_time].
8327    ///
8328    /// # Example
8329    /// ```ignore,no_run
8330    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8331    /// use wkt::Timestamp;
8332    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(Some(Timestamp::default()/* use setters */));
8333    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_request_time(None::<Timestamp>);
8334    /// ```
8335    pub fn set_or_clear_request_time<T>(mut self, v: std::option::Option<T>) -> Self
8336    where
8337        T: std::convert::Into<wkt::Timestamp>,
8338    {
8339        self.request_time = v.map(|x| x.into());
8340        self
8341    }
8342
8343    /// Sets the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8344    ///
8345    /// # Example
8346    /// ```ignore,no_run
8347    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8348    /// use wkt::Timestamp;
8349    /// let x = UpdateAuthorizedViewMetadata::new().set_finish_time(Timestamp::default()/* use setters */);
8350    /// ```
8351    pub fn set_finish_time<T>(mut self, v: T) -> Self
8352    where
8353        T: std::convert::Into<wkt::Timestamp>,
8354    {
8355        self.finish_time = std::option::Option::Some(v.into());
8356        self
8357    }
8358
8359    /// Sets or clears the value of [finish_time][crate::model::UpdateAuthorizedViewMetadata::finish_time].
8360    ///
8361    /// # Example
8362    /// ```ignore,no_run
8363    /// # use google_cloud_bigtable_admin_v2::model::UpdateAuthorizedViewMetadata;
8364    /// use wkt::Timestamp;
8365    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(Some(Timestamp::default()/* use setters */));
8366    /// let x = UpdateAuthorizedViewMetadata::new().set_or_clear_finish_time(None::<Timestamp>);
8367    /// ```
8368    pub fn set_or_clear_finish_time<T>(mut self, v: std::option::Option<T>) -> Self
8369    where
8370        T: std::convert::Into<wkt::Timestamp>,
8371    {
8372        self.finish_time = v.map(|x| x.into());
8373        self
8374    }
8375}
8376
8377impl wkt::message::Message for UpdateAuthorizedViewMetadata {
8378    fn typename() -> &'static str {
8379        "type.googleapis.com/google.bigtable.admin.v2.UpdateAuthorizedViewMetadata"
8380    }
8381}
8382
8383/// Request message for
8384/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView][google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]
8385///
8386/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteAuthorizedView]: crate::client::BigtableTableAdmin::delete_authorized_view
8387#[derive(Clone, Default, PartialEq)]
8388#[non_exhaustive]
8389pub struct DeleteAuthorizedViewRequest {
8390    /// Required. The unique name of the AuthorizedView to be deleted.
8391    /// Values are of the form
8392    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
8393    pub name: std::string::String,
8394
8395    /// Optional. The current etag of the AuthorizedView.
8396    /// If an etag is provided and does not match the current etag of the
8397    /// AuthorizedView, deletion will be blocked and an ABORTED error will be
8398    /// returned.
8399    pub etag: std::string::String,
8400
8401    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8402}
8403
8404impl DeleteAuthorizedViewRequest {
8405    /// Creates a new default instance.
8406    pub fn new() -> Self {
8407        std::default::Default::default()
8408    }
8409
8410    /// Sets the value of [name][crate::model::DeleteAuthorizedViewRequest::name].
8411    ///
8412    /// # Example
8413    /// ```ignore,no_run
8414    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8415    /// # let project_id = "project_id";
8416    /// # let instance_id = "instance_id";
8417    /// # let table_id = "table_id";
8418    /// # let authorized_view_id = "authorized_view_id";
8419    /// let x = DeleteAuthorizedViewRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"));
8420    /// ```
8421    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8422        self.name = v.into();
8423        self
8424    }
8425
8426    /// Sets the value of [etag][crate::model::DeleteAuthorizedViewRequest::etag].
8427    ///
8428    /// # Example
8429    /// ```ignore,no_run
8430    /// # use google_cloud_bigtable_admin_v2::model::DeleteAuthorizedViewRequest;
8431    /// let x = DeleteAuthorizedViewRequest::new().set_etag("example");
8432    /// ```
8433    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8434        self.etag = v.into();
8435        self
8436    }
8437}
8438
8439impl wkt::message::Message for DeleteAuthorizedViewRequest {
8440    fn typename() -> &'static str {
8441        "type.googleapis.com/google.bigtable.admin.v2.DeleteAuthorizedViewRequest"
8442    }
8443}
8444
8445/// The request for
8446/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8447///
8448/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8449#[derive(Clone, Default, PartialEq)]
8450#[non_exhaustive]
8451pub struct CreateSchemaBundleRequest {
8452    /// Required. The parent resource where this schema bundle will be created.
8453    /// Values are of the form
8454    /// `projects/{project}/instances/{instance}/tables/{table}`.
8455    pub parent: std::string::String,
8456
8457    /// Required. The unique ID to use for the schema bundle, which will become the
8458    /// final component of the schema bundle's resource name.
8459    pub schema_bundle_id: std::string::String,
8460
8461    /// Required. The schema bundle to create.
8462    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8463
8464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8465}
8466
8467impl CreateSchemaBundleRequest {
8468    /// Creates a new default instance.
8469    pub fn new() -> Self {
8470        std::default::Default::default()
8471    }
8472
8473    /// Sets the value of [parent][crate::model::CreateSchemaBundleRequest::parent].
8474    ///
8475    /// # Example
8476    /// ```ignore,no_run
8477    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8478    /// # let project_id = "project_id";
8479    /// # let instance_id = "instance_id";
8480    /// # let table_id = "table_id";
8481    /// let x = CreateSchemaBundleRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
8482    /// ```
8483    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8484        self.parent = v.into();
8485        self
8486    }
8487
8488    /// Sets the value of [schema_bundle_id][crate::model::CreateSchemaBundleRequest::schema_bundle_id].
8489    ///
8490    /// # Example
8491    /// ```ignore,no_run
8492    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8493    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle_id("example");
8494    /// ```
8495    pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
8496        mut self,
8497        v: T,
8498    ) -> Self {
8499        self.schema_bundle_id = v.into();
8500        self
8501    }
8502
8503    /// Sets the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8504    ///
8505    /// # Example
8506    /// ```ignore,no_run
8507    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8508    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8509    /// let x = CreateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8510    /// ```
8511    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8512    where
8513        T: std::convert::Into<crate::model::SchemaBundle>,
8514    {
8515        self.schema_bundle = std::option::Option::Some(v.into());
8516        self
8517    }
8518
8519    /// Sets or clears the value of [schema_bundle][crate::model::CreateSchemaBundleRequest::schema_bundle].
8520    ///
8521    /// # Example
8522    /// ```ignore,no_run
8523    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleRequest;
8524    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8525    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8526    /// let x = CreateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8527    /// ```
8528    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8529    where
8530        T: std::convert::Into<crate::model::SchemaBundle>,
8531    {
8532        self.schema_bundle = v.map(|x| x.into());
8533        self
8534    }
8535}
8536
8537impl wkt::message::Message for CreateSchemaBundleRequest {
8538    fn typename() -> &'static str {
8539        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleRequest"
8540    }
8541}
8542
8543/// The metadata for the Operation returned by
8544/// [CreateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle].
8545///
8546/// [google.bigtable.admin.v2.BigtableTableAdmin.CreateSchemaBundle]: crate::client::BigtableTableAdmin::create_schema_bundle
8547#[derive(Clone, Default, PartialEq)]
8548#[non_exhaustive]
8549pub struct CreateSchemaBundleMetadata {
8550    /// The unique name identifying this schema bundle.
8551    /// Values are of the form
8552    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8553    pub name: std::string::String,
8554
8555    /// The time at which this operation started.
8556    pub start_time: std::option::Option<wkt::Timestamp>,
8557
8558    /// If set, the time at which this operation finished or was canceled.
8559    pub end_time: std::option::Option<wkt::Timestamp>,
8560
8561    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8562}
8563
8564impl CreateSchemaBundleMetadata {
8565    /// Creates a new default instance.
8566    pub fn new() -> Self {
8567        std::default::Default::default()
8568    }
8569
8570    /// Sets the value of [name][crate::model::CreateSchemaBundleMetadata::name].
8571    ///
8572    /// # Example
8573    /// ```ignore,no_run
8574    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8575    /// let x = CreateSchemaBundleMetadata::new().set_name("example");
8576    /// ```
8577    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8578        self.name = v.into();
8579        self
8580    }
8581
8582    /// Sets the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
8583    ///
8584    /// # Example
8585    /// ```ignore,no_run
8586    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8587    /// use wkt::Timestamp;
8588    /// let x = CreateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
8589    /// ```
8590    pub fn set_start_time<T>(mut self, v: T) -> Self
8591    where
8592        T: std::convert::Into<wkt::Timestamp>,
8593    {
8594        self.start_time = std::option::Option::Some(v.into());
8595        self
8596    }
8597
8598    /// Sets or clears the value of [start_time][crate::model::CreateSchemaBundleMetadata::start_time].
8599    ///
8600    /// # Example
8601    /// ```ignore,no_run
8602    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8603    /// use wkt::Timestamp;
8604    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8605    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
8606    /// ```
8607    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8608    where
8609        T: std::convert::Into<wkt::Timestamp>,
8610    {
8611        self.start_time = v.map(|x| x.into());
8612        self
8613    }
8614
8615    /// Sets the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
8616    ///
8617    /// # Example
8618    /// ```ignore,no_run
8619    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8620    /// use wkt::Timestamp;
8621    /// let x = CreateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8622    /// ```
8623    pub fn set_end_time<T>(mut self, v: T) -> Self
8624    where
8625        T: std::convert::Into<wkt::Timestamp>,
8626    {
8627        self.end_time = std::option::Option::Some(v.into());
8628        self
8629    }
8630
8631    /// Sets or clears the value of [end_time][crate::model::CreateSchemaBundleMetadata::end_time].
8632    ///
8633    /// # Example
8634    /// ```ignore,no_run
8635    /// # use google_cloud_bigtable_admin_v2::model::CreateSchemaBundleMetadata;
8636    /// use wkt::Timestamp;
8637    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8638    /// let x = CreateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8639    /// ```
8640    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8641    where
8642        T: std::convert::Into<wkt::Timestamp>,
8643    {
8644        self.end_time = v.map(|x| x.into());
8645        self
8646    }
8647}
8648
8649impl wkt::message::Message for CreateSchemaBundleMetadata {
8650    fn typename() -> &'static str {
8651        "type.googleapis.com/google.bigtable.admin.v2.CreateSchemaBundleMetadata"
8652    }
8653}
8654
8655/// The request for
8656/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
8657///
8658/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
8659#[derive(Clone, Default, PartialEq)]
8660#[non_exhaustive]
8661pub struct UpdateSchemaBundleRequest {
8662    /// Required. The schema bundle to update.
8663    ///
8664    /// The schema bundle's `name` field is used to identify the schema bundle to
8665    /// update. Values are of the form
8666    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8667    pub schema_bundle: std::option::Option<crate::model::SchemaBundle>,
8668
8669    /// Optional. The list of fields to update.
8670    pub update_mask: std::option::Option<wkt::FieldMask>,
8671
8672    /// Optional. If set, ignore the safety checks when updating the Schema Bundle.
8673    /// The safety checks are:
8674    ///
8675    /// - The new Schema Bundle is backwards compatible with the existing Schema
8676    ///   Bundle.
8677    pub ignore_warnings: bool,
8678
8679    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8680}
8681
8682impl UpdateSchemaBundleRequest {
8683    /// Creates a new default instance.
8684    pub fn new() -> Self {
8685        std::default::Default::default()
8686    }
8687
8688    /// Sets the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
8689    ///
8690    /// # Example
8691    /// ```ignore,no_run
8692    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8693    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8694    /// let x = UpdateSchemaBundleRequest::new().set_schema_bundle(SchemaBundle::default()/* use setters */);
8695    /// ```
8696    pub fn set_schema_bundle<T>(mut self, v: T) -> Self
8697    where
8698        T: std::convert::Into<crate::model::SchemaBundle>,
8699    {
8700        self.schema_bundle = std::option::Option::Some(v.into());
8701        self
8702    }
8703
8704    /// Sets or clears the value of [schema_bundle][crate::model::UpdateSchemaBundleRequest::schema_bundle].
8705    ///
8706    /// # Example
8707    /// ```ignore,no_run
8708    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8709    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
8710    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(Some(SchemaBundle::default()/* use setters */));
8711    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_schema_bundle(None::<SchemaBundle>);
8712    /// ```
8713    pub fn set_or_clear_schema_bundle<T>(mut self, v: std::option::Option<T>) -> Self
8714    where
8715        T: std::convert::Into<crate::model::SchemaBundle>,
8716    {
8717        self.schema_bundle = v.map(|x| x.into());
8718        self
8719    }
8720
8721    /// Sets the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
8722    ///
8723    /// # Example
8724    /// ```ignore,no_run
8725    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8726    /// use wkt::FieldMask;
8727    /// let x = UpdateSchemaBundleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8728    /// ```
8729    pub fn set_update_mask<T>(mut self, v: T) -> Self
8730    where
8731        T: std::convert::Into<wkt::FieldMask>,
8732    {
8733        self.update_mask = std::option::Option::Some(v.into());
8734        self
8735    }
8736
8737    /// Sets or clears the value of [update_mask][crate::model::UpdateSchemaBundleRequest::update_mask].
8738    ///
8739    /// # Example
8740    /// ```ignore,no_run
8741    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8742    /// use wkt::FieldMask;
8743    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8744    /// let x = UpdateSchemaBundleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8745    /// ```
8746    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8747    where
8748        T: std::convert::Into<wkt::FieldMask>,
8749    {
8750        self.update_mask = v.map(|x| x.into());
8751        self
8752    }
8753
8754    /// Sets the value of [ignore_warnings][crate::model::UpdateSchemaBundleRequest::ignore_warnings].
8755    ///
8756    /// # Example
8757    /// ```ignore,no_run
8758    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleRequest;
8759    /// let x = UpdateSchemaBundleRequest::new().set_ignore_warnings(true);
8760    /// ```
8761    pub fn set_ignore_warnings<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
8762        self.ignore_warnings = v.into();
8763        self
8764    }
8765}
8766
8767impl wkt::message::Message for UpdateSchemaBundleRequest {
8768    fn typename() -> &'static str {
8769        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleRequest"
8770    }
8771}
8772
8773/// The metadata for the Operation returned by
8774/// [UpdateSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle].
8775///
8776/// [google.bigtable.admin.v2.BigtableTableAdmin.UpdateSchemaBundle]: crate::client::BigtableTableAdmin::update_schema_bundle
8777#[derive(Clone, Default, PartialEq)]
8778#[non_exhaustive]
8779pub struct UpdateSchemaBundleMetadata {
8780    /// The unique name identifying this schema bundle.
8781    /// Values are of the form
8782    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8783    pub name: std::string::String,
8784
8785    /// The time at which this operation started.
8786    pub start_time: std::option::Option<wkt::Timestamp>,
8787
8788    /// If set, the time at which this operation finished or was canceled.
8789    pub end_time: std::option::Option<wkt::Timestamp>,
8790
8791    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8792}
8793
8794impl UpdateSchemaBundleMetadata {
8795    /// Creates a new default instance.
8796    pub fn new() -> Self {
8797        std::default::Default::default()
8798    }
8799
8800    /// Sets the value of [name][crate::model::UpdateSchemaBundleMetadata::name].
8801    ///
8802    /// # Example
8803    /// ```ignore,no_run
8804    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8805    /// let x = UpdateSchemaBundleMetadata::new().set_name("example");
8806    /// ```
8807    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8808        self.name = v.into();
8809        self
8810    }
8811
8812    /// Sets the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
8813    ///
8814    /// # Example
8815    /// ```ignore,no_run
8816    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8817    /// use wkt::Timestamp;
8818    /// let x = UpdateSchemaBundleMetadata::new().set_start_time(Timestamp::default()/* use setters */);
8819    /// ```
8820    pub fn set_start_time<T>(mut self, v: T) -> Self
8821    where
8822        T: std::convert::Into<wkt::Timestamp>,
8823    {
8824        self.start_time = std::option::Option::Some(v.into());
8825        self
8826    }
8827
8828    /// Sets or clears the value of [start_time][crate::model::UpdateSchemaBundleMetadata::start_time].
8829    ///
8830    /// # Example
8831    /// ```ignore,no_run
8832    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8833    /// use wkt::Timestamp;
8834    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
8835    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_start_time(None::<Timestamp>);
8836    /// ```
8837    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
8838    where
8839        T: std::convert::Into<wkt::Timestamp>,
8840    {
8841        self.start_time = v.map(|x| x.into());
8842        self
8843    }
8844
8845    /// Sets the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
8846    ///
8847    /// # Example
8848    /// ```ignore,no_run
8849    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8850    /// use wkt::Timestamp;
8851    /// let x = UpdateSchemaBundleMetadata::new().set_end_time(Timestamp::default()/* use setters */);
8852    /// ```
8853    pub fn set_end_time<T>(mut self, v: T) -> Self
8854    where
8855        T: std::convert::Into<wkt::Timestamp>,
8856    {
8857        self.end_time = std::option::Option::Some(v.into());
8858        self
8859    }
8860
8861    /// Sets or clears the value of [end_time][crate::model::UpdateSchemaBundleMetadata::end_time].
8862    ///
8863    /// # Example
8864    /// ```ignore,no_run
8865    /// # use google_cloud_bigtable_admin_v2::model::UpdateSchemaBundleMetadata;
8866    /// use wkt::Timestamp;
8867    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
8868    /// let x = UpdateSchemaBundleMetadata::new().set_or_clear_end_time(None::<Timestamp>);
8869    /// ```
8870    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
8871    where
8872        T: std::convert::Into<wkt::Timestamp>,
8873    {
8874        self.end_time = v.map(|x| x.into());
8875        self
8876    }
8877}
8878
8879impl wkt::message::Message for UpdateSchemaBundleMetadata {
8880    fn typename() -> &'static str {
8881        "type.googleapis.com/google.bigtable.admin.v2.UpdateSchemaBundleMetadata"
8882    }
8883}
8884
8885/// The request for
8886/// [GetSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle].
8887///
8888/// [google.bigtable.admin.v2.BigtableTableAdmin.GetSchemaBundle]: crate::client::BigtableTableAdmin::get_schema_bundle
8889#[derive(Clone, Default, PartialEq)]
8890#[non_exhaustive]
8891pub struct GetSchemaBundleRequest {
8892    /// Required. The unique name of the schema bundle to retrieve.
8893    /// Values are of the form
8894    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
8895    pub name: std::string::String,
8896
8897    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8898}
8899
8900impl GetSchemaBundleRequest {
8901    /// Creates a new default instance.
8902    pub fn new() -> Self {
8903        std::default::Default::default()
8904    }
8905
8906    /// Sets the value of [name][crate::model::GetSchemaBundleRequest::name].
8907    ///
8908    /// # Example
8909    /// ```ignore,no_run
8910    /// # use google_cloud_bigtable_admin_v2::model::GetSchemaBundleRequest;
8911    /// # let project_id = "project_id";
8912    /// # let instance_id = "instance_id";
8913    /// # let table_id = "table_id";
8914    /// # let schema_bundle_id = "schema_bundle_id";
8915    /// let x = GetSchemaBundleRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"));
8916    /// ```
8917    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8918        self.name = v.into();
8919        self
8920    }
8921}
8922
8923impl wkt::message::Message for GetSchemaBundleRequest {
8924    fn typename() -> &'static str {
8925        "type.googleapis.com/google.bigtable.admin.v2.GetSchemaBundleRequest"
8926    }
8927}
8928
8929/// The request for
8930/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
8931///
8932/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
8933#[derive(Clone, Default, PartialEq)]
8934#[non_exhaustive]
8935pub struct ListSchemaBundlesRequest {
8936    /// Required. The parent, which owns this collection of schema bundles.
8937    /// Values are of the form
8938    /// `projects/{project}/instances/{instance}/tables/{table}`.
8939    pub parent: std::string::String,
8940
8941    /// The maximum number of schema bundles to return. If the value is positive,
8942    /// the server may return at most this value. If unspecified, the server will
8943    /// return the maximum allowed page size.
8944    pub page_size: i32,
8945
8946    /// A page token, received from a previous `ListSchemaBundles` call.
8947    /// Provide this to retrieve the subsequent page.
8948    ///
8949    /// When paginating, all other parameters provided to `ListSchemaBundles` must
8950    /// match the call that provided the page token.
8951    pub page_token: std::string::String,
8952
8953    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8954}
8955
8956impl ListSchemaBundlesRequest {
8957    /// Creates a new default instance.
8958    pub fn new() -> Self {
8959        std::default::Default::default()
8960    }
8961
8962    /// Sets the value of [parent][crate::model::ListSchemaBundlesRequest::parent].
8963    ///
8964    /// # Example
8965    /// ```ignore,no_run
8966    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8967    /// # let project_id = "project_id";
8968    /// # let instance_id = "instance_id";
8969    /// # let table_id = "table_id";
8970    /// let x = ListSchemaBundlesRequest::new().set_parent(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
8971    /// ```
8972    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8973        self.parent = v.into();
8974        self
8975    }
8976
8977    /// Sets the value of [page_size][crate::model::ListSchemaBundlesRequest::page_size].
8978    ///
8979    /// # Example
8980    /// ```ignore,no_run
8981    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8982    /// let x = ListSchemaBundlesRequest::new().set_page_size(42);
8983    /// ```
8984    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8985        self.page_size = v.into();
8986        self
8987    }
8988
8989    /// Sets the value of [page_token][crate::model::ListSchemaBundlesRequest::page_token].
8990    ///
8991    /// # Example
8992    /// ```ignore,no_run
8993    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesRequest;
8994    /// let x = ListSchemaBundlesRequest::new().set_page_token("example");
8995    /// ```
8996    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8997        self.page_token = v.into();
8998        self
8999    }
9000}
9001
9002impl wkt::message::Message for ListSchemaBundlesRequest {
9003    fn typename() -> &'static str {
9004        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesRequest"
9005    }
9006}
9007
9008/// The response for
9009/// [ListSchemaBundles][google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles].
9010///
9011/// [google.bigtable.admin.v2.BigtableTableAdmin.ListSchemaBundles]: crate::client::BigtableTableAdmin::list_schema_bundles
9012#[derive(Clone, Default, PartialEq)]
9013#[non_exhaustive]
9014pub struct ListSchemaBundlesResponse {
9015    /// The schema bundles from the specified table.
9016    pub schema_bundles: std::vec::Vec<crate::model::SchemaBundle>,
9017
9018    /// A token, which can be sent as `page_token` to retrieve the next page.
9019    /// If this field is omitted, there are no subsequent pages.
9020    pub next_page_token: std::string::String,
9021
9022    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9023}
9024
9025impl ListSchemaBundlesResponse {
9026    /// Creates a new default instance.
9027    pub fn new() -> Self {
9028        std::default::Default::default()
9029    }
9030
9031    /// Sets the value of [schema_bundles][crate::model::ListSchemaBundlesResponse::schema_bundles].
9032    ///
9033    /// # Example
9034    /// ```ignore,no_run
9035    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
9036    /// use google_cloud_bigtable_admin_v2::model::SchemaBundle;
9037    /// let x = ListSchemaBundlesResponse::new()
9038    ///     .set_schema_bundles([
9039    ///         SchemaBundle::default()/* use setters */,
9040    ///         SchemaBundle::default()/* use (different) setters */,
9041    ///     ]);
9042    /// ```
9043    pub fn set_schema_bundles<T, V>(mut self, v: T) -> Self
9044    where
9045        T: std::iter::IntoIterator<Item = V>,
9046        V: std::convert::Into<crate::model::SchemaBundle>,
9047    {
9048        use std::iter::Iterator;
9049        self.schema_bundles = v.into_iter().map(|i| i.into()).collect();
9050        self
9051    }
9052
9053    /// Sets the value of [next_page_token][crate::model::ListSchemaBundlesResponse::next_page_token].
9054    ///
9055    /// # Example
9056    /// ```ignore,no_run
9057    /// # use google_cloud_bigtable_admin_v2::model::ListSchemaBundlesResponse;
9058    /// let x = ListSchemaBundlesResponse::new().set_next_page_token("example");
9059    /// ```
9060    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9061        self.next_page_token = v.into();
9062        self
9063    }
9064}
9065
9066impl wkt::message::Message for ListSchemaBundlesResponse {
9067    fn typename() -> &'static str {
9068        "type.googleapis.com/google.bigtable.admin.v2.ListSchemaBundlesResponse"
9069    }
9070}
9071
9072#[doc(hidden)]
9073impl google_cloud_gax::paginator::internal::PageableResponse for ListSchemaBundlesResponse {
9074    type PageItem = crate::model::SchemaBundle;
9075
9076    fn items(self) -> std::vec::Vec<Self::PageItem> {
9077        self.schema_bundles
9078    }
9079
9080    fn next_page_token(&self) -> std::string::String {
9081        use std::clone::Clone;
9082        self.next_page_token.clone()
9083    }
9084}
9085
9086/// The request for
9087/// [DeleteSchemaBundle][google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle].
9088///
9089/// [google.bigtable.admin.v2.BigtableTableAdmin.DeleteSchemaBundle]: crate::client::BigtableTableAdmin::delete_schema_bundle
9090#[derive(Clone, Default, PartialEq)]
9091#[non_exhaustive]
9092pub struct DeleteSchemaBundleRequest {
9093    /// Required. The unique name of the schema bundle to delete.
9094    /// Values are of the form
9095    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
9096    pub name: std::string::String,
9097
9098    /// Optional. The etag of the schema bundle.
9099    /// If this is provided, it must match the server's etag. The server
9100    /// returns an ABORTED error on a mismatched etag.
9101    pub etag: std::string::String,
9102
9103    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9104}
9105
9106impl DeleteSchemaBundleRequest {
9107    /// Creates a new default instance.
9108    pub fn new() -> Self {
9109        std::default::Default::default()
9110    }
9111
9112    /// Sets the value of [name][crate::model::DeleteSchemaBundleRequest::name].
9113    ///
9114    /// # Example
9115    /// ```ignore,no_run
9116    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
9117    /// # let project_id = "project_id";
9118    /// # let instance_id = "instance_id";
9119    /// # let table_id = "table_id";
9120    /// # let schema_bundle_id = "schema_bundle_id";
9121    /// let x = DeleteSchemaBundleRequest::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"));
9122    /// ```
9123    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9124        self.name = v.into();
9125        self
9126    }
9127
9128    /// Sets the value of [etag][crate::model::DeleteSchemaBundleRequest::etag].
9129    ///
9130    /// # Example
9131    /// ```ignore,no_run
9132    /// # use google_cloud_bigtable_admin_v2::model::DeleteSchemaBundleRequest;
9133    /// let x = DeleteSchemaBundleRequest::new().set_etag("example");
9134    /// ```
9135    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9136        self.etag = v.into();
9137        self
9138    }
9139}
9140
9141impl wkt::message::Message for DeleteSchemaBundleRequest {
9142    fn typename() -> &'static str {
9143        "type.googleapis.com/google.bigtable.admin.v2.DeleteSchemaBundleRequest"
9144    }
9145}
9146
9147/// Encapsulates progress related information for a Cloud Bigtable long
9148/// running operation.
9149#[derive(Clone, Default, PartialEq)]
9150#[non_exhaustive]
9151pub struct OperationProgress {
9152    /// Percent completion of the operation.
9153    /// Values are between 0 and 100 inclusive.
9154    pub progress_percent: i32,
9155
9156    /// Time the request was received.
9157    pub start_time: std::option::Option<wkt::Timestamp>,
9158
9159    /// If set, the time at which this operation failed or was completed
9160    /// successfully.
9161    pub end_time: std::option::Option<wkt::Timestamp>,
9162
9163    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9164}
9165
9166impl OperationProgress {
9167    /// Creates a new default instance.
9168    pub fn new() -> Self {
9169        std::default::Default::default()
9170    }
9171
9172    /// Sets the value of [progress_percent][crate::model::OperationProgress::progress_percent].
9173    ///
9174    /// # Example
9175    /// ```ignore,no_run
9176    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9177    /// let x = OperationProgress::new().set_progress_percent(42);
9178    /// ```
9179    pub fn set_progress_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9180        self.progress_percent = v.into();
9181        self
9182    }
9183
9184    /// Sets the value of [start_time][crate::model::OperationProgress::start_time].
9185    ///
9186    /// # Example
9187    /// ```ignore,no_run
9188    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9189    /// use wkt::Timestamp;
9190    /// let x = OperationProgress::new().set_start_time(Timestamp::default()/* use setters */);
9191    /// ```
9192    pub fn set_start_time<T>(mut self, v: T) -> Self
9193    where
9194        T: std::convert::Into<wkt::Timestamp>,
9195    {
9196        self.start_time = std::option::Option::Some(v.into());
9197        self
9198    }
9199
9200    /// Sets or clears the value of [start_time][crate::model::OperationProgress::start_time].
9201    ///
9202    /// # Example
9203    /// ```ignore,no_run
9204    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9205    /// use wkt::Timestamp;
9206    /// let x = OperationProgress::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
9207    /// let x = OperationProgress::new().set_or_clear_start_time(None::<Timestamp>);
9208    /// ```
9209    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
9210    where
9211        T: std::convert::Into<wkt::Timestamp>,
9212    {
9213        self.start_time = v.map(|x| x.into());
9214        self
9215    }
9216
9217    /// Sets the value of [end_time][crate::model::OperationProgress::end_time].
9218    ///
9219    /// # Example
9220    /// ```ignore,no_run
9221    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9222    /// use wkt::Timestamp;
9223    /// let x = OperationProgress::new().set_end_time(Timestamp::default()/* use setters */);
9224    /// ```
9225    pub fn set_end_time<T>(mut self, v: T) -> Self
9226    where
9227        T: std::convert::Into<wkt::Timestamp>,
9228    {
9229        self.end_time = std::option::Option::Some(v.into());
9230        self
9231    }
9232
9233    /// Sets or clears the value of [end_time][crate::model::OperationProgress::end_time].
9234    ///
9235    /// # Example
9236    /// ```ignore,no_run
9237    /// # use google_cloud_bigtable_admin_v2::model::OperationProgress;
9238    /// use wkt::Timestamp;
9239    /// let x = OperationProgress::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
9240    /// let x = OperationProgress::new().set_or_clear_end_time(None::<Timestamp>);
9241    /// ```
9242    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
9243    where
9244        T: std::convert::Into<wkt::Timestamp>,
9245    {
9246        self.end_time = v.map(|x| x.into());
9247        self
9248    }
9249}
9250
9251impl wkt::message::Message for OperationProgress {
9252    fn typename() -> &'static str {
9253        "type.googleapis.com/google.bigtable.admin.v2.OperationProgress"
9254    }
9255}
9256
9257/// A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and
9258/// the resources that serve them.
9259/// All tables in an instance are served from all
9260/// [Clusters][google.bigtable.admin.v2.Cluster] in the instance.
9261///
9262/// [google.bigtable.admin.v2.Cluster]: crate::model::Cluster
9263/// [google.bigtable.admin.v2.Table]: crate::model::Table
9264#[derive(Clone, Default, PartialEq)]
9265#[non_exhaustive]
9266pub struct Instance {
9267    /// The unique name of the instance. Values are of the form
9268    /// `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
9269    pub name: std::string::String,
9270
9271    /// Required. The descriptive name for this instance as it appears in UIs.
9272    /// Can be changed at any time, but should be kept globally unique
9273    /// to avoid confusion.
9274    pub display_name: std::string::String,
9275
9276    /// Output only. The current state of the instance.
9277    pub state: crate::model::instance::State,
9278
9279    /// The type of the instance. Defaults to `PRODUCTION`.
9280    pub r#type: crate::model::instance::Type,
9281
9282    /// Optional. The edition of the instance. See
9283    /// [Edition][google.bigtable.admin.v2.Instance.Edition] for details.
9284    ///
9285    /// [google.bigtable.admin.v2.Instance.Edition]: crate::model::instance::Edition
9286    pub edition: crate::model::instance::Edition,
9287
9288    /// Labels are a flexible and lightweight mechanism for organizing cloud
9289    /// resources into groups that reflect a customer's organizational needs and
9290    /// deployment strategies. They can be used to filter resources and aggregate
9291    /// metrics.
9292    ///
9293    /// * Label keys must be between 1 and 63 characters long and must conform to
9294    ///   the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
9295    /// * Label values must be between 0 and 63 characters long and must conform to
9296    ///   the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
9297    /// * No more than 64 labels can be associated with a given resource.
9298    /// * Keys and values must both be under 128 bytes.
9299    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
9300
9301    /// Output only. A commit timestamp representing when this Instance was
9302    /// created. For instances created before this field was added (August 2021),
9303    /// this value is `seconds: 0, nanos: 1`.
9304    pub create_time: std::option::Option<wkt::Timestamp>,
9305
9306    /// Output only. Reserved for future use.
9307    pub satisfies_pzs: std::option::Option<bool>,
9308
9309    /// Output only. Reserved for future use.
9310    pub satisfies_pzi: std::option::Option<bool>,
9311
9312    /// Optional. Input only. Immutable. Tag keys/values directly bound to this
9313    /// resource. For example:
9314    ///
9315    /// - "123/environment": "production",
9316    /// - "123/costCenter": "marketing"
9317    ///
9318    /// Tags and Labels (above) are both used to bind metadata to resources, with
9319    /// different use-cases. See
9320    /// <https://cloud.google.com/resource-manager/docs/tags/tags-overview> for an
9321    /// in-depth overview on the difference between tags and labels.
9322    pub tags: std::collections::HashMap<std::string::String, std::string::String>,
9323
9324    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9325}
9326
9327impl Instance {
9328    /// Creates a new default instance.
9329    pub fn new() -> Self {
9330        std::default::Default::default()
9331    }
9332
9333    /// Sets the value of [name][crate::model::Instance::name].
9334    ///
9335    /// # Example
9336    /// ```ignore,no_run
9337    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9338    /// # let project_id = "project_id";
9339    /// # let instance_id = "instance_id";
9340    /// let x = Instance::new().set_name(format!("projects/{project_id}/instances/{instance_id}"));
9341    /// ```
9342    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9343        self.name = v.into();
9344        self
9345    }
9346
9347    /// Sets the value of [display_name][crate::model::Instance::display_name].
9348    ///
9349    /// # Example
9350    /// ```ignore,no_run
9351    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9352    /// let x = Instance::new().set_display_name("example");
9353    /// ```
9354    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9355        self.display_name = v.into();
9356        self
9357    }
9358
9359    /// Sets the value of [state][crate::model::Instance::state].
9360    ///
9361    /// # Example
9362    /// ```ignore,no_run
9363    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9364    /// use google_cloud_bigtable_admin_v2::model::instance::State;
9365    /// let x0 = Instance::new().set_state(State::Ready);
9366    /// let x1 = Instance::new().set_state(State::Creating);
9367    /// ```
9368    pub fn set_state<T: std::convert::Into<crate::model::instance::State>>(mut self, v: T) -> Self {
9369        self.state = v.into();
9370        self
9371    }
9372
9373    /// Sets the value of [r#type][crate::model::Instance::type].
9374    ///
9375    /// # Example
9376    /// ```ignore,no_run
9377    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9378    /// use google_cloud_bigtable_admin_v2::model::instance::Type;
9379    /// let x0 = Instance::new().set_type(Type::Production);
9380    /// let x1 = Instance::new().set_type(Type::Development);
9381    /// ```
9382    pub fn set_type<T: std::convert::Into<crate::model::instance::Type>>(mut self, v: T) -> Self {
9383        self.r#type = v.into();
9384        self
9385    }
9386
9387    /// Sets the value of [edition][crate::model::Instance::edition].
9388    ///
9389    /// # Example
9390    /// ```ignore,no_run
9391    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9392    /// use google_cloud_bigtable_admin_v2::model::instance::Edition;
9393    /// let x0 = Instance::new().set_edition(Edition::Enterprise);
9394    /// let x1 = Instance::new().set_edition(Edition::EnterprisePlus);
9395    /// ```
9396    pub fn set_edition<T: std::convert::Into<crate::model::instance::Edition>>(
9397        mut self,
9398        v: T,
9399    ) -> Self {
9400        self.edition = v.into();
9401        self
9402    }
9403
9404    /// Sets the value of [labels][crate::model::Instance::labels].
9405    ///
9406    /// # Example
9407    /// ```ignore,no_run
9408    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9409    /// let x = Instance::new().set_labels([
9410    ///     ("key0", "abc"),
9411    ///     ("key1", "xyz"),
9412    /// ]);
9413    /// ```
9414    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
9415    where
9416        T: std::iter::IntoIterator<Item = (K, V)>,
9417        K: std::convert::Into<std::string::String>,
9418        V: std::convert::Into<std::string::String>,
9419    {
9420        use std::iter::Iterator;
9421        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9422        self
9423    }
9424
9425    /// Sets the value of [create_time][crate::model::Instance::create_time].
9426    ///
9427    /// # Example
9428    /// ```ignore,no_run
9429    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9430    /// use wkt::Timestamp;
9431    /// let x = Instance::new().set_create_time(Timestamp::default()/* use setters */);
9432    /// ```
9433    pub fn set_create_time<T>(mut self, v: T) -> Self
9434    where
9435        T: std::convert::Into<wkt::Timestamp>,
9436    {
9437        self.create_time = std::option::Option::Some(v.into());
9438        self
9439    }
9440
9441    /// Sets or clears the value of [create_time][crate::model::Instance::create_time].
9442    ///
9443    /// # Example
9444    /// ```ignore,no_run
9445    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9446    /// use wkt::Timestamp;
9447    /// let x = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9448    /// let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);
9449    /// ```
9450    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9451    where
9452        T: std::convert::Into<wkt::Timestamp>,
9453    {
9454        self.create_time = v.map(|x| x.into());
9455        self
9456    }
9457
9458    /// Sets the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9459    ///
9460    /// # Example
9461    /// ```ignore,no_run
9462    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9463    /// let x = Instance::new().set_satisfies_pzs(true);
9464    /// ```
9465    pub fn set_satisfies_pzs<T>(mut self, v: T) -> Self
9466    where
9467        T: std::convert::Into<bool>,
9468    {
9469        self.satisfies_pzs = std::option::Option::Some(v.into());
9470        self
9471    }
9472
9473    /// Sets or clears the value of [satisfies_pzs][crate::model::Instance::satisfies_pzs].
9474    ///
9475    /// # Example
9476    /// ```ignore,no_run
9477    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9478    /// let x = Instance::new().set_or_clear_satisfies_pzs(Some(false));
9479    /// let x = Instance::new().set_or_clear_satisfies_pzs(None::<bool>);
9480    /// ```
9481    pub fn set_or_clear_satisfies_pzs<T>(mut self, v: std::option::Option<T>) -> Self
9482    where
9483        T: std::convert::Into<bool>,
9484    {
9485        self.satisfies_pzs = v.map(|x| x.into());
9486        self
9487    }
9488
9489    /// Sets the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9490    ///
9491    /// # Example
9492    /// ```ignore,no_run
9493    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9494    /// let x = Instance::new().set_satisfies_pzi(true);
9495    /// ```
9496    pub fn set_satisfies_pzi<T>(mut self, v: T) -> Self
9497    where
9498        T: std::convert::Into<bool>,
9499    {
9500        self.satisfies_pzi = std::option::Option::Some(v.into());
9501        self
9502    }
9503
9504    /// Sets or clears the value of [satisfies_pzi][crate::model::Instance::satisfies_pzi].
9505    ///
9506    /// # Example
9507    /// ```ignore,no_run
9508    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9509    /// let x = Instance::new().set_or_clear_satisfies_pzi(Some(false));
9510    /// let x = Instance::new().set_or_clear_satisfies_pzi(None::<bool>);
9511    /// ```
9512    pub fn set_or_clear_satisfies_pzi<T>(mut self, v: std::option::Option<T>) -> Self
9513    where
9514        T: std::convert::Into<bool>,
9515    {
9516        self.satisfies_pzi = v.map(|x| x.into());
9517        self
9518    }
9519
9520    /// Sets the value of [tags][crate::model::Instance::tags].
9521    ///
9522    /// # Example
9523    /// ```ignore,no_run
9524    /// # use google_cloud_bigtable_admin_v2::model::Instance;
9525    /// let x = Instance::new().set_tags([
9526    ///     ("key0", "abc"),
9527    ///     ("key1", "xyz"),
9528    /// ]);
9529    /// ```
9530    pub fn set_tags<T, K, V>(mut self, v: T) -> Self
9531    where
9532        T: std::iter::IntoIterator<Item = (K, V)>,
9533        K: std::convert::Into<std::string::String>,
9534        V: std::convert::Into<std::string::String>,
9535    {
9536        use std::iter::Iterator;
9537        self.tags = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9538        self
9539    }
9540}
9541
9542impl wkt::message::Message for Instance {
9543    fn typename() -> &'static str {
9544        "type.googleapis.com/google.bigtable.admin.v2.Instance"
9545    }
9546}
9547
9548/// Defines additional types related to [Instance].
9549pub mod instance {
9550    #[allow(unused_imports)]
9551    use super::*;
9552
9553    /// Possible states of an instance.
9554    ///
9555    /// # Working with unknown values
9556    ///
9557    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9558    /// additional enum variants at any time. Adding new variants is not considered
9559    /// a breaking change. Applications should write their code in anticipation of:
9560    ///
9561    /// - New values appearing in future releases of the client library, **and**
9562    /// - New values received dynamically, without application changes.
9563    ///
9564    /// Please consult the [Working with enums] section in the user guide for some
9565    /// guidelines.
9566    ///
9567    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9568    #[derive(Clone, Debug, PartialEq)]
9569    #[non_exhaustive]
9570    pub enum State {
9571        /// The state of the instance could not be determined.
9572        NotKnown,
9573        /// The instance has been successfully created and can serve requests
9574        /// to its tables.
9575        Ready,
9576        /// The instance is currently being created, and may be destroyed
9577        /// if the creation process encounters an error.
9578        Creating,
9579        /// If set, the enum was initialized with an unknown value.
9580        ///
9581        /// Applications can examine the value using [State::value] or
9582        /// [State::name].
9583        UnknownValue(state::UnknownValue),
9584    }
9585
9586    #[doc(hidden)]
9587    pub mod state {
9588        #[allow(unused_imports)]
9589        use super::*;
9590        #[derive(Clone, Debug, PartialEq)]
9591        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9592    }
9593
9594    impl State {
9595        /// Gets the enum value.
9596        ///
9597        /// Returns `None` if the enum contains an unknown value deserialized from
9598        /// the string representation of enums.
9599        pub fn value(&self) -> std::option::Option<i32> {
9600            match self {
9601                Self::NotKnown => std::option::Option::Some(0),
9602                Self::Ready => std::option::Option::Some(1),
9603                Self::Creating => std::option::Option::Some(2),
9604                Self::UnknownValue(u) => u.0.value(),
9605            }
9606        }
9607
9608        /// Gets the enum value as a string.
9609        ///
9610        /// Returns `None` if the enum contains an unknown value deserialized from
9611        /// the integer representation of enums.
9612        pub fn name(&self) -> std::option::Option<&str> {
9613            match self {
9614                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
9615                Self::Ready => std::option::Option::Some("READY"),
9616                Self::Creating => std::option::Option::Some("CREATING"),
9617                Self::UnknownValue(u) => u.0.name(),
9618            }
9619        }
9620    }
9621
9622    impl std::default::Default for State {
9623        fn default() -> Self {
9624            use std::convert::From;
9625            Self::from(0)
9626        }
9627    }
9628
9629    impl std::fmt::Display for State {
9630        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9631            wkt::internal::display_enum(f, self.name(), self.value())
9632        }
9633    }
9634
9635    impl std::convert::From<i32> for State {
9636        fn from(value: i32) -> Self {
9637            match value {
9638                0 => Self::NotKnown,
9639                1 => Self::Ready,
9640                2 => Self::Creating,
9641                _ => Self::UnknownValue(state::UnknownValue(
9642                    wkt::internal::UnknownEnumValue::Integer(value),
9643                )),
9644            }
9645        }
9646    }
9647
9648    impl std::convert::From<&str> for State {
9649        fn from(value: &str) -> Self {
9650            use std::string::ToString;
9651            match value {
9652                "STATE_NOT_KNOWN" => Self::NotKnown,
9653                "READY" => Self::Ready,
9654                "CREATING" => Self::Creating,
9655                _ => Self::UnknownValue(state::UnknownValue(
9656                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9657                )),
9658            }
9659        }
9660    }
9661
9662    impl serde::ser::Serialize for State {
9663        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9664        where
9665            S: serde::Serializer,
9666        {
9667            match self {
9668                Self::NotKnown => serializer.serialize_i32(0),
9669                Self::Ready => serializer.serialize_i32(1),
9670                Self::Creating => serializer.serialize_i32(2),
9671                Self::UnknownValue(u) => u.0.serialize(serializer),
9672            }
9673        }
9674    }
9675
9676    impl<'de> serde::de::Deserialize<'de> for State {
9677        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9678        where
9679            D: serde::Deserializer<'de>,
9680        {
9681            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9682                ".google.bigtable.admin.v2.Instance.State",
9683            ))
9684        }
9685    }
9686
9687    /// The type of the instance.
9688    ///
9689    /// # Working with unknown values
9690    ///
9691    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9692    /// additional enum variants at any time. Adding new variants is not considered
9693    /// a breaking change. Applications should write their code in anticipation of:
9694    ///
9695    /// - New values appearing in future releases of the client library, **and**
9696    /// - New values received dynamically, without application changes.
9697    ///
9698    /// Please consult the [Working with enums] section in the user guide for some
9699    /// guidelines.
9700    ///
9701    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9702    #[derive(Clone, Debug, PartialEq)]
9703    #[non_exhaustive]
9704    pub enum Type {
9705        /// The type of the instance is unspecified. If set when creating an
9706        /// instance, a `PRODUCTION` instance will be created. If set when updating
9707        /// an instance, the type will be left unchanged.
9708        Unspecified,
9709        /// An instance meant for production use. `serve_nodes` must be set
9710        /// on the cluster.
9711        Production,
9712        /// DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces
9713        /// a higher minimum node count than DEVELOPMENT.
9714        Development,
9715        /// If set, the enum was initialized with an unknown value.
9716        ///
9717        /// Applications can examine the value using [Type::value] or
9718        /// [Type::name].
9719        UnknownValue(r#type::UnknownValue),
9720    }
9721
9722    #[doc(hidden)]
9723    pub mod r#type {
9724        #[allow(unused_imports)]
9725        use super::*;
9726        #[derive(Clone, Debug, PartialEq)]
9727        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9728    }
9729
9730    impl Type {
9731        /// Gets the enum value.
9732        ///
9733        /// Returns `None` if the enum contains an unknown value deserialized from
9734        /// the string representation of enums.
9735        pub fn value(&self) -> std::option::Option<i32> {
9736            match self {
9737                Self::Unspecified => std::option::Option::Some(0),
9738                Self::Production => std::option::Option::Some(1),
9739                Self::Development => std::option::Option::Some(2),
9740                Self::UnknownValue(u) => u.0.value(),
9741            }
9742        }
9743
9744        /// Gets the enum value as a string.
9745        ///
9746        /// Returns `None` if the enum contains an unknown value deserialized from
9747        /// the integer representation of enums.
9748        pub fn name(&self) -> std::option::Option<&str> {
9749            match self {
9750                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
9751                Self::Production => std::option::Option::Some("PRODUCTION"),
9752                Self::Development => std::option::Option::Some("DEVELOPMENT"),
9753                Self::UnknownValue(u) => u.0.name(),
9754            }
9755        }
9756    }
9757
9758    impl std::default::Default for Type {
9759        fn default() -> Self {
9760            use std::convert::From;
9761            Self::from(0)
9762        }
9763    }
9764
9765    impl std::fmt::Display for Type {
9766        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9767            wkt::internal::display_enum(f, self.name(), self.value())
9768        }
9769    }
9770
9771    impl std::convert::From<i32> for Type {
9772        fn from(value: i32) -> Self {
9773            match value {
9774                0 => Self::Unspecified,
9775                1 => Self::Production,
9776                2 => Self::Development,
9777                _ => Self::UnknownValue(r#type::UnknownValue(
9778                    wkt::internal::UnknownEnumValue::Integer(value),
9779                )),
9780            }
9781        }
9782    }
9783
9784    impl std::convert::From<&str> for Type {
9785        fn from(value: &str) -> Self {
9786            use std::string::ToString;
9787            match value {
9788                "TYPE_UNSPECIFIED" => Self::Unspecified,
9789                "PRODUCTION" => Self::Production,
9790                "DEVELOPMENT" => Self::Development,
9791                _ => Self::UnknownValue(r#type::UnknownValue(
9792                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9793                )),
9794            }
9795        }
9796    }
9797
9798    impl serde::ser::Serialize for Type {
9799        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9800        where
9801            S: serde::Serializer,
9802        {
9803            match self {
9804                Self::Unspecified => serializer.serialize_i32(0),
9805                Self::Production => serializer.serialize_i32(1),
9806                Self::Development => serializer.serialize_i32(2),
9807                Self::UnknownValue(u) => u.0.serialize(serializer),
9808            }
9809        }
9810    }
9811
9812    impl<'de> serde::de::Deserialize<'de> for Type {
9813        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9814        where
9815            D: serde::Deserializer<'de>,
9816        {
9817            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
9818                ".google.bigtable.admin.v2.Instance.Type",
9819            ))
9820        }
9821    }
9822
9823    /// Possible editions of an instance.
9824    ///
9825    /// An edition is a specific tier of Cloud Bigtable. Each edition is tailored
9826    /// to different customer needs. Higher tiers offer more features and better
9827    /// performance.
9828    ///
9829    /// # Working with unknown values
9830    ///
9831    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9832    /// additional enum variants at any time. Adding new variants is not considered
9833    /// a breaking change. Applications should write their code in anticipation of:
9834    ///
9835    /// - New values appearing in future releases of the client library, **and**
9836    /// - New values received dynamically, without application changes.
9837    ///
9838    /// Please consult the [Working with enums] section in the user guide for some
9839    /// guidelines.
9840    ///
9841    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9842    #[derive(Clone, Debug, PartialEq)]
9843    #[non_exhaustive]
9844    pub enum Edition {
9845        /// The edition is unspecified. This is treated as `ENTERPRISE`.
9846        Unspecified,
9847        /// The Enterprise edition. This is the default offering that is designed to
9848        /// meet the needs of most enterprise workloads.
9849        Enterprise,
9850        /// The Enterprise Plus edition. This is a premium tier that is designed for
9851        /// demanding, multi-tenant workloads requiring the highest levels of
9852        /// performance, scale, and global availability.
9853        ///
9854        /// The nodes in the Enterprise Plus tier come at a higher cost than the
9855        /// Enterprise tier. Any Enterprise Plus features must be disabled before
9856        /// downgrading to Enterprise.
9857        EnterprisePlus,
9858        /// If set, the enum was initialized with an unknown value.
9859        ///
9860        /// Applications can examine the value using [Edition::value] or
9861        /// [Edition::name].
9862        UnknownValue(edition::UnknownValue),
9863    }
9864
9865    #[doc(hidden)]
9866    pub mod edition {
9867        #[allow(unused_imports)]
9868        use super::*;
9869        #[derive(Clone, Debug, PartialEq)]
9870        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9871    }
9872
9873    impl Edition {
9874        /// Gets the enum value.
9875        ///
9876        /// Returns `None` if the enum contains an unknown value deserialized from
9877        /// the string representation of enums.
9878        pub fn value(&self) -> std::option::Option<i32> {
9879            match self {
9880                Self::Unspecified => std::option::Option::Some(0),
9881                Self::Enterprise => std::option::Option::Some(1),
9882                Self::EnterprisePlus => std::option::Option::Some(2),
9883                Self::UnknownValue(u) => u.0.value(),
9884            }
9885        }
9886
9887        /// Gets the enum value as a string.
9888        ///
9889        /// Returns `None` if the enum contains an unknown value deserialized from
9890        /// the integer representation of enums.
9891        pub fn name(&self) -> std::option::Option<&str> {
9892            match self {
9893                Self::Unspecified => std::option::Option::Some("EDITION_UNSPECIFIED"),
9894                Self::Enterprise => std::option::Option::Some("ENTERPRISE"),
9895                Self::EnterprisePlus => std::option::Option::Some("ENTERPRISE_PLUS"),
9896                Self::UnknownValue(u) => u.0.name(),
9897            }
9898        }
9899    }
9900
9901    impl std::default::Default for Edition {
9902        fn default() -> Self {
9903            use std::convert::From;
9904            Self::from(0)
9905        }
9906    }
9907
9908    impl std::fmt::Display for Edition {
9909        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9910            wkt::internal::display_enum(f, self.name(), self.value())
9911        }
9912    }
9913
9914    impl std::convert::From<i32> for Edition {
9915        fn from(value: i32) -> Self {
9916            match value {
9917                0 => Self::Unspecified,
9918                1 => Self::Enterprise,
9919                2 => Self::EnterprisePlus,
9920                _ => Self::UnknownValue(edition::UnknownValue(
9921                    wkt::internal::UnknownEnumValue::Integer(value),
9922                )),
9923            }
9924        }
9925    }
9926
9927    impl std::convert::From<&str> for Edition {
9928        fn from(value: &str) -> Self {
9929            use std::string::ToString;
9930            match value {
9931                "EDITION_UNSPECIFIED" => Self::Unspecified,
9932                "ENTERPRISE" => Self::Enterprise,
9933                "ENTERPRISE_PLUS" => Self::EnterprisePlus,
9934                _ => Self::UnknownValue(edition::UnknownValue(
9935                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9936                )),
9937            }
9938        }
9939    }
9940
9941    impl serde::ser::Serialize for Edition {
9942        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9943        where
9944            S: serde::Serializer,
9945        {
9946            match self {
9947                Self::Unspecified => serializer.serialize_i32(0),
9948                Self::Enterprise => serializer.serialize_i32(1),
9949                Self::EnterprisePlus => serializer.serialize_i32(2),
9950                Self::UnknownValue(u) => u.0.serialize(serializer),
9951            }
9952        }
9953    }
9954
9955    impl<'de> serde::de::Deserialize<'de> for Edition {
9956        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9957        where
9958            D: serde::Deserializer<'de>,
9959        {
9960            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Edition>::new(
9961                ".google.bigtable.admin.v2.Instance.Edition",
9962            ))
9963        }
9964    }
9965}
9966
9967/// The Autoscaling targets for a Cluster. These determine the recommended nodes.
9968#[derive(Clone, Default, PartialEq)]
9969#[non_exhaustive]
9970pub struct AutoscalingTargets {
9971    /// The cpu utilization that the Autoscaler should be trying to achieve.
9972    /// This number is on a scale from 0 (no utilization) to
9973    /// 100 (total utilization), and is limited between 10 and 80, otherwise it
9974    /// will return INVALID_ARGUMENT error.
9975    pub cpu_utilization_percent: i32,
9976
9977    /// The storage utilization that the Autoscaler should be trying to achieve.
9978    /// This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD
9979    /// cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster,
9980    /// otherwise it will return INVALID_ARGUMENT error. If this value is set to 0,
9981    /// it will be treated as if it were set to the default value: 2560 for SSD,
9982    /// 8192 for HDD.
9983    pub storage_utilization_gib_per_node: i32,
9984
9985    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9986}
9987
9988impl AutoscalingTargets {
9989    /// Creates a new default instance.
9990    pub fn new() -> Self {
9991        std::default::Default::default()
9992    }
9993
9994    /// Sets the value of [cpu_utilization_percent][crate::model::AutoscalingTargets::cpu_utilization_percent].
9995    ///
9996    /// # Example
9997    /// ```ignore,no_run
9998    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
9999    /// let x = AutoscalingTargets::new().set_cpu_utilization_percent(42);
10000    /// ```
10001    pub fn set_cpu_utilization_percent<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10002        self.cpu_utilization_percent = v.into();
10003        self
10004    }
10005
10006    /// Sets the value of [storage_utilization_gib_per_node][crate::model::AutoscalingTargets::storage_utilization_gib_per_node].
10007    ///
10008    /// # Example
10009    /// ```ignore,no_run
10010    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10011    /// let x = AutoscalingTargets::new().set_storage_utilization_gib_per_node(42);
10012    /// ```
10013    pub fn set_storage_utilization_gib_per_node<T: std::convert::Into<i32>>(
10014        mut self,
10015        v: T,
10016    ) -> Self {
10017        self.storage_utilization_gib_per_node = v.into();
10018        self
10019    }
10020}
10021
10022impl wkt::message::Message for AutoscalingTargets {
10023    fn typename() -> &'static str {
10024        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingTargets"
10025    }
10026}
10027
10028/// Limits for the number of nodes a Cluster can autoscale up/down to.
10029#[derive(Clone, Default, PartialEq)]
10030#[non_exhaustive]
10031pub struct AutoscalingLimits {
10032    /// Required. Minimum number of nodes to scale down to.
10033    pub min_serve_nodes: i32,
10034
10035    /// Required. Maximum number of nodes to scale up to.
10036    pub max_serve_nodes: i32,
10037
10038    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10039}
10040
10041impl AutoscalingLimits {
10042    /// Creates a new default instance.
10043    pub fn new() -> Self {
10044        std::default::Default::default()
10045    }
10046
10047    /// Sets the value of [min_serve_nodes][crate::model::AutoscalingLimits::min_serve_nodes].
10048    ///
10049    /// # Example
10050    /// ```ignore,no_run
10051    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10052    /// let x = AutoscalingLimits::new().set_min_serve_nodes(42);
10053    /// ```
10054    pub fn set_min_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10055        self.min_serve_nodes = v.into();
10056        self
10057    }
10058
10059    /// Sets the value of [max_serve_nodes][crate::model::AutoscalingLimits::max_serve_nodes].
10060    ///
10061    /// # Example
10062    /// ```ignore,no_run
10063    /// # use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10064    /// let x = AutoscalingLimits::new().set_max_serve_nodes(42);
10065    /// ```
10066    pub fn set_max_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10067        self.max_serve_nodes = v.into();
10068        self
10069    }
10070}
10071
10072impl wkt::message::Message for AutoscalingLimits {
10073    fn typename() -> &'static str {
10074        "type.googleapis.com/google.bigtable.admin.v2.AutoscalingLimits"
10075    }
10076}
10077
10078/// A resizable group of nodes in a particular cloud location, capable
10079/// of serving all [Tables][google.bigtable.admin.v2.Table] in the parent
10080/// [Instance][google.bigtable.admin.v2.Instance].
10081///
10082/// [google.bigtable.admin.v2.Instance]: crate::model::Instance
10083/// [google.bigtable.admin.v2.Table]: crate::model::Table
10084#[derive(Clone, Default, PartialEq)]
10085#[non_exhaustive]
10086pub struct Cluster {
10087    /// The unique name of the cluster. Values are of the form
10088    /// `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`.
10089    pub name: std::string::String,
10090
10091    /// Immutable. The location where this cluster's nodes and storage reside. For
10092    /// best performance, clients should be located as close as possible to this
10093    /// cluster. Currently only zones are supported, so values should be of the
10094    /// form `projects/{project}/locations/{zone}`.
10095    pub location: std::string::String,
10096
10097    /// Output only. The current state of the cluster.
10098    pub state: crate::model::cluster::State,
10099
10100    /// The number of nodes in the cluster. If no value is set,
10101    /// Cloud Bigtable automatically allocates nodes based on your data footprint
10102    /// and optimized for 50% storage utilization.
10103    pub serve_nodes: i32,
10104
10105    /// Immutable. The node scaling factor of this cluster.
10106    pub node_scaling_factor: crate::model::cluster::NodeScalingFactor,
10107
10108    /// Immutable. The type of storage used by this cluster to serve its
10109    /// parent instance's tables, unless explicitly overridden.
10110    pub default_storage_type: crate::model::StorageType,
10111
10112    /// Immutable. The encryption configuration for CMEK-protected clusters.
10113    pub encryption_config: std::option::Option<crate::model::cluster::EncryptionConfig>,
10114
10115    #[allow(missing_docs)]
10116    pub config: std::option::Option<crate::model::cluster::Config>,
10117
10118    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10119}
10120
10121impl Cluster {
10122    /// Creates a new default instance.
10123    pub fn new() -> Self {
10124        std::default::Default::default()
10125    }
10126
10127    /// Sets the value of [name][crate::model::Cluster::name].
10128    ///
10129    /// # Example
10130    /// ```ignore,no_run
10131    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10132    /// # let project_id = "project_id";
10133    /// # let instance_id = "instance_id";
10134    /// # let cluster_id = "cluster_id";
10135    /// let x = Cluster::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}"));
10136    /// ```
10137    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10138        self.name = v.into();
10139        self
10140    }
10141
10142    /// Sets the value of [location][crate::model::Cluster::location].
10143    ///
10144    /// # Example
10145    /// ```ignore,no_run
10146    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10147    /// let x = Cluster::new().set_location("example");
10148    /// ```
10149    pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10150        self.location = v.into();
10151        self
10152    }
10153
10154    /// Sets the value of [state][crate::model::Cluster::state].
10155    ///
10156    /// # Example
10157    /// ```ignore,no_run
10158    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10159    /// use google_cloud_bigtable_admin_v2::model::cluster::State;
10160    /// let x0 = Cluster::new().set_state(State::Ready);
10161    /// let x1 = Cluster::new().set_state(State::Creating);
10162    /// let x2 = Cluster::new().set_state(State::Resizing);
10163    /// ```
10164    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
10165        self.state = v.into();
10166        self
10167    }
10168
10169    /// Sets the value of [serve_nodes][crate::model::Cluster::serve_nodes].
10170    ///
10171    /// # Example
10172    /// ```ignore,no_run
10173    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10174    /// let x = Cluster::new().set_serve_nodes(42);
10175    /// ```
10176    pub fn set_serve_nodes<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10177        self.serve_nodes = v.into();
10178        self
10179    }
10180
10181    /// Sets the value of [node_scaling_factor][crate::model::Cluster::node_scaling_factor].
10182    ///
10183    /// # Example
10184    /// ```ignore,no_run
10185    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10186    /// use google_cloud_bigtable_admin_v2::model::cluster::NodeScalingFactor;
10187    /// let x0 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor1X);
10188    /// let x1 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor2X);
10189    /// ```
10190    pub fn set_node_scaling_factor<
10191        T: std::convert::Into<crate::model::cluster::NodeScalingFactor>,
10192    >(
10193        mut self,
10194        v: T,
10195    ) -> Self {
10196        self.node_scaling_factor = v.into();
10197        self
10198    }
10199
10200    /// Sets the value of [default_storage_type][crate::model::Cluster::default_storage_type].
10201    ///
10202    /// # Example
10203    /// ```ignore,no_run
10204    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10205    /// use google_cloud_bigtable_admin_v2::model::StorageType;
10206    /// let x0 = Cluster::new().set_default_storage_type(StorageType::Ssd);
10207    /// let x1 = Cluster::new().set_default_storage_type(StorageType::Hdd);
10208    /// ```
10209    pub fn set_default_storage_type<T: std::convert::Into<crate::model::StorageType>>(
10210        mut self,
10211        v: T,
10212    ) -> Self {
10213        self.default_storage_type = v.into();
10214        self
10215    }
10216
10217    /// Sets the value of [encryption_config][crate::model::Cluster::encryption_config].
10218    ///
10219    /// # Example
10220    /// ```ignore,no_run
10221    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10222    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10223    /// let x = Cluster::new().set_encryption_config(EncryptionConfig::default()/* use setters */);
10224    /// ```
10225    pub fn set_encryption_config<T>(mut self, v: T) -> Self
10226    where
10227        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
10228    {
10229        self.encryption_config = std::option::Option::Some(v.into());
10230        self
10231    }
10232
10233    /// Sets or clears the value of [encryption_config][crate::model::Cluster::encryption_config].
10234    ///
10235    /// # Example
10236    /// ```ignore,no_run
10237    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10238    /// use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10239    /// let x = Cluster::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
10240    /// let x = Cluster::new().set_or_clear_encryption_config(None::<EncryptionConfig>);
10241    /// ```
10242    pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
10243    where
10244        T: std::convert::Into<crate::model::cluster::EncryptionConfig>,
10245    {
10246        self.encryption_config = v.map(|x| x.into());
10247        self
10248    }
10249
10250    /// Sets the value of [config][crate::model::Cluster::config].
10251    ///
10252    /// Note that all the setters affecting `config` are mutually
10253    /// exclusive.
10254    ///
10255    /// # Example
10256    /// ```ignore,no_run
10257    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10258    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10259    /// let x = Cluster::new().set_config(Some(
10260    ///     google_cloud_bigtable_admin_v2::model::cluster::Config::ClusterConfig(ClusterConfig::default().into())));
10261    /// ```
10262    pub fn set_config<T: std::convert::Into<std::option::Option<crate::model::cluster::Config>>>(
10263        mut self,
10264        v: T,
10265    ) -> Self {
10266        self.config = v.into();
10267        self
10268    }
10269
10270    /// The value of [config][crate::model::Cluster::config]
10271    /// if it holds a `ClusterConfig`, `None` if the field is not set or
10272    /// holds a different branch.
10273    pub fn cluster_config(
10274        &self,
10275    ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::ClusterConfig>> {
10276        #[allow(unreachable_patterns)]
10277        self.config.as_ref().and_then(|v| match v {
10278            crate::model::cluster::Config::ClusterConfig(v) => std::option::Option::Some(v),
10279            _ => std::option::Option::None,
10280        })
10281    }
10282
10283    /// Sets the value of [config][crate::model::Cluster::config]
10284    /// to hold a `ClusterConfig`.
10285    ///
10286    /// Note that all the setters affecting `config` are
10287    /// mutually exclusive.
10288    ///
10289    /// # Example
10290    /// ```ignore,no_run
10291    /// # use google_cloud_bigtable_admin_v2::model::Cluster;
10292    /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10293    /// let x = Cluster::new().set_cluster_config(ClusterConfig::default()/* use setters */);
10294    /// assert!(x.cluster_config().is_some());
10295    /// ```
10296    pub fn set_cluster_config<
10297        T: std::convert::Into<std::boxed::Box<crate::model::cluster::ClusterConfig>>,
10298    >(
10299        mut self,
10300        v: T,
10301    ) -> Self {
10302        self.config =
10303            std::option::Option::Some(crate::model::cluster::Config::ClusterConfig(v.into()));
10304        self
10305    }
10306}
10307
10308impl wkt::message::Message for Cluster {
10309    fn typename() -> &'static str {
10310        "type.googleapis.com/google.bigtable.admin.v2.Cluster"
10311    }
10312}
10313
10314/// Defines additional types related to [Cluster].
10315pub mod cluster {
10316    #[allow(unused_imports)]
10317    use super::*;
10318
10319    /// Autoscaling config for a cluster.
10320    #[derive(Clone, Default, PartialEq)]
10321    #[non_exhaustive]
10322    pub struct ClusterAutoscalingConfig {
10323        /// Required. Autoscaling limits for this cluster.
10324        pub autoscaling_limits: std::option::Option<crate::model::AutoscalingLimits>,
10325
10326        /// Required. Autoscaling targets for this cluster.
10327        pub autoscaling_targets: std::option::Option<crate::model::AutoscalingTargets>,
10328
10329        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10330    }
10331
10332    impl ClusterAutoscalingConfig {
10333        /// Creates a new default instance.
10334        pub fn new() -> Self {
10335            std::default::Default::default()
10336        }
10337
10338        /// Sets the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
10339        ///
10340        /// # Example
10341        /// ```ignore,no_run
10342        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10343        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10344        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_limits(AutoscalingLimits::default()/* use setters */);
10345        /// ```
10346        pub fn set_autoscaling_limits<T>(mut self, v: T) -> Self
10347        where
10348            T: std::convert::Into<crate::model::AutoscalingLimits>,
10349        {
10350            self.autoscaling_limits = std::option::Option::Some(v.into());
10351            self
10352        }
10353
10354        /// Sets or clears the value of [autoscaling_limits][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_limits].
10355        ///
10356        /// # Example
10357        /// ```ignore,no_run
10358        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10359        /// use google_cloud_bigtable_admin_v2::model::AutoscalingLimits;
10360        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(Some(AutoscalingLimits::default()/* use setters */));
10361        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_limits(None::<AutoscalingLimits>);
10362        /// ```
10363        pub fn set_or_clear_autoscaling_limits<T>(mut self, v: std::option::Option<T>) -> Self
10364        where
10365            T: std::convert::Into<crate::model::AutoscalingLimits>,
10366        {
10367            self.autoscaling_limits = v.map(|x| x.into());
10368            self
10369        }
10370
10371        /// Sets the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
10372        ///
10373        /// # Example
10374        /// ```ignore,no_run
10375        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10376        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10377        /// let x = ClusterAutoscalingConfig::new().set_autoscaling_targets(AutoscalingTargets::default()/* use setters */);
10378        /// ```
10379        pub fn set_autoscaling_targets<T>(mut self, v: T) -> Self
10380        where
10381            T: std::convert::Into<crate::model::AutoscalingTargets>,
10382        {
10383            self.autoscaling_targets = std::option::Option::Some(v.into());
10384            self
10385        }
10386
10387        /// Sets or clears the value of [autoscaling_targets][crate::model::cluster::ClusterAutoscalingConfig::autoscaling_targets].
10388        ///
10389        /// # Example
10390        /// ```ignore,no_run
10391        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10392        /// use google_cloud_bigtable_admin_v2::model::AutoscalingTargets;
10393        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(Some(AutoscalingTargets::default()/* use setters */));
10394        /// let x = ClusterAutoscalingConfig::new().set_or_clear_autoscaling_targets(None::<AutoscalingTargets>);
10395        /// ```
10396        pub fn set_or_clear_autoscaling_targets<T>(mut self, v: std::option::Option<T>) -> Self
10397        where
10398            T: std::convert::Into<crate::model::AutoscalingTargets>,
10399        {
10400            self.autoscaling_targets = v.map(|x| x.into());
10401            self
10402        }
10403    }
10404
10405    impl wkt::message::Message for ClusterAutoscalingConfig {
10406        fn typename() -> &'static str {
10407            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig"
10408        }
10409    }
10410
10411    /// Configuration for a cluster.
10412    #[derive(Clone, Default, PartialEq)]
10413    #[non_exhaustive]
10414    pub struct ClusterConfig {
10415        /// Autoscaling configuration for this cluster.
10416        pub cluster_autoscaling_config:
10417            std::option::Option<crate::model::cluster::ClusterAutoscalingConfig>,
10418
10419        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10420    }
10421
10422    impl ClusterConfig {
10423        /// Creates a new default instance.
10424        pub fn new() -> Self {
10425            std::default::Default::default()
10426        }
10427
10428        /// Sets the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
10429        ///
10430        /// # Example
10431        /// ```ignore,no_run
10432        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10433        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10434        /// let x = ClusterConfig::new().set_cluster_autoscaling_config(ClusterAutoscalingConfig::default()/* use setters */);
10435        /// ```
10436        pub fn set_cluster_autoscaling_config<T>(mut self, v: T) -> Self
10437        where
10438            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10439        {
10440            self.cluster_autoscaling_config = std::option::Option::Some(v.into());
10441            self
10442        }
10443
10444        /// Sets or clears the value of [cluster_autoscaling_config][crate::model::cluster::ClusterConfig::cluster_autoscaling_config].
10445        ///
10446        /// # Example
10447        /// ```ignore,no_run
10448        /// # use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
10449        /// use google_cloud_bigtable_admin_v2::model::cluster::ClusterAutoscalingConfig;
10450        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(Some(ClusterAutoscalingConfig::default()/* use setters */));
10451        /// let x = ClusterConfig::new().set_or_clear_cluster_autoscaling_config(None::<ClusterAutoscalingConfig>);
10452        /// ```
10453        pub fn set_or_clear_cluster_autoscaling_config<T>(
10454            mut self,
10455            v: std::option::Option<T>,
10456        ) -> Self
10457        where
10458            T: std::convert::Into<crate::model::cluster::ClusterAutoscalingConfig>,
10459        {
10460            self.cluster_autoscaling_config = v.map(|x| x.into());
10461            self
10462        }
10463    }
10464
10465    impl wkt::message::Message for ClusterConfig {
10466        fn typename() -> &'static str {
10467            "type.googleapis.com/google.bigtable.admin.v2.Cluster.ClusterConfig"
10468        }
10469    }
10470
10471    /// Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected
10472    /// cluster.
10473    #[derive(Clone, Default, PartialEq)]
10474    #[non_exhaustive]
10475    pub struct EncryptionConfig {
10476        /// Describes the Cloud KMS encryption key that will be used to protect the
10477        /// destination Bigtable cluster. The requirements for this key are:
10478        ///
10479        /// 1. The Cloud Bigtable service account associated with the project that
10480        ///    contains this cluster must be granted the
10481        ///    `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
10482        /// 1. Only regional keys can be used and the region of the CMEK key must
10483        ///    match the region of the cluster.
10484        ///    Values are of the form
10485        ///    `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}`
10486        pub kms_key_name: std::string::String,
10487
10488        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10489    }
10490
10491    impl EncryptionConfig {
10492        /// Creates a new default instance.
10493        pub fn new() -> Self {
10494            std::default::Default::default()
10495        }
10496
10497        /// Sets the value of [kms_key_name][crate::model::cluster::EncryptionConfig::kms_key_name].
10498        ///
10499        /// # Example
10500        /// ```ignore,no_run
10501        /// # use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
10502        /// let x = EncryptionConfig::new().set_kms_key_name("example");
10503        /// ```
10504        pub fn set_kms_key_name<T: std::convert::Into<std::string::String>>(
10505            mut self,
10506            v: T,
10507        ) -> Self {
10508            self.kms_key_name = v.into();
10509            self
10510        }
10511    }
10512
10513    impl wkt::message::Message for EncryptionConfig {
10514        fn typename() -> &'static str {
10515            "type.googleapis.com/google.bigtable.admin.v2.Cluster.EncryptionConfig"
10516        }
10517    }
10518
10519    /// Possible states of a cluster.
10520    ///
10521    /// # Working with unknown values
10522    ///
10523    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10524    /// additional enum variants at any time. Adding new variants is not considered
10525    /// a breaking change. Applications should write their code in anticipation of:
10526    ///
10527    /// - New values appearing in future releases of the client library, **and**
10528    /// - New values received dynamically, without application changes.
10529    ///
10530    /// Please consult the [Working with enums] section in the user guide for some
10531    /// guidelines.
10532    ///
10533    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10534    #[derive(Clone, Debug, PartialEq)]
10535    #[non_exhaustive]
10536    pub enum State {
10537        /// The state of the cluster could not be determined.
10538        NotKnown,
10539        /// The cluster has been successfully created and is ready to serve requests.
10540        Ready,
10541        /// The cluster is currently being created, and may be destroyed
10542        /// if the creation process encounters an error.
10543        /// A cluster may not be able to serve requests while being created.
10544        Creating,
10545        /// The cluster is currently being resized, and may revert to its previous
10546        /// node count if the process encounters an error.
10547        /// A cluster is still capable of serving requests while being resized,
10548        /// but may exhibit performance as if its number of allocated nodes is
10549        /// between the starting and requested states.
10550        Resizing,
10551        /// The cluster has no backing nodes. The data (tables) still
10552        /// exist, but no operations can be performed on the cluster.
10553        Disabled,
10554        /// If set, the enum was initialized with an unknown value.
10555        ///
10556        /// Applications can examine the value using [State::value] or
10557        /// [State::name].
10558        UnknownValue(state::UnknownValue),
10559    }
10560
10561    #[doc(hidden)]
10562    pub mod state {
10563        #[allow(unused_imports)]
10564        use super::*;
10565        #[derive(Clone, Debug, PartialEq)]
10566        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10567    }
10568
10569    impl State {
10570        /// Gets the enum value.
10571        ///
10572        /// Returns `None` if the enum contains an unknown value deserialized from
10573        /// the string representation of enums.
10574        pub fn value(&self) -> std::option::Option<i32> {
10575            match self {
10576                Self::NotKnown => std::option::Option::Some(0),
10577                Self::Ready => std::option::Option::Some(1),
10578                Self::Creating => std::option::Option::Some(2),
10579                Self::Resizing => std::option::Option::Some(3),
10580                Self::Disabled => std::option::Option::Some(4),
10581                Self::UnknownValue(u) => u.0.value(),
10582            }
10583        }
10584
10585        /// Gets the enum value as a string.
10586        ///
10587        /// Returns `None` if the enum contains an unknown value deserialized from
10588        /// the integer representation of enums.
10589        pub fn name(&self) -> std::option::Option<&str> {
10590            match self {
10591                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
10592                Self::Ready => std::option::Option::Some("READY"),
10593                Self::Creating => std::option::Option::Some("CREATING"),
10594                Self::Resizing => std::option::Option::Some("RESIZING"),
10595                Self::Disabled => std::option::Option::Some("DISABLED"),
10596                Self::UnknownValue(u) => u.0.name(),
10597            }
10598        }
10599    }
10600
10601    impl std::default::Default for State {
10602        fn default() -> Self {
10603            use std::convert::From;
10604            Self::from(0)
10605        }
10606    }
10607
10608    impl std::fmt::Display for State {
10609        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10610            wkt::internal::display_enum(f, self.name(), self.value())
10611        }
10612    }
10613
10614    impl std::convert::From<i32> for State {
10615        fn from(value: i32) -> Self {
10616            match value {
10617                0 => Self::NotKnown,
10618                1 => Self::Ready,
10619                2 => Self::Creating,
10620                3 => Self::Resizing,
10621                4 => Self::Disabled,
10622                _ => Self::UnknownValue(state::UnknownValue(
10623                    wkt::internal::UnknownEnumValue::Integer(value),
10624                )),
10625            }
10626        }
10627    }
10628
10629    impl std::convert::From<&str> for State {
10630        fn from(value: &str) -> Self {
10631            use std::string::ToString;
10632            match value {
10633                "STATE_NOT_KNOWN" => Self::NotKnown,
10634                "READY" => Self::Ready,
10635                "CREATING" => Self::Creating,
10636                "RESIZING" => Self::Resizing,
10637                "DISABLED" => Self::Disabled,
10638                _ => Self::UnknownValue(state::UnknownValue(
10639                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10640                )),
10641            }
10642        }
10643    }
10644
10645    impl serde::ser::Serialize for State {
10646        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10647        where
10648            S: serde::Serializer,
10649        {
10650            match self {
10651                Self::NotKnown => serializer.serialize_i32(0),
10652                Self::Ready => serializer.serialize_i32(1),
10653                Self::Creating => serializer.serialize_i32(2),
10654                Self::Resizing => serializer.serialize_i32(3),
10655                Self::Disabled => serializer.serialize_i32(4),
10656                Self::UnknownValue(u) => u.0.serialize(serializer),
10657            }
10658        }
10659    }
10660
10661    impl<'de> serde::de::Deserialize<'de> for State {
10662        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10663        where
10664            D: serde::Deserializer<'de>,
10665        {
10666            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10667                ".google.bigtable.admin.v2.Cluster.State",
10668            ))
10669        }
10670    }
10671
10672    /// Possible node scaling factors of the clusters. Node scaling delivers better
10673    /// latency and more throughput by removing node boundaries.
10674    ///
10675    /// # Working with unknown values
10676    ///
10677    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10678    /// additional enum variants at any time. Adding new variants is not considered
10679    /// a breaking change. Applications should write their code in anticipation of:
10680    ///
10681    /// - New values appearing in future releases of the client library, **and**
10682    /// - New values received dynamically, without application changes.
10683    ///
10684    /// Please consult the [Working with enums] section in the user guide for some
10685    /// guidelines.
10686    ///
10687    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10688    #[derive(Clone, Debug, PartialEq)]
10689    #[non_exhaustive]
10690    pub enum NodeScalingFactor {
10691        /// No node scaling specified. Defaults to NODE_SCALING_FACTOR_1X.
10692        Unspecified,
10693        /// The cluster is running with a scaling factor of 1.
10694        NodeScalingFactor1X,
10695        /// The cluster is running with a scaling factor of 2.
10696        /// All node count values must be in increments of 2 with this scaling factor
10697        /// enabled, otherwise an INVALID_ARGUMENT error will be returned.
10698        NodeScalingFactor2X,
10699        /// If set, the enum was initialized with an unknown value.
10700        ///
10701        /// Applications can examine the value using [NodeScalingFactor::value] or
10702        /// [NodeScalingFactor::name].
10703        UnknownValue(node_scaling_factor::UnknownValue),
10704    }
10705
10706    #[doc(hidden)]
10707    pub mod node_scaling_factor {
10708        #[allow(unused_imports)]
10709        use super::*;
10710        #[derive(Clone, Debug, PartialEq)]
10711        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10712    }
10713
10714    impl NodeScalingFactor {
10715        /// Gets the enum value.
10716        ///
10717        /// Returns `None` if the enum contains an unknown value deserialized from
10718        /// the string representation of enums.
10719        pub fn value(&self) -> std::option::Option<i32> {
10720            match self {
10721                Self::Unspecified => std::option::Option::Some(0),
10722                Self::NodeScalingFactor1X => std::option::Option::Some(1),
10723                Self::NodeScalingFactor2X => std::option::Option::Some(2),
10724                Self::UnknownValue(u) => u.0.value(),
10725            }
10726        }
10727
10728        /// Gets the enum value as a string.
10729        ///
10730        /// Returns `None` if the enum contains an unknown value deserialized from
10731        /// the integer representation of enums.
10732        pub fn name(&self) -> std::option::Option<&str> {
10733            match self {
10734                Self::Unspecified => std::option::Option::Some("NODE_SCALING_FACTOR_UNSPECIFIED"),
10735                Self::NodeScalingFactor1X => std::option::Option::Some("NODE_SCALING_FACTOR_1X"),
10736                Self::NodeScalingFactor2X => std::option::Option::Some("NODE_SCALING_FACTOR_2X"),
10737                Self::UnknownValue(u) => u.0.name(),
10738            }
10739        }
10740    }
10741
10742    impl std::default::Default for NodeScalingFactor {
10743        fn default() -> Self {
10744            use std::convert::From;
10745            Self::from(0)
10746        }
10747    }
10748
10749    impl std::fmt::Display for NodeScalingFactor {
10750        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10751            wkt::internal::display_enum(f, self.name(), self.value())
10752        }
10753    }
10754
10755    impl std::convert::From<i32> for NodeScalingFactor {
10756        fn from(value: i32) -> Self {
10757            match value {
10758                0 => Self::Unspecified,
10759                1 => Self::NodeScalingFactor1X,
10760                2 => Self::NodeScalingFactor2X,
10761                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
10762                    wkt::internal::UnknownEnumValue::Integer(value),
10763                )),
10764            }
10765        }
10766    }
10767
10768    impl std::convert::From<&str> for NodeScalingFactor {
10769        fn from(value: &str) -> Self {
10770            use std::string::ToString;
10771            match value {
10772                "NODE_SCALING_FACTOR_UNSPECIFIED" => Self::Unspecified,
10773                "NODE_SCALING_FACTOR_1X" => Self::NodeScalingFactor1X,
10774                "NODE_SCALING_FACTOR_2X" => Self::NodeScalingFactor2X,
10775                _ => Self::UnknownValue(node_scaling_factor::UnknownValue(
10776                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10777                )),
10778            }
10779        }
10780    }
10781
10782    impl serde::ser::Serialize for NodeScalingFactor {
10783        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10784        where
10785            S: serde::Serializer,
10786        {
10787            match self {
10788                Self::Unspecified => serializer.serialize_i32(0),
10789                Self::NodeScalingFactor1X => serializer.serialize_i32(1),
10790                Self::NodeScalingFactor2X => serializer.serialize_i32(2),
10791                Self::UnknownValue(u) => u.0.serialize(serializer),
10792            }
10793        }
10794    }
10795
10796    impl<'de> serde::de::Deserialize<'de> for NodeScalingFactor {
10797        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10798        where
10799            D: serde::Deserializer<'de>,
10800        {
10801            deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeScalingFactor>::new(
10802                ".google.bigtable.admin.v2.Cluster.NodeScalingFactor",
10803            ))
10804        }
10805    }
10806
10807    #[allow(missing_docs)]
10808    #[derive(Clone, Debug, PartialEq)]
10809    #[non_exhaustive]
10810    pub enum Config {
10811        /// Configuration for this cluster.
10812        ClusterConfig(std::boxed::Box<crate::model::cluster::ClusterConfig>),
10813    }
10814}
10815
10816/// A configuration object describing how Cloud Bigtable should treat traffic
10817/// from a particular end user application.
10818#[derive(Clone, Default, PartialEq)]
10819#[non_exhaustive]
10820pub struct AppProfile {
10821    /// The unique name of the app profile. Values are of the form
10822    /// `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
10823    pub name: std::string::String,
10824
10825    /// Strongly validated etag for optimistic concurrency control. Preserve the
10826    /// value returned from `GetAppProfile` when calling `UpdateAppProfile` to
10827    /// fail the request if there has been a modification in the mean time. The
10828    /// `update_mask` of the request need not include `etag` for this protection
10829    /// to apply.
10830    /// See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
10831    /// [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
10832    /// details.
10833    pub etag: std::string::String,
10834
10835    /// Long form description of the use case for this AppProfile.
10836    pub description: std::string::String,
10837
10838    /// The routing policy for all read/write requests that use this app profile.
10839    /// A value must be explicitly set.
10840    pub routing_policy: std::option::Option<crate::model::app_profile::RoutingPolicy>,
10841
10842    /// Options for isolating this app profile's traffic from other use cases.
10843    pub isolation: std::option::Option<crate::model::app_profile::Isolation>,
10844
10845    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10846}
10847
10848impl AppProfile {
10849    /// Creates a new default instance.
10850    pub fn new() -> Self {
10851        std::default::Default::default()
10852    }
10853
10854    /// Sets the value of [name][crate::model::AppProfile::name].
10855    ///
10856    /// # Example
10857    /// ```ignore,no_run
10858    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10859    /// # let project_id = "project_id";
10860    /// # let instance_id = "instance_id";
10861    /// # let app_profile_id = "app_profile_id";
10862    /// let x = AppProfile::new().set_name(format!("projects/{project_id}/instances/{instance_id}/appProfiles/{app_profile_id}"));
10863    /// ```
10864    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10865        self.name = v.into();
10866        self
10867    }
10868
10869    /// Sets the value of [etag][crate::model::AppProfile::etag].
10870    ///
10871    /// # Example
10872    /// ```ignore,no_run
10873    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10874    /// let x = AppProfile::new().set_etag("example");
10875    /// ```
10876    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10877        self.etag = v.into();
10878        self
10879    }
10880
10881    /// Sets the value of [description][crate::model::AppProfile::description].
10882    ///
10883    /// # Example
10884    /// ```ignore,no_run
10885    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10886    /// let x = AppProfile::new().set_description("example");
10887    /// ```
10888    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10889        self.description = v.into();
10890        self
10891    }
10892
10893    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy].
10894    ///
10895    /// Note that all the setters affecting `routing_policy` are mutually
10896    /// exclusive.
10897    ///
10898    /// # Example
10899    /// ```ignore,no_run
10900    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10901    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10902    /// let x = AppProfile::new().set_routing_policy(Some(
10903    ///     google_cloud_bigtable_admin_v2::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(MultiClusterRoutingUseAny::default().into())));
10904    /// ```
10905    pub fn set_routing_policy<
10906        T: std::convert::Into<std::option::Option<crate::model::app_profile::RoutingPolicy>>,
10907    >(
10908        mut self,
10909        v: T,
10910    ) -> Self {
10911        self.routing_policy = v.into();
10912        self
10913    }
10914
10915    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
10916    /// if it holds a `MultiClusterRoutingUseAny`, `None` if the field is not set or
10917    /// holds a different branch.
10918    pub fn multi_cluster_routing_use_any(
10919        &self,
10920    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>
10921    {
10922        #[allow(unreachable_patterns)]
10923        self.routing_policy.as_ref().and_then(|v| match v {
10924            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v) => {
10925                std::option::Option::Some(v)
10926            }
10927            _ => std::option::Option::None,
10928        })
10929    }
10930
10931    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
10932    /// to hold a `MultiClusterRoutingUseAny`.
10933    ///
10934    /// Note that all the setters affecting `routing_policy` are
10935    /// mutually exclusive.
10936    ///
10937    /// # Example
10938    /// ```ignore,no_run
10939    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10940    /// use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
10941    /// let x = AppProfile::new().set_multi_cluster_routing_use_any(MultiClusterRoutingUseAny::default()/* use setters */);
10942    /// assert!(x.multi_cluster_routing_use_any().is_some());
10943    /// assert!(x.single_cluster_routing().is_none());
10944    /// ```
10945    pub fn set_multi_cluster_routing_use_any<
10946        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>>,
10947    >(
10948        mut self,
10949        v: T,
10950    ) -> Self {
10951        self.routing_policy = std::option::Option::Some(
10952            crate::model::app_profile::RoutingPolicy::MultiClusterRoutingUseAny(v.into()),
10953        );
10954        self
10955    }
10956
10957    /// The value of [routing_policy][crate::model::AppProfile::routing_policy]
10958    /// if it holds a `SingleClusterRouting`, `None` if the field is not set or
10959    /// holds a different branch.
10960    pub fn single_cluster_routing(
10961        &self,
10962    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>
10963    {
10964        #[allow(unreachable_patterns)]
10965        self.routing_policy.as_ref().and_then(|v| match v {
10966            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v) => {
10967                std::option::Option::Some(v)
10968            }
10969            _ => std::option::Option::None,
10970        })
10971    }
10972
10973    /// Sets the value of [routing_policy][crate::model::AppProfile::routing_policy]
10974    /// to hold a `SingleClusterRouting`.
10975    ///
10976    /// Note that all the setters affecting `routing_policy` are
10977    /// mutually exclusive.
10978    ///
10979    /// # Example
10980    /// ```ignore,no_run
10981    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
10982    /// use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
10983    /// let x = AppProfile::new().set_single_cluster_routing(SingleClusterRouting::default()/* use setters */);
10984    /// assert!(x.single_cluster_routing().is_some());
10985    /// assert!(x.multi_cluster_routing_use_any().is_none());
10986    /// ```
10987    pub fn set_single_cluster_routing<
10988        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::SingleClusterRouting>>,
10989    >(
10990        mut self,
10991        v: T,
10992    ) -> Self {
10993        self.routing_policy = std::option::Option::Some(
10994            crate::model::app_profile::RoutingPolicy::SingleClusterRouting(v.into()),
10995        );
10996        self
10997    }
10998
10999    /// Sets the value of [isolation][crate::model::AppProfile::isolation].
11000    ///
11001    /// Note that all the setters affecting `isolation` are mutually
11002    /// exclusive.
11003    ///
11004    /// # Example
11005    /// ```ignore,no_run
11006    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11007    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
11008    /// let x = AppProfile::new().set_isolation(Some(
11009    ///     google_cloud_bigtable_admin_v2::model::app_profile::Isolation::StandardIsolation(StandardIsolation::default().into())));
11010    /// ```
11011    pub fn set_isolation<
11012        T: std::convert::Into<std::option::Option<crate::model::app_profile::Isolation>>,
11013    >(
11014        mut self,
11015        v: T,
11016    ) -> Self {
11017        self.isolation = v.into();
11018        self
11019    }
11020
11021    /// The value of [isolation][crate::model::AppProfile::isolation]
11022    /// if it holds a `Priority`, `None` if the field is not set or
11023    /// holds a different branch.
11024    #[deprecated]
11025    pub fn priority(&self) -> std::option::Option<&crate::model::app_profile::Priority> {
11026        #[allow(unreachable_patterns)]
11027        self.isolation.as_ref().and_then(|v| match v {
11028            crate::model::app_profile::Isolation::Priority(v) => std::option::Option::Some(v),
11029            _ => std::option::Option::None,
11030        })
11031    }
11032
11033    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
11034    /// to hold a `Priority`.
11035    ///
11036    /// Note that all the setters affecting `isolation` are
11037    /// mutually exclusive.
11038    ///
11039    /// # Example
11040    /// ```ignore,no_run
11041    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11042    /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
11043    /// let x0 = AppProfile::new().set_priority(Priority::Low);
11044    /// let x1 = AppProfile::new().set_priority(Priority::Medium);
11045    /// let x2 = AppProfile::new().set_priority(Priority::High);
11046    /// assert!(x0.priority().is_some());
11047    /// assert!(x0.standard_isolation().is_none());
11048    /// assert!(x0.data_boost_isolation_read_only().is_none());
11049    /// assert!(x1.priority().is_some());
11050    /// assert!(x1.standard_isolation().is_none());
11051    /// assert!(x1.data_boost_isolation_read_only().is_none());
11052    /// assert!(x2.priority().is_some());
11053    /// assert!(x2.standard_isolation().is_none());
11054    /// assert!(x2.data_boost_isolation_read_only().is_none());
11055    /// ```
11056    #[deprecated]
11057    pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
11058        mut self,
11059        v: T,
11060    ) -> Self {
11061        self.isolation =
11062            std::option::Option::Some(crate::model::app_profile::Isolation::Priority(v.into()));
11063        self
11064    }
11065
11066    /// The value of [isolation][crate::model::AppProfile::isolation]
11067    /// if it holds a `StandardIsolation`, `None` if the field is not set or
11068    /// holds a different branch.
11069    pub fn standard_isolation(
11070        &self,
11071    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::StandardIsolation>> {
11072        #[allow(unreachable_patterns)]
11073        self.isolation.as_ref().and_then(|v| match v {
11074            crate::model::app_profile::Isolation::StandardIsolation(v) => {
11075                std::option::Option::Some(v)
11076            }
11077            _ => std::option::Option::None,
11078        })
11079    }
11080
11081    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
11082    /// to hold a `StandardIsolation`.
11083    ///
11084    /// Note that all the setters affecting `isolation` are
11085    /// mutually exclusive.
11086    ///
11087    /// # Example
11088    /// ```ignore,no_run
11089    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11090    /// use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
11091    /// let x = AppProfile::new().set_standard_isolation(StandardIsolation::default()/* use setters */);
11092    /// assert!(x.standard_isolation().is_some());
11093    /// assert!(x.priority().is_none());
11094    /// assert!(x.data_boost_isolation_read_only().is_none());
11095    /// ```
11096    pub fn set_standard_isolation<
11097        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::StandardIsolation>>,
11098    >(
11099        mut self,
11100        v: T,
11101    ) -> Self {
11102        self.isolation = std::option::Option::Some(
11103            crate::model::app_profile::Isolation::StandardIsolation(v.into()),
11104        );
11105        self
11106    }
11107
11108    /// The value of [isolation][crate::model::AppProfile::isolation]
11109    /// if it holds a `DataBoostIsolationReadOnly`, `None` if the field is not set or
11110    /// holds a different branch.
11111    pub fn data_boost_isolation_read_only(
11112        &self,
11113    ) -> std::option::Option<&std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>
11114    {
11115        #[allow(unreachable_patterns)]
11116        self.isolation.as_ref().and_then(|v| match v {
11117            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v) => {
11118                std::option::Option::Some(v)
11119            }
11120            _ => std::option::Option::None,
11121        })
11122    }
11123
11124    /// Sets the value of [isolation][crate::model::AppProfile::isolation]
11125    /// to hold a `DataBoostIsolationReadOnly`.
11126    ///
11127    /// Note that all the setters affecting `isolation` are
11128    /// mutually exclusive.
11129    ///
11130    /// # Example
11131    /// ```ignore,no_run
11132    /// # use google_cloud_bigtable_admin_v2::model::AppProfile;
11133    /// use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11134    /// let x = AppProfile::new().set_data_boost_isolation_read_only(DataBoostIsolationReadOnly::default()/* use setters */);
11135    /// assert!(x.data_boost_isolation_read_only().is_some());
11136    /// assert!(x.priority().is_none());
11137    /// assert!(x.standard_isolation().is_none());
11138    /// ```
11139    pub fn set_data_boost_isolation_read_only<
11140        T: std::convert::Into<std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>>,
11141    >(
11142        mut self,
11143        v: T,
11144    ) -> Self {
11145        self.isolation = std::option::Option::Some(
11146            crate::model::app_profile::Isolation::DataBoostIsolationReadOnly(v.into()),
11147        );
11148        self
11149    }
11150}
11151
11152impl wkt::message::Message for AppProfile {
11153    fn typename() -> &'static str {
11154        "type.googleapis.com/google.bigtable.admin.v2.AppProfile"
11155    }
11156}
11157
11158/// Defines additional types related to [AppProfile].
11159pub mod app_profile {
11160    #[allow(unused_imports)]
11161    use super::*;
11162
11163    /// Read/write requests are routed to the nearest cluster in the instance, and
11164    /// will fail over to the nearest cluster that is available in the event of
11165    /// transient errors or delays. Clusters in a region are considered
11166    /// equidistant. Choosing this option sacrifices read-your-writes consistency
11167    /// to improve availability.
11168    #[derive(Clone, Default, PartialEq)]
11169    #[non_exhaustive]
11170    pub struct MultiClusterRoutingUseAny {
11171        /// The set of clusters to route to. The order is ignored; clusters will be
11172        /// tried in order of distance. If left empty, all clusters are eligible.
11173        pub cluster_ids: std::vec::Vec<std::string::String>,
11174
11175        /// Possible algorithms for routing affinity. If enabled, Bigtable will
11176        /// route between equidistant clusters in a deterministic order rather than
11177        /// choosing randomly.
11178        ///
11179        /// This mechanism gives read-your-writes consistency for *most* requests
11180        /// under *most* circumstances, without sacrificing availability. Consistency
11181        /// is *not* guaranteed, as requests might still fail over between clusters
11182        /// in the event of errors or latency.
11183        pub affinity:
11184            std::option::Option<crate::model::app_profile::multi_cluster_routing_use_any::Affinity>,
11185
11186        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11187    }
11188
11189    impl MultiClusterRoutingUseAny {
11190        /// Creates a new default instance.
11191        pub fn new() -> Self {
11192            std::default::Default::default()
11193        }
11194
11195        /// Sets the value of [cluster_ids][crate::model::app_profile::MultiClusterRoutingUseAny::cluster_ids].
11196        ///
11197        /// # Example
11198        /// ```ignore,no_run
11199        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11200        /// let x = MultiClusterRoutingUseAny::new().set_cluster_ids(["a", "b", "c"]);
11201        /// ```
11202        pub fn set_cluster_ids<T, V>(mut self, v: T) -> Self
11203        where
11204            T: std::iter::IntoIterator<Item = V>,
11205            V: std::convert::Into<std::string::String>,
11206        {
11207            use std::iter::Iterator;
11208            self.cluster_ids = v.into_iter().map(|i| i.into()).collect();
11209            self
11210        }
11211
11212        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity].
11213        ///
11214        /// Note that all the setters affecting `affinity` are mutually
11215        /// exclusive.
11216        ///
11217        /// # Example
11218        /// ```ignore,no_run
11219        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11220        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
11221        /// let x = MultiClusterRoutingUseAny::new().set_affinity(Some(
11222        ///     google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(RowAffinity::default().into())));
11223        /// ```
11224        pub fn set_affinity<
11225            T: std::convert::Into<
11226                    std::option::Option<
11227                        crate::model::app_profile::multi_cluster_routing_use_any::Affinity,
11228                    >,
11229                >,
11230        >(
11231            mut self,
11232            v: T,
11233        ) -> Self {
11234            self.affinity = v.into();
11235            self
11236        }
11237
11238        /// The value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
11239        /// if it holds a `RowAffinity`, `None` if the field is not set or
11240        /// holds a different branch.
11241        pub fn row_affinity(
11242            &self,
11243        ) -> std::option::Option<
11244            &std::boxed::Box<crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity>,
11245        > {
11246            #[allow(unreachable_patterns)]
11247            self.affinity.as_ref().and_then(|v| match v {
11248                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
11249                    v,
11250                ) => std::option::Option::Some(v),
11251                _ => std::option::Option::None,
11252            })
11253        }
11254
11255        /// Sets the value of [affinity][crate::model::app_profile::MultiClusterRoutingUseAny::affinity]
11256        /// to hold a `RowAffinity`.
11257        ///
11258        /// Note that all the setters affecting `affinity` are
11259        /// mutually exclusive.
11260        ///
11261        /// # Example
11262        /// ```ignore,no_run
11263        /// # use google_cloud_bigtable_admin_v2::model::app_profile::MultiClusterRoutingUseAny;
11264        /// use google_cloud_bigtable_admin_v2::model::app_profile::multi_cluster_routing_use_any::RowAffinity;
11265        /// let x = MultiClusterRoutingUseAny::new().set_row_affinity(RowAffinity::default()/* use setters */);
11266        /// assert!(x.row_affinity().is_some());
11267        /// ```
11268        pub fn set_row_affinity<
11269            T: std::convert::Into<
11270                    std::boxed::Box<
11271                        crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
11272                    >,
11273                >,
11274        >(
11275            mut self,
11276            v: T,
11277        ) -> Self {
11278            self.affinity = std::option::Option::Some(
11279                crate::model::app_profile::multi_cluster_routing_use_any::Affinity::RowAffinity(
11280                    v.into(),
11281                ),
11282            );
11283            self
11284        }
11285    }
11286
11287    impl wkt::message::Message for MultiClusterRoutingUseAny {
11288        fn typename() -> &'static str {
11289            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny"
11290        }
11291    }
11292
11293    /// Defines additional types related to [MultiClusterRoutingUseAny].
11294    pub mod multi_cluster_routing_use_any {
11295        #[allow(unused_imports)]
11296        use super::*;
11297
11298        /// If enabled, Bigtable will route the request based on the row key of the
11299        /// request, rather than randomly. Instead, each row key will be assigned
11300        /// to a cluster, and will stick to that cluster. If clusters are added or
11301        /// removed, then this may affect which row keys stick to which clusters.
11302        /// To avoid this, users can use a cluster group to specify which clusters
11303        /// are to be used. In this case, new clusters that are not a part of the
11304        /// cluster group will not be routed to, and routing will be unaffected by
11305        /// the new cluster. Moreover, clusters specified in the cluster group cannot
11306        /// be deleted unless removed from the cluster group.
11307        #[derive(Clone, Default, PartialEq)]
11308        #[non_exhaustive]
11309        pub struct RowAffinity {
11310            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11311        }
11312
11313        impl RowAffinity {
11314            /// Creates a new default instance.
11315            pub fn new() -> Self {
11316                std::default::Default::default()
11317            }
11318        }
11319
11320        impl wkt::message::Message for RowAffinity {
11321            fn typename() -> &'static str {
11322                "type.googleapis.com/google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.RowAffinity"
11323            }
11324        }
11325
11326        /// Possible algorithms for routing affinity. If enabled, Bigtable will
11327        /// route between equidistant clusters in a deterministic order rather than
11328        /// choosing randomly.
11329        ///
11330        /// This mechanism gives read-your-writes consistency for *most* requests
11331        /// under *most* circumstances, without sacrificing availability. Consistency
11332        /// is *not* guaranteed, as requests might still fail over between clusters
11333        /// in the event of errors or latency.
11334        #[derive(Clone, Debug, PartialEq)]
11335        #[non_exhaustive]
11336        pub enum Affinity {
11337            /// Row affinity sticky routing based on the row key of the request.
11338            /// Requests that span multiple rows are routed non-deterministically.
11339            RowAffinity(
11340                std::boxed::Box<
11341                    crate::model::app_profile::multi_cluster_routing_use_any::RowAffinity,
11342                >,
11343            ),
11344        }
11345    }
11346
11347    /// Unconditionally routes all read/write requests to a specific cluster.
11348    /// This option preserves read-your-writes consistency but does not improve
11349    /// availability.
11350    #[derive(Clone, Default, PartialEq)]
11351    #[non_exhaustive]
11352    pub struct SingleClusterRouting {
11353        /// The cluster to which read/write requests should be routed.
11354        pub cluster_id: std::string::String,
11355
11356        /// Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
11357        /// allowed by this app profile. It is unsafe to send these requests to
11358        /// the same table/row/column in multiple clusters.
11359        pub allow_transactional_writes: bool,
11360
11361        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11362    }
11363
11364    impl SingleClusterRouting {
11365        /// Creates a new default instance.
11366        pub fn new() -> Self {
11367            std::default::Default::default()
11368        }
11369
11370        /// Sets the value of [cluster_id][crate::model::app_profile::SingleClusterRouting::cluster_id].
11371        ///
11372        /// # Example
11373        /// ```ignore,no_run
11374        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
11375        /// let x = SingleClusterRouting::new().set_cluster_id("example");
11376        /// ```
11377        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11378            self.cluster_id = v.into();
11379            self
11380        }
11381
11382        /// Sets the value of [allow_transactional_writes][crate::model::app_profile::SingleClusterRouting::allow_transactional_writes].
11383        ///
11384        /// # Example
11385        /// ```ignore,no_run
11386        /// # use google_cloud_bigtable_admin_v2::model::app_profile::SingleClusterRouting;
11387        /// let x = SingleClusterRouting::new().set_allow_transactional_writes(true);
11388        /// ```
11389        pub fn set_allow_transactional_writes<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11390            self.allow_transactional_writes = v.into();
11391            self
11392        }
11393    }
11394
11395    impl wkt::message::Message for SingleClusterRouting {
11396        fn typename() -> &'static str {
11397            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.SingleClusterRouting"
11398        }
11399    }
11400
11401    /// Standard options for isolating this app profile's traffic from other use
11402    /// cases.
11403    #[derive(Clone, Default, PartialEq)]
11404    #[non_exhaustive]
11405    pub struct StandardIsolation {
11406        /// The priority of requests sent using this app profile.
11407        pub priority: crate::model::app_profile::Priority,
11408
11409        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11410    }
11411
11412    impl StandardIsolation {
11413        /// Creates a new default instance.
11414        pub fn new() -> Self {
11415            std::default::Default::default()
11416        }
11417
11418        /// Sets the value of [priority][crate::model::app_profile::StandardIsolation::priority].
11419        ///
11420        /// # Example
11421        /// ```ignore,no_run
11422        /// # use google_cloud_bigtable_admin_v2::model::app_profile::StandardIsolation;
11423        /// use google_cloud_bigtable_admin_v2::model::app_profile::Priority;
11424        /// let x0 = StandardIsolation::new().set_priority(Priority::Low);
11425        /// let x1 = StandardIsolation::new().set_priority(Priority::Medium);
11426        /// let x2 = StandardIsolation::new().set_priority(Priority::High);
11427        /// ```
11428        pub fn set_priority<T: std::convert::Into<crate::model::app_profile::Priority>>(
11429            mut self,
11430            v: T,
11431        ) -> Self {
11432            self.priority = v.into();
11433            self
11434        }
11435    }
11436
11437    impl wkt::message::Message for StandardIsolation {
11438        fn typename() -> &'static str {
11439            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.StandardIsolation"
11440        }
11441    }
11442
11443    /// Data Boost is a serverless compute capability that lets you run
11444    /// high-throughput read jobs and queries on your Bigtable data, without
11445    /// impacting the performance of the clusters that handle your application
11446    /// traffic. Data Boost supports read-only use cases with single-cluster
11447    /// routing.
11448    #[derive(Clone, Default, PartialEq)]
11449    #[non_exhaustive]
11450    pub struct DataBoostIsolationReadOnly {
11451        /// The Compute Billing Owner for this Data Boost App Profile.
11452        pub compute_billing_owner: std::option::Option<
11453            crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11454        >,
11455
11456        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11457    }
11458
11459    impl DataBoostIsolationReadOnly {
11460        /// Creates a new default instance.
11461        pub fn new() -> Self {
11462            std::default::Default::default()
11463        }
11464
11465        /// Sets the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
11466        ///
11467        /// # Example
11468        /// ```ignore,no_run
11469        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11470        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
11471        /// let x0 = DataBoostIsolationReadOnly::new().set_compute_billing_owner(ComputeBillingOwner::HostPays);
11472        /// ```
11473        pub fn set_compute_billing_owner<T>(mut self, v: T) -> Self
11474        where
11475            T: std::convert::Into<
11476                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11477                >,
11478        {
11479            self.compute_billing_owner = std::option::Option::Some(v.into());
11480            self
11481        }
11482
11483        /// Sets or clears the value of [compute_billing_owner][crate::model::app_profile::DataBoostIsolationReadOnly::compute_billing_owner].
11484        ///
11485        /// # Example
11486        /// ```ignore,no_run
11487        /// # use google_cloud_bigtable_admin_v2::model::app_profile::DataBoostIsolationReadOnly;
11488        /// use google_cloud_bigtable_admin_v2::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner;
11489        /// let x0 = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(Some(ComputeBillingOwner::HostPays));
11490        /// let x_none = DataBoostIsolationReadOnly::new().set_or_clear_compute_billing_owner(None::<ComputeBillingOwner>);
11491        /// ```
11492        pub fn set_or_clear_compute_billing_owner<T>(mut self, v: std::option::Option<T>) -> Self
11493        where
11494            T: std::convert::Into<
11495                    crate::model::app_profile::data_boost_isolation_read_only::ComputeBillingOwner,
11496                >,
11497        {
11498            self.compute_billing_owner = v.map(|x| x.into());
11499            self
11500        }
11501    }
11502
11503    impl wkt::message::Message for DataBoostIsolationReadOnly {
11504        fn typename() -> &'static str {
11505            "type.googleapis.com/google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly"
11506        }
11507    }
11508
11509    /// Defines additional types related to [DataBoostIsolationReadOnly].
11510    pub mod data_boost_isolation_read_only {
11511        #[allow(unused_imports)]
11512        use super::*;
11513
11514        /// Compute Billing Owner specifies how usage should be accounted when using
11515        /// Data Boost. Compute Billing Owner also configures which Cloud Project is
11516        /// charged for relevant quota.
11517        ///
11518        /// # Working with unknown values
11519        ///
11520        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11521        /// additional enum variants at any time. Adding new variants is not considered
11522        /// a breaking change. Applications should write their code in anticipation of:
11523        ///
11524        /// - New values appearing in future releases of the client library, **and**
11525        /// - New values received dynamically, without application changes.
11526        ///
11527        /// Please consult the [Working with enums] section in the user guide for some
11528        /// guidelines.
11529        ///
11530        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11531        #[derive(Clone, Debug, PartialEq)]
11532        #[non_exhaustive]
11533        pub enum ComputeBillingOwner {
11534            /// Unspecified value.
11535            Unspecified,
11536            /// The host Cloud Project containing the targeted Bigtable Instance /
11537            /// Table pays for compute.
11538            HostPays,
11539            /// If set, the enum was initialized with an unknown value.
11540            ///
11541            /// Applications can examine the value using [ComputeBillingOwner::value] or
11542            /// [ComputeBillingOwner::name].
11543            UnknownValue(compute_billing_owner::UnknownValue),
11544        }
11545
11546        #[doc(hidden)]
11547        pub mod compute_billing_owner {
11548            #[allow(unused_imports)]
11549            use super::*;
11550            #[derive(Clone, Debug, PartialEq)]
11551            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11552        }
11553
11554        impl ComputeBillingOwner {
11555            /// Gets the enum value.
11556            ///
11557            /// Returns `None` if the enum contains an unknown value deserialized from
11558            /// the string representation of enums.
11559            pub fn value(&self) -> std::option::Option<i32> {
11560                match self {
11561                    Self::Unspecified => std::option::Option::Some(0),
11562                    Self::HostPays => std::option::Option::Some(1),
11563                    Self::UnknownValue(u) => u.0.value(),
11564                }
11565            }
11566
11567            /// Gets the enum value as a string.
11568            ///
11569            /// Returns `None` if the enum contains an unknown value deserialized from
11570            /// the integer representation of enums.
11571            pub fn name(&self) -> std::option::Option<&str> {
11572                match self {
11573                    Self::Unspecified => {
11574                        std::option::Option::Some("COMPUTE_BILLING_OWNER_UNSPECIFIED")
11575                    }
11576                    Self::HostPays => std::option::Option::Some("HOST_PAYS"),
11577                    Self::UnknownValue(u) => u.0.name(),
11578                }
11579            }
11580        }
11581
11582        impl std::default::Default for ComputeBillingOwner {
11583            fn default() -> Self {
11584                use std::convert::From;
11585                Self::from(0)
11586            }
11587        }
11588
11589        impl std::fmt::Display for ComputeBillingOwner {
11590            fn fmt(
11591                &self,
11592                f: &mut std::fmt::Formatter<'_>,
11593            ) -> std::result::Result<(), std::fmt::Error> {
11594                wkt::internal::display_enum(f, self.name(), self.value())
11595            }
11596        }
11597
11598        impl std::convert::From<i32> for ComputeBillingOwner {
11599            fn from(value: i32) -> Self {
11600                match value {
11601                    0 => Self::Unspecified,
11602                    1 => Self::HostPays,
11603                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
11604                        wkt::internal::UnknownEnumValue::Integer(value),
11605                    )),
11606                }
11607            }
11608        }
11609
11610        impl std::convert::From<&str> for ComputeBillingOwner {
11611            fn from(value: &str) -> Self {
11612                use std::string::ToString;
11613                match value {
11614                    "COMPUTE_BILLING_OWNER_UNSPECIFIED" => Self::Unspecified,
11615                    "HOST_PAYS" => Self::HostPays,
11616                    _ => Self::UnknownValue(compute_billing_owner::UnknownValue(
11617                        wkt::internal::UnknownEnumValue::String(value.to_string()),
11618                    )),
11619                }
11620            }
11621        }
11622
11623        impl serde::ser::Serialize for ComputeBillingOwner {
11624            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11625            where
11626                S: serde::Serializer,
11627            {
11628                match self {
11629                    Self::Unspecified => serializer.serialize_i32(0),
11630                    Self::HostPays => serializer.serialize_i32(1),
11631                    Self::UnknownValue(u) => u.0.serialize(serializer),
11632                }
11633            }
11634        }
11635
11636        impl<'de> serde::de::Deserialize<'de> for ComputeBillingOwner {
11637            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11638            where
11639                D: serde::Deserializer<'de>,
11640            {
11641                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ComputeBillingOwner>::new(
11642                    ".google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner"))
11643            }
11644        }
11645    }
11646
11647    /// Possible priorities for an app profile. Note that higher priority writes
11648    /// can sometimes queue behind lower priority writes to the same tablet, as
11649    /// writes must be strictly sequenced in the durability log.
11650    ///
11651    /// # Working with unknown values
11652    ///
11653    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11654    /// additional enum variants at any time. Adding new variants is not considered
11655    /// a breaking change. Applications should write their code in anticipation of:
11656    ///
11657    /// - New values appearing in future releases of the client library, **and**
11658    /// - New values received dynamically, without application changes.
11659    ///
11660    /// Please consult the [Working with enums] section in the user guide for some
11661    /// guidelines.
11662    ///
11663    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11664    #[derive(Clone, Debug, PartialEq)]
11665    #[non_exhaustive]
11666    pub enum Priority {
11667        /// Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation.
11668        Unspecified,
11669        #[allow(missing_docs)]
11670        Low,
11671        #[allow(missing_docs)]
11672        Medium,
11673        #[allow(missing_docs)]
11674        High,
11675        /// If set, the enum was initialized with an unknown value.
11676        ///
11677        /// Applications can examine the value using [Priority::value] or
11678        /// [Priority::name].
11679        UnknownValue(priority::UnknownValue),
11680    }
11681
11682    #[doc(hidden)]
11683    pub mod priority {
11684        #[allow(unused_imports)]
11685        use super::*;
11686        #[derive(Clone, Debug, PartialEq)]
11687        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11688    }
11689
11690    impl Priority {
11691        /// Gets the enum value.
11692        ///
11693        /// Returns `None` if the enum contains an unknown value deserialized from
11694        /// the string representation of enums.
11695        pub fn value(&self) -> std::option::Option<i32> {
11696            match self {
11697                Self::Unspecified => std::option::Option::Some(0),
11698                Self::Low => std::option::Option::Some(1),
11699                Self::Medium => std::option::Option::Some(2),
11700                Self::High => std::option::Option::Some(3),
11701                Self::UnknownValue(u) => u.0.value(),
11702            }
11703        }
11704
11705        /// Gets the enum value as a string.
11706        ///
11707        /// Returns `None` if the enum contains an unknown value deserialized from
11708        /// the integer representation of enums.
11709        pub fn name(&self) -> std::option::Option<&str> {
11710            match self {
11711                Self::Unspecified => std::option::Option::Some("PRIORITY_UNSPECIFIED"),
11712                Self::Low => std::option::Option::Some("PRIORITY_LOW"),
11713                Self::Medium => std::option::Option::Some("PRIORITY_MEDIUM"),
11714                Self::High => std::option::Option::Some("PRIORITY_HIGH"),
11715                Self::UnknownValue(u) => u.0.name(),
11716            }
11717        }
11718    }
11719
11720    impl std::default::Default for Priority {
11721        fn default() -> Self {
11722            use std::convert::From;
11723            Self::from(0)
11724        }
11725    }
11726
11727    impl std::fmt::Display for Priority {
11728        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11729            wkt::internal::display_enum(f, self.name(), self.value())
11730        }
11731    }
11732
11733    impl std::convert::From<i32> for Priority {
11734        fn from(value: i32) -> Self {
11735            match value {
11736                0 => Self::Unspecified,
11737                1 => Self::Low,
11738                2 => Self::Medium,
11739                3 => Self::High,
11740                _ => Self::UnknownValue(priority::UnknownValue(
11741                    wkt::internal::UnknownEnumValue::Integer(value),
11742                )),
11743            }
11744        }
11745    }
11746
11747    impl std::convert::From<&str> for Priority {
11748        fn from(value: &str) -> Self {
11749            use std::string::ToString;
11750            match value {
11751                "PRIORITY_UNSPECIFIED" => Self::Unspecified,
11752                "PRIORITY_LOW" => Self::Low,
11753                "PRIORITY_MEDIUM" => Self::Medium,
11754                "PRIORITY_HIGH" => Self::High,
11755                _ => Self::UnknownValue(priority::UnknownValue(
11756                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11757                )),
11758            }
11759        }
11760    }
11761
11762    impl serde::ser::Serialize for Priority {
11763        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11764        where
11765            S: serde::Serializer,
11766        {
11767            match self {
11768                Self::Unspecified => serializer.serialize_i32(0),
11769                Self::Low => serializer.serialize_i32(1),
11770                Self::Medium => serializer.serialize_i32(2),
11771                Self::High => serializer.serialize_i32(3),
11772                Self::UnknownValue(u) => u.0.serialize(serializer),
11773            }
11774        }
11775    }
11776
11777    impl<'de> serde::de::Deserialize<'de> for Priority {
11778        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11779        where
11780            D: serde::Deserializer<'de>,
11781        {
11782            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Priority>::new(
11783                ".google.bigtable.admin.v2.AppProfile.Priority",
11784            ))
11785        }
11786    }
11787
11788    /// The routing policy for all read/write requests that use this app profile.
11789    /// A value must be explicitly set.
11790    #[derive(Clone, Debug, PartialEq)]
11791    #[non_exhaustive]
11792    pub enum RoutingPolicy {
11793        /// Use a multi-cluster routing policy.
11794        MultiClusterRoutingUseAny(
11795            std::boxed::Box<crate::model::app_profile::MultiClusterRoutingUseAny>,
11796        ),
11797        /// Use a single-cluster routing policy.
11798        SingleClusterRouting(std::boxed::Box<crate::model::app_profile::SingleClusterRouting>),
11799    }
11800
11801    /// Options for isolating this app profile's traffic from other use cases.
11802    #[derive(Clone, Debug, PartialEq)]
11803    #[non_exhaustive]
11804    pub enum Isolation {
11805        /// This field has been deprecated in favor of `standard_isolation.priority`.
11806        /// If you set this field, `standard_isolation.priority` will be set instead.
11807        ///
11808        /// The priority of requests sent using this app profile.
11809        #[deprecated]
11810        Priority(crate::model::app_profile::Priority),
11811        /// The standard options used for isolating this app profile's traffic from
11812        /// other use cases.
11813        StandardIsolation(std::boxed::Box<crate::model::app_profile::StandardIsolation>),
11814        /// Specifies that this app profile is intended for read-only usage via the
11815        /// Data Boost feature.
11816        DataBoostIsolationReadOnly(
11817            std::boxed::Box<crate::model::app_profile::DataBoostIsolationReadOnly>,
11818        ),
11819    }
11820}
11821
11822/// A tablet is a defined by a start and end key and is explained in
11823/// <https://cloud.google.com/bigtable/docs/overview#architecture> and
11824/// <https://cloud.google.com/bigtable/docs/performance#optimization>.
11825/// A Hot tablet is a tablet that exhibits high average cpu usage during the time
11826/// interval from start time to end time.
11827#[derive(Clone, Default, PartialEq)]
11828#[non_exhaustive]
11829pub struct HotTablet {
11830    /// The unique name of the hot tablet. Values are of the form
11831    /// `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`.
11832    pub name: std::string::String,
11833
11834    /// Name of the table that contains the tablet. Values are of the form
11835    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
11836    pub table_name: std::string::String,
11837
11838    /// Output only. The start time of the hot tablet.
11839    pub start_time: std::option::Option<wkt::Timestamp>,
11840
11841    /// Output only. The end time of the hot tablet.
11842    pub end_time: std::option::Option<wkt::Timestamp>,
11843
11844    /// Tablet Start Key (inclusive).
11845    pub start_key: std::string::String,
11846
11847    /// Tablet End Key (inclusive).
11848    pub end_key: std::string::String,
11849
11850    /// Output only. The average CPU usage spent by a node on this tablet over the
11851    /// start_time to end_time time range. The percentage is the amount of CPU used
11852    /// by the node to serve the tablet, from 0% (tablet was not interacted with)
11853    /// to 100% (the node spent all cycles serving the hot tablet).
11854    pub node_cpu_usage_percent: f32,
11855
11856    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11857}
11858
11859impl HotTablet {
11860    /// Creates a new default instance.
11861    pub fn new() -> Self {
11862        std::default::Default::default()
11863    }
11864
11865    /// Sets the value of [name][crate::model::HotTablet::name].
11866    ///
11867    /// # Example
11868    /// ```ignore,no_run
11869    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11870    /// # let project_id = "project_id";
11871    /// # let instance_id = "instance_id";
11872    /// # let cluster_id = "cluster_id";
11873    /// # let hot_tablet_id = "hot_tablet_id";
11874    /// let x = HotTablet::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/hotTablets/{hot_tablet_id}"));
11875    /// ```
11876    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11877        self.name = v.into();
11878        self
11879    }
11880
11881    /// Sets the value of [table_name][crate::model::HotTablet::table_name].
11882    ///
11883    /// # Example
11884    /// ```ignore,no_run
11885    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11886    /// # let project_id = "project_id";
11887    /// # let instance_id = "instance_id";
11888    /// # let table_id = "table_id";
11889    /// let x = HotTablet::new().set_table_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
11890    /// ```
11891    pub fn set_table_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11892        self.table_name = v.into();
11893        self
11894    }
11895
11896    /// Sets the value of [start_time][crate::model::HotTablet::start_time].
11897    ///
11898    /// # Example
11899    /// ```ignore,no_run
11900    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11901    /// use wkt::Timestamp;
11902    /// let x = HotTablet::new().set_start_time(Timestamp::default()/* use setters */);
11903    /// ```
11904    pub fn set_start_time<T>(mut self, v: T) -> Self
11905    where
11906        T: std::convert::Into<wkt::Timestamp>,
11907    {
11908        self.start_time = std::option::Option::Some(v.into());
11909        self
11910    }
11911
11912    /// Sets or clears the value of [start_time][crate::model::HotTablet::start_time].
11913    ///
11914    /// # Example
11915    /// ```ignore,no_run
11916    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11917    /// use wkt::Timestamp;
11918    /// let x = HotTablet::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
11919    /// let x = HotTablet::new().set_or_clear_start_time(None::<Timestamp>);
11920    /// ```
11921    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
11922    where
11923        T: std::convert::Into<wkt::Timestamp>,
11924    {
11925        self.start_time = v.map(|x| x.into());
11926        self
11927    }
11928
11929    /// Sets the value of [end_time][crate::model::HotTablet::end_time].
11930    ///
11931    /// # Example
11932    /// ```ignore,no_run
11933    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11934    /// use wkt::Timestamp;
11935    /// let x = HotTablet::new().set_end_time(Timestamp::default()/* use setters */);
11936    /// ```
11937    pub fn set_end_time<T>(mut self, v: T) -> Self
11938    where
11939        T: std::convert::Into<wkt::Timestamp>,
11940    {
11941        self.end_time = std::option::Option::Some(v.into());
11942        self
11943    }
11944
11945    /// Sets or clears the value of [end_time][crate::model::HotTablet::end_time].
11946    ///
11947    /// # Example
11948    /// ```ignore,no_run
11949    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11950    /// use wkt::Timestamp;
11951    /// let x = HotTablet::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
11952    /// let x = HotTablet::new().set_or_clear_end_time(None::<Timestamp>);
11953    /// ```
11954    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
11955    where
11956        T: std::convert::Into<wkt::Timestamp>,
11957    {
11958        self.end_time = v.map(|x| x.into());
11959        self
11960    }
11961
11962    /// Sets the value of [start_key][crate::model::HotTablet::start_key].
11963    ///
11964    /// # Example
11965    /// ```ignore,no_run
11966    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11967    /// let x = HotTablet::new().set_start_key("example");
11968    /// ```
11969    pub fn set_start_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11970        self.start_key = v.into();
11971        self
11972    }
11973
11974    /// Sets the value of [end_key][crate::model::HotTablet::end_key].
11975    ///
11976    /// # Example
11977    /// ```ignore,no_run
11978    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11979    /// let x = HotTablet::new().set_end_key("example");
11980    /// ```
11981    pub fn set_end_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11982        self.end_key = v.into();
11983        self
11984    }
11985
11986    /// Sets the value of [node_cpu_usage_percent][crate::model::HotTablet::node_cpu_usage_percent].
11987    ///
11988    /// # Example
11989    /// ```ignore,no_run
11990    /// # use google_cloud_bigtable_admin_v2::model::HotTablet;
11991    /// let x = HotTablet::new().set_node_cpu_usage_percent(42.0);
11992    /// ```
11993    pub fn set_node_cpu_usage_percent<T: std::convert::Into<f32>>(mut self, v: T) -> Self {
11994        self.node_cpu_usage_percent = v.into();
11995        self
11996    }
11997}
11998
11999impl wkt::message::Message for HotTablet {
12000    fn typename() -> &'static str {
12001        "type.googleapis.com/google.bigtable.admin.v2.HotTablet"
12002    }
12003}
12004
12005/// A SQL logical view object that can be referenced in SQL queries.
12006#[derive(Clone, Default, PartialEq)]
12007#[non_exhaustive]
12008pub struct LogicalView {
12009    /// Identifier. The unique name of the logical view.
12010    /// Format:
12011    /// `projects/{project}/instances/{instance}/logicalViews/{logical_view}`
12012    pub name: std::string::String,
12013
12014    /// Required. The logical view's select query.
12015    pub query: std::string::String,
12016
12017    /// Optional. The etag for this logical view.
12018    /// This may be sent on update requests to ensure that the client has an
12019    /// up-to-date value before proceeding. The server returns an ABORTED error on
12020    /// a mismatched etag.
12021    pub etag: std::string::String,
12022
12023    /// Optional. Set to true to make the LogicalView protected against deletion.
12024    pub deletion_protection: bool,
12025
12026    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12027}
12028
12029impl LogicalView {
12030    /// Creates a new default instance.
12031    pub fn new() -> Self {
12032        std::default::Default::default()
12033    }
12034
12035    /// Sets the value of [name][crate::model::LogicalView::name].
12036    ///
12037    /// # Example
12038    /// ```ignore,no_run
12039    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12040    /// # let project_id = "project_id";
12041    /// # let instance_id = "instance_id";
12042    /// # let logical_view_id = "logical_view_id";
12043    /// let x = LogicalView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/logicalViews/{logical_view_id}"));
12044    /// ```
12045    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12046        self.name = v.into();
12047        self
12048    }
12049
12050    /// Sets the value of [query][crate::model::LogicalView::query].
12051    ///
12052    /// # Example
12053    /// ```ignore,no_run
12054    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12055    /// let x = LogicalView::new().set_query("example");
12056    /// ```
12057    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12058        self.query = v.into();
12059        self
12060    }
12061
12062    /// Sets the value of [etag][crate::model::LogicalView::etag].
12063    ///
12064    /// # Example
12065    /// ```ignore,no_run
12066    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12067    /// let x = LogicalView::new().set_etag("example");
12068    /// ```
12069    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12070        self.etag = v.into();
12071        self
12072    }
12073
12074    /// Sets the value of [deletion_protection][crate::model::LogicalView::deletion_protection].
12075    ///
12076    /// # Example
12077    /// ```ignore,no_run
12078    /// # use google_cloud_bigtable_admin_v2::model::LogicalView;
12079    /// let x = LogicalView::new().set_deletion_protection(true);
12080    /// ```
12081    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12082        self.deletion_protection = v.into();
12083        self
12084    }
12085}
12086
12087impl wkt::message::Message for LogicalView {
12088    fn typename() -> &'static str {
12089        "type.googleapis.com/google.bigtable.admin.v2.LogicalView"
12090    }
12091}
12092
12093/// A materialized view object that can be referenced in SQL queries.
12094#[derive(Clone, Default, PartialEq)]
12095#[non_exhaustive]
12096pub struct MaterializedView {
12097    /// Identifier. The unique name of the materialized view.
12098    /// Format:
12099    /// `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`
12100    pub name: std::string::String,
12101
12102    /// Required. Immutable. The materialized view's select query.
12103    pub query: std::string::String,
12104
12105    /// Optional. The etag for this materialized view.
12106    /// This may be sent on update requests to ensure that the client has an
12107    /// up-to-date value before proceeding. The server returns an ABORTED error on
12108    /// a mismatched etag.
12109    pub etag: std::string::String,
12110
12111    /// Set to true to make the MaterializedView protected against deletion.
12112    pub deletion_protection: bool,
12113
12114    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12115}
12116
12117impl MaterializedView {
12118    /// Creates a new default instance.
12119    pub fn new() -> Self {
12120        std::default::Default::default()
12121    }
12122
12123    /// Sets the value of [name][crate::model::MaterializedView::name].
12124    ///
12125    /// # Example
12126    /// ```ignore,no_run
12127    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12128    /// # let project_id = "project_id";
12129    /// # let instance_id = "instance_id";
12130    /// # let materialized_view_id = "materialized_view_id";
12131    /// let x = MaterializedView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/materializedViews/{materialized_view_id}"));
12132    /// ```
12133    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12134        self.name = v.into();
12135        self
12136    }
12137
12138    /// Sets the value of [query][crate::model::MaterializedView::query].
12139    ///
12140    /// # Example
12141    /// ```ignore,no_run
12142    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12143    /// let x = MaterializedView::new().set_query("example");
12144    /// ```
12145    pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12146        self.query = v.into();
12147        self
12148    }
12149
12150    /// Sets the value of [etag][crate::model::MaterializedView::etag].
12151    ///
12152    /// # Example
12153    /// ```ignore,no_run
12154    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12155    /// let x = MaterializedView::new().set_etag("example");
12156    /// ```
12157    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12158        self.etag = v.into();
12159        self
12160    }
12161
12162    /// Sets the value of [deletion_protection][crate::model::MaterializedView::deletion_protection].
12163    ///
12164    /// # Example
12165    /// ```ignore,no_run
12166    /// # use google_cloud_bigtable_admin_v2::model::MaterializedView;
12167    /// let x = MaterializedView::new().set_deletion_protection(true);
12168    /// ```
12169    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12170        self.deletion_protection = v.into();
12171        self
12172    }
12173}
12174
12175impl wkt::message::Message for MaterializedView {
12176    fn typename() -> &'static str {
12177        "type.googleapis.com/google.bigtable.admin.v2.MaterializedView"
12178    }
12179}
12180
12181/// Information about a table restore.
12182#[derive(Clone, Default, PartialEq)]
12183#[non_exhaustive]
12184pub struct RestoreInfo {
12185    /// The type of the restore source.
12186    pub source_type: crate::model::RestoreSourceType,
12187
12188    /// Information about the source used to restore the table.
12189    pub source_info: std::option::Option<crate::model::restore_info::SourceInfo>,
12190
12191    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12192}
12193
12194impl RestoreInfo {
12195    /// Creates a new default instance.
12196    pub fn new() -> Self {
12197        std::default::Default::default()
12198    }
12199
12200    /// Sets the value of [source_type][crate::model::RestoreInfo::source_type].
12201    ///
12202    /// # Example
12203    /// ```ignore,no_run
12204    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12205    /// use google_cloud_bigtable_admin_v2::model::RestoreSourceType;
12206    /// let x0 = RestoreInfo::new().set_source_type(RestoreSourceType::Backup);
12207    /// ```
12208    pub fn set_source_type<T: std::convert::Into<crate::model::RestoreSourceType>>(
12209        mut self,
12210        v: T,
12211    ) -> Self {
12212        self.source_type = v.into();
12213        self
12214    }
12215
12216    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info].
12217    ///
12218    /// Note that all the setters affecting `source_info` are mutually
12219    /// exclusive.
12220    ///
12221    /// # Example
12222    /// ```ignore,no_run
12223    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12224    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
12225    /// let x = RestoreInfo::new().set_source_info(Some(
12226    ///     google_cloud_bigtable_admin_v2::model::restore_info::SourceInfo::BackupInfo(BackupInfo::default().into())));
12227    /// ```
12228    pub fn set_source_info<
12229        T: std::convert::Into<std::option::Option<crate::model::restore_info::SourceInfo>>,
12230    >(
12231        mut self,
12232        v: T,
12233    ) -> Self {
12234        self.source_info = v.into();
12235        self
12236    }
12237
12238    /// The value of [source_info][crate::model::RestoreInfo::source_info]
12239    /// if it holds a `BackupInfo`, `None` if the field is not set or
12240    /// holds a different branch.
12241    pub fn backup_info(&self) -> std::option::Option<&std::boxed::Box<crate::model::BackupInfo>> {
12242        #[allow(unreachable_patterns)]
12243        self.source_info.as_ref().and_then(|v| match v {
12244            crate::model::restore_info::SourceInfo::BackupInfo(v) => std::option::Option::Some(v),
12245            _ => std::option::Option::None,
12246        })
12247    }
12248
12249    /// Sets the value of [source_info][crate::model::RestoreInfo::source_info]
12250    /// to hold a `BackupInfo`.
12251    ///
12252    /// Note that all the setters affecting `source_info` are
12253    /// mutually exclusive.
12254    ///
12255    /// # Example
12256    /// ```ignore,no_run
12257    /// # use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12258    /// use google_cloud_bigtable_admin_v2::model::BackupInfo;
12259    /// let x = RestoreInfo::new().set_backup_info(BackupInfo::default()/* use setters */);
12260    /// assert!(x.backup_info().is_some());
12261    /// ```
12262    pub fn set_backup_info<T: std::convert::Into<std::boxed::Box<crate::model::BackupInfo>>>(
12263        mut self,
12264        v: T,
12265    ) -> Self {
12266        self.source_info =
12267            std::option::Option::Some(crate::model::restore_info::SourceInfo::BackupInfo(v.into()));
12268        self
12269    }
12270}
12271
12272impl wkt::message::Message for RestoreInfo {
12273    fn typename() -> &'static str {
12274        "type.googleapis.com/google.bigtable.admin.v2.RestoreInfo"
12275    }
12276}
12277
12278/// Defines additional types related to [RestoreInfo].
12279pub mod restore_info {
12280    #[allow(unused_imports)]
12281    use super::*;
12282
12283    /// Information about the source used to restore the table.
12284    #[derive(Clone, Debug, PartialEq)]
12285    #[non_exhaustive]
12286    pub enum SourceInfo {
12287        /// Information about the backup used to restore the table. The backup
12288        /// may no longer exist.
12289        BackupInfo(std::boxed::Box<crate::model::BackupInfo>),
12290    }
12291}
12292
12293/// Change stream configuration.
12294#[derive(Clone, Default, PartialEq)]
12295#[non_exhaustive]
12296pub struct ChangeStreamConfig {
12297    /// How long the change stream should be retained. Change stream data older
12298    /// than the retention period will not be returned when reading the change
12299    /// stream from the table.
12300    /// Values must be at least 1 day and at most 7 days, and will be truncated to
12301    /// microsecond granularity.
12302    pub retention_period: std::option::Option<wkt::Duration>,
12303
12304    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12305}
12306
12307impl ChangeStreamConfig {
12308    /// Creates a new default instance.
12309    pub fn new() -> Self {
12310        std::default::Default::default()
12311    }
12312
12313    /// Sets the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
12314    ///
12315    /// # Example
12316    /// ```ignore,no_run
12317    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12318    /// use wkt::Duration;
12319    /// let x = ChangeStreamConfig::new().set_retention_period(Duration::default()/* use setters */);
12320    /// ```
12321    pub fn set_retention_period<T>(mut self, v: T) -> Self
12322    where
12323        T: std::convert::Into<wkt::Duration>,
12324    {
12325        self.retention_period = std::option::Option::Some(v.into());
12326        self
12327    }
12328
12329    /// Sets or clears the value of [retention_period][crate::model::ChangeStreamConfig::retention_period].
12330    ///
12331    /// # Example
12332    /// ```ignore,no_run
12333    /// # use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12334    /// use wkt::Duration;
12335    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
12336    /// let x = ChangeStreamConfig::new().set_or_clear_retention_period(None::<Duration>);
12337    /// ```
12338    pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
12339    where
12340        T: std::convert::Into<wkt::Duration>,
12341    {
12342        self.retention_period = v.map(|x| x.into());
12343        self
12344    }
12345}
12346
12347impl wkt::message::Message for ChangeStreamConfig {
12348    fn typename() -> &'static str {
12349        "type.googleapis.com/google.bigtable.admin.v2.ChangeStreamConfig"
12350    }
12351}
12352
12353/// A collection of user data indexed by row, column, and timestamp.
12354/// Each table is served using the resources of its parent cluster.
12355#[derive(Clone, Default, PartialEq)]
12356#[non_exhaustive]
12357pub struct Table {
12358    /// The unique name of the table. Values are of the form
12359    /// `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
12360    /// Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
12361    pub name: std::string::String,
12362
12363    /// Output only. Map from cluster ID to per-cluster table state.
12364    /// If it could not be determined whether or not the table has data in a
12365    /// particular cluster (for example, if its zone is unavailable), then
12366    /// there will be an entry for the cluster with UNKNOWN `replication_status`.
12367    /// Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
12368    pub cluster_states:
12369        std::collections::HashMap<std::string::String, crate::model::table::ClusterState>,
12370
12371    /// The column families configured for this table, mapped by column family ID.
12372    /// Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL`
12373    pub column_families: std::collections::HashMap<std::string::String, crate::model::ColumnFamily>,
12374
12375    /// Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored
12376    /// in this table. Timestamps not matching the granularity will be rejected. If
12377    /// unspecified at creation time, the value will be set to `MILLIS`. Views:
12378    /// `SCHEMA_VIEW`, `FULL`.
12379    pub granularity: crate::model::table::TimestampGranularity,
12380
12381    /// Output only. If this table was restored from another data source (e.g. a
12382    /// backup), this field will be populated with information about the restore.
12383    pub restore_info: std::option::Option<crate::model::RestoreInfo>,
12384
12385    /// If specified, enable the change stream on this table.
12386    /// Otherwise, the change stream is disabled and the change stream is not
12387    /// retained.
12388    pub change_stream_config: std::option::Option<crate::model::ChangeStreamConfig>,
12389
12390    /// Set to true to make the table protected against data loss. i.e. deleting
12391    /// the following resources through Admin APIs are prohibited:
12392    ///
12393    /// * The table.
12394    /// * The column families in the table.
12395    /// * The instance containing the table.
12396    ///
12397    /// Note one can still delete the data stored in the table through Data APIs.
12398    pub deletion_protection: bool,
12399
12400    /// Rules to specify what data is stored in each storage tier.
12401    /// Different tiers store data differently, providing different trade-offs
12402    /// between cost and performance. Different parts of a table can be stored
12403    /// separately on different tiers.
12404    /// If a config is specified, tiered storage is enabled for this table.
12405    /// Otherwise, tiered storage is disabled.
12406    /// Only SSD instances can configure tiered storage.
12407    pub tiered_storage_config: std::option::Option<crate::model::TieredStorageConfig>,
12408
12409    /// The row key schema for this table. The schema is used to decode the raw row
12410    /// key bytes into a structured format. The order of field declarations in this
12411    /// schema is important, as it reflects how the raw row key bytes are
12412    /// structured. Currently, this only affects how the key is read via a
12413    /// GoogleSQL query from the ExecuteQuery API.
12414    ///
12415    /// For a SQL query, the _key column is still read as raw bytes. But queries
12416    /// can reference the key fields by name, which will be decoded from _key using
12417    /// provided type and encoding. Queries that reference key fields will fail if
12418    /// they encounter an invalid row key.
12419    ///
12420    /// For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the
12421    /// following schema:
12422    /// {
12423    /// fields {
12424    /// field_name: "id"
12425    /// type { string { encoding: utf8_bytes {} } }
12426    /// }
12427    /// fields {
12428    /// field_name: "date"
12429    /// type { string { encoding: utf8_bytes {} } }
12430    /// }
12431    /// fields {
12432    /// field_name: "product_code"
12433    /// type { int64 { encoding: big_endian_bytes {} } }
12434    /// }
12435    /// encoding { delimited_bytes { delimiter: "#" } }
12436    /// }
12437    ///
12438    /// The decoded key parts would be:
12439    /// id = "some_id", date = "2024-04-30", product_code = 1245427
12440    /// The query "SELECT _key, product_code FROM table" will return two columns:
12441    /// /------------------------------------------------------\
12442    /// |              _key                     | product_code |
12443    /// | --------------------------------------|--------------|
12444    /// | "some_id#2024-04-30#\x00\x13\x00\xf3" |   1245427    |
12445    /// \------------------------------------------------------/
12446    ///
12447    /// The schema has the following invariants:
12448    /// (1) The decoded field values are order-preserved. For read, the field
12449    /// values will be decoded in sorted mode from the raw bytes.
12450    /// (2) Every field in the schema must specify a non-empty name.
12451    /// (3) Every field must specify a type with an associated encoding. The type
12452    /// is limited to scalar types only: Array, Map, Aggregate, and Struct are not
12453    /// allowed.
12454    /// (4) The field names must not collide with existing column family
12455    /// names and reserved keywords "_key" and "_timestamp".
12456    ///
12457    /// The following update operations are allowed for row_key_schema:
12458    ///
12459    /// - Update from an empty schema to a new schema.
12460    /// - Remove the existing schema. This operation requires setting the
12461    ///   `ignore_warnings` flag to `true`, since it might be a backward
12462    ///   incompatible change. Without the flag, the update request will fail with
12463    ///   an INVALID_ARGUMENT error.
12464    ///   Any other row key schema update operation (e.g. update existing schema
12465    ///   columns names or types) is currently unsupported.
12466    pub row_key_schema: std::option::Option<crate::model::r#type::Struct>,
12467
12468    #[allow(missing_docs)]
12469    pub automated_backup_config: std::option::Option<crate::model::table::AutomatedBackupConfig>,
12470
12471    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12472}
12473
12474impl Table {
12475    /// Creates a new default instance.
12476    pub fn new() -> Self {
12477        std::default::Default::default()
12478    }
12479
12480    /// Sets the value of [name][crate::model::Table::name].
12481    ///
12482    /// # Example
12483    /// ```ignore,no_run
12484    /// # use google_cloud_bigtable_admin_v2::model::Table;
12485    /// # let project_id = "project_id";
12486    /// # let instance_id = "instance_id";
12487    /// # let table_id = "table_id";
12488    /// let x = Table::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}"));
12489    /// ```
12490    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12491        self.name = v.into();
12492        self
12493    }
12494
12495    /// Sets the value of [cluster_states][crate::model::Table::cluster_states].
12496    ///
12497    /// # Example
12498    /// ```ignore,no_run
12499    /// # use google_cloud_bigtable_admin_v2::model::Table;
12500    /// use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12501    /// let x = Table::new().set_cluster_states([
12502    ///     ("key0", ClusterState::default()/* use setters */),
12503    ///     ("key1", ClusterState::default()/* use (different) setters */),
12504    /// ]);
12505    /// ```
12506    pub fn set_cluster_states<T, K, V>(mut self, v: T) -> Self
12507    where
12508        T: std::iter::IntoIterator<Item = (K, V)>,
12509        K: std::convert::Into<std::string::String>,
12510        V: std::convert::Into<crate::model::table::ClusterState>,
12511    {
12512        use std::iter::Iterator;
12513        self.cluster_states = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12514        self
12515    }
12516
12517    /// Sets the value of [column_families][crate::model::Table::column_families].
12518    ///
12519    /// # Example
12520    /// ```ignore,no_run
12521    /// # use google_cloud_bigtable_admin_v2::model::Table;
12522    /// use google_cloud_bigtable_admin_v2::model::ColumnFamily;
12523    /// let x = Table::new().set_column_families([
12524    ///     ("key0", ColumnFamily::default()/* use setters */),
12525    ///     ("key1", ColumnFamily::default()/* use (different) setters */),
12526    /// ]);
12527    /// ```
12528    pub fn set_column_families<T, K, V>(mut self, v: T) -> Self
12529    where
12530        T: std::iter::IntoIterator<Item = (K, V)>,
12531        K: std::convert::Into<std::string::String>,
12532        V: std::convert::Into<crate::model::ColumnFamily>,
12533    {
12534        use std::iter::Iterator;
12535        self.column_families = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
12536        self
12537    }
12538
12539    /// Sets the value of [granularity][crate::model::Table::granularity].
12540    ///
12541    /// # Example
12542    /// ```ignore,no_run
12543    /// # use google_cloud_bigtable_admin_v2::model::Table;
12544    /// use google_cloud_bigtable_admin_v2::model::table::TimestampGranularity;
12545    /// let x0 = Table::new().set_granularity(TimestampGranularity::Millis);
12546    /// ```
12547    pub fn set_granularity<T: std::convert::Into<crate::model::table::TimestampGranularity>>(
12548        mut self,
12549        v: T,
12550    ) -> Self {
12551        self.granularity = v.into();
12552        self
12553    }
12554
12555    /// Sets the value of [restore_info][crate::model::Table::restore_info].
12556    ///
12557    /// # Example
12558    /// ```ignore,no_run
12559    /// # use google_cloud_bigtable_admin_v2::model::Table;
12560    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12561    /// let x = Table::new().set_restore_info(RestoreInfo::default()/* use setters */);
12562    /// ```
12563    pub fn set_restore_info<T>(mut self, v: T) -> Self
12564    where
12565        T: std::convert::Into<crate::model::RestoreInfo>,
12566    {
12567        self.restore_info = std::option::Option::Some(v.into());
12568        self
12569    }
12570
12571    /// Sets or clears the value of [restore_info][crate::model::Table::restore_info].
12572    ///
12573    /// # Example
12574    /// ```ignore,no_run
12575    /// # use google_cloud_bigtable_admin_v2::model::Table;
12576    /// use google_cloud_bigtable_admin_v2::model::RestoreInfo;
12577    /// let x = Table::new().set_or_clear_restore_info(Some(RestoreInfo::default()/* use setters */));
12578    /// let x = Table::new().set_or_clear_restore_info(None::<RestoreInfo>);
12579    /// ```
12580    pub fn set_or_clear_restore_info<T>(mut self, v: std::option::Option<T>) -> Self
12581    where
12582        T: std::convert::Into<crate::model::RestoreInfo>,
12583    {
12584        self.restore_info = v.map(|x| x.into());
12585        self
12586    }
12587
12588    /// Sets the value of [change_stream_config][crate::model::Table::change_stream_config].
12589    ///
12590    /// # Example
12591    /// ```ignore,no_run
12592    /// # use google_cloud_bigtable_admin_v2::model::Table;
12593    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12594    /// let x = Table::new().set_change_stream_config(ChangeStreamConfig::default()/* use setters */);
12595    /// ```
12596    pub fn set_change_stream_config<T>(mut self, v: T) -> Self
12597    where
12598        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12599    {
12600        self.change_stream_config = std::option::Option::Some(v.into());
12601        self
12602    }
12603
12604    /// Sets or clears the value of [change_stream_config][crate::model::Table::change_stream_config].
12605    ///
12606    /// # Example
12607    /// ```ignore,no_run
12608    /// # use google_cloud_bigtable_admin_v2::model::Table;
12609    /// use google_cloud_bigtable_admin_v2::model::ChangeStreamConfig;
12610    /// let x = Table::new().set_or_clear_change_stream_config(Some(ChangeStreamConfig::default()/* use setters */));
12611    /// let x = Table::new().set_or_clear_change_stream_config(None::<ChangeStreamConfig>);
12612    /// ```
12613    pub fn set_or_clear_change_stream_config<T>(mut self, v: std::option::Option<T>) -> Self
12614    where
12615        T: std::convert::Into<crate::model::ChangeStreamConfig>,
12616    {
12617        self.change_stream_config = v.map(|x| x.into());
12618        self
12619    }
12620
12621    /// Sets the value of [deletion_protection][crate::model::Table::deletion_protection].
12622    ///
12623    /// # Example
12624    /// ```ignore,no_run
12625    /// # use google_cloud_bigtable_admin_v2::model::Table;
12626    /// let x = Table::new().set_deletion_protection(true);
12627    /// ```
12628    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12629        self.deletion_protection = v.into();
12630        self
12631    }
12632
12633    /// Sets the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
12634    ///
12635    /// # Example
12636    /// ```ignore,no_run
12637    /// # use google_cloud_bigtable_admin_v2::model::Table;
12638    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
12639    /// let x = Table::new().set_tiered_storage_config(TieredStorageConfig::default()/* use setters */);
12640    /// ```
12641    pub fn set_tiered_storage_config<T>(mut self, v: T) -> Self
12642    where
12643        T: std::convert::Into<crate::model::TieredStorageConfig>,
12644    {
12645        self.tiered_storage_config = std::option::Option::Some(v.into());
12646        self
12647    }
12648
12649    /// Sets or clears the value of [tiered_storage_config][crate::model::Table::tiered_storage_config].
12650    ///
12651    /// # Example
12652    /// ```ignore,no_run
12653    /// # use google_cloud_bigtable_admin_v2::model::Table;
12654    /// use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
12655    /// let x = Table::new().set_or_clear_tiered_storage_config(Some(TieredStorageConfig::default()/* use setters */));
12656    /// let x = Table::new().set_or_clear_tiered_storage_config(None::<TieredStorageConfig>);
12657    /// ```
12658    pub fn set_or_clear_tiered_storage_config<T>(mut self, v: std::option::Option<T>) -> Self
12659    where
12660        T: std::convert::Into<crate::model::TieredStorageConfig>,
12661    {
12662        self.tiered_storage_config = v.map(|x| x.into());
12663        self
12664    }
12665
12666    /// Sets the value of [row_key_schema][crate::model::Table::row_key_schema].
12667    ///
12668    /// # Example
12669    /// ```ignore,no_run
12670    /// # use google_cloud_bigtable_admin_v2::model::Table;
12671    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12672    /// let x = Table::new().set_row_key_schema(Struct::default()/* use setters */);
12673    /// ```
12674    pub fn set_row_key_schema<T>(mut self, v: T) -> Self
12675    where
12676        T: std::convert::Into<crate::model::r#type::Struct>,
12677    {
12678        self.row_key_schema = std::option::Option::Some(v.into());
12679        self
12680    }
12681
12682    /// Sets or clears the value of [row_key_schema][crate::model::Table::row_key_schema].
12683    ///
12684    /// # Example
12685    /// ```ignore,no_run
12686    /// # use google_cloud_bigtable_admin_v2::model::Table;
12687    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
12688    /// let x = Table::new().set_or_clear_row_key_schema(Some(Struct::default()/* use setters */));
12689    /// let x = Table::new().set_or_clear_row_key_schema(None::<Struct>);
12690    /// ```
12691    pub fn set_or_clear_row_key_schema<T>(mut self, v: std::option::Option<T>) -> Self
12692    where
12693        T: std::convert::Into<crate::model::r#type::Struct>,
12694    {
12695        self.row_key_schema = v.map(|x| x.into());
12696        self
12697    }
12698
12699    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config].
12700    ///
12701    /// Note that all the setters affecting `automated_backup_config` are mutually
12702    /// exclusive.
12703    ///
12704    /// # Example
12705    /// ```ignore,no_run
12706    /// # use google_cloud_bigtable_admin_v2::model::Table;
12707    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12708    /// let x = Table::new().set_automated_backup_config(Some(
12709    ///     google_cloud_bigtable_admin_v2::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(AutomatedBackupPolicy::default().into())));
12710    /// ```
12711    pub fn set_automated_backup_config<
12712        T: std::convert::Into<std::option::Option<crate::model::table::AutomatedBackupConfig>>,
12713    >(
12714        mut self,
12715        v: T,
12716    ) -> Self {
12717        self.automated_backup_config = v.into();
12718        self
12719    }
12720
12721    /// The value of [automated_backup_config][crate::model::Table::automated_backup_config]
12722    /// if it holds a `AutomatedBackupPolicy`, `None` if the field is not set or
12723    /// holds a different branch.
12724    pub fn automated_backup_policy(
12725        &self,
12726    ) -> std::option::Option<&std::boxed::Box<crate::model::table::AutomatedBackupPolicy>> {
12727        #[allow(unreachable_patterns)]
12728        self.automated_backup_config.as_ref().and_then(|v| match v {
12729            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v) => {
12730                std::option::Option::Some(v)
12731            }
12732            _ => std::option::Option::None,
12733        })
12734    }
12735
12736    /// Sets the value of [automated_backup_config][crate::model::Table::automated_backup_config]
12737    /// to hold a `AutomatedBackupPolicy`.
12738    ///
12739    /// Note that all the setters affecting `automated_backup_config` are
12740    /// mutually exclusive.
12741    ///
12742    /// # Example
12743    /// ```ignore,no_run
12744    /// # use google_cloud_bigtable_admin_v2::model::Table;
12745    /// use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
12746    /// let x = Table::new().set_automated_backup_policy(AutomatedBackupPolicy::default()/* use setters */);
12747    /// assert!(x.automated_backup_policy().is_some());
12748    /// ```
12749    pub fn set_automated_backup_policy<
12750        T: std::convert::Into<std::boxed::Box<crate::model::table::AutomatedBackupPolicy>>,
12751    >(
12752        mut self,
12753        v: T,
12754    ) -> Self {
12755        self.automated_backup_config = std::option::Option::Some(
12756            crate::model::table::AutomatedBackupConfig::AutomatedBackupPolicy(v.into()),
12757        );
12758        self
12759    }
12760}
12761
12762impl wkt::message::Message for Table {
12763    fn typename() -> &'static str {
12764        "type.googleapis.com/google.bigtable.admin.v2.Table"
12765    }
12766}
12767
12768/// Defines additional types related to [Table].
12769pub mod table {
12770    #[allow(unused_imports)]
12771    use super::*;
12772
12773    /// The state of a table's data in a particular cluster.
12774    #[derive(Clone, Default, PartialEq)]
12775    #[non_exhaustive]
12776    pub struct ClusterState {
12777        /// Output only. The state of replication for the table in this cluster.
12778        pub replication_state: crate::model::table::cluster_state::ReplicationState,
12779
12780        /// Output only. The encryption information for the table in this cluster.
12781        /// If the encryption key protecting this resource is customer managed, then
12782        /// its version can be rotated in Cloud Key Management Service (Cloud KMS).
12783        /// The primary version of the key and its status will be reflected here when
12784        /// changes propagate from Cloud KMS.
12785        pub encryption_info: std::vec::Vec<crate::model::EncryptionInfo>,
12786
12787        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12788    }
12789
12790    impl ClusterState {
12791        /// Creates a new default instance.
12792        pub fn new() -> Self {
12793            std::default::Default::default()
12794        }
12795
12796        /// Sets the value of [replication_state][crate::model::table::ClusterState::replication_state].
12797        ///
12798        /// # Example
12799        /// ```ignore,no_run
12800        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12801        /// use google_cloud_bigtable_admin_v2::model::table::cluster_state::ReplicationState;
12802        /// let x0 = ClusterState::new().set_replication_state(ReplicationState::Initializing);
12803        /// let x1 = ClusterState::new().set_replication_state(ReplicationState::PlannedMaintenance);
12804        /// let x2 = ClusterState::new().set_replication_state(ReplicationState::UnplannedMaintenance);
12805        /// ```
12806        pub fn set_replication_state<
12807            T: std::convert::Into<crate::model::table::cluster_state::ReplicationState>,
12808        >(
12809            mut self,
12810            v: T,
12811        ) -> Self {
12812            self.replication_state = v.into();
12813            self
12814        }
12815
12816        /// Sets the value of [encryption_info][crate::model::table::ClusterState::encryption_info].
12817        ///
12818        /// # Example
12819        /// ```ignore,no_run
12820        /// # use google_cloud_bigtable_admin_v2::model::table::ClusterState;
12821        /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
12822        /// let x = ClusterState::new()
12823        ///     .set_encryption_info([
12824        ///         EncryptionInfo::default()/* use setters */,
12825        ///         EncryptionInfo::default()/* use (different) setters */,
12826        ///     ]);
12827        /// ```
12828        pub fn set_encryption_info<T, V>(mut self, v: T) -> Self
12829        where
12830            T: std::iter::IntoIterator<Item = V>,
12831            V: std::convert::Into<crate::model::EncryptionInfo>,
12832        {
12833            use std::iter::Iterator;
12834            self.encryption_info = v.into_iter().map(|i| i.into()).collect();
12835            self
12836        }
12837    }
12838
12839    impl wkt::message::Message for ClusterState {
12840        fn typename() -> &'static str {
12841            "type.googleapis.com/google.bigtable.admin.v2.Table.ClusterState"
12842        }
12843    }
12844
12845    /// Defines additional types related to [ClusterState].
12846    pub mod cluster_state {
12847        #[allow(unused_imports)]
12848        use super::*;
12849
12850        /// Table replication states.
12851        ///
12852        /// # Working with unknown values
12853        ///
12854        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12855        /// additional enum variants at any time. Adding new variants is not considered
12856        /// a breaking change. Applications should write their code in anticipation of:
12857        ///
12858        /// - New values appearing in future releases of the client library, **and**
12859        /// - New values received dynamically, without application changes.
12860        ///
12861        /// Please consult the [Working with enums] section in the user guide for some
12862        /// guidelines.
12863        ///
12864        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12865        #[derive(Clone, Debug, PartialEq)]
12866        #[non_exhaustive]
12867        pub enum ReplicationState {
12868            /// The replication state of the table is unknown in this cluster.
12869            StateNotKnown,
12870            /// The cluster was recently created, and the table must finish copying
12871            /// over pre-existing data from other clusters before it can begin
12872            /// receiving live replication updates and serving Data API requests.
12873            Initializing,
12874            /// The table is temporarily unable to serve Data API requests from this
12875            /// cluster due to planned internal maintenance.
12876            PlannedMaintenance,
12877            /// The table is temporarily unable to serve Data API requests from this
12878            /// cluster due to unplanned or emergency maintenance.
12879            UnplannedMaintenance,
12880            /// The table can serve Data API requests from this cluster. Depending on
12881            /// replication delay, reads may not immediately reflect the state of the
12882            /// table in other clusters.
12883            Ready,
12884            /// The table is fully created and ready for use after a restore, and is
12885            /// being optimized for performance. When optimizations are complete, the
12886            /// table will transition to `READY` state.
12887            ReadyOptimizing,
12888            /// If set, the enum was initialized with an unknown value.
12889            ///
12890            /// Applications can examine the value using [ReplicationState::value] or
12891            /// [ReplicationState::name].
12892            UnknownValue(replication_state::UnknownValue),
12893        }
12894
12895        #[doc(hidden)]
12896        pub mod replication_state {
12897            #[allow(unused_imports)]
12898            use super::*;
12899            #[derive(Clone, Debug, PartialEq)]
12900            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12901        }
12902
12903        impl ReplicationState {
12904            /// Gets the enum value.
12905            ///
12906            /// Returns `None` if the enum contains an unknown value deserialized from
12907            /// the string representation of enums.
12908            pub fn value(&self) -> std::option::Option<i32> {
12909                match self {
12910                    Self::StateNotKnown => std::option::Option::Some(0),
12911                    Self::Initializing => std::option::Option::Some(1),
12912                    Self::PlannedMaintenance => std::option::Option::Some(2),
12913                    Self::UnplannedMaintenance => std::option::Option::Some(3),
12914                    Self::Ready => std::option::Option::Some(4),
12915                    Self::ReadyOptimizing => std::option::Option::Some(5),
12916                    Self::UnknownValue(u) => u.0.value(),
12917                }
12918            }
12919
12920            /// Gets the enum value as a string.
12921            ///
12922            /// Returns `None` if the enum contains an unknown value deserialized from
12923            /// the integer representation of enums.
12924            pub fn name(&self) -> std::option::Option<&str> {
12925                match self {
12926                    Self::StateNotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
12927                    Self::Initializing => std::option::Option::Some("INITIALIZING"),
12928                    Self::PlannedMaintenance => std::option::Option::Some("PLANNED_MAINTENANCE"),
12929                    Self::UnplannedMaintenance => {
12930                        std::option::Option::Some("UNPLANNED_MAINTENANCE")
12931                    }
12932                    Self::Ready => std::option::Option::Some("READY"),
12933                    Self::ReadyOptimizing => std::option::Option::Some("READY_OPTIMIZING"),
12934                    Self::UnknownValue(u) => u.0.name(),
12935                }
12936            }
12937        }
12938
12939        impl std::default::Default for ReplicationState {
12940            fn default() -> Self {
12941                use std::convert::From;
12942                Self::from(0)
12943            }
12944        }
12945
12946        impl std::fmt::Display for ReplicationState {
12947            fn fmt(
12948                &self,
12949                f: &mut std::fmt::Formatter<'_>,
12950            ) -> std::result::Result<(), std::fmt::Error> {
12951                wkt::internal::display_enum(f, self.name(), self.value())
12952            }
12953        }
12954
12955        impl std::convert::From<i32> for ReplicationState {
12956            fn from(value: i32) -> Self {
12957                match value {
12958                    0 => Self::StateNotKnown,
12959                    1 => Self::Initializing,
12960                    2 => Self::PlannedMaintenance,
12961                    3 => Self::UnplannedMaintenance,
12962                    4 => Self::Ready,
12963                    5 => Self::ReadyOptimizing,
12964                    _ => Self::UnknownValue(replication_state::UnknownValue(
12965                        wkt::internal::UnknownEnumValue::Integer(value),
12966                    )),
12967                }
12968            }
12969        }
12970
12971        impl std::convert::From<&str> for ReplicationState {
12972            fn from(value: &str) -> Self {
12973                use std::string::ToString;
12974                match value {
12975                    "STATE_NOT_KNOWN" => Self::StateNotKnown,
12976                    "INITIALIZING" => Self::Initializing,
12977                    "PLANNED_MAINTENANCE" => Self::PlannedMaintenance,
12978                    "UNPLANNED_MAINTENANCE" => Self::UnplannedMaintenance,
12979                    "READY" => Self::Ready,
12980                    "READY_OPTIMIZING" => Self::ReadyOptimizing,
12981                    _ => Self::UnknownValue(replication_state::UnknownValue(
12982                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12983                    )),
12984                }
12985            }
12986        }
12987
12988        impl serde::ser::Serialize for ReplicationState {
12989            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12990            where
12991                S: serde::Serializer,
12992            {
12993                match self {
12994                    Self::StateNotKnown => serializer.serialize_i32(0),
12995                    Self::Initializing => serializer.serialize_i32(1),
12996                    Self::PlannedMaintenance => serializer.serialize_i32(2),
12997                    Self::UnplannedMaintenance => serializer.serialize_i32(3),
12998                    Self::Ready => serializer.serialize_i32(4),
12999                    Self::ReadyOptimizing => serializer.serialize_i32(5),
13000                    Self::UnknownValue(u) => u.0.serialize(serializer),
13001                }
13002            }
13003        }
13004
13005        impl<'de> serde::de::Deserialize<'de> for ReplicationState {
13006            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13007            where
13008                D: serde::Deserializer<'de>,
13009            {
13010                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReplicationState>::new(
13011                    ".google.bigtable.admin.v2.Table.ClusterState.ReplicationState",
13012                ))
13013            }
13014        }
13015    }
13016
13017    /// Defines an automated backup policy for a table
13018    #[derive(Clone, Default, PartialEq)]
13019    #[non_exhaustive]
13020    pub struct AutomatedBackupPolicy {
13021        /// Required. How long the automated backups should be retained. Values must
13022        /// be at least 3 days and at most 90 days.
13023        pub retention_period: std::option::Option<wkt::Duration>,
13024
13025        /// How frequently automated backups should occur. The only supported value
13026        /// at this time is 24 hours. An undefined frequency is treated as 24 hours.
13027        pub frequency: std::option::Option<wkt::Duration>,
13028
13029        /// Optional. A list of Cloud Bigtable zones where automated backups are
13030        /// allowed to be created. If empty, automated backups will be created in all
13031        /// zones of the instance. Locations are in the format
13032        /// `projects/{project}/locations/{zone}`.
13033        /// This field can only set for tables in Enterprise Plus instances.
13034        pub locations: std::vec::Vec<std::string::String>,
13035
13036        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13037    }
13038
13039    impl AutomatedBackupPolicy {
13040        /// Creates a new default instance.
13041        pub fn new() -> Self {
13042            std::default::Default::default()
13043        }
13044
13045        /// Sets the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
13046        ///
13047        /// # Example
13048        /// ```ignore,no_run
13049        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13050        /// use wkt::Duration;
13051        /// let x = AutomatedBackupPolicy::new().set_retention_period(Duration::default()/* use setters */);
13052        /// ```
13053        pub fn set_retention_period<T>(mut self, v: T) -> Self
13054        where
13055            T: std::convert::Into<wkt::Duration>,
13056        {
13057            self.retention_period = std::option::Option::Some(v.into());
13058            self
13059        }
13060
13061        /// Sets or clears the value of [retention_period][crate::model::table::AutomatedBackupPolicy::retention_period].
13062        ///
13063        /// # Example
13064        /// ```ignore,no_run
13065        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13066        /// use wkt::Duration;
13067        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(Some(Duration::default()/* use setters */));
13068        /// let x = AutomatedBackupPolicy::new().set_or_clear_retention_period(None::<Duration>);
13069        /// ```
13070        pub fn set_or_clear_retention_period<T>(mut self, v: std::option::Option<T>) -> Self
13071        where
13072            T: std::convert::Into<wkt::Duration>,
13073        {
13074            self.retention_period = v.map(|x| x.into());
13075            self
13076        }
13077
13078        /// Sets the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
13079        ///
13080        /// # Example
13081        /// ```ignore,no_run
13082        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13083        /// use wkt::Duration;
13084        /// let x = AutomatedBackupPolicy::new().set_frequency(Duration::default()/* use setters */);
13085        /// ```
13086        pub fn set_frequency<T>(mut self, v: T) -> Self
13087        where
13088            T: std::convert::Into<wkt::Duration>,
13089        {
13090            self.frequency = std::option::Option::Some(v.into());
13091            self
13092        }
13093
13094        /// Sets or clears the value of [frequency][crate::model::table::AutomatedBackupPolicy::frequency].
13095        ///
13096        /// # Example
13097        /// ```ignore,no_run
13098        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13099        /// use wkt::Duration;
13100        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(Some(Duration::default()/* use setters */));
13101        /// let x = AutomatedBackupPolicy::new().set_or_clear_frequency(None::<Duration>);
13102        /// ```
13103        pub fn set_or_clear_frequency<T>(mut self, v: std::option::Option<T>) -> Self
13104        where
13105            T: std::convert::Into<wkt::Duration>,
13106        {
13107            self.frequency = v.map(|x| x.into());
13108            self
13109        }
13110
13111        /// Sets the value of [locations][crate::model::table::AutomatedBackupPolicy::locations].
13112        ///
13113        /// # Example
13114        /// ```ignore,no_run
13115        /// # use google_cloud_bigtable_admin_v2::model::table::AutomatedBackupPolicy;
13116        /// let x = AutomatedBackupPolicy::new().set_locations(["a", "b", "c"]);
13117        /// ```
13118        pub fn set_locations<T, V>(mut self, v: T) -> Self
13119        where
13120            T: std::iter::IntoIterator<Item = V>,
13121            V: std::convert::Into<std::string::String>,
13122        {
13123            use std::iter::Iterator;
13124            self.locations = v.into_iter().map(|i| i.into()).collect();
13125            self
13126        }
13127    }
13128
13129    impl wkt::message::Message for AutomatedBackupPolicy {
13130        fn typename() -> &'static str {
13131            "type.googleapis.com/google.bigtable.admin.v2.Table.AutomatedBackupPolicy"
13132        }
13133    }
13134
13135    /// Possible timestamp granularities to use when keeping multiple versions
13136    /// of data in a table.
13137    ///
13138    /// # Working with unknown values
13139    ///
13140    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13141    /// additional enum variants at any time. Adding new variants is not considered
13142    /// a breaking change. Applications should write their code in anticipation of:
13143    ///
13144    /// - New values appearing in future releases of the client library, **and**
13145    /// - New values received dynamically, without application changes.
13146    ///
13147    /// Please consult the [Working with enums] section in the user guide for some
13148    /// guidelines.
13149    ///
13150    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13151    #[derive(Clone, Debug, PartialEq)]
13152    #[non_exhaustive]
13153    pub enum TimestampGranularity {
13154        /// The user did not specify a granularity. Should not be returned.
13155        /// When specified during table creation, MILLIS will be used.
13156        Unspecified,
13157        /// The table keeps data versioned at a granularity of 1ms.
13158        Millis,
13159        /// If set, the enum was initialized with an unknown value.
13160        ///
13161        /// Applications can examine the value using [TimestampGranularity::value] or
13162        /// [TimestampGranularity::name].
13163        UnknownValue(timestamp_granularity::UnknownValue),
13164    }
13165
13166    #[doc(hidden)]
13167    pub mod timestamp_granularity {
13168        #[allow(unused_imports)]
13169        use super::*;
13170        #[derive(Clone, Debug, PartialEq)]
13171        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13172    }
13173
13174    impl TimestampGranularity {
13175        /// Gets the enum value.
13176        ///
13177        /// Returns `None` if the enum contains an unknown value deserialized from
13178        /// the string representation of enums.
13179        pub fn value(&self) -> std::option::Option<i32> {
13180            match self {
13181                Self::Unspecified => std::option::Option::Some(0),
13182                Self::Millis => std::option::Option::Some(1),
13183                Self::UnknownValue(u) => u.0.value(),
13184            }
13185        }
13186
13187        /// Gets the enum value as a string.
13188        ///
13189        /// Returns `None` if the enum contains an unknown value deserialized from
13190        /// the integer representation of enums.
13191        pub fn name(&self) -> std::option::Option<&str> {
13192            match self {
13193                Self::Unspecified => std::option::Option::Some("TIMESTAMP_GRANULARITY_UNSPECIFIED"),
13194                Self::Millis => std::option::Option::Some("MILLIS"),
13195                Self::UnknownValue(u) => u.0.name(),
13196            }
13197        }
13198    }
13199
13200    impl std::default::Default for TimestampGranularity {
13201        fn default() -> Self {
13202            use std::convert::From;
13203            Self::from(0)
13204        }
13205    }
13206
13207    impl std::fmt::Display for TimestampGranularity {
13208        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13209            wkt::internal::display_enum(f, self.name(), self.value())
13210        }
13211    }
13212
13213    impl std::convert::From<i32> for TimestampGranularity {
13214        fn from(value: i32) -> Self {
13215            match value {
13216                0 => Self::Unspecified,
13217                1 => Self::Millis,
13218                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
13219                    wkt::internal::UnknownEnumValue::Integer(value),
13220                )),
13221            }
13222        }
13223    }
13224
13225    impl std::convert::From<&str> for TimestampGranularity {
13226        fn from(value: &str) -> Self {
13227            use std::string::ToString;
13228            match value {
13229                "TIMESTAMP_GRANULARITY_UNSPECIFIED" => Self::Unspecified,
13230                "MILLIS" => Self::Millis,
13231                _ => Self::UnknownValue(timestamp_granularity::UnknownValue(
13232                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13233                )),
13234            }
13235        }
13236    }
13237
13238    impl serde::ser::Serialize for TimestampGranularity {
13239        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13240        where
13241            S: serde::Serializer,
13242        {
13243            match self {
13244                Self::Unspecified => serializer.serialize_i32(0),
13245                Self::Millis => serializer.serialize_i32(1),
13246                Self::UnknownValue(u) => u.0.serialize(serializer),
13247            }
13248        }
13249    }
13250
13251    impl<'de> serde::de::Deserialize<'de> for TimestampGranularity {
13252        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13253        where
13254            D: serde::Deserializer<'de>,
13255        {
13256            deserializer.deserialize_any(wkt::internal::EnumVisitor::<TimestampGranularity>::new(
13257                ".google.bigtable.admin.v2.Table.TimestampGranularity",
13258            ))
13259        }
13260    }
13261
13262    /// Defines a view over a table's fields.
13263    ///
13264    /// # Working with unknown values
13265    ///
13266    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13267    /// additional enum variants at any time. Adding new variants is not considered
13268    /// a breaking change. Applications should write their code in anticipation of:
13269    ///
13270    /// - New values appearing in future releases of the client library, **and**
13271    /// - New values received dynamically, without application changes.
13272    ///
13273    /// Please consult the [Working with enums] section in the user guide for some
13274    /// guidelines.
13275    ///
13276    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13277    #[derive(Clone, Debug, PartialEq)]
13278    #[non_exhaustive]
13279    pub enum View {
13280        /// Uses the default view for each method as documented in its request.
13281        Unspecified,
13282        /// Only populates `name`.
13283        NameOnly,
13284        /// Only populates `name` and fields related to the table's schema.
13285        SchemaView,
13286        /// Only populates `name` and fields related to the table's replication
13287        /// state.
13288        ReplicationView,
13289        /// Only populates `name` and fields related to the table's encryption state.
13290        EncryptionView,
13291        /// Populates all fields.
13292        Full,
13293        /// If set, the enum was initialized with an unknown value.
13294        ///
13295        /// Applications can examine the value using [View::value] or
13296        /// [View::name].
13297        UnknownValue(view::UnknownValue),
13298    }
13299
13300    #[doc(hidden)]
13301    pub mod view {
13302        #[allow(unused_imports)]
13303        use super::*;
13304        #[derive(Clone, Debug, PartialEq)]
13305        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13306    }
13307
13308    impl View {
13309        /// Gets the enum value.
13310        ///
13311        /// Returns `None` if the enum contains an unknown value deserialized from
13312        /// the string representation of enums.
13313        pub fn value(&self) -> std::option::Option<i32> {
13314            match self {
13315                Self::Unspecified => std::option::Option::Some(0),
13316                Self::NameOnly => std::option::Option::Some(1),
13317                Self::SchemaView => std::option::Option::Some(2),
13318                Self::ReplicationView => std::option::Option::Some(3),
13319                Self::EncryptionView => std::option::Option::Some(5),
13320                Self::Full => std::option::Option::Some(4),
13321                Self::UnknownValue(u) => u.0.value(),
13322            }
13323        }
13324
13325        /// Gets the enum value as a string.
13326        ///
13327        /// Returns `None` if the enum contains an unknown value deserialized from
13328        /// the integer representation of enums.
13329        pub fn name(&self) -> std::option::Option<&str> {
13330            match self {
13331                Self::Unspecified => std::option::Option::Some("VIEW_UNSPECIFIED"),
13332                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
13333                Self::SchemaView => std::option::Option::Some("SCHEMA_VIEW"),
13334                Self::ReplicationView => std::option::Option::Some("REPLICATION_VIEW"),
13335                Self::EncryptionView => std::option::Option::Some("ENCRYPTION_VIEW"),
13336                Self::Full => std::option::Option::Some("FULL"),
13337                Self::UnknownValue(u) => u.0.name(),
13338            }
13339        }
13340    }
13341
13342    impl std::default::Default for View {
13343        fn default() -> Self {
13344            use std::convert::From;
13345            Self::from(0)
13346        }
13347    }
13348
13349    impl std::fmt::Display for View {
13350        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13351            wkt::internal::display_enum(f, self.name(), self.value())
13352        }
13353    }
13354
13355    impl std::convert::From<i32> for View {
13356        fn from(value: i32) -> Self {
13357            match value {
13358                0 => Self::Unspecified,
13359                1 => Self::NameOnly,
13360                2 => Self::SchemaView,
13361                3 => Self::ReplicationView,
13362                4 => Self::Full,
13363                5 => Self::EncryptionView,
13364                _ => Self::UnknownValue(view::UnknownValue(
13365                    wkt::internal::UnknownEnumValue::Integer(value),
13366                )),
13367            }
13368        }
13369    }
13370
13371    impl std::convert::From<&str> for View {
13372        fn from(value: &str) -> Self {
13373            use std::string::ToString;
13374            match value {
13375                "VIEW_UNSPECIFIED" => Self::Unspecified,
13376                "NAME_ONLY" => Self::NameOnly,
13377                "SCHEMA_VIEW" => Self::SchemaView,
13378                "REPLICATION_VIEW" => Self::ReplicationView,
13379                "ENCRYPTION_VIEW" => Self::EncryptionView,
13380                "FULL" => Self::Full,
13381                _ => Self::UnknownValue(view::UnknownValue(
13382                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13383                )),
13384            }
13385        }
13386    }
13387
13388    impl serde::ser::Serialize for View {
13389        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13390        where
13391            S: serde::Serializer,
13392        {
13393            match self {
13394                Self::Unspecified => serializer.serialize_i32(0),
13395                Self::NameOnly => serializer.serialize_i32(1),
13396                Self::SchemaView => serializer.serialize_i32(2),
13397                Self::ReplicationView => serializer.serialize_i32(3),
13398                Self::EncryptionView => serializer.serialize_i32(5),
13399                Self::Full => serializer.serialize_i32(4),
13400                Self::UnknownValue(u) => u.0.serialize(serializer),
13401            }
13402        }
13403    }
13404
13405    impl<'de> serde::de::Deserialize<'de> for View {
13406        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13407        where
13408            D: serde::Deserializer<'de>,
13409        {
13410            deserializer.deserialize_any(wkt::internal::EnumVisitor::<View>::new(
13411                ".google.bigtable.admin.v2.Table.View",
13412            ))
13413        }
13414    }
13415
13416    #[allow(missing_docs)]
13417    #[derive(Clone, Debug, PartialEq)]
13418    #[non_exhaustive]
13419    pub enum AutomatedBackupConfig {
13420        /// If specified, automated backups are enabled for this table.
13421        /// Otherwise, automated backups are disabled.
13422        AutomatedBackupPolicy(std::boxed::Box<crate::model::table::AutomatedBackupPolicy>),
13423    }
13424}
13425
13426/// AuthorizedViews represent subsets of a particular Cloud Bigtable table. Users
13427/// can configure access to each Authorized View independently from the table and
13428/// use the existing Data APIs to access the subset of data.
13429#[derive(Clone, Default, PartialEq)]
13430#[non_exhaustive]
13431pub struct AuthorizedView {
13432    /// Identifier. The name of this AuthorizedView.
13433    /// Values are of the form
13434    /// `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`
13435    pub name: std::string::String,
13436
13437    /// The etag for this AuthorizedView.
13438    /// If this is provided on update, it must match the server's etag. The server
13439    /// returns ABORTED error on a mismatched etag.
13440    pub etag: std::string::String,
13441
13442    /// Set to true to make the AuthorizedView protected against deletion.
13443    /// The parent Table and containing Instance cannot be deleted if an
13444    /// AuthorizedView has this bit set.
13445    pub deletion_protection: bool,
13446
13447    /// The type of this AuthorizedView.
13448    pub authorized_view: std::option::Option<crate::model::authorized_view::AuthorizedView>,
13449
13450    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13451}
13452
13453impl AuthorizedView {
13454    /// Creates a new default instance.
13455    pub fn new() -> Self {
13456        std::default::Default::default()
13457    }
13458
13459    /// Sets the value of [name][crate::model::AuthorizedView::name].
13460    ///
13461    /// # Example
13462    /// ```ignore,no_run
13463    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13464    /// # let project_id = "project_id";
13465    /// # let instance_id = "instance_id";
13466    /// # let table_id = "table_id";
13467    /// # let authorized_view_id = "authorized_view_id";
13468    /// let x = AuthorizedView::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/authorizedViews/{authorized_view_id}"));
13469    /// ```
13470    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13471        self.name = v.into();
13472        self
13473    }
13474
13475    /// Sets the value of [etag][crate::model::AuthorizedView::etag].
13476    ///
13477    /// # Example
13478    /// ```ignore,no_run
13479    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13480    /// let x = AuthorizedView::new().set_etag("example");
13481    /// ```
13482    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13483        self.etag = v.into();
13484        self
13485    }
13486
13487    /// Sets the value of [deletion_protection][crate::model::AuthorizedView::deletion_protection].
13488    ///
13489    /// # Example
13490    /// ```ignore,no_run
13491    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13492    /// let x = AuthorizedView::new().set_deletion_protection(true);
13493    /// ```
13494    pub fn set_deletion_protection<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
13495        self.deletion_protection = v.into();
13496        self
13497    }
13498
13499    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view].
13500    ///
13501    /// Note that all the setters affecting `authorized_view` are mutually
13502    /// exclusive.
13503    ///
13504    /// # Example
13505    /// ```ignore,no_run
13506    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13507    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13508    /// let x = AuthorizedView::new().set_authorized_view(Some(
13509    ///     google_cloud_bigtable_admin_v2::model::authorized_view::AuthorizedView::SubsetView(SubsetView::default().into())));
13510    /// ```
13511    pub fn set_authorized_view<
13512        T: std::convert::Into<std::option::Option<crate::model::authorized_view::AuthorizedView>>,
13513    >(
13514        mut self,
13515        v: T,
13516    ) -> Self {
13517        self.authorized_view = v.into();
13518        self
13519    }
13520
13521    /// The value of [authorized_view][crate::model::AuthorizedView::authorized_view]
13522    /// if it holds a `SubsetView`, `None` if the field is not set or
13523    /// holds a different branch.
13524    pub fn subset_view(
13525        &self,
13526    ) -> std::option::Option<&std::boxed::Box<crate::model::authorized_view::SubsetView>> {
13527        #[allow(unreachable_patterns)]
13528        self.authorized_view.as_ref().and_then(|v| match v {
13529            crate::model::authorized_view::AuthorizedView::SubsetView(v) => {
13530                std::option::Option::Some(v)
13531            }
13532            _ => std::option::Option::None,
13533        })
13534    }
13535
13536    /// Sets the value of [authorized_view][crate::model::AuthorizedView::authorized_view]
13537    /// to hold a `SubsetView`.
13538    ///
13539    /// Note that all the setters affecting `authorized_view` are
13540    /// mutually exclusive.
13541    ///
13542    /// # Example
13543    /// ```ignore,no_run
13544    /// # use google_cloud_bigtable_admin_v2::model::AuthorizedView;
13545    /// use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13546    /// let x = AuthorizedView::new().set_subset_view(SubsetView::default()/* use setters */);
13547    /// assert!(x.subset_view().is_some());
13548    /// ```
13549    pub fn set_subset_view<
13550        T: std::convert::Into<std::boxed::Box<crate::model::authorized_view::SubsetView>>,
13551    >(
13552        mut self,
13553        v: T,
13554    ) -> Self {
13555        self.authorized_view = std::option::Option::Some(
13556            crate::model::authorized_view::AuthorizedView::SubsetView(v.into()),
13557        );
13558        self
13559    }
13560}
13561
13562impl wkt::message::Message for AuthorizedView {
13563    fn typename() -> &'static str {
13564        "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView"
13565    }
13566}
13567
13568/// Defines additional types related to [AuthorizedView].
13569pub mod authorized_view {
13570    #[allow(unused_imports)]
13571    use super::*;
13572
13573    /// Subsets of a column family that are included in this AuthorizedView.
13574    #[derive(Clone, Default, PartialEq)]
13575    #[non_exhaustive]
13576    pub struct FamilySubsets {
13577        /// Individual exact column qualifiers to be included in the AuthorizedView.
13578        pub qualifiers: std::vec::Vec<::bytes::Bytes>,
13579
13580        /// Prefixes for qualifiers to be included in the AuthorizedView. Every
13581        /// qualifier starting with one of these prefixes is included in the
13582        /// AuthorizedView. To provide access to all qualifiers, include the empty
13583        /// string as a prefix
13584        /// ("").
13585        pub qualifier_prefixes: std::vec::Vec<::bytes::Bytes>,
13586
13587        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13588    }
13589
13590    impl FamilySubsets {
13591        /// Creates a new default instance.
13592        pub fn new() -> Self {
13593            std::default::Default::default()
13594        }
13595
13596        /// Sets the value of [qualifiers][crate::model::authorized_view::FamilySubsets::qualifiers].
13597        ///
13598        /// # Example
13599        /// ```ignore,no_run
13600        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13601        /// let b1 = bytes::Bytes::from_static(b"abc");
13602        /// let b2 = bytes::Bytes::from_static(b"xyz");
13603        /// let x = FamilySubsets::new().set_qualifiers([b1, b2]);
13604        /// ```
13605        pub fn set_qualifiers<T, V>(mut self, v: T) -> Self
13606        where
13607            T: std::iter::IntoIterator<Item = V>,
13608            V: std::convert::Into<::bytes::Bytes>,
13609        {
13610            use std::iter::Iterator;
13611            self.qualifiers = v.into_iter().map(|i| i.into()).collect();
13612            self
13613        }
13614
13615        /// Sets the value of [qualifier_prefixes][crate::model::authorized_view::FamilySubsets::qualifier_prefixes].
13616        ///
13617        /// # Example
13618        /// ```ignore,no_run
13619        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13620        /// let b1 = bytes::Bytes::from_static(b"abc");
13621        /// let b2 = bytes::Bytes::from_static(b"xyz");
13622        /// let x = FamilySubsets::new().set_qualifier_prefixes([b1, b2]);
13623        /// ```
13624        pub fn set_qualifier_prefixes<T, V>(mut self, v: T) -> Self
13625        where
13626            T: std::iter::IntoIterator<Item = V>,
13627            V: std::convert::Into<::bytes::Bytes>,
13628        {
13629            use std::iter::Iterator;
13630            self.qualifier_prefixes = v.into_iter().map(|i| i.into()).collect();
13631            self
13632        }
13633    }
13634
13635    impl wkt::message::Message for FamilySubsets {
13636        fn typename() -> &'static str {
13637            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.FamilySubsets"
13638        }
13639    }
13640
13641    /// Defines a simple AuthorizedView that is a subset of the underlying Table.
13642    #[derive(Clone, Default, PartialEq)]
13643    #[non_exhaustive]
13644    pub struct SubsetView {
13645        /// Row prefixes to be included in the AuthorizedView.
13646        /// To provide access to all rows, include the empty string as a prefix ("").
13647        pub row_prefixes: std::vec::Vec<::bytes::Bytes>,
13648
13649        /// Map from column family name to the columns in this family to be included
13650        /// in the AuthorizedView.
13651        pub family_subsets: std::collections::HashMap<
13652            std::string::String,
13653            crate::model::authorized_view::FamilySubsets,
13654        >,
13655
13656        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13657    }
13658
13659    impl SubsetView {
13660        /// Creates a new default instance.
13661        pub fn new() -> Self {
13662            std::default::Default::default()
13663        }
13664
13665        /// Sets the value of [row_prefixes][crate::model::authorized_view::SubsetView::row_prefixes].
13666        ///
13667        /// # Example
13668        /// ```ignore,no_run
13669        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13670        /// let b1 = bytes::Bytes::from_static(b"abc");
13671        /// let b2 = bytes::Bytes::from_static(b"xyz");
13672        /// let x = SubsetView::new().set_row_prefixes([b1, b2]);
13673        /// ```
13674        pub fn set_row_prefixes<T, V>(mut self, v: T) -> Self
13675        where
13676            T: std::iter::IntoIterator<Item = V>,
13677            V: std::convert::Into<::bytes::Bytes>,
13678        {
13679            use std::iter::Iterator;
13680            self.row_prefixes = v.into_iter().map(|i| i.into()).collect();
13681            self
13682        }
13683
13684        /// Sets the value of [family_subsets][crate::model::authorized_view::SubsetView::family_subsets].
13685        ///
13686        /// # Example
13687        /// ```ignore,no_run
13688        /// # use google_cloud_bigtable_admin_v2::model::authorized_view::SubsetView;
13689        /// use google_cloud_bigtable_admin_v2::model::authorized_view::FamilySubsets;
13690        /// let x = SubsetView::new().set_family_subsets([
13691        ///     ("key0", FamilySubsets::default()/* use setters */),
13692        ///     ("key1", FamilySubsets::default()/* use (different) setters */),
13693        /// ]);
13694        /// ```
13695        pub fn set_family_subsets<T, K, V>(mut self, v: T) -> Self
13696        where
13697            T: std::iter::IntoIterator<Item = (K, V)>,
13698            K: std::convert::Into<std::string::String>,
13699            V: std::convert::Into<crate::model::authorized_view::FamilySubsets>,
13700        {
13701            use std::iter::Iterator;
13702            self.family_subsets = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
13703            self
13704        }
13705    }
13706
13707    impl wkt::message::Message for SubsetView {
13708        fn typename() -> &'static str {
13709            "type.googleapis.com/google.bigtable.admin.v2.AuthorizedView.SubsetView"
13710        }
13711    }
13712
13713    /// Defines a subset of an AuthorizedView's fields.
13714    ///
13715    /// # Working with unknown values
13716    ///
13717    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13718    /// additional enum variants at any time. Adding new variants is not considered
13719    /// a breaking change. Applications should write their code in anticipation of:
13720    ///
13721    /// - New values appearing in future releases of the client library, **and**
13722    /// - New values received dynamically, without application changes.
13723    ///
13724    /// Please consult the [Working with enums] section in the user guide for some
13725    /// guidelines.
13726    ///
13727    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13728    #[derive(Clone, Debug, PartialEq)]
13729    #[non_exhaustive]
13730    pub enum ResponseView {
13731        /// Uses the default view for each method as documented in the request.
13732        Unspecified,
13733        /// Only populates `name`.
13734        NameOnly,
13735        /// Only populates the AuthorizedView's basic metadata. This includes:
13736        /// name, deletion_protection, etag.
13737        Basic,
13738        /// Populates every fields.
13739        Full,
13740        /// If set, the enum was initialized with an unknown value.
13741        ///
13742        /// Applications can examine the value using [ResponseView::value] or
13743        /// [ResponseView::name].
13744        UnknownValue(response_view::UnknownValue),
13745    }
13746
13747    #[doc(hidden)]
13748    pub mod response_view {
13749        #[allow(unused_imports)]
13750        use super::*;
13751        #[derive(Clone, Debug, PartialEq)]
13752        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13753    }
13754
13755    impl ResponseView {
13756        /// Gets the enum value.
13757        ///
13758        /// Returns `None` if the enum contains an unknown value deserialized from
13759        /// the string representation of enums.
13760        pub fn value(&self) -> std::option::Option<i32> {
13761            match self {
13762                Self::Unspecified => std::option::Option::Some(0),
13763                Self::NameOnly => std::option::Option::Some(1),
13764                Self::Basic => std::option::Option::Some(2),
13765                Self::Full => std::option::Option::Some(3),
13766                Self::UnknownValue(u) => u.0.value(),
13767            }
13768        }
13769
13770        /// Gets the enum value as a string.
13771        ///
13772        /// Returns `None` if the enum contains an unknown value deserialized from
13773        /// the integer representation of enums.
13774        pub fn name(&self) -> std::option::Option<&str> {
13775            match self {
13776                Self::Unspecified => std::option::Option::Some("RESPONSE_VIEW_UNSPECIFIED"),
13777                Self::NameOnly => std::option::Option::Some("NAME_ONLY"),
13778                Self::Basic => std::option::Option::Some("BASIC"),
13779                Self::Full => std::option::Option::Some("FULL"),
13780                Self::UnknownValue(u) => u.0.name(),
13781            }
13782        }
13783    }
13784
13785    impl std::default::Default for ResponseView {
13786        fn default() -> Self {
13787            use std::convert::From;
13788            Self::from(0)
13789        }
13790    }
13791
13792    impl std::fmt::Display for ResponseView {
13793        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13794            wkt::internal::display_enum(f, self.name(), self.value())
13795        }
13796    }
13797
13798    impl std::convert::From<i32> for ResponseView {
13799        fn from(value: i32) -> Self {
13800            match value {
13801                0 => Self::Unspecified,
13802                1 => Self::NameOnly,
13803                2 => Self::Basic,
13804                3 => Self::Full,
13805                _ => Self::UnknownValue(response_view::UnknownValue(
13806                    wkt::internal::UnknownEnumValue::Integer(value),
13807                )),
13808            }
13809        }
13810    }
13811
13812    impl std::convert::From<&str> for ResponseView {
13813        fn from(value: &str) -> Self {
13814            use std::string::ToString;
13815            match value {
13816                "RESPONSE_VIEW_UNSPECIFIED" => Self::Unspecified,
13817                "NAME_ONLY" => Self::NameOnly,
13818                "BASIC" => Self::Basic,
13819                "FULL" => Self::Full,
13820                _ => Self::UnknownValue(response_view::UnknownValue(
13821                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13822                )),
13823            }
13824        }
13825    }
13826
13827    impl serde::ser::Serialize for ResponseView {
13828        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13829        where
13830            S: serde::Serializer,
13831        {
13832            match self {
13833                Self::Unspecified => serializer.serialize_i32(0),
13834                Self::NameOnly => serializer.serialize_i32(1),
13835                Self::Basic => serializer.serialize_i32(2),
13836                Self::Full => serializer.serialize_i32(3),
13837                Self::UnknownValue(u) => u.0.serialize(serializer),
13838            }
13839        }
13840    }
13841
13842    impl<'de> serde::de::Deserialize<'de> for ResponseView {
13843        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13844        where
13845            D: serde::Deserializer<'de>,
13846        {
13847            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResponseView>::new(
13848                ".google.bigtable.admin.v2.AuthorizedView.ResponseView",
13849            ))
13850        }
13851    }
13852
13853    /// The type of this AuthorizedView.
13854    #[derive(Clone, Debug, PartialEq)]
13855    #[non_exhaustive]
13856    pub enum AuthorizedView {
13857        /// An AuthorizedView permitting access to an explicit subset of a Table.
13858        SubsetView(std::boxed::Box<crate::model::authorized_view::SubsetView>),
13859    }
13860}
13861
13862/// A set of columns within a table which share a common configuration.
13863#[derive(Clone, Default, PartialEq)]
13864#[non_exhaustive]
13865pub struct ColumnFamily {
13866    /// Garbage collection rule specified as a protobuf.
13867    /// Must serialize to at most 500 bytes.
13868    ///
13869    /// NOTE: Garbage collection executes opportunistically in the background, and
13870    /// so it's possible for reads to return a cell even if it matches the active
13871    /// GC expression for its family.
13872    pub gc_rule: std::option::Option<crate::model::GcRule>,
13873
13874    /// The type of data stored in each of this family's cell values, including its
13875    /// full encoding. If omitted, the family only serves raw untyped bytes.
13876    ///
13877    /// For now, only the `Aggregate` type is supported.
13878    ///
13879    /// `Aggregate` can only be set at family creation and is immutable afterwards.
13880    ///
13881    /// If `value_type` is `Aggregate`, written data must be compatible with:
13882    ///
13883    /// * `value_type.input_type` for `AddInput` mutations
13884    pub value_type: std::option::Option<crate::model::Type>,
13885
13886    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13887}
13888
13889impl ColumnFamily {
13890    /// Creates a new default instance.
13891    pub fn new() -> Self {
13892        std::default::Default::default()
13893    }
13894
13895    /// Sets the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13896    ///
13897    /// # Example
13898    /// ```ignore,no_run
13899    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13900    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13901    /// let x = ColumnFamily::new().set_gc_rule(GcRule::default()/* use setters */);
13902    /// ```
13903    pub fn set_gc_rule<T>(mut self, v: T) -> Self
13904    where
13905        T: std::convert::Into<crate::model::GcRule>,
13906    {
13907        self.gc_rule = std::option::Option::Some(v.into());
13908        self
13909    }
13910
13911    /// Sets or clears the value of [gc_rule][crate::model::ColumnFamily::gc_rule].
13912    ///
13913    /// # Example
13914    /// ```ignore,no_run
13915    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13916    /// use google_cloud_bigtable_admin_v2::model::GcRule;
13917    /// let x = ColumnFamily::new().set_or_clear_gc_rule(Some(GcRule::default()/* use setters */));
13918    /// let x = ColumnFamily::new().set_or_clear_gc_rule(None::<GcRule>);
13919    /// ```
13920    pub fn set_or_clear_gc_rule<T>(mut self, v: std::option::Option<T>) -> Self
13921    where
13922        T: std::convert::Into<crate::model::GcRule>,
13923    {
13924        self.gc_rule = v.map(|x| x.into());
13925        self
13926    }
13927
13928    /// Sets the value of [value_type][crate::model::ColumnFamily::value_type].
13929    ///
13930    /// # Example
13931    /// ```ignore,no_run
13932    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13933    /// use google_cloud_bigtable_admin_v2::model::Type;
13934    /// let x = ColumnFamily::new().set_value_type(Type::default()/* use setters */);
13935    /// ```
13936    pub fn set_value_type<T>(mut self, v: T) -> Self
13937    where
13938        T: std::convert::Into<crate::model::Type>,
13939    {
13940        self.value_type = std::option::Option::Some(v.into());
13941        self
13942    }
13943
13944    /// Sets or clears the value of [value_type][crate::model::ColumnFamily::value_type].
13945    ///
13946    /// # Example
13947    /// ```ignore,no_run
13948    /// # use google_cloud_bigtable_admin_v2::model::ColumnFamily;
13949    /// use google_cloud_bigtable_admin_v2::model::Type;
13950    /// let x = ColumnFamily::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
13951    /// let x = ColumnFamily::new().set_or_clear_value_type(None::<Type>);
13952    /// ```
13953    pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
13954    where
13955        T: std::convert::Into<crate::model::Type>,
13956    {
13957        self.value_type = v.map(|x| x.into());
13958        self
13959    }
13960}
13961
13962impl wkt::message::Message for ColumnFamily {
13963    fn typename() -> &'static str {
13964        "type.googleapis.com/google.bigtable.admin.v2.ColumnFamily"
13965    }
13966}
13967
13968/// Rule for determining which cells to delete during garbage collection.
13969#[derive(Clone, Default, PartialEq)]
13970#[non_exhaustive]
13971pub struct GcRule {
13972    /// Garbage collection rules.
13973    pub rule: std::option::Option<crate::model::gc_rule::Rule>,
13974
13975    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13976}
13977
13978impl GcRule {
13979    /// Creates a new default instance.
13980    pub fn new() -> Self {
13981        std::default::Default::default()
13982    }
13983
13984    /// Sets the value of [rule][crate::model::GcRule::rule].
13985    ///
13986    /// Note that all the setters affecting `rule` are mutually
13987    /// exclusive.
13988    ///
13989    /// # Example
13990    /// ```ignore,no_run
13991    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
13992    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Rule;
13993    /// let x = GcRule::new().set_rule(Some(Rule::MaxNumVersions(42)));
13994    /// ```
13995    pub fn set_rule<T: std::convert::Into<std::option::Option<crate::model::gc_rule::Rule>>>(
13996        mut self,
13997        v: T,
13998    ) -> Self {
13999        self.rule = v.into();
14000        self
14001    }
14002
14003    /// The value of [rule][crate::model::GcRule::rule]
14004    /// if it holds a `MaxNumVersions`, `None` if the field is not set or
14005    /// holds a different branch.
14006    pub fn max_num_versions(&self) -> std::option::Option<&i32> {
14007        #[allow(unreachable_patterns)]
14008        self.rule.as_ref().and_then(|v| match v {
14009            crate::model::gc_rule::Rule::MaxNumVersions(v) => std::option::Option::Some(v),
14010            _ => std::option::Option::None,
14011        })
14012    }
14013
14014    /// Sets the value of [rule][crate::model::GcRule::rule]
14015    /// to hold a `MaxNumVersions`.
14016    ///
14017    /// Note that all the setters affecting `rule` are
14018    /// mutually exclusive.
14019    ///
14020    /// # Example
14021    /// ```ignore,no_run
14022    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14023    /// let x = GcRule::new().set_max_num_versions(42);
14024    /// assert!(x.max_num_versions().is_some());
14025    /// assert!(x.max_age().is_none());
14026    /// assert!(x.intersection().is_none());
14027    /// assert!(x.union().is_none());
14028    /// ```
14029    pub fn set_max_num_versions<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14030        self.rule =
14031            std::option::Option::Some(crate::model::gc_rule::Rule::MaxNumVersions(v.into()));
14032        self
14033    }
14034
14035    /// The value of [rule][crate::model::GcRule::rule]
14036    /// if it holds a `MaxAge`, `None` if the field is not set or
14037    /// holds a different branch.
14038    pub fn max_age(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
14039        #[allow(unreachable_patterns)]
14040        self.rule.as_ref().and_then(|v| match v {
14041            crate::model::gc_rule::Rule::MaxAge(v) => std::option::Option::Some(v),
14042            _ => std::option::Option::None,
14043        })
14044    }
14045
14046    /// Sets the value of [rule][crate::model::GcRule::rule]
14047    /// to hold a `MaxAge`.
14048    ///
14049    /// Note that all the setters affecting `rule` are
14050    /// mutually exclusive.
14051    ///
14052    /// # Example
14053    /// ```ignore,no_run
14054    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14055    /// use wkt::Duration;
14056    /// let x = GcRule::new().set_max_age(Duration::default()/* use setters */);
14057    /// assert!(x.max_age().is_some());
14058    /// assert!(x.max_num_versions().is_none());
14059    /// assert!(x.intersection().is_none());
14060    /// assert!(x.union().is_none());
14061    /// ```
14062    pub fn set_max_age<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
14063        mut self,
14064        v: T,
14065    ) -> Self {
14066        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::MaxAge(v.into()));
14067        self
14068    }
14069
14070    /// The value of [rule][crate::model::GcRule::rule]
14071    /// if it holds a `Intersection`, `None` if the field is not set or
14072    /// holds a different branch.
14073    pub fn intersection(
14074        &self,
14075    ) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Intersection>> {
14076        #[allow(unreachable_patterns)]
14077        self.rule.as_ref().and_then(|v| match v {
14078            crate::model::gc_rule::Rule::Intersection(v) => std::option::Option::Some(v),
14079            _ => std::option::Option::None,
14080        })
14081    }
14082
14083    /// Sets the value of [rule][crate::model::GcRule::rule]
14084    /// to hold a `Intersection`.
14085    ///
14086    /// Note that all the setters affecting `rule` are
14087    /// mutually exclusive.
14088    ///
14089    /// # Example
14090    /// ```ignore,no_run
14091    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14092    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
14093    /// let x = GcRule::new().set_intersection(Intersection::default()/* use setters */);
14094    /// assert!(x.intersection().is_some());
14095    /// assert!(x.max_num_versions().is_none());
14096    /// assert!(x.max_age().is_none());
14097    /// assert!(x.union().is_none());
14098    /// ```
14099    pub fn set_intersection<
14100        T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Intersection>>,
14101    >(
14102        mut self,
14103        v: T,
14104    ) -> Self {
14105        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Intersection(v.into()));
14106        self
14107    }
14108
14109    /// The value of [rule][crate::model::GcRule::rule]
14110    /// if it holds a `Union`, `None` if the field is not set or
14111    /// holds a different branch.
14112    pub fn union(&self) -> std::option::Option<&std::boxed::Box<crate::model::gc_rule::Union>> {
14113        #[allow(unreachable_patterns)]
14114        self.rule.as_ref().and_then(|v| match v {
14115            crate::model::gc_rule::Rule::Union(v) => std::option::Option::Some(v),
14116            _ => std::option::Option::None,
14117        })
14118    }
14119
14120    /// Sets the value of [rule][crate::model::GcRule::rule]
14121    /// to hold a `Union`.
14122    ///
14123    /// Note that all the setters affecting `rule` are
14124    /// mutually exclusive.
14125    ///
14126    /// # Example
14127    /// ```ignore,no_run
14128    /// # use google_cloud_bigtable_admin_v2::model::GcRule;
14129    /// use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
14130    /// let x = GcRule::new().set_union(Union::default()/* use setters */);
14131    /// assert!(x.union().is_some());
14132    /// assert!(x.max_num_versions().is_none());
14133    /// assert!(x.max_age().is_none());
14134    /// assert!(x.intersection().is_none());
14135    /// ```
14136    pub fn set_union<T: std::convert::Into<std::boxed::Box<crate::model::gc_rule::Union>>>(
14137        mut self,
14138        v: T,
14139    ) -> Self {
14140        self.rule = std::option::Option::Some(crate::model::gc_rule::Rule::Union(v.into()));
14141        self
14142    }
14143}
14144
14145impl wkt::message::Message for GcRule {
14146    fn typename() -> &'static str {
14147        "type.googleapis.com/google.bigtable.admin.v2.GcRule"
14148    }
14149}
14150
14151/// Defines additional types related to [GcRule].
14152pub mod gc_rule {
14153    #[allow(unused_imports)]
14154    use super::*;
14155
14156    /// A GcRule which deletes cells matching all of the given rules.
14157    #[derive(Clone, Default, PartialEq)]
14158    #[non_exhaustive]
14159    pub struct Intersection {
14160        /// Only delete cells which would be deleted by every element of `rules`.
14161        pub rules: std::vec::Vec<crate::model::GcRule>,
14162
14163        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14164    }
14165
14166    impl Intersection {
14167        /// Creates a new default instance.
14168        pub fn new() -> Self {
14169            std::default::Default::default()
14170        }
14171
14172        /// Sets the value of [rules][crate::model::gc_rule::Intersection::rules].
14173        ///
14174        /// # Example
14175        /// ```ignore,no_run
14176        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Intersection;
14177        /// use google_cloud_bigtable_admin_v2::model::GcRule;
14178        /// let x = Intersection::new()
14179        ///     .set_rules([
14180        ///         GcRule::default()/* use setters */,
14181        ///         GcRule::default()/* use (different) setters */,
14182        ///     ]);
14183        /// ```
14184        pub fn set_rules<T, V>(mut self, v: T) -> Self
14185        where
14186            T: std::iter::IntoIterator<Item = V>,
14187            V: std::convert::Into<crate::model::GcRule>,
14188        {
14189            use std::iter::Iterator;
14190            self.rules = v.into_iter().map(|i| i.into()).collect();
14191            self
14192        }
14193    }
14194
14195    impl wkt::message::Message for Intersection {
14196        fn typename() -> &'static str {
14197            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Intersection"
14198        }
14199    }
14200
14201    /// A GcRule which deletes cells matching any of the given rules.
14202    #[derive(Clone, Default, PartialEq)]
14203    #[non_exhaustive]
14204    pub struct Union {
14205        /// Delete cells which would be deleted by any element of `rules`.
14206        pub rules: std::vec::Vec<crate::model::GcRule>,
14207
14208        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14209    }
14210
14211    impl Union {
14212        /// Creates a new default instance.
14213        pub fn new() -> Self {
14214            std::default::Default::default()
14215        }
14216
14217        /// Sets the value of [rules][crate::model::gc_rule::Union::rules].
14218        ///
14219        /// # Example
14220        /// ```ignore,no_run
14221        /// # use google_cloud_bigtable_admin_v2::model::gc_rule::Union;
14222        /// use google_cloud_bigtable_admin_v2::model::GcRule;
14223        /// let x = Union::new()
14224        ///     .set_rules([
14225        ///         GcRule::default()/* use setters */,
14226        ///         GcRule::default()/* use (different) setters */,
14227        ///     ]);
14228        /// ```
14229        pub fn set_rules<T, V>(mut self, v: T) -> Self
14230        where
14231            T: std::iter::IntoIterator<Item = V>,
14232            V: std::convert::Into<crate::model::GcRule>,
14233        {
14234            use std::iter::Iterator;
14235            self.rules = v.into_iter().map(|i| i.into()).collect();
14236            self
14237        }
14238    }
14239
14240    impl wkt::message::Message for Union {
14241        fn typename() -> &'static str {
14242            "type.googleapis.com/google.bigtable.admin.v2.GcRule.Union"
14243        }
14244    }
14245
14246    /// Garbage collection rules.
14247    #[derive(Clone, Debug, PartialEq)]
14248    #[non_exhaustive]
14249    pub enum Rule {
14250        /// Delete all cells in a column except the most recent N.
14251        MaxNumVersions(i32),
14252        /// Delete cells in a column older than the given age.
14253        /// Values must be at least one millisecond, and will be truncated to
14254        /// microsecond granularity.
14255        MaxAge(std::boxed::Box<wkt::Duration>),
14256        /// Delete cells that would be deleted by every nested rule.
14257        Intersection(std::boxed::Box<crate::model::gc_rule::Intersection>),
14258        /// Delete cells that would be deleted by any nested rule.
14259        Union(std::boxed::Box<crate::model::gc_rule::Union>),
14260    }
14261}
14262
14263/// Encryption information for a given resource.
14264/// If this resource is protected with customer managed encryption, the in-use
14265/// Cloud Key Management Service (Cloud KMS) key version is specified along with
14266/// its status.
14267#[derive(Clone, Default, PartialEq)]
14268#[non_exhaustive]
14269pub struct EncryptionInfo {
14270    /// Output only. The type of encryption used to protect this resource.
14271    pub encryption_type: crate::model::encryption_info::EncryptionType,
14272
14273    /// Output only. The status of encrypt/decrypt calls on underlying data for
14274    /// this resource. Regardless of status, the existing data is always encrypted
14275    /// at rest.
14276    pub encryption_status: std::option::Option<google_cloud_rpc::model::Status>,
14277
14278    /// Output only. The version of the Cloud KMS key specified in the parent
14279    /// cluster that is in use for the data underlying this table.
14280    pub kms_key_version: std::string::String,
14281
14282    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14283}
14284
14285impl EncryptionInfo {
14286    /// Creates a new default instance.
14287    pub fn new() -> Self {
14288        std::default::Default::default()
14289    }
14290
14291    /// Sets the value of [encryption_type][crate::model::EncryptionInfo::encryption_type].
14292    ///
14293    /// # Example
14294    /// ```ignore,no_run
14295    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14296    /// use google_cloud_bigtable_admin_v2::model::encryption_info::EncryptionType;
14297    /// let x0 = EncryptionInfo::new().set_encryption_type(EncryptionType::GoogleDefaultEncryption);
14298    /// let x1 = EncryptionInfo::new().set_encryption_type(EncryptionType::CustomerManagedEncryption);
14299    /// ```
14300    pub fn set_encryption_type<
14301        T: std::convert::Into<crate::model::encryption_info::EncryptionType>,
14302    >(
14303        mut self,
14304        v: T,
14305    ) -> Self {
14306        self.encryption_type = v.into();
14307        self
14308    }
14309
14310    /// Sets the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
14311    ///
14312    /// # Example
14313    /// ```ignore,no_run
14314    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14315    /// use google_cloud_rpc::model::Status;
14316    /// let x = EncryptionInfo::new().set_encryption_status(Status::default()/* use setters */);
14317    /// ```
14318    pub fn set_encryption_status<T>(mut self, v: T) -> Self
14319    where
14320        T: std::convert::Into<google_cloud_rpc::model::Status>,
14321    {
14322        self.encryption_status = std::option::Option::Some(v.into());
14323        self
14324    }
14325
14326    /// Sets or clears the value of [encryption_status][crate::model::EncryptionInfo::encryption_status].
14327    ///
14328    /// # Example
14329    /// ```ignore,no_run
14330    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14331    /// use google_cloud_rpc::model::Status;
14332    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(Some(Status::default()/* use setters */));
14333    /// let x = EncryptionInfo::new().set_or_clear_encryption_status(None::<Status>);
14334    /// ```
14335    pub fn set_or_clear_encryption_status<T>(mut self, v: std::option::Option<T>) -> Self
14336    where
14337        T: std::convert::Into<google_cloud_rpc::model::Status>,
14338    {
14339        self.encryption_status = v.map(|x| x.into());
14340        self
14341    }
14342
14343    /// Sets the value of [kms_key_version][crate::model::EncryptionInfo::kms_key_version].
14344    ///
14345    /// # Example
14346    /// ```ignore,no_run
14347    /// # use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
14348    /// let x = EncryptionInfo::new().set_kms_key_version("example");
14349    /// ```
14350    pub fn set_kms_key_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14351        self.kms_key_version = v.into();
14352        self
14353    }
14354}
14355
14356impl wkt::message::Message for EncryptionInfo {
14357    fn typename() -> &'static str {
14358        "type.googleapis.com/google.bigtable.admin.v2.EncryptionInfo"
14359    }
14360}
14361
14362/// Defines additional types related to [EncryptionInfo].
14363pub mod encryption_info {
14364    #[allow(unused_imports)]
14365    use super::*;
14366
14367    /// Possible encryption types for a resource.
14368    ///
14369    /// # Working with unknown values
14370    ///
14371    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14372    /// additional enum variants at any time. Adding new variants is not considered
14373    /// a breaking change. Applications should write their code in anticipation of:
14374    ///
14375    /// - New values appearing in future releases of the client library, **and**
14376    /// - New values received dynamically, without application changes.
14377    ///
14378    /// Please consult the [Working with enums] section in the user guide for some
14379    /// guidelines.
14380    ///
14381    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14382    #[derive(Clone, Debug, PartialEq)]
14383    #[non_exhaustive]
14384    pub enum EncryptionType {
14385        /// Encryption type was not specified, though data at rest remains encrypted.
14386        Unspecified,
14387        /// The data backing this resource is encrypted at rest with a key that is
14388        /// fully managed by Google. No key version or status will be populated.
14389        /// This is the default state.
14390        GoogleDefaultEncryption,
14391        /// The data backing this resource is encrypted at rest with a key that is
14392        /// managed by the customer.
14393        /// The in-use version of the key and its status are populated for
14394        /// CMEK-protected tables.
14395        /// CMEK-protected backups are pinned to the key version that was in use at
14396        /// the time the backup was taken. This key version is populated but its
14397        /// status is not tracked and is reported as `UNKNOWN`.
14398        CustomerManagedEncryption,
14399        /// If set, the enum was initialized with an unknown value.
14400        ///
14401        /// Applications can examine the value using [EncryptionType::value] or
14402        /// [EncryptionType::name].
14403        UnknownValue(encryption_type::UnknownValue),
14404    }
14405
14406    #[doc(hidden)]
14407    pub mod encryption_type {
14408        #[allow(unused_imports)]
14409        use super::*;
14410        #[derive(Clone, Debug, PartialEq)]
14411        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14412    }
14413
14414    impl EncryptionType {
14415        /// Gets the enum value.
14416        ///
14417        /// Returns `None` if the enum contains an unknown value deserialized from
14418        /// the string representation of enums.
14419        pub fn value(&self) -> std::option::Option<i32> {
14420            match self {
14421                Self::Unspecified => std::option::Option::Some(0),
14422                Self::GoogleDefaultEncryption => std::option::Option::Some(1),
14423                Self::CustomerManagedEncryption => std::option::Option::Some(2),
14424                Self::UnknownValue(u) => u.0.value(),
14425            }
14426        }
14427
14428        /// Gets the enum value as a string.
14429        ///
14430        /// Returns `None` if the enum contains an unknown value deserialized from
14431        /// the integer representation of enums.
14432        pub fn name(&self) -> std::option::Option<&str> {
14433            match self {
14434                Self::Unspecified => std::option::Option::Some("ENCRYPTION_TYPE_UNSPECIFIED"),
14435                Self::GoogleDefaultEncryption => {
14436                    std::option::Option::Some("GOOGLE_DEFAULT_ENCRYPTION")
14437                }
14438                Self::CustomerManagedEncryption => {
14439                    std::option::Option::Some("CUSTOMER_MANAGED_ENCRYPTION")
14440                }
14441                Self::UnknownValue(u) => u.0.name(),
14442            }
14443        }
14444    }
14445
14446    impl std::default::Default for EncryptionType {
14447        fn default() -> Self {
14448            use std::convert::From;
14449            Self::from(0)
14450        }
14451    }
14452
14453    impl std::fmt::Display for EncryptionType {
14454        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14455            wkt::internal::display_enum(f, self.name(), self.value())
14456        }
14457    }
14458
14459    impl std::convert::From<i32> for EncryptionType {
14460        fn from(value: i32) -> Self {
14461            match value {
14462                0 => Self::Unspecified,
14463                1 => Self::GoogleDefaultEncryption,
14464                2 => Self::CustomerManagedEncryption,
14465                _ => Self::UnknownValue(encryption_type::UnknownValue(
14466                    wkt::internal::UnknownEnumValue::Integer(value),
14467                )),
14468            }
14469        }
14470    }
14471
14472    impl std::convert::From<&str> for EncryptionType {
14473        fn from(value: &str) -> Self {
14474            use std::string::ToString;
14475            match value {
14476                "ENCRYPTION_TYPE_UNSPECIFIED" => Self::Unspecified,
14477                "GOOGLE_DEFAULT_ENCRYPTION" => Self::GoogleDefaultEncryption,
14478                "CUSTOMER_MANAGED_ENCRYPTION" => Self::CustomerManagedEncryption,
14479                _ => Self::UnknownValue(encryption_type::UnknownValue(
14480                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14481                )),
14482            }
14483        }
14484    }
14485
14486    impl serde::ser::Serialize for EncryptionType {
14487        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14488        where
14489            S: serde::Serializer,
14490        {
14491            match self {
14492                Self::Unspecified => serializer.serialize_i32(0),
14493                Self::GoogleDefaultEncryption => serializer.serialize_i32(1),
14494                Self::CustomerManagedEncryption => serializer.serialize_i32(2),
14495                Self::UnknownValue(u) => u.0.serialize(serializer),
14496            }
14497        }
14498    }
14499
14500    impl<'de> serde::de::Deserialize<'de> for EncryptionType {
14501        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14502        where
14503            D: serde::Deserializer<'de>,
14504        {
14505            deserializer.deserialize_any(wkt::internal::EnumVisitor::<EncryptionType>::new(
14506                ".google.bigtable.admin.v2.EncryptionInfo.EncryptionType",
14507            ))
14508        }
14509    }
14510}
14511
14512/// A snapshot of a table at a particular time. A snapshot can be used as a
14513/// checkpoint for data restoration or a data source for a new table.
14514///
14515/// Note: This is a private alpha release of Cloud Bigtable snapshots. This
14516/// feature is not currently available to most Cloud Bigtable customers. This
14517/// feature might be changed in backward-incompatible ways and is not recommended
14518/// for production use. It is not subject to any SLA or deprecation policy.
14519#[derive(Clone, Default, PartialEq)]
14520#[non_exhaustive]
14521pub struct Snapshot {
14522    /// The unique name of the snapshot.
14523    /// Values are of the form
14524    /// `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
14525    pub name: std::string::String,
14526
14527    /// Output only. The source table at the time the snapshot was taken.
14528    pub source_table: std::option::Option<crate::model::Table>,
14529
14530    /// Output only. The size of the data in the source table at the time the
14531    /// snapshot was taken. In some cases, this value may be computed
14532    /// asynchronously via a background process and a placeholder of 0 will be used
14533    /// in the meantime.
14534    pub data_size_bytes: i64,
14535
14536    /// Output only. The time when the snapshot is created.
14537    pub create_time: std::option::Option<wkt::Timestamp>,
14538
14539    /// The time when the snapshot will be deleted. The maximum amount of time a
14540    /// snapshot can stay active is 365 days. If 'ttl' is not specified,
14541    /// the default maximum of 365 days will be used.
14542    pub delete_time: std::option::Option<wkt::Timestamp>,
14543
14544    /// Output only. The current state of the snapshot.
14545    pub state: crate::model::snapshot::State,
14546
14547    /// Description of the snapshot.
14548    pub description: std::string::String,
14549
14550    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14551}
14552
14553impl Snapshot {
14554    /// Creates a new default instance.
14555    pub fn new() -> Self {
14556        std::default::Default::default()
14557    }
14558
14559    /// Sets the value of [name][crate::model::Snapshot::name].
14560    ///
14561    /// # Example
14562    /// ```ignore,no_run
14563    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14564    /// # let project_id = "project_id";
14565    /// # let instance_id = "instance_id";
14566    /// # let cluster_id = "cluster_id";
14567    /// # let snapshot_id = "snapshot_id";
14568    /// let x = Snapshot::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/snapshots/{snapshot_id}"));
14569    /// ```
14570    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14571        self.name = v.into();
14572        self
14573    }
14574
14575    /// Sets the value of [source_table][crate::model::Snapshot::source_table].
14576    ///
14577    /// # Example
14578    /// ```ignore,no_run
14579    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14580    /// use google_cloud_bigtable_admin_v2::model::Table;
14581    /// let x = Snapshot::new().set_source_table(Table::default()/* use setters */);
14582    /// ```
14583    pub fn set_source_table<T>(mut self, v: T) -> Self
14584    where
14585        T: std::convert::Into<crate::model::Table>,
14586    {
14587        self.source_table = std::option::Option::Some(v.into());
14588        self
14589    }
14590
14591    /// Sets or clears the value of [source_table][crate::model::Snapshot::source_table].
14592    ///
14593    /// # Example
14594    /// ```ignore,no_run
14595    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14596    /// use google_cloud_bigtable_admin_v2::model::Table;
14597    /// let x = Snapshot::new().set_or_clear_source_table(Some(Table::default()/* use setters */));
14598    /// let x = Snapshot::new().set_or_clear_source_table(None::<Table>);
14599    /// ```
14600    pub fn set_or_clear_source_table<T>(mut self, v: std::option::Option<T>) -> Self
14601    where
14602        T: std::convert::Into<crate::model::Table>,
14603    {
14604        self.source_table = v.map(|x| x.into());
14605        self
14606    }
14607
14608    /// Sets the value of [data_size_bytes][crate::model::Snapshot::data_size_bytes].
14609    ///
14610    /// # Example
14611    /// ```ignore,no_run
14612    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14613    /// let x = Snapshot::new().set_data_size_bytes(42);
14614    /// ```
14615    pub fn set_data_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
14616        self.data_size_bytes = v.into();
14617        self
14618    }
14619
14620    /// Sets the value of [create_time][crate::model::Snapshot::create_time].
14621    ///
14622    /// # Example
14623    /// ```ignore,no_run
14624    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14625    /// use wkt::Timestamp;
14626    /// let x = Snapshot::new().set_create_time(Timestamp::default()/* use setters */);
14627    /// ```
14628    pub fn set_create_time<T>(mut self, v: T) -> Self
14629    where
14630        T: std::convert::Into<wkt::Timestamp>,
14631    {
14632        self.create_time = std::option::Option::Some(v.into());
14633        self
14634    }
14635
14636    /// Sets or clears the value of [create_time][crate::model::Snapshot::create_time].
14637    ///
14638    /// # Example
14639    /// ```ignore,no_run
14640    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14641    /// use wkt::Timestamp;
14642    /// let x = Snapshot::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14643    /// let x = Snapshot::new().set_or_clear_create_time(None::<Timestamp>);
14644    /// ```
14645    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14646    where
14647        T: std::convert::Into<wkt::Timestamp>,
14648    {
14649        self.create_time = v.map(|x| x.into());
14650        self
14651    }
14652
14653    /// Sets the value of [delete_time][crate::model::Snapshot::delete_time].
14654    ///
14655    /// # Example
14656    /// ```ignore,no_run
14657    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14658    /// use wkt::Timestamp;
14659    /// let x = Snapshot::new().set_delete_time(Timestamp::default()/* use setters */);
14660    /// ```
14661    pub fn set_delete_time<T>(mut self, v: T) -> Self
14662    where
14663        T: std::convert::Into<wkt::Timestamp>,
14664    {
14665        self.delete_time = std::option::Option::Some(v.into());
14666        self
14667    }
14668
14669    /// Sets or clears the value of [delete_time][crate::model::Snapshot::delete_time].
14670    ///
14671    /// # Example
14672    /// ```ignore,no_run
14673    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14674    /// use wkt::Timestamp;
14675    /// let x = Snapshot::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
14676    /// let x = Snapshot::new().set_or_clear_delete_time(None::<Timestamp>);
14677    /// ```
14678    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
14679    where
14680        T: std::convert::Into<wkt::Timestamp>,
14681    {
14682        self.delete_time = v.map(|x| x.into());
14683        self
14684    }
14685
14686    /// Sets the value of [state][crate::model::Snapshot::state].
14687    ///
14688    /// # Example
14689    /// ```ignore,no_run
14690    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14691    /// use google_cloud_bigtable_admin_v2::model::snapshot::State;
14692    /// let x0 = Snapshot::new().set_state(State::Ready);
14693    /// let x1 = Snapshot::new().set_state(State::Creating);
14694    /// ```
14695    pub fn set_state<T: std::convert::Into<crate::model::snapshot::State>>(mut self, v: T) -> Self {
14696        self.state = v.into();
14697        self
14698    }
14699
14700    /// Sets the value of [description][crate::model::Snapshot::description].
14701    ///
14702    /// # Example
14703    /// ```ignore,no_run
14704    /// # use google_cloud_bigtable_admin_v2::model::Snapshot;
14705    /// let x = Snapshot::new().set_description("example");
14706    /// ```
14707    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14708        self.description = v.into();
14709        self
14710    }
14711}
14712
14713impl wkt::message::Message for Snapshot {
14714    fn typename() -> &'static str {
14715        "type.googleapis.com/google.bigtable.admin.v2.Snapshot"
14716    }
14717}
14718
14719/// Defines additional types related to [Snapshot].
14720pub mod snapshot {
14721    #[allow(unused_imports)]
14722    use super::*;
14723
14724    /// Possible states of a snapshot.
14725    ///
14726    /// # Working with unknown values
14727    ///
14728    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14729    /// additional enum variants at any time. Adding new variants is not considered
14730    /// a breaking change. Applications should write their code in anticipation of:
14731    ///
14732    /// - New values appearing in future releases of the client library, **and**
14733    /// - New values received dynamically, without application changes.
14734    ///
14735    /// Please consult the [Working with enums] section in the user guide for some
14736    /// guidelines.
14737    ///
14738    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14739    #[derive(Clone, Debug, PartialEq)]
14740    #[non_exhaustive]
14741    pub enum State {
14742        /// The state of the snapshot could not be determined.
14743        NotKnown,
14744        /// The snapshot has been successfully created and can serve all requests.
14745        Ready,
14746        /// The snapshot is currently being created, and may be destroyed if the
14747        /// creation process encounters an error. A snapshot may not be restored to a
14748        /// table while it is being created.
14749        Creating,
14750        /// If set, the enum was initialized with an unknown value.
14751        ///
14752        /// Applications can examine the value using [State::value] or
14753        /// [State::name].
14754        UnknownValue(state::UnknownValue),
14755    }
14756
14757    #[doc(hidden)]
14758    pub mod state {
14759        #[allow(unused_imports)]
14760        use super::*;
14761        #[derive(Clone, Debug, PartialEq)]
14762        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14763    }
14764
14765    impl State {
14766        /// Gets the enum value.
14767        ///
14768        /// Returns `None` if the enum contains an unknown value deserialized from
14769        /// the string representation of enums.
14770        pub fn value(&self) -> std::option::Option<i32> {
14771            match self {
14772                Self::NotKnown => std::option::Option::Some(0),
14773                Self::Ready => std::option::Option::Some(1),
14774                Self::Creating => std::option::Option::Some(2),
14775                Self::UnknownValue(u) => u.0.value(),
14776            }
14777        }
14778
14779        /// Gets the enum value as a string.
14780        ///
14781        /// Returns `None` if the enum contains an unknown value deserialized from
14782        /// the integer representation of enums.
14783        pub fn name(&self) -> std::option::Option<&str> {
14784            match self {
14785                Self::NotKnown => std::option::Option::Some("STATE_NOT_KNOWN"),
14786                Self::Ready => std::option::Option::Some("READY"),
14787                Self::Creating => std::option::Option::Some("CREATING"),
14788                Self::UnknownValue(u) => u.0.name(),
14789            }
14790        }
14791    }
14792
14793    impl std::default::Default for State {
14794        fn default() -> Self {
14795            use std::convert::From;
14796            Self::from(0)
14797        }
14798    }
14799
14800    impl std::fmt::Display for State {
14801        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14802            wkt::internal::display_enum(f, self.name(), self.value())
14803        }
14804    }
14805
14806    impl std::convert::From<i32> for State {
14807        fn from(value: i32) -> Self {
14808            match value {
14809                0 => Self::NotKnown,
14810                1 => Self::Ready,
14811                2 => Self::Creating,
14812                _ => Self::UnknownValue(state::UnknownValue(
14813                    wkt::internal::UnknownEnumValue::Integer(value),
14814                )),
14815            }
14816        }
14817    }
14818
14819    impl std::convert::From<&str> for State {
14820        fn from(value: &str) -> Self {
14821            use std::string::ToString;
14822            match value {
14823                "STATE_NOT_KNOWN" => Self::NotKnown,
14824                "READY" => Self::Ready,
14825                "CREATING" => Self::Creating,
14826                _ => Self::UnknownValue(state::UnknownValue(
14827                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14828                )),
14829            }
14830        }
14831    }
14832
14833    impl serde::ser::Serialize for State {
14834        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14835        where
14836            S: serde::Serializer,
14837        {
14838            match self {
14839                Self::NotKnown => serializer.serialize_i32(0),
14840                Self::Ready => serializer.serialize_i32(1),
14841                Self::Creating => serializer.serialize_i32(2),
14842                Self::UnknownValue(u) => u.0.serialize(serializer),
14843            }
14844        }
14845    }
14846
14847    impl<'de> serde::de::Deserialize<'de> for State {
14848        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14849        where
14850            D: serde::Deserializer<'de>,
14851        {
14852            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14853                ".google.bigtable.admin.v2.Snapshot.State",
14854            ))
14855        }
14856    }
14857}
14858
14859/// A backup of a Cloud Bigtable table.
14860#[derive(Clone, Default, PartialEq)]
14861#[non_exhaustive]
14862pub struct Backup {
14863    /// A globally unique identifier for the backup which cannot be
14864    /// changed. Values are of the form
14865    /// `projects/{project}/instances/{instance}/clusters/{cluster}/
14866    /// backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
14867    /// The final segment of the name must be between 1 and 50 characters
14868    /// in length.
14869    ///
14870    /// The backup is stored in the cluster identified by the prefix of the backup
14871    /// name of the form
14872    /// `projects/{project}/instances/{instance}/clusters/{cluster}`.
14873    pub name: std::string::String,
14874
14875    /// Required. Immutable. Name of the table from which this backup was created.
14876    /// This needs to be in the same instance as the backup. Values are of the form
14877    /// `projects/{project}/instances/{instance}/tables/{source_table}`.
14878    pub source_table: std::string::String,
14879
14880    /// Output only. Name of the backup from which this backup was copied. If a
14881    /// backup is not created by copying a backup, this field will be empty. Values
14882    /// are of the form:
14883    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
14884    pub source_backup: std::string::String,
14885
14886    /// Required. The expiration time of the backup.
14887    /// When creating a backup or updating its `expire_time`, the value must be
14888    /// greater than the backup creation time by:
14889    ///
14890    /// - At least 6 hours
14891    /// - At most 90 days
14892    ///
14893    /// Once the `expire_time` has passed, Cloud Bigtable will delete the backup.
14894    pub expire_time: std::option::Option<wkt::Timestamp>,
14895
14896    /// Output only. `start_time` is the time that the backup was started
14897    /// (i.e. approximately the time the
14898    /// [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]
14899    /// request is received).  The row data in this backup will be no older than
14900    /// this timestamp.
14901    ///
14902    /// [google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup]: crate::client::BigtableTableAdmin::create_backup
14903    pub start_time: std::option::Option<wkt::Timestamp>,
14904
14905    /// Output only. `end_time` is the time that the backup was finished. The row
14906    /// data in the backup will be no newer than this timestamp.
14907    pub end_time: std::option::Option<wkt::Timestamp>,
14908
14909    /// Output only. Size of the backup in bytes.
14910    pub size_bytes: i64,
14911
14912    /// Output only. The current state of the backup.
14913    pub state: crate::model::backup::State,
14914
14915    /// Output only. The encryption information for the backup.
14916    pub encryption_info: std::option::Option<crate::model::EncryptionInfo>,
14917
14918    /// Indicates the backup type of the backup.
14919    pub backup_type: crate::model::backup::BackupType,
14920
14921    /// The time at which the hot backup will be converted to a standard backup.
14922    /// Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the
14923    /// hot backup to a standard backup. This value must be greater than the backup
14924    /// creation time by:
14925    ///
14926    /// - At least 24 hours
14927    ///
14928    /// This field only applies for hot backups. When creating or updating a
14929    /// standard backup, attempting to set this field will fail the request.
14930    pub hot_to_standard_time: std::option::Option<wkt::Timestamp>,
14931
14932    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14933}
14934
14935impl Backup {
14936    /// Creates a new default instance.
14937    pub fn new() -> Self {
14938        std::default::Default::default()
14939    }
14940
14941    /// Sets the value of [name][crate::model::Backup::name].
14942    ///
14943    /// # Example
14944    /// ```ignore,no_run
14945    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14946    /// # let project_id = "project_id";
14947    /// # let instance_id = "instance_id";
14948    /// # let cluster_id = "cluster_id";
14949    /// # let backup_id = "backup_id";
14950    /// let x = Backup::new().set_name(format!("projects/{project_id}/instances/{instance_id}/clusters/{cluster_id}/backups/{backup_id}"));
14951    /// ```
14952    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14953        self.name = v.into();
14954        self
14955    }
14956
14957    /// Sets the value of [source_table][crate::model::Backup::source_table].
14958    ///
14959    /// # Example
14960    /// ```ignore,no_run
14961    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14962    /// let x = Backup::new().set_source_table("example");
14963    /// ```
14964    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14965        self.source_table = v.into();
14966        self
14967    }
14968
14969    /// Sets the value of [source_backup][crate::model::Backup::source_backup].
14970    ///
14971    /// # Example
14972    /// ```ignore,no_run
14973    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14974    /// let x = Backup::new().set_source_backup("example");
14975    /// ```
14976    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14977        self.source_backup = v.into();
14978        self
14979    }
14980
14981    /// Sets the value of [expire_time][crate::model::Backup::expire_time].
14982    ///
14983    /// # Example
14984    /// ```ignore,no_run
14985    /// # use google_cloud_bigtable_admin_v2::model::Backup;
14986    /// use wkt::Timestamp;
14987    /// let x = Backup::new().set_expire_time(Timestamp::default()/* use setters */);
14988    /// ```
14989    pub fn set_expire_time<T>(mut self, v: T) -> Self
14990    where
14991        T: std::convert::Into<wkt::Timestamp>,
14992    {
14993        self.expire_time = std::option::Option::Some(v.into());
14994        self
14995    }
14996
14997    /// Sets or clears the value of [expire_time][crate::model::Backup::expire_time].
14998    ///
14999    /// # Example
15000    /// ```ignore,no_run
15001    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15002    /// use wkt::Timestamp;
15003    /// let x = Backup::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
15004    /// let x = Backup::new().set_or_clear_expire_time(None::<Timestamp>);
15005    /// ```
15006    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
15007    where
15008        T: std::convert::Into<wkt::Timestamp>,
15009    {
15010        self.expire_time = v.map(|x| x.into());
15011        self
15012    }
15013
15014    /// Sets the value of [start_time][crate::model::Backup::start_time].
15015    ///
15016    /// # Example
15017    /// ```ignore,no_run
15018    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15019    /// use wkt::Timestamp;
15020    /// let x = Backup::new().set_start_time(Timestamp::default()/* use setters */);
15021    /// ```
15022    pub fn set_start_time<T>(mut self, v: T) -> Self
15023    where
15024        T: std::convert::Into<wkt::Timestamp>,
15025    {
15026        self.start_time = std::option::Option::Some(v.into());
15027        self
15028    }
15029
15030    /// Sets or clears the value of [start_time][crate::model::Backup::start_time].
15031    ///
15032    /// # Example
15033    /// ```ignore,no_run
15034    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15035    /// use wkt::Timestamp;
15036    /// let x = Backup::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
15037    /// let x = Backup::new().set_or_clear_start_time(None::<Timestamp>);
15038    /// ```
15039    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
15040    where
15041        T: std::convert::Into<wkt::Timestamp>,
15042    {
15043        self.start_time = v.map(|x| x.into());
15044        self
15045    }
15046
15047    /// Sets the value of [end_time][crate::model::Backup::end_time].
15048    ///
15049    /// # Example
15050    /// ```ignore,no_run
15051    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15052    /// use wkt::Timestamp;
15053    /// let x = Backup::new().set_end_time(Timestamp::default()/* use setters */);
15054    /// ```
15055    pub fn set_end_time<T>(mut self, v: T) -> Self
15056    where
15057        T: std::convert::Into<wkt::Timestamp>,
15058    {
15059        self.end_time = std::option::Option::Some(v.into());
15060        self
15061    }
15062
15063    /// Sets or clears the value of [end_time][crate::model::Backup::end_time].
15064    ///
15065    /// # Example
15066    /// ```ignore,no_run
15067    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15068    /// use wkt::Timestamp;
15069    /// let x = Backup::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15070    /// let x = Backup::new().set_or_clear_end_time(None::<Timestamp>);
15071    /// ```
15072    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15073    where
15074        T: std::convert::Into<wkt::Timestamp>,
15075    {
15076        self.end_time = v.map(|x| x.into());
15077        self
15078    }
15079
15080    /// Sets the value of [size_bytes][crate::model::Backup::size_bytes].
15081    ///
15082    /// # Example
15083    /// ```ignore,no_run
15084    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15085    /// let x = Backup::new().set_size_bytes(42);
15086    /// ```
15087    pub fn set_size_bytes<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15088        self.size_bytes = v.into();
15089        self
15090    }
15091
15092    /// Sets the value of [state][crate::model::Backup::state].
15093    ///
15094    /// # Example
15095    /// ```ignore,no_run
15096    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15097    /// use google_cloud_bigtable_admin_v2::model::backup::State;
15098    /// let x0 = Backup::new().set_state(State::Creating);
15099    /// let x1 = Backup::new().set_state(State::Ready);
15100    /// ```
15101    pub fn set_state<T: std::convert::Into<crate::model::backup::State>>(mut self, v: T) -> Self {
15102        self.state = v.into();
15103        self
15104    }
15105
15106    /// Sets the value of [encryption_info][crate::model::Backup::encryption_info].
15107    ///
15108    /// # Example
15109    /// ```ignore,no_run
15110    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15111    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
15112    /// let x = Backup::new().set_encryption_info(EncryptionInfo::default()/* use setters */);
15113    /// ```
15114    pub fn set_encryption_info<T>(mut self, v: T) -> Self
15115    where
15116        T: std::convert::Into<crate::model::EncryptionInfo>,
15117    {
15118        self.encryption_info = std::option::Option::Some(v.into());
15119        self
15120    }
15121
15122    /// Sets or clears the value of [encryption_info][crate::model::Backup::encryption_info].
15123    ///
15124    /// # Example
15125    /// ```ignore,no_run
15126    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15127    /// use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
15128    /// let x = Backup::new().set_or_clear_encryption_info(Some(EncryptionInfo::default()/* use setters */));
15129    /// let x = Backup::new().set_or_clear_encryption_info(None::<EncryptionInfo>);
15130    /// ```
15131    pub fn set_or_clear_encryption_info<T>(mut self, v: std::option::Option<T>) -> Self
15132    where
15133        T: std::convert::Into<crate::model::EncryptionInfo>,
15134    {
15135        self.encryption_info = v.map(|x| x.into());
15136        self
15137    }
15138
15139    /// Sets the value of [backup_type][crate::model::Backup::backup_type].
15140    ///
15141    /// # Example
15142    /// ```ignore,no_run
15143    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15144    /// use google_cloud_bigtable_admin_v2::model::backup::BackupType;
15145    /// let x0 = Backup::new().set_backup_type(BackupType::Standard);
15146    /// let x1 = Backup::new().set_backup_type(BackupType::Hot);
15147    /// ```
15148    pub fn set_backup_type<T: std::convert::Into<crate::model::backup::BackupType>>(
15149        mut self,
15150        v: T,
15151    ) -> Self {
15152        self.backup_type = v.into();
15153        self
15154    }
15155
15156    /// Sets the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
15157    ///
15158    /// # Example
15159    /// ```ignore,no_run
15160    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15161    /// use wkt::Timestamp;
15162    /// let x = Backup::new().set_hot_to_standard_time(Timestamp::default()/* use setters */);
15163    /// ```
15164    pub fn set_hot_to_standard_time<T>(mut self, v: T) -> Self
15165    where
15166        T: std::convert::Into<wkt::Timestamp>,
15167    {
15168        self.hot_to_standard_time = std::option::Option::Some(v.into());
15169        self
15170    }
15171
15172    /// Sets or clears the value of [hot_to_standard_time][crate::model::Backup::hot_to_standard_time].
15173    ///
15174    /// # Example
15175    /// ```ignore,no_run
15176    /// # use google_cloud_bigtable_admin_v2::model::Backup;
15177    /// use wkt::Timestamp;
15178    /// let x = Backup::new().set_or_clear_hot_to_standard_time(Some(Timestamp::default()/* use setters */));
15179    /// let x = Backup::new().set_or_clear_hot_to_standard_time(None::<Timestamp>);
15180    /// ```
15181    pub fn set_or_clear_hot_to_standard_time<T>(mut self, v: std::option::Option<T>) -> Self
15182    where
15183        T: std::convert::Into<wkt::Timestamp>,
15184    {
15185        self.hot_to_standard_time = v.map(|x| x.into());
15186        self
15187    }
15188}
15189
15190impl wkt::message::Message for Backup {
15191    fn typename() -> &'static str {
15192        "type.googleapis.com/google.bigtable.admin.v2.Backup"
15193    }
15194}
15195
15196/// Defines additional types related to [Backup].
15197pub mod backup {
15198    #[allow(unused_imports)]
15199    use super::*;
15200
15201    /// Indicates the current state of the backup.
15202    ///
15203    /// # Working with unknown values
15204    ///
15205    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15206    /// additional enum variants at any time. Adding new variants is not considered
15207    /// a breaking change. Applications should write their code in anticipation of:
15208    ///
15209    /// - New values appearing in future releases of the client library, **and**
15210    /// - New values received dynamically, without application changes.
15211    ///
15212    /// Please consult the [Working with enums] section in the user guide for some
15213    /// guidelines.
15214    ///
15215    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15216    #[derive(Clone, Debug, PartialEq)]
15217    #[non_exhaustive]
15218    pub enum State {
15219        /// Not specified.
15220        Unspecified,
15221        /// The pending backup is still being created. Operations on the
15222        /// backup may fail with `FAILED_PRECONDITION` in this state.
15223        Creating,
15224        /// The backup is complete and ready for use.
15225        Ready,
15226        /// If set, the enum was initialized with an unknown value.
15227        ///
15228        /// Applications can examine the value using [State::value] or
15229        /// [State::name].
15230        UnknownValue(state::UnknownValue),
15231    }
15232
15233    #[doc(hidden)]
15234    pub mod state {
15235        #[allow(unused_imports)]
15236        use super::*;
15237        #[derive(Clone, Debug, PartialEq)]
15238        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15239    }
15240
15241    impl State {
15242        /// Gets the enum value.
15243        ///
15244        /// Returns `None` if the enum contains an unknown value deserialized from
15245        /// the string representation of enums.
15246        pub fn value(&self) -> std::option::Option<i32> {
15247            match self {
15248                Self::Unspecified => std::option::Option::Some(0),
15249                Self::Creating => std::option::Option::Some(1),
15250                Self::Ready => std::option::Option::Some(2),
15251                Self::UnknownValue(u) => u.0.value(),
15252            }
15253        }
15254
15255        /// Gets the enum value as a string.
15256        ///
15257        /// Returns `None` if the enum contains an unknown value deserialized from
15258        /// the integer representation of enums.
15259        pub fn name(&self) -> std::option::Option<&str> {
15260            match self {
15261                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
15262                Self::Creating => std::option::Option::Some("CREATING"),
15263                Self::Ready => std::option::Option::Some("READY"),
15264                Self::UnknownValue(u) => u.0.name(),
15265            }
15266        }
15267    }
15268
15269    impl std::default::Default for State {
15270        fn default() -> Self {
15271            use std::convert::From;
15272            Self::from(0)
15273        }
15274    }
15275
15276    impl std::fmt::Display for State {
15277        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15278            wkt::internal::display_enum(f, self.name(), self.value())
15279        }
15280    }
15281
15282    impl std::convert::From<i32> for State {
15283        fn from(value: i32) -> Self {
15284            match value {
15285                0 => Self::Unspecified,
15286                1 => Self::Creating,
15287                2 => Self::Ready,
15288                _ => Self::UnknownValue(state::UnknownValue(
15289                    wkt::internal::UnknownEnumValue::Integer(value),
15290                )),
15291            }
15292        }
15293    }
15294
15295    impl std::convert::From<&str> for State {
15296        fn from(value: &str) -> Self {
15297            use std::string::ToString;
15298            match value {
15299                "STATE_UNSPECIFIED" => Self::Unspecified,
15300                "CREATING" => Self::Creating,
15301                "READY" => Self::Ready,
15302                _ => Self::UnknownValue(state::UnknownValue(
15303                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15304                )),
15305            }
15306        }
15307    }
15308
15309    impl serde::ser::Serialize for State {
15310        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15311        where
15312            S: serde::Serializer,
15313        {
15314            match self {
15315                Self::Unspecified => serializer.serialize_i32(0),
15316                Self::Creating => serializer.serialize_i32(1),
15317                Self::Ready => serializer.serialize_i32(2),
15318                Self::UnknownValue(u) => u.0.serialize(serializer),
15319            }
15320        }
15321    }
15322
15323    impl<'de> serde::de::Deserialize<'de> for State {
15324        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15325        where
15326            D: serde::Deserializer<'de>,
15327        {
15328            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15329                ".google.bigtable.admin.v2.Backup.State",
15330            ))
15331        }
15332    }
15333
15334    /// The type of the backup.
15335    ///
15336    /// # Working with unknown values
15337    ///
15338    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15339    /// additional enum variants at any time. Adding new variants is not considered
15340    /// a breaking change. Applications should write their code in anticipation of:
15341    ///
15342    /// - New values appearing in future releases of the client library, **and**
15343    /// - New values received dynamically, without application changes.
15344    ///
15345    /// Please consult the [Working with enums] section in the user guide for some
15346    /// guidelines.
15347    ///
15348    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15349    #[derive(Clone, Debug, PartialEq)]
15350    #[non_exhaustive]
15351    pub enum BackupType {
15352        /// Not specified.
15353        Unspecified,
15354        /// The default type for Cloud Bigtable managed backups. Supported for
15355        /// backups created in both HDD and SSD instances. Requires optimization when
15356        /// restored to a table in an SSD instance.
15357        Standard,
15358        /// A backup type with faster restore to SSD performance. Only supported for
15359        /// backups created in SSD instances. A new SSD table restored from a hot
15360        /// backup reaches production performance more quickly than a standard
15361        /// backup.
15362        Hot,
15363        /// If set, the enum was initialized with an unknown value.
15364        ///
15365        /// Applications can examine the value using [BackupType::value] or
15366        /// [BackupType::name].
15367        UnknownValue(backup_type::UnknownValue),
15368    }
15369
15370    #[doc(hidden)]
15371    pub mod backup_type {
15372        #[allow(unused_imports)]
15373        use super::*;
15374        #[derive(Clone, Debug, PartialEq)]
15375        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15376    }
15377
15378    impl BackupType {
15379        /// Gets the enum value.
15380        ///
15381        /// Returns `None` if the enum contains an unknown value deserialized from
15382        /// the string representation of enums.
15383        pub fn value(&self) -> std::option::Option<i32> {
15384            match self {
15385                Self::Unspecified => std::option::Option::Some(0),
15386                Self::Standard => std::option::Option::Some(1),
15387                Self::Hot => std::option::Option::Some(2),
15388                Self::UnknownValue(u) => u.0.value(),
15389            }
15390        }
15391
15392        /// Gets the enum value as a string.
15393        ///
15394        /// Returns `None` if the enum contains an unknown value deserialized from
15395        /// the integer representation of enums.
15396        pub fn name(&self) -> std::option::Option<&str> {
15397            match self {
15398                Self::Unspecified => std::option::Option::Some("BACKUP_TYPE_UNSPECIFIED"),
15399                Self::Standard => std::option::Option::Some("STANDARD"),
15400                Self::Hot => std::option::Option::Some("HOT"),
15401                Self::UnknownValue(u) => u.0.name(),
15402            }
15403        }
15404    }
15405
15406    impl std::default::Default for BackupType {
15407        fn default() -> Self {
15408            use std::convert::From;
15409            Self::from(0)
15410        }
15411    }
15412
15413    impl std::fmt::Display for BackupType {
15414        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15415            wkt::internal::display_enum(f, self.name(), self.value())
15416        }
15417    }
15418
15419    impl std::convert::From<i32> for BackupType {
15420        fn from(value: i32) -> Self {
15421            match value {
15422                0 => Self::Unspecified,
15423                1 => Self::Standard,
15424                2 => Self::Hot,
15425                _ => Self::UnknownValue(backup_type::UnknownValue(
15426                    wkt::internal::UnknownEnumValue::Integer(value),
15427                )),
15428            }
15429        }
15430    }
15431
15432    impl std::convert::From<&str> for BackupType {
15433        fn from(value: &str) -> Self {
15434            use std::string::ToString;
15435            match value {
15436                "BACKUP_TYPE_UNSPECIFIED" => Self::Unspecified,
15437                "STANDARD" => Self::Standard,
15438                "HOT" => Self::Hot,
15439                _ => Self::UnknownValue(backup_type::UnknownValue(
15440                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15441                )),
15442            }
15443        }
15444    }
15445
15446    impl serde::ser::Serialize for BackupType {
15447        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15448        where
15449            S: serde::Serializer,
15450        {
15451            match self {
15452                Self::Unspecified => serializer.serialize_i32(0),
15453                Self::Standard => serializer.serialize_i32(1),
15454                Self::Hot => serializer.serialize_i32(2),
15455                Self::UnknownValue(u) => u.0.serialize(serializer),
15456            }
15457        }
15458    }
15459
15460    impl<'de> serde::de::Deserialize<'de> for BackupType {
15461        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15462        where
15463            D: serde::Deserializer<'de>,
15464        {
15465            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BackupType>::new(
15466                ".google.bigtable.admin.v2.Backup.BackupType",
15467            ))
15468        }
15469    }
15470}
15471
15472/// Information about a backup.
15473#[derive(Clone, Default, PartialEq)]
15474#[non_exhaustive]
15475pub struct BackupInfo {
15476    /// Output only. Name of the backup.
15477    pub backup: std::string::String,
15478
15479    /// Output only. The time that the backup was started. Row data in the backup
15480    /// will be no older than this timestamp.
15481    pub start_time: std::option::Option<wkt::Timestamp>,
15482
15483    /// Output only. This time that the backup was finished. Row data in the
15484    /// backup will be no newer than this timestamp.
15485    pub end_time: std::option::Option<wkt::Timestamp>,
15486
15487    /// Output only. Name of the table the backup was created from.
15488    pub source_table: std::string::String,
15489
15490    /// Output only. Name of the backup from which this backup was copied. If a
15491    /// backup is not created by copying a backup, this field will be empty. Values
15492    /// are of the form:
15493    /// projects/\<project\>/instances/\<instance\>/clusters/\<cluster\>/backups/\<backup\>
15494    pub source_backup: std::string::String,
15495
15496    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15497}
15498
15499impl BackupInfo {
15500    /// Creates a new default instance.
15501    pub fn new() -> Self {
15502        std::default::Default::default()
15503    }
15504
15505    /// Sets the value of [backup][crate::model::BackupInfo::backup].
15506    ///
15507    /// # Example
15508    /// ```ignore,no_run
15509    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15510    /// let x = BackupInfo::new().set_backup("example");
15511    /// ```
15512    pub fn set_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15513        self.backup = v.into();
15514        self
15515    }
15516
15517    /// Sets the value of [start_time][crate::model::BackupInfo::start_time].
15518    ///
15519    /// # Example
15520    /// ```ignore,no_run
15521    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15522    /// use wkt::Timestamp;
15523    /// let x = BackupInfo::new().set_start_time(Timestamp::default()/* use setters */);
15524    /// ```
15525    pub fn set_start_time<T>(mut self, v: T) -> Self
15526    where
15527        T: std::convert::Into<wkt::Timestamp>,
15528    {
15529        self.start_time = std::option::Option::Some(v.into());
15530        self
15531    }
15532
15533    /// Sets or clears the value of [start_time][crate::model::BackupInfo::start_time].
15534    ///
15535    /// # Example
15536    /// ```ignore,no_run
15537    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15538    /// use wkt::Timestamp;
15539    /// let x = BackupInfo::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
15540    /// let x = BackupInfo::new().set_or_clear_start_time(None::<Timestamp>);
15541    /// ```
15542    pub fn set_or_clear_start_time<T>(mut self, v: std::option::Option<T>) -> Self
15543    where
15544        T: std::convert::Into<wkt::Timestamp>,
15545    {
15546        self.start_time = v.map(|x| x.into());
15547        self
15548    }
15549
15550    /// Sets the value of [end_time][crate::model::BackupInfo::end_time].
15551    ///
15552    /// # Example
15553    /// ```ignore,no_run
15554    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15555    /// use wkt::Timestamp;
15556    /// let x = BackupInfo::new().set_end_time(Timestamp::default()/* use setters */);
15557    /// ```
15558    pub fn set_end_time<T>(mut self, v: T) -> Self
15559    where
15560        T: std::convert::Into<wkt::Timestamp>,
15561    {
15562        self.end_time = std::option::Option::Some(v.into());
15563        self
15564    }
15565
15566    /// Sets or clears the value of [end_time][crate::model::BackupInfo::end_time].
15567    ///
15568    /// # Example
15569    /// ```ignore,no_run
15570    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15571    /// use wkt::Timestamp;
15572    /// let x = BackupInfo::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
15573    /// let x = BackupInfo::new().set_or_clear_end_time(None::<Timestamp>);
15574    /// ```
15575    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
15576    where
15577        T: std::convert::Into<wkt::Timestamp>,
15578    {
15579        self.end_time = v.map(|x| x.into());
15580        self
15581    }
15582
15583    /// Sets the value of [source_table][crate::model::BackupInfo::source_table].
15584    ///
15585    /// # Example
15586    /// ```ignore,no_run
15587    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15588    /// let x = BackupInfo::new().set_source_table("example");
15589    /// ```
15590    pub fn set_source_table<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15591        self.source_table = v.into();
15592        self
15593    }
15594
15595    /// Sets the value of [source_backup][crate::model::BackupInfo::source_backup].
15596    ///
15597    /// # Example
15598    /// ```ignore,no_run
15599    /// # use google_cloud_bigtable_admin_v2::model::BackupInfo;
15600    /// let x = BackupInfo::new().set_source_backup("example");
15601    /// ```
15602    pub fn set_source_backup<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15603        self.source_backup = v.into();
15604        self
15605    }
15606}
15607
15608impl wkt::message::Message for BackupInfo {
15609    fn typename() -> &'static str {
15610        "type.googleapis.com/google.bigtable.admin.v2.BackupInfo"
15611    }
15612}
15613
15614/// Config for tiered storage.
15615/// A valid config must have a valid TieredStorageRule. Otherwise the whole
15616/// TieredStorageConfig must be unset.
15617/// By default all data is stored in the SSD tier (only SSD instances can
15618/// configure tiered storage).
15619#[derive(Clone, Default, PartialEq)]
15620#[non_exhaustive]
15621pub struct TieredStorageConfig {
15622    /// Rule to specify what data is stored in the infrequent access(IA) tier.
15623    /// The IA tier allows storing more data per node with reduced performance.
15624    pub infrequent_access: std::option::Option<crate::model::TieredStorageRule>,
15625
15626    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15627}
15628
15629impl TieredStorageConfig {
15630    /// Creates a new default instance.
15631    pub fn new() -> Self {
15632        std::default::Default::default()
15633    }
15634
15635    /// Sets the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
15636    ///
15637    /// # Example
15638    /// ```ignore,no_run
15639    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
15640    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15641    /// let x = TieredStorageConfig::new().set_infrequent_access(TieredStorageRule::default()/* use setters */);
15642    /// ```
15643    pub fn set_infrequent_access<T>(mut self, v: T) -> Self
15644    where
15645        T: std::convert::Into<crate::model::TieredStorageRule>,
15646    {
15647        self.infrequent_access = std::option::Option::Some(v.into());
15648        self
15649    }
15650
15651    /// Sets or clears the value of [infrequent_access][crate::model::TieredStorageConfig::infrequent_access].
15652    ///
15653    /// # Example
15654    /// ```ignore,no_run
15655    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageConfig;
15656    /// use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15657    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(Some(TieredStorageRule::default()/* use setters */));
15658    /// let x = TieredStorageConfig::new().set_or_clear_infrequent_access(None::<TieredStorageRule>);
15659    /// ```
15660    pub fn set_or_clear_infrequent_access<T>(mut self, v: std::option::Option<T>) -> Self
15661    where
15662        T: std::convert::Into<crate::model::TieredStorageRule>,
15663    {
15664        self.infrequent_access = v.map(|x| x.into());
15665        self
15666    }
15667}
15668
15669impl wkt::message::Message for TieredStorageConfig {
15670    fn typename() -> &'static str {
15671        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageConfig"
15672    }
15673}
15674
15675/// Rule to specify what data is stored in a storage tier.
15676#[derive(Clone, Default, PartialEq)]
15677#[non_exhaustive]
15678pub struct TieredStorageRule {
15679    /// Rules to specify what data is stored in this tier.
15680    pub rule: std::option::Option<crate::model::tiered_storage_rule::Rule>,
15681
15682    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15683}
15684
15685impl TieredStorageRule {
15686    /// Creates a new default instance.
15687    pub fn new() -> Self {
15688        std::default::Default::default()
15689    }
15690
15691    /// Sets the value of [rule][crate::model::TieredStorageRule::rule].
15692    ///
15693    /// Note that all the setters affecting `rule` are mutually
15694    /// exclusive.
15695    ///
15696    /// # Example
15697    /// ```ignore,no_run
15698    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15699    /// use wkt::Duration;
15700    /// let x = TieredStorageRule::new().set_rule(Some(
15701    ///     google_cloud_bigtable_admin_v2::model::tiered_storage_rule::Rule::IncludeIfOlderThan(Duration::default().into())));
15702    /// ```
15703    pub fn set_rule<
15704        T: std::convert::Into<std::option::Option<crate::model::tiered_storage_rule::Rule>>,
15705    >(
15706        mut self,
15707        v: T,
15708    ) -> Self {
15709        self.rule = v.into();
15710        self
15711    }
15712
15713    /// The value of [rule][crate::model::TieredStorageRule::rule]
15714    /// if it holds a `IncludeIfOlderThan`, `None` if the field is not set or
15715    /// holds a different branch.
15716    pub fn include_if_older_than(&self) -> std::option::Option<&std::boxed::Box<wkt::Duration>> {
15717        #[allow(unreachable_patterns)]
15718        self.rule.as_ref().and_then(|v| match v {
15719            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v) => {
15720                std::option::Option::Some(v)
15721            }
15722            _ => std::option::Option::None,
15723        })
15724    }
15725
15726    /// Sets the value of [rule][crate::model::TieredStorageRule::rule]
15727    /// to hold a `IncludeIfOlderThan`.
15728    ///
15729    /// Note that all the setters affecting `rule` are
15730    /// mutually exclusive.
15731    ///
15732    /// # Example
15733    /// ```ignore,no_run
15734    /// # use google_cloud_bigtable_admin_v2::model::TieredStorageRule;
15735    /// use wkt::Duration;
15736    /// let x = TieredStorageRule::new().set_include_if_older_than(Duration::default()/* use setters */);
15737    /// assert!(x.include_if_older_than().is_some());
15738    /// ```
15739    pub fn set_include_if_older_than<T: std::convert::Into<std::boxed::Box<wkt::Duration>>>(
15740        mut self,
15741        v: T,
15742    ) -> Self {
15743        self.rule = std::option::Option::Some(
15744            crate::model::tiered_storage_rule::Rule::IncludeIfOlderThan(v.into()),
15745        );
15746        self
15747    }
15748}
15749
15750impl wkt::message::Message for TieredStorageRule {
15751    fn typename() -> &'static str {
15752        "type.googleapis.com/google.bigtable.admin.v2.TieredStorageRule"
15753    }
15754}
15755
15756/// Defines additional types related to [TieredStorageRule].
15757pub mod tiered_storage_rule {
15758    #[allow(unused_imports)]
15759    use super::*;
15760
15761    /// Rules to specify what data is stored in this tier.
15762    #[derive(Clone, Debug, PartialEq)]
15763    #[non_exhaustive]
15764    pub enum Rule {
15765        /// Include cells older than the given age.
15766        /// For the infrequent access tier, this value must be at least 30 days.
15767        IncludeIfOlderThan(std::boxed::Box<wkt::Duration>),
15768    }
15769}
15770
15771/// Represents a protobuf schema.
15772#[derive(Clone, Default, PartialEq)]
15773#[non_exhaustive]
15774pub struct ProtoSchema {
15775    /// Required. Contains a protobuf-serialized
15776    /// [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto),
15777    /// which could include multiple proto files.
15778    /// To generate it, [install](https://grpc.io/docs/protoc-installation/) and
15779    /// run `protoc` with
15780    /// `--include_imports` and `--descriptor_set_out`. For example, to generate
15781    /// for moon/shot/app.proto, run
15782    ///
15783    /// ```norust
15784    /// $protoc  --proto_path=/app_path --proto_path=/lib_path \
15785    ///          --include_imports \
15786    ///          --descriptor_set_out=descriptors.pb \
15787    ///          moon/shot/app.proto
15788    /// ```
15789    ///
15790    /// For more details, see protobuffer [self
15791    /// description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
15792    pub proto_descriptors: ::bytes::Bytes,
15793
15794    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15795}
15796
15797impl ProtoSchema {
15798    /// Creates a new default instance.
15799    pub fn new() -> Self {
15800        std::default::Default::default()
15801    }
15802
15803    /// Sets the value of [proto_descriptors][crate::model::ProtoSchema::proto_descriptors].
15804    ///
15805    /// # Example
15806    /// ```ignore,no_run
15807    /// # use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15808    /// let x = ProtoSchema::new().set_proto_descriptors(bytes::Bytes::from_static(b"example"));
15809    /// ```
15810    pub fn set_proto_descriptors<T: std::convert::Into<::bytes::Bytes>>(mut self, v: T) -> Self {
15811        self.proto_descriptors = v.into();
15812        self
15813    }
15814}
15815
15816impl wkt::message::Message for ProtoSchema {
15817    fn typename() -> &'static str {
15818        "type.googleapis.com/google.bigtable.admin.v2.ProtoSchema"
15819    }
15820}
15821
15822/// A named collection of related schemas.
15823#[derive(Clone, Default, PartialEq)]
15824#[non_exhaustive]
15825pub struct SchemaBundle {
15826    /// Identifier. The unique name identifying this schema bundle.
15827    /// Values are of the form
15828    /// `projects/{project}/instances/{instance}/tables/{table}/schemaBundles/{schema_bundle}`
15829    pub name: std::string::String,
15830
15831    /// Optional. The etag for this schema bundle.
15832    /// This may be sent on update and delete requests to ensure the
15833    /// client has an up-to-date value before proceeding. The server
15834    /// returns an ABORTED error on a mismatched etag.
15835    pub etag: std::string::String,
15836
15837    /// The type of this schema bundle. The oneof case cannot change after
15838    /// creation.
15839    pub r#type: std::option::Option<crate::model::schema_bundle::Type>,
15840
15841    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15842}
15843
15844impl SchemaBundle {
15845    /// Creates a new default instance.
15846    pub fn new() -> Self {
15847        std::default::Default::default()
15848    }
15849
15850    /// Sets the value of [name][crate::model::SchemaBundle::name].
15851    ///
15852    /// # Example
15853    /// ```ignore,no_run
15854    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15855    /// # let project_id = "project_id";
15856    /// # let instance_id = "instance_id";
15857    /// # let table_id = "table_id";
15858    /// # let schema_bundle_id = "schema_bundle_id";
15859    /// let x = SchemaBundle::new().set_name(format!("projects/{project_id}/instances/{instance_id}/tables/{table_id}/schemaBundles/{schema_bundle_id}"));
15860    /// ```
15861    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15862        self.name = v.into();
15863        self
15864    }
15865
15866    /// Sets the value of [etag][crate::model::SchemaBundle::etag].
15867    ///
15868    /// # Example
15869    /// ```ignore,no_run
15870    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15871    /// let x = SchemaBundle::new().set_etag("example");
15872    /// ```
15873    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15874        self.etag = v.into();
15875        self
15876    }
15877
15878    /// Sets the value of [r#type][crate::model::SchemaBundle::type].
15879    ///
15880    /// Note that all the setters affecting `r#type` are mutually
15881    /// exclusive.
15882    ///
15883    /// # Example
15884    /// ```ignore,no_run
15885    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15886    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15887    /// let x = SchemaBundle::new().set_type(Some(
15888    ///     google_cloud_bigtable_admin_v2::model::schema_bundle::Type::ProtoSchema(ProtoSchema::default().into())));
15889    /// ```
15890    pub fn set_type<
15891        T: std::convert::Into<std::option::Option<crate::model::schema_bundle::Type>>,
15892    >(
15893        mut self,
15894        v: T,
15895    ) -> Self {
15896        self.r#type = v.into();
15897        self
15898    }
15899
15900    /// The value of [r#type][crate::model::SchemaBundle::r#type]
15901    /// if it holds a `ProtoSchema`, `None` if the field is not set or
15902    /// holds a different branch.
15903    pub fn proto_schema(&self) -> std::option::Option<&std::boxed::Box<crate::model::ProtoSchema>> {
15904        #[allow(unreachable_patterns)]
15905        self.r#type.as_ref().and_then(|v| match v {
15906            crate::model::schema_bundle::Type::ProtoSchema(v) => std::option::Option::Some(v),
15907            _ => std::option::Option::None,
15908        })
15909    }
15910
15911    /// Sets the value of [r#type][crate::model::SchemaBundle::r#type]
15912    /// to hold a `ProtoSchema`.
15913    ///
15914    /// Note that all the setters affecting `r#type` are
15915    /// mutually exclusive.
15916    ///
15917    /// # Example
15918    /// ```ignore,no_run
15919    /// # use google_cloud_bigtable_admin_v2::model::SchemaBundle;
15920    /// use google_cloud_bigtable_admin_v2::model::ProtoSchema;
15921    /// let x = SchemaBundle::new().set_proto_schema(ProtoSchema::default()/* use setters */);
15922    /// assert!(x.proto_schema().is_some());
15923    /// ```
15924    pub fn set_proto_schema<T: std::convert::Into<std::boxed::Box<crate::model::ProtoSchema>>>(
15925        mut self,
15926        v: T,
15927    ) -> Self {
15928        self.r#type =
15929            std::option::Option::Some(crate::model::schema_bundle::Type::ProtoSchema(v.into()));
15930        self
15931    }
15932}
15933
15934impl wkt::message::Message for SchemaBundle {
15935    fn typename() -> &'static str {
15936        "type.googleapis.com/google.bigtable.admin.v2.SchemaBundle"
15937    }
15938}
15939
15940/// Defines additional types related to [SchemaBundle].
15941pub mod schema_bundle {
15942    #[allow(unused_imports)]
15943    use super::*;
15944
15945    /// The type of this schema bundle. The oneof case cannot change after
15946    /// creation.
15947    #[derive(Clone, Debug, PartialEq)]
15948    #[non_exhaustive]
15949    pub enum Type {
15950        /// Schema for Protobufs.
15951        ProtoSchema(std::boxed::Box<crate::model::ProtoSchema>),
15952    }
15953}
15954
15955/// `Type` represents the type of data that is written to, read from, or stored
15956/// in Bigtable. It is heavily based on the GoogleSQL standard to help maintain
15957/// familiarity and consistency across products and features.
15958///
15959/// For compatibility with Bigtable's existing untyped APIs, each `Type` includes
15960/// an `Encoding` which describes how to convert to or from the underlying data.
15961///
15962/// Each encoding can operate in one of two modes:
15963///
15964/// - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)`
15965///   if and only if `X <= Y`. This is useful anywhere sort order is important,
15966///   for example when encoding keys.
15967/// - Distinct: In this mode, Bigtable guarantees that if `X != Y` then
15968///   `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For
15969///   example, both "{'foo': '1', 'bar': '2'}" and "{'bar': '2', 'foo': '1'}"
15970///   are valid encodings of the same JSON value.
15971///
15972/// The API clearly documents which mode is used wherever an encoding can be
15973/// configured. Each encoding also documents which values are supported in which
15974/// modes. For example, when encoding INT64 as a numeric STRING, negative numbers
15975/// cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but
15976/// `STRING("-00001") > STRING("00001")`.
15977#[derive(Clone, Default, PartialEq)]
15978#[non_exhaustive]
15979pub struct Type {
15980    /// The kind of type that this represents.
15981    pub kind: std::option::Option<crate::model::r#type::Kind>,
15982
15983    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15984}
15985
15986impl Type {
15987    /// Creates a new default instance.
15988    pub fn new() -> Self {
15989        std::default::Default::default()
15990    }
15991
15992    /// Sets the value of [kind][crate::model::Type::kind].
15993    ///
15994    /// Note that all the setters affecting `kind` are mutually
15995    /// exclusive.
15996    ///
15997    /// # Example
15998    /// ```ignore,no_run
15999    /// # use google_cloud_bigtable_admin_v2::model::Type;
16000    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16001    /// let x = Type::new().set_kind(Some(
16002    ///     google_cloud_bigtable_admin_v2::model::r#type::Kind::BytesType(Bytes::default().into())));
16003    /// ```
16004    pub fn set_kind<T: std::convert::Into<std::option::Option<crate::model::r#type::Kind>>>(
16005        mut self,
16006        v: T,
16007    ) -> Self {
16008        self.kind = v.into();
16009        self
16010    }
16011
16012    /// The value of [kind][crate::model::Type::kind]
16013    /// if it holds a `BytesType`, `None` if the field is not set or
16014    /// holds a different branch.
16015    pub fn bytes_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bytes>> {
16016        #[allow(unreachable_patterns)]
16017        self.kind.as_ref().and_then(|v| match v {
16018            crate::model::r#type::Kind::BytesType(v) => std::option::Option::Some(v),
16019            _ => std::option::Option::None,
16020        })
16021    }
16022
16023    /// Sets the value of [kind][crate::model::Type::kind]
16024    /// to hold a `BytesType`.
16025    ///
16026    /// Note that all the setters affecting `kind` are
16027    /// mutually exclusive.
16028    ///
16029    /// # Example
16030    /// ```ignore,no_run
16031    /// # use google_cloud_bigtable_admin_v2::model::Type;
16032    /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16033    /// let x = Type::new().set_bytes_type(Bytes::default()/* use setters */);
16034    /// assert!(x.bytes_type().is_some());
16035    /// assert!(x.string_type().is_none());
16036    /// assert!(x.int64_type().is_none());
16037    /// assert!(x.float32_type().is_none());
16038    /// assert!(x.float64_type().is_none());
16039    /// assert!(x.bool_type().is_none());
16040    /// assert!(x.timestamp_type().is_none());
16041    /// assert!(x.date_type().is_none());
16042    /// assert!(x.aggregate_type().is_none());
16043    /// assert!(x.struct_type().is_none());
16044    /// assert!(x.array_type().is_none());
16045    /// assert!(x.map_type().is_none());
16046    /// assert!(x.proto_type().is_none());
16047    /// assert!(x.enum_type().is_none());
16048    /// ```
16049    pub fn set_bytes_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bytes>>>(
16050        mut self,
16051        v: T,
16052    ) -> Self {
16053        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BytesType(v.into()));
16054        self
16055    }
16056
16057    /// The value of [kind][crate::model::Type::kind]
16058    /// if it holds a `StringType`, `None` if the field is not set or
16059    /// holds a different branch.
16060    pub fn string_type(
16061        &self,
16062    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::String>> {
16063        #[allow(unreachable_patterns)]
16064        self.kind.as_ref().and_then(|v| match v {
16065            crate::model::r#type::Kind::StringType(v) => std::option::Option::Some(v),
16066            _ => std::option::Option::None,
16067        })
16068    }
16069
16070    /// Sets the value of [kind][crate::model::Type::kind]
16071    /// to hold a `StringType`.
16072    ///
16073    /// Note that all the setters affecting `kind` are
16074    /// mutually exclusive.
16075    ///
16076    /// # Example
16077    /// ```ignore,no_run
16078    /// # use google_cloud_bigtable_admin_v2::model::Type;
16079    /// use google_cloud_bigtable_admin_v2::model::r#type::String;
16080    /// let x = Type::new().set_string_type(String::default()/* use setters */);
16081    /// assert!(x.string_type().is_some());
16082    /// assert!(x.bytes_type().is_none());
16083    /// assert!(x.int64_type().is_none());
16084    /// assert!(x.float32_type().is_none());
16085    /// assert!(x.float64_type().is_none());
16086    /// assert!(x.bool_type().is_none());
16087    /// assert!(x.timestamp_type().is_none());
16088    /// assert!(x.date_type().is_none());
16089    /// assert!(x.aggregate_type().is_none());
16090    /// assert!(x.struct_type().is_none());
16091    /// assert!(x.array_type().is_none());
16092    /// assert!(x.map_type().is_none());
16093    /// assert!(x.proto_type().is_none());
16094    /// assert!(x.enum_type().is_none());
16095    /// ```
16096    pub fn set_string_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::String>>>(
16097        mut self,
16098        v: T,
16099    ) -> Self {
16100        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StringType(v.into()));
16101        self
16102    }
16103
16104    /// The value of [kind][crate::model::Type::kind]
16105    /// if it holds a `Int64Type`, `None` if the field is not set or
16106    /// holds a different branch.
16107    pub fn int64_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Int64>> {
16108        #[allow(unreachable_patterns)]
16109        self.kind.as_ref().and_then(|v| match v {
16110            crate::model::r#type::Kind::Int64Type(v) => std::option::Option::Some(v),
16111            _ => std::option::Option::None,
16112        })
16113    }
16114
16115    /// Sets the value of [kind][crate::model::Type::kind]
16116    /// to hold a `Int64Type`.
16117    ///
16118    /// Note that all the setters affecting `kind` are
16119    /// mutually exclusive.
16120    ///
16121    /// # Example
16122    /// ```ignore,no_run
16123    /// # use google_cloud_bigtable_admin_v2::model::Type;
16124    /// use google_cloud_bigtable_admin_v2::model::r#type::Int64;
16125    /// let x = Type::new().set_int64_type(Int64::default()/* use setters */);
16126    /// assert!(x.int64_type().is_some());
16127    /// assert!(x.bytes_type().is_none());
16128    /// assert!(x.string_type().is_none());
16129    /// assert!(x.float32_type().is_none());
16130    /// assert!(x.float64_type().is_none());
16131    /// assert!(x.bool_type().is_none());
16132    /// assert!(x.timestamp_type().is_none());
16133    /// assert!(x.date_type().is_none());
16134    /// assert!(x.aggregate_type().is_none());
16135    /// assert!(x.struct_type().is_none());
16136    /// assert!(x.array_type().is_none());
16137    /// assert!(x.map_type().is_none());
16138    /// assert!(x.proto_type().is_none());
16139    /// assert!(x.enum_type().is_none());
16140    /// ```
16141    pub fn set_int64_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Int64>>>(
16142        mut self,
16143        v: T,
16144    ) -> Self {
16145        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Int64Type(v.into()));
16146        self
16147    }
16148
16149    /// The value of [kind][crate::model::Type::kind]
16150    /// if it holds a `Float32Type`, `None` if the field is not set or
16151    /// holds a different branch.
16152    pub fn float32_type(
16153        &self,
16154    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float32>> {
16155        #[allow(unreachable_patterns)]
16156        self.kind.as_ref().and_then(|v| match v {
16157            crate::model::r#type::Kind::Float32Type(v) => std::option::Option::Some(v),
16158            _ => std::option::Option::None,
16159        })
16160    }
16161
16162    /// Sets the value of [kind][crate::model::Type::kind]
16163    /// to hold a `Float32Type`.
16164    ///
16165    /// Note that all the setters affecting `kind` are
16166    /// mutually exclusive.
16167    ///
16168    /// # Example
16169    /// ```ignore,no_run
16170    /// # use google_cloud_bigtable_admin_v2::model::Type;
16171    /// use google_cloud_bigtable_admin_v2::model::r#type::Float32;
16172    /// let x = Type::new().set_float32_type(Float32::default()/* use setters */);
16173    /// assert!(x.float32_type().is_some());
16174    /// assert!(x.bytes_type().is_none());
16175    /// assert!(x.string_type().is_none());
16176    /// assert!(x.int64_type().is_none());
16177    /// assert!(x.float64_type().is_none());
16178    /// assert!(x.bool_type().is_none());
16179    /// assert!(x.timestamp_type().is_none());
16180    /// assert!(x.date_type().is_none());
16181    /// assert!(x.aggregate_type().is_none());
16182    /// assert!(x.struct_type().is_none());
16183    /// assert!(x.array_type().is_none());
16184    /// assert!(x.map_type().is_none());
16185    /// assert!(x.proto_type().is_none());
16186    /// assert!(x.enum_type().is_none());
16187    /// ```
16188    pub fn set_float32_type<
16189        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float32>>,
16190    >(
16191        mut self,
16192        v: T,
16193    ) -> Self {
16194        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float32Type(v.into()));
16195        self
16196    }
16197
16198    /// The value of [kind][crate::model::Type::kind]
16199    /// if it holds a `Float64Type`, `None` if the field is not set or
16200    /// holds a different branch.
16201    pub fn float64_type(
16202        &self,
16203    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Float64>> {
16204        #[allow(unreachable_patterns)]
16205        self.kind.as_ref().and_then(|v| match v {
16206            crate::model::r#type::Kind::Float64Type(v) => std::option::Option::Some(v),
16207            _ => std::option::Option::None,
16208        })
16209    }
16210
16211    /// Sets the value of [kind][crate::model::Type::kind]
16212    /// to hold a `Float64Type`.
16213    ///
16214    /// Note that all the setters affecting `kind` are
16215    /// mutually exclusive.
16216    ///
16217    /// # Example
16218    /// ```ignore,no_run
16219    /// # use google_cloud_bigtable_admin_v2::model::Type;
16220    /// use google_cloud_bigtable_admin_v2::model::r#type::Float64;
16221    /// let x = Type::new().set_float64_type(Float64::default()/* use setters */);
16222    /// assert!(x.float64_type().is_some());
16223    /// assert!(x.bytes_type().is_none());
16224    /// assert!(x.string_type().is_none());
16225    /// assert!(x.int64_type().is_none());
16226    /// assert!(x.float32_type().is_none());
16227    /// assert!(x.bool_type().is_none());
16228    /// assert!(x.timestamp_type().is_none());
16229    /// assert!(x.date_type().is_none());
16230    /// assert!(x.aggregate_type().is_none());
16231    /// assert!(x.struct_type().is_none());
16232    /// assert!(x.array_type().is_none());
16233    /// assert!(x.map_type().is_none());
16234    /// assert!(x.proto_type().is_none());
16235    /// assert!(x.enum_type().is_none());
16236    /// ```
16237    pub fn set_float64_type<
16238        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Float64>>,
16239    >(
16240        mut self,
16241        v: T,
16242    ) -> Self {
16243        self.kind = std::option::Option::Some(crate::model::r#type::Kind::Float64Type(v.into()));
16244        self
16245    }
16246
16247    /// The value of [kind][crate::model::Type::kind]
16248    /// if it holds a `BoolType`, `None` if the field is not set or
16249    /// holds a different branch.
16250    pub fn bool_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Bool>> {
16251        #[allow(unreachable_patterns)]
16252        self.kind.as_ref().and_then(|v| match v {
16253            crate::model::r#type::Kind::BoolType(v) => std::option::Option::Some(v),
16254            _ => std::option::Option::None,
16255        })
16256    }
16257
16258    /// Sets the value of [kind][crate::model::Type::kind]
16259    /// to hold a `BoolType`.
16260    ///
16261    /// Note that all the setters affecting `kind` are
16262    /// mutually exclusive.
16263    ///
16264    /// # Example
16265    /// ```ignore,no_run
16266    /// # use google_cloud_bigtable_admin_v2::model::Type;
16267    /// use google_cloud_bigtable_admin_v2::model::r#type::Bool;
16268    /// let x = Type::new().set_bool_type(Bool::default()/* use setters */);
16269    /// assert!(x.bool_type().is_some());
16270    /// assert!(x.bytes_type().is_none());
16271    /// assert!(x.string_type().is_none());
16272    /// assert!(x.int64_type().is_none());
16273    /// assert!(x.float32_type().is_none());
16274    /// assert!(x.float64_type().is_none());
16275    /// assert!(x.timestamp_type().is_none());
16276    /// assert!(x.date_type().is_none());
16277    /// assert!(x.aggregate_type().is_none());
16278    /// assert!(x.struct_type().is_none());
16279    /// assert!(x.array_type().is_none());
16280    /// assert!(x.map_type().is_none());
16281    /// assert!(x.proto_type().is_none());
16282    /// assert!(x.enum_type().is_none());
16283    /// ```
16284    pub fn set_bool_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Bool>>>(
16285        mut self,
16286        v: T,
16287    ) -> Self {
16288        self.kind = std::option::Option::Some(crate::model::r#type::Kind::BoolType(v.into()));
16289        self
16290    }
16291
16292    /// The value of [kind][crate::model::Type::kind]
16293    /// if it holds a `TimestampType`, `None` if the field is not set or
16294    /// holds a different branch.
16295    pub fn timestamp_type(
16296        &self,
16297    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Timestamp>> {
16298        #[allow(unreachable_patterns)]
16299        self.kind.as_ref().and_then(|v| match v {
16300            crate::model::r#type::Kind::TimestampType(v) => std::option::Option::Some(v),
16301            _ => std::option::Option::None,
16302        })
16303    }
16304
16305    /// Sets the value of [kind][crate::model::Type::kind]
16306    /// to hold a `TimestampType`.
16307    ///
16308    /// Note that all the setters affecting `kind` are
16309    /// mutually exclusive.
16310    ///
16311    /// # Example
16312    /// ```ignore,no_run
16313    /// # use google_cloud_bigtable_admin_v2::model::Type;
16314    /// use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
16315    /// let x = Type::new().set_timestamp_type(Timestamp::default()/* use setters */);
16316    /// assert!(x.timestamp_type().is_some());
16317    /// assert!(x.bytes_type().is_none());
16318    /// assert!(x.string_type().is_none());
16319    /// assert!(x.int64_type().is_none());
16320    /// assert!(x.float32_type().is_none());
16321    /// assert!(x.float64_type().is_none());
16322    /// assert!(x.bool_type().is_none());
16323    /// assert!(x.date_type().is_none());
16324    /// assert!(x.aggregate_type().is_none());
16325    /// assert!(x.struct_type().is_none());
16326    /// assert!(x.array_type().is_none());
16327    /// assert!(x.map_type().is_none());
16328    /// assert!(x.proto_type().is_none());
16329    /// assert!(x.enum_type().is_none());
16330    /// ```
16331    pub fn set_timestamp_type<
16332        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Timestamp>>,
16333    >(
16334        mut self,
16335        v: T,
16336    ) -> Self {
16337        self.kind = std::option::Option::Some(crate::model::r#type::Kind::TimestampType(v.into()));
16338        self
16339    }
16340
16341    /// The value of [kind][crate::model::Type::kind]
16342    /// if it holds a `DateType`, `None` if the field is not set or
16343    /// holds a different branch.
16344    pub fn date_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Date>> {
16345        #[allow(unreachable_patterns)]
16346        self.kind.as_ref().and_then(|v| match v {
16347            crate::model::r#type::Kind::DateType(v) => std::option::Option::Some(v),
16348            _ => std::option::Option::None,
16349        })
16350    }
16351
16352    /// Sets the value of [kind][crate::model::Type::kind]
16353    /// to hold a `DateType`.
16354    ///
16355    /// Note that all the setters affecting `kind` are
16356    /// mutually exclusive.
16357    ///
16358    /// # Example
16359    /// ```ignore,no_run
16360    /// # use google_cloud_bigtable_admin_v2::model::Type;
16361    /// use google_cloud_bigtable_admin_v2::model::r#type::Date;
16362    /// let x = Type::new().set_date_type(Date::default()/* use setters */);
16363    /// assert!(x.date_type().is_some());
16364    /// assert!(x.bytes_type().is_none());
16365    /// assert!(x.string_type().is_none());
16366    /// assert!(x.int64_type().is_none());
16367    /// assert!(x.float32_type().is_none());
16368    /// assert!(x.float64_type().is_none());
16369    /// assert!(x.bool_type().is_none());
16370    /// assert!(x.timestamp_type().is_none());
16371    /// assert!(x.aggregate_type().is_none());
16372    /// assert!(x.struct_type().is_none());
16373    /// assert!(x.array_type().is_none());
16374    /// assert!(x.map_type().is_none());
16375    /// assert!(x.proto_type().is_none());
16376    /// assert!(x.enum_type().is_none());
16377    /// ```
16378    pub fn set_date_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Date>>>(
16379        mut self,
16380        v: T,
16381    ) -> Self {
16382        self.kind = std::option::Option::Some(crate::model::r#type::Kind::DateType(v.into()));
16383        self
16384    }
16385
16386    /// The value of [kind][crate::model::Type::kind]
16387    /// if it holds a `AggregateType`, `None` if the field is not set or
16388    /// holds a different branch.
16389    pub fn aggregate_type(
16390        &self,
16391    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Aggregate>> {
16392        #[allow(unreachable_patterns)]
16393        self.kind.as_ref().and_then(|v| match v {
16394            crate::model::r#type::Kind::AggregateType(v) => std::option::Option::Some(v),
16395            _ => std::option::Option::None,
16396        })
16397    }
16398
16399    /// Sets the value of [kind][crate::model::Type::kind]
16400    /// to hold a `AggregateType`.
16401    ///
16402    /// Note that all the setters affecting `kind` are
16403    /// mutually exclusive.
16404    ///
16405    /// # Example
16406    /// ```ignore,no_run
16407    /// # use google_cloud_bigtable_admin_v2::model::Type;
16408    /// use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
16409    /// let x = Type::new().set_aggregate_type(Aggregate::default()/* use setters */);
16410    /// assert!(x.aggregate_type().is_some());
16411    /// assert!(x.bytes_type().is_none());
16412    /// assert!(x.string_type().is_none());
16413    /// assert!(x.int64_type().is_none());
16414    /// assert!(x.float32_type().is_none());
16415    /// assert!(x.float64_type().is_none());
16416    /// assert!(x.bool_type().is_none());
16417    /// assert!(x.timestamp_type().is_none());
16418    /// assert!(x.date_type().is_none());
16419    /// assert!(x.struct_type().is_none());
16420    /// assert!(x.array_type().is_none());
16421    /// assert!(x.map_type().is_none());
16422    /// assert!(x.proto_type().is_none());
16423    /// assert!(x.enum_type().is_none());
16424    /// ```
16425    pub fn set_aggregate_type<
16426        T: std::convert::Into<std::boxed::Box<crate::model::r#type::Aggregate>>,
16427    >(
16428        mut self,
16429        v: T,
16430    ) -> Self {
16431        self.kind = std::option::Option::Some(crate::model::r#type::Kind::AggregateType(v.into()));
16432        self
16433    }
16434
16435    /// The value of [kind][crate::model::Type::kind]
16436    /// if it holds a `StructType`, `None` if the field is not set or
16437    /// holds a different branch.
16438    pub fn struct_type(
16439        &self,
16440    ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Struct>> {
16441        #[allow(unreachable_patterns)]
16442        self.kind.as_ref().and_then(|v| match v {
16443            crate::model::r#type::Kind::StructType(v) => std::option::Option::Some(v),
16444            _ => std::option::Option::None,
16445        })
16446    }
16447
16448    /// Sets the value of [kind][crate::model::Type::kind]
16449    /// to hold a `StructType`.
16450    ///
16451    /// Note that all the setters affecting `kind` are
16452    /// mutually exclusive.
16453    ///
16454    /// # Example
16455    /// ```ignore,no_run
16456    /// # use google_cloud_bigtable_admin_v2::model::Type;
16457    /// use google_cloud_bigtable_admin_v2::model::r#type::Struct;
16458    /// let x = Type::new().set_struct_type(Struct::default()/* use setters */);
16459    /// assert!(x.struct_type().is_some());
16460    /// assert!(x.bytes_type().is_none());
16461    /// assert!(x.string_type().is_none());
16462    /// assert!(x.int64_type().is_none());
16463    /// assert!(x.float32_type().is_none());
16464    /// assert!(x.float64_type().is_none());
16465    /// assert!(x.bool_type().is_none());
16466    /// assert!(x.timestamp_type().is_none());
16467    /// assert!(x.date_type().is_none());
16468    /// assert!(x.aggregate_type().is_none());
16469    /// assert!(x.array_type().is_none());
16470    /// assert!(x.map_type().is_none());
16471    /// assert!(x.proto_type().is_none());
16472    /// assert!(x.enum_type().is_none());
16473    /// ```
16474    pub fn set_struct_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Struct>>>(
16475        mut self,
16476        v: T,
16477    ) -> Self {
16478        self.kind = std::option::Option::Some(crate::model::r#type::Kind::StructType(v.into()));
16479        self
16480    }
16481
16482    /// The value of [kind][crate::model::Type::kind]
16483    /// if it holds a `ArrayType`, `None` if the field is not set or
16484    /// holds a different branch.
16485    pub fn array_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Array>> {
16486        #[allow(unreachable_patterns)]
16487        self.kind.as_ref().and_then(|v| match v {
16488            crate::model::r#type::Kind::ArrayType(v) => std::option::Option::Some(v),
16489            _ => std::option::Option::None,
16490        })
16491    }
16492
16493    /// Sets the value of [kind][crate::model::Type::kind]
16494    /// to hold a `ArrayType`.
16495    ///
16496    /// Note that all the setters affecting `kind` are
16497    /// mutually exclusive.
16498    ///
16499    /// # Example
16500    /// ```ignore,no_run
16501    /// # use google_cloud_bigtable_admin_v2::model::Type;
16502    /// use google_cloud_bigtable_admin_v2::model::r#type::Array;
16503    /// let x = Type::new().set_array_type(Array::default()/* use setters */);
16504    /// assert!(x.array_type().is_some());
16505    /// assert!(x.bytes_type().is_none());
16506    /// assert!(x.string_type().is_none());
16507    /// assert!(x.int64_type().is_none());
16508    /// assert!(x.float32_type().is_none());
16509    /// assert!(x.float64_type().is_none());
16510    /// assert!(x.bool_type().is_none());
16511    /// assert!(x.timestamp_type().is_none());
16512    /// assert!(x.date_type().is_none());
16513    /// assert!(x.aggregate_type().is_none());
16514    /// assert!(x.struct_type().is_none());
16515    /// assert!(x.map_type().is_none());
16516    /// assert!(x.proto_type().is_none());
16517    /// assert!(x.enum_type().is_none());
16518    /// ```
16519    pub fn set_array_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Array>>>(
16520        mut self,
16521        v: T,
16522    ) -> Self {
16523        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ArrayType(v.into()));
16524        self
16525    }
16526
16527    /// The value of [kind][crate::model::Type::kind]
16528    /// if it holds a `MapType`, `None` if the field is not set or
16529    /// holds a different branch.
16530    pub fn map_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Map>> {
16531        #[allow(unreachable_patterns)]
16532        self.kind.as_ref().and_then(|v| match v {
16533            crate::model::r#type::Kind::MapType(v) => std::option::Option::Some(v),
16534            _ => std::option::Option::None,
16535        })
16536    }
16537
16538    /// Sets the value of [kind][crate::model::Type::kind]
16539    /// to hold a `MapType`.
16540    ///
16541    /// Note that all the setters affecting `kind` are
16542    /// mutually exclusive.
16543    ///
16544    /// # Example
16545    /// ```ignore,no_run
16546    /// # use google_cloud_bigtable_admin_v2::model::Type;
16547    /// use google_cloud_bigtable_admin_v2::model::r#type::Map;
16548    /// let x = Type::new().set_map_type(Map::default()/* use setters */);
16549    /// assert!(x.map_type().is_some());
16550    /// assert!(x.bytes_type().is_none());
16551    /// assert!(x.string_type().is_none());
16552    /// assert!(x.int64_type().is_none());
16553    /// assert!(x.float32_type().is_none());
16554    /// assert!(x.float64_type().is_none());
16555    /// assert!(x.bool_type().is_none());
16556    /// assert!(x.timestamp_type().is_none());
16557    /// assert!(x.date_type().is_none());
16558    /// assert!(x.aggregate_type().is_none());
16559    /// assert!(x.struct_type().is_none());
16560    /// assert!(x.array_type().is_none());
16561    /// assert!(x.proto_type().is_none());
16562    /// assert!(x.enum_type().is_none());
16563    /// ```
16564    pub fn set_map_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Map>>>(
16565        mut self,
16566        v: T,
16567    ) -> Self {
16568        self.kind = std::option::Option::Some(crate::model::r#type::Kind::MapType(v.into()));
16569        self
16570    }
16571
16572    /// The value of [kind][crate::model::Type::kind]
16573    /// if it holds a `ProtoType`, `None` if the field is not set or
16574    /// holds a different branch.
16575    pub fn proto_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Proto>> {
16576        #[allow(unreachable_patterns)]
16577        self.kind.as_ref().and_then(|v| match v {
16578            crate::model::r#type::Kind::ProtoType(v) => std::option::Option::Some(v),
16579            _ => std::option::Option::None,
16580        })
16581    }
16582
16583    /// Sets the value of [kind][crate::model::Type::kind]
16584    /// to hold a `ProtoType`.
16585    ///
16586    /// Note that all the setters affecting `kind` are
16587    /// mutually exclusive.
16588    ///
16589    /// # Example
16590    /// ```ignore,no_run
16591    /// # use google_cloud_bigtable_admin_v2::model::Type;
16592    /// use google_cloud_bigtable_admin_v2::model::r#type::Proto;
16593    /// let x = Type::new().set_proto_type(Proto::default()/* use setters */);
16594    /// assert!(x.proto_type().is_some());
16595    /// assert!(x.bytes_type().is_none());
16596    /// assert!(x.string_type().is_none());
16597    /// assert!(x.int64_type().is_none());
16598    /// assert!(x.float32_type().is_none());
16599    /// assert!(x.float64_type().is_none());
16600    /// assert!(x.bool_type().is_none());
16601    /// assert!(x.timestamp_type().is_none());
16602    /// assert!(x.date_type().is_none());
16603    /// assert!(x.aggregate_type().is_none());
16604    /// assert!(x.struct_type().is_none());
16605    /// assert!(x.array_type().is_none());
16606    /// assert!(x.map_type().is_none());
16607    /// assert!(x.enum_type().is_none());
16608    /// ```
16609    pub fn set_proto_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Proto>>>(
16610        mut self,
16611        v: T,
16612    ) -> Self {
16613        self.kind = std::option::Option::Some(crate::model::r#type::Kind::ProtoType(v.into()));
16614        self
16615    }
16616
16617    /// The value of [kind][crate::model::Type::kind]
16618    /// if it holds a `EnumType`, `None` if the field is not set or
16619    /// holds a different branch.
16620    pub fn enum_type(&self) -> std::option::Option<&std::boxed::Box<crate::model::r#type::Enum>> {
16621        #[allow(unreachable_patterns)]
16622        self.kind.as_ref().and_then(|v| match v {
16623            crate::model::r#type::Kind::EnumType(v) => std::option::Option::Some(v),
16624            _ => std::option::Option::None,
16625        })
16626    }
16627
16628    /// Sets the value of [kind][crate::model::Type::kind]
16629    /// to hold a `EnumType`.
16630    ///
16631    /// Note that all the setters affecting `kind` are
16632    /// mutually exclusive.
16633    ///
16634    /// # Example
16635    /// ```ignore,no_run
16636    /// # use google_cloud_bigtable_admin_v2::model::Type;
16637    /// use google_cloud_bigtable_admin_v2::model::r#type::Enum;
16638    /// let x = Type::new().set_enum_type(Enum::default()/* use setters */);
16639    /// assert!(x.enum_type().is_some());
16640    /// assert!(x.bytes_type().is_none());
16641    /// assert!(x.string_type().is_none());
16642    /// assert!(x.int64_type().is_none());
16643    /// assert!(x.float32_type().is_none());
16644    /// assert!(x.float64_type().is_none());
16645    /// assert!(x.bool_type().is_none());
16646    /// assert!(x.timestamp_type().is_none());
16647    /// assert!(x.date_type().is_none());
16648    /// assert!(x.aggregate_type().is_none());
16649    /// assert!(x.struct_type().is_none());
16650    /// assert!(x.array_type().is_none());
16651    /// assert!(x.map_type().is_none());
16652    /// assert!(x.proto_type().is_none());
16653    /// ```
16654    pub fn set_enum_type<T: std::convert::Into<std::boxed::Box<crate::model::r#type::Enum>>>(
16655        mut self,
16656        v: T,
16657    ) -> Self {
16658        self.kind = std::option::Option::Some(crate::model::r#type::Kind::EnumType(v.into()));
16659        self
16660    }
16661}
16662
16663impl wkt::message::Message for Type {
16664    fn typename() -> &'static str {
16665        "type.googleapis.com/google.bigtable.admin.v2.Type"
16666    }
16667}
16668
16669/// Defines additional types related to [Type].
16670pub mod r#type {
16671    #[allow(unused_imports)]
16672    use super::*;
16673
16674    /// Bytes
16675    /// Values of type `Bytes` are stored in `Value.bytes_value`.
16676    #[derive(Clone, Default, PartialEq)]
16677    #[non_exhaustive]
16678    pub struct Bytes {
16679        /// The encoding to use when converting to or from lower level types.
16680        pub encoding: std::option::Option<crate::model::r#type::bytes::Encoding>,
16681
16682        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16683    }
16684
16685    impl Bytes {
16686        /// Creates a new default instance.
16687        pub fn new() -> Self {
16688            std::default::Default::default()
16689        }
16690
16691        /// Sets the value of [encoding][crate::model::r#type::Bytes::encoding].
16692        ///
16693        /// # Example
16694        /// ```ignore,no_run
16695        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16696        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16697        /// let x = Bytes::new().set_encoding(Encoding::default()/* use setters */);
16698        /// ```
16699        pub fn set_encoding<T>(mut self, v: T) -> Self
16700        where
16701            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
16702        {
16703            self.encoding = std::option::Option::Some(v.into());
16704            self
16705        }
16706
16707        /// Sets or clears the value of [encoding][crate::model::r#type::Bytes::encoding].
16708        ///
16709        /// # Example
16710        /// ```ignore,no_run
16711        /// # use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
16712        /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16713        /// let x = Bytes::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16714        /// let x = Bytes::new().set_or_clear_encoding(None::<Encoding>);
16715        /// ```
16716        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16717        where
16718            T: std::convert::Into<crate::model::r#type::bytes::Encoding>,
16719        {
16720            self.encoding = v.map(|x| x.into());
16721            self
16722        }
16723    }
16724
16725    impl wkt::message::Message for Bytes {
16726        fn typename() -> &'static str {
16727            "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes"
16728        }
16729    }
16730
16731    /// Defines additional types related to [Bytes].
16732    pub mod bytes {
16733        #[allow(unused_imports)]
16734        use super::*;
16735
16736        /// Rules used to convert to or from lower level types.
16737        #[derive(Clone, Default, PartialEq)]
16738        #[non_exhaustive]
16739        pub struct Encoding {
16740            /// Which encoding to use.
16741            pub encoding: std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16742
16743            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16744        }
16745
16746        impl Encoding {
16747            /// Creates a new default instance.
16748            pub fn new() -> Self {
16749                std::default::Default::default()
16750            }
16751
16752            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding].
16753            ///
16754            /// Note that all the setters affecting `encoding` are mutually
16755            /// exclusive.
16756            ///
16757            /// # Example
16758            /// ```ignore,no_run
16759            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16760            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16761            /// let x = Encoding::new().set_encoding(Some(
16762            ///     google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Encoding::Raw(Raw::default().into())));
16763            /// ```
16764            pub fn set_encoding<
16765                T: std::convert::Into<
16766                        std::option::Option<crate::model::r#type::bytes::encoding::Encoding>,
16767                    >,
16768            >(
16769                mut self,
16770                v: T,
16771            ) -> Self {
16772                self.encoding = v.into();
16773                self
16774            }
16775
16776            /// The value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16777            /// if it holds a `Raw`, `None` if the field is not set or
16778            /// holds a different branch.
16779            pub fn raw(
16780                &self,
16781            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>
16782            {
16783                #[allow(unreachable_patterns)]
16784                self.encoding.as_ref().and_then(|v| match v {
16785                    crate::model::r#type::bytes::encoding::Encoding::Raw(v) => {
16786                        std::option::Option::Some(v)
16787                    }
16788                    _ => std::option::Option::None,
16789                })
16790            }
16791
16792            /// Sets the value of [encoding][crate::model::r#type::bytes::Encoding::encoding]
16793            /// to hold a `Raw`.
16794            ///
16795            /// Note that all the setters affecting `encoding` are
16796            /// mutually exclusive.
16797            ///
16798            /// # Example
16799            /// ```ignore,no_run
16800            /// # use google_cloud_bigtable_admin_v2::model::r#type::bytes::Encoding;
16801            /// use google_cloud_bigtable_admin_v2::model::r#type::bytes::encoding::Raw;
16802            /// let x = Encoding::new().set_raw(Raw::default()/* use setters */);
16803            /// assert!(x.raw().is_some());
16804            /// ```
16805            pub fn set_raw<
16806                T: std::convert::Into<std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>>,
16807            >(
16808                mut self,
16809                v: T,
16810            ) -> Self {
16811                self.encoding = std::option::Option::Some(
16812                    crate::model::r#type::bytes::encoding::Encoding::Raw(v.into()),
16813                );
16814                self
16815            }
16816        }
16817
16818        impl wkt::message::Message for Encoding {
16819            fn typename() -> &'static str {
16820                "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding"
16821            }
16822        }
16823
16824        /// Defines additional types related to [Encoding].
16825        pub mod encoding {
16826            #[allow(unused_imports)]
16827            use super::*;
16828
16829            /// Leaves the value as-is.
16830            ///
16831            /// Sorted mode: all values are supported.
16832            ///
16833            /// Distinct mode: all values are supported.
16834            #[derive(Clone, Default, PartialEq)]
16835            #[non_exhaustive]
16836            pub struct Raw {
16837                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16838            }
16839
16840            impl Raw {
16841                /// Creates a new default instance.
16842                pub fn new() -> Self {
16843                    std::default::Default::default()
16844                }
16845            }
16846
16847            impl wkt::message::Message for Raw {
16848                fn typename() -> &'static str {
16849                    "type.googleapis.com/google.bigtable.admin.v2.Type.Bytes.Encoding.Raw"
16850                }
16851            }
16852
16853            /// Which encoding to use.
16854            #[derive(Clone, Debug, PartialEq)]
16855            #[non_exhaustive]
16856            pub enum Encoding {
16857                /// Use `Raw` encoding.
16858                Raw(std::boxed::Box<crate::model::r#type::bytes::encoding::Raw>),
16859            }
16860        }
16861    }
16862
16863    /// String
16864    /// Values of type `String` are stored in `Value.string_value`.
16865    #[derive(Clone, Default, PartialEq)]
16866    #[non_exhaustive]
16867    pub struct String {
16868        /// The encoding to use when converting to or from lower level types.
16869        pub encoding: std::option::Option<crate::model::r#type::string::Encoding>,
16870
16871        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16872    }
16873
16874    impl String {
16875        /// Creates a new default instance.
16876        pub fn new() -> Self {
16877            std::default::Default::default()
16878        }
16879
16880        /// Sets the value of [encoding][crate::model::r#type::String::encoding].
16881        ///
16882        /// # Example
16883        /// ```ignore,no_run
16884        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16885        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16886        /// let x = String::new().set_encoding(Encoding::default()/* use setters */);
16887        /// ```
16888        pub fn set_encoding<T>(mut self, v: T) -> Self
16889        where
16890            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16891        {
16892            self.encoding = std::option::Option::Some(v.into());
16893            self
16894        }
16895
16896        /// Sets or clears the value of [encoding][crate::model::r#type::String::encoding].
16897        ///
16898        /// # Example
16899        /// ```ignore,no_run
16900        /// # use google_cloud_bigtable_admin_v2::model::r#type::String;
16901        /// use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16902        /// let x = String::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
16903        /// let x = String::new().set_or_clear_encoding(None::<Encoding>);
16904        /// ```
16905        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
16906        where
16907            T: std::convert::Into<crate::model::r#type::string::Encoding>,
16908        {
16909            self.encoding = v.map(|x| x.into());
16910            self
16911        }
16912    }
16913
16914    impl wkt::message::Message for String {
16915        fn typename() -> &'static str {
16916            "type.googleapis.com/google.bigtable.admin.v2.Type.String"
16917        }
16918    }
16919
16920    /// Defines additional types related to [String].
16921    pub mod string {
16922        #[allow(unused_imports)]
16923        use super::*;
16924
16925        /// Rules used to convert to or from lower level types.
16926        #[derive(Clone, Default, PartialEq)]
16927        #[non_exhaustive]
16928        pub struct Encoding {
16929            /// Which encoding to use.
16930            pub encoding: std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16931
16932            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16933        }
16934
16935        impl Encoding {
16936            /// Creates a new default instance.
16937            pub fn new() -> Self {
16938                std::default::Default::default()
16939            }
16940
16941            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding].
16942            ///
16943            /// Note that all the setters affecting `encoding` are mutually
16944            /// exclusive.
16945            ///
16946            /// # Example
16947            /// ```ignore,no_run
16948            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16949            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
16950            /// let x = Encoding::new().set_encoding(Some(
16951            ///     google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Encoding::Utf8Bytes(Utf8Bytes::default().into())));
16952            /// ```
16953            pub fn set_encoding<
16954                T: std::convert::Into<
16955                        std::option::Option<crate::model::r#type::string::encoding::Encoding>,
16956                    >,
16957            >(
16958                mut self,
16959                v: T,
16960            ) -> Self {
16961                self.encoding = v.into();
16962                self
16963            }
16964
16965            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
16966            /// if it holds a `Utf8Raw`, `None` if the field is not set or
16967            /// holds a different branch.
16968            #[deprecated]
16969            pub fn utf8_raw(
16970                &self,
16971            ) -> std::option::Option<
16972                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
16973            > {
16974                #[allow(unreachable_patterns)]
16975                self.encoding.as_ref().and_then(|v| match v {
16976                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v) => {
16977                        std::option::Option::Some(v)
16978                    }
16979                    _ => std::option::Option::None,
16980                })
16981            }
16982
16983            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
16984            /// to hold a `Utf8Raw`.
16985            ///
16986            /// Note that all the setters affecting `encoding` are
16987            /// mutually exclusive.
16988            ///
16989            /// # Example
16990            /// ```ignore,no_run
16991            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
16992            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Raw;
16993            /// let x = Encoding::new().set_utf8_raw(Utf8Raw::default()/* use setters */);
16994            /// assert!(x.utf8_raw().is_some());
16995            /// assert!(x.utf8_bytes().is_none());
16996            /// ```
16997            #[deprecated]
16998            pub fn set_utf8_raw<
16999                T: std::convert::Into<
17000                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>,
17001                    >,
17002            >(
17003                mut self,
17004                v: T,
17005            ) -> Self {
17006                self.encoding = std::option::Option::Some(
17007                    crate::model::r#type::string::encoding::Encoding::Utf8Raw(v.into()),
17008                );
17009                self
17010            }
17011
17012            /// The value of [encoding][crate::model::r#type::string::Encoding::encoding]
17013            /// if it holds a `Utf8Bytes`, `None` if the field is not set or
17014            /// holds a different branch.
17015            pub fn utf8_bytes(
17016                &self,
17017            ) -> std::option::Option<
17018                &std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
17019            > {
17020                #[allow(unreachable_patterns)]
17021                self.encoding.as_ref().and_then(|v| match v {
17022                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v) => {
17023                        std::option::Option::Some(v)
17024                    }
17025                    _ => std::option::Option::None,
17026                })
17027            }
17028
17029            /// Sets the value of [encoding][crate::model::r#type::string::Encoding::encoding]
17030            /// to hold a `Utf8Bytes`.
17031            ///
17032            /// Note that all the setters affecting `encoding` are
17033            /// mutually exclusive.
17034            ///
17035            /// # Example
17036            /// ```ignore,no_run
17037            /// # use google_cloud_bigtable_admin_v2::model::r#type::string::Encoding;
17038            /// use google_cloud_bigtable_admin_v2::model::r#type::string::encoding::Utf8Bytes;
17039            /// let x = Encoding::new().set_utf8_bytes(Utf8Bytes::default()/* use setters */);
17040            /// assert!(x.utf8_bytes().is_some());
17041            /// assert!(x.utf8_raw().is_none());
17042            /// ```
17043            pub fn set_utf8_bytes<
17044                T: std::convert::Into<
17045                        std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>,
17046                    >,
17047            >(
17048                mut self,
17049                v: T,
17050            ) -> Self {
17051                self.encoding = std::option::Option::Some(
17052                    crate::model::r#type::string::encoding::Encoding::Utf8Bytes(v.into()),
17053                );
17054                self
17055            }
17056        }
17057
17058        impl wkt::message::Message for Encoding {
17059            fn typename() -> &'static str {
17060                "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding"
17061            }
17062        }
17063
17064        /// Defines additional types related to [Encoding].
17065        pub mod encoding {
17066            #[allow(unused_imports)]
17067            use super::*;
17068
17069            /// Deprecated: prefer the equivalent `Utf8Bytes`.
17070            #[derive(Clone, Default, PartialEq)]
17071            #[non_exhaustive]
17072            #[deprecated]
17073            pub struct Utf8Raw {
17074                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17075            }
17076
17077            impl Utf8Raw {
17078                /// Creates a new default instance.
17079                pub fn new() -> Self {
17080                    std::default::Default::default()
17081                }
17082            }
17083
17084            impl wkt::message::Message for Utf8Raw {
17085                fn typename() -> &'static str {
17086                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Raw"
17087                }
17088            }
17089
17090            /// UTF-8 encoding.
17091            ///
17092            /// Sorted mode:
17093            ///
17094            /// - All values are supported.
17095            /// - Code point order is preserved.
17096            ///
17097            /// Distinct mode: all values are supported.
17098            ///
17099            /// Compatible with:
17100            ///
17101            /// - BigQuery `TEXT` encoding
17102            /// - HBase `Bytes.toBytes`
17103            /// - Java `String#getBytes(StandardCharsets.UTF_8)`
17104            #[derive(Clone, Default, PartialEq)]
17105            #[non_exhaustive]
17106            pub struct Utf8Bytes {
17107                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17108            }
17109
17110            impl Utf8Bytes {
17111                /// Creates a new default instance.
17112                pub fn new() -> Self {
17113                    std::default::Default::default()
17114                }
17115            }
17116
17117            impl wkt::message::Message for Utf8Bytes {
17118                fn typename() -> &'static str {
17119                    "type.googleapis.com/google.bigtable.admin.v2.Type.String.Encoding.Utf8Bytes"
17120                }
17121            }
17122
17123            /// Which encoding to use.
17124            #[derive(Clone, Debug, PartialEq)]
17125            #[non_exhaustive]
17126            pub enum Encoding {
17127                /// Deprecated: if set, converts to an empty `utf8_bytes`.
17128                #[deprecated]
17129                Utf8Raw(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Raw>),
17130                /// Use `Utf8Bytes` encoding.
17131                Utf8Bytes(std::boxed::Box<crate::model::r#type::string::encoding::Utf8Bytes>),
17132            }
17133        }
17134    }
17135
17136    /// Int64
17137    /// Values of type `Int64` are stored in `Value.int_value`.
17138    #[derive(Clone, Default, PartialEq)]
17139    #[non_exhaustive]
17140    pub struct Int64 {
17141        /// The encoding to use when converting to or from lower level types.
17142        pub encoding: std::option::Option<crate::model::r#type::int_64::Encoding>,
17143
17144        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17145    }
17146
17147    impl Int64 {
17148        /// Creates a new default instance.
17149        pub fn new() -> Self {
17150            std::default::Default::default()
17151        }
17152
17153        /// Sets the value of [encoding][crate::model::r#type::Int64::encoding].
17154        ///
17155        /// # Example
17156        /// ```ignore,no_run
17157        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
17158        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17159        /// let x = Int64::new().set_encoding(Encoding::default()/* use setters */);
17160        /// ```
17161        pub fn set_encoding<T>(mut self, v: T) -> Self
17162        where
17163            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
17164        {
17165            self.encoding = std::option::Option::Some(v.into());
17166            self
17167        }
17168
17169        /// Sets or clears the value of [encoding][crate::model::r#type::Int64::encoding].
17170        ///
17171        /// # Example
17172        /// ```ignore,no_run
17173        /// # use google_cloud_bigtable_admin_v2::model::r#type::Int64;
17174        /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17175        /// let x = Int64::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17176        /// let x = Int64::new().set_or_clear_encoding(None::<Encoding>);
17177        /// ```
17178        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17179        where
17180            T: std::convert::Into<crate::model::r#type::int_64::Encoding>,
17181        {
17182            self.encoding = v.map(|x| x.into());
17183            self
17184        }
17185    }
17186
17187    impl wkt::message::Message for Int64 {
17188        fn typename() -> &'static str {
17189            "type.googleapis.com/google.bigtable.admin.v2.Type.Int64"
17190        }
17191    }
17192
17193    /// Defines additional types related to [Int64].
17194    pub mod int_64 {
17195        #[allow(unused_imports)]
17196        use super::*;
17197
17198        /// Rules used to convert to or from lower level types.
17199        #[derive(Clone, Default, PartialEq)]
17200        #[non_exhaustive]
17201        pub struct Encoding {
17202            /// Which encoding to use.
17203            pub encoding: std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
17204
17205            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17206        }
17207
17208        impl Encoding {
17209            /// Creates a new default instance.
17210            pub fn new() -> Self {
17211                std::default::Default::default()
17212            }
17213
17214            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding].
17215            ///
17216            /// Note that all the setters affecting `encoding` are mutually
17217            /// exclusive.
17218            ///
17219            /// # Example
17220            /// ```ignore,no_run
17221            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17222            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17223            /// let x = Encoding::new().set_encoding(Some(
17224            ///     google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::Encoding::BigEndianBytes(BigEndianBytes::default().into())));
17225            /// ```
17226            pub fn set_encoding<
17227                T: std::convert::Into<
17228                        std::option::Option<crate::model::r#type::int_64::encoding::Encoding>,
17229                    >,
17230            >(
17231                mut self,
17232                v: T,
17233            ) -> Self {
17234                self.encoding = v.into();
17235                self
17236            }
17237
17238            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17239            /// if it holds a `BigEndianBytes`, `None` if the field is not set or
17240            /// holds a different branch.
17241            pub fn big_endian_bytes(
17242                &self,
17243            ) -> std::option::Option<
17244                &std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17245            > {
17246                #[allow(unreachable_patterns)]
17247                self.encoding.as_ref().and_then(|v| match v {
17248                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v) => {
17249                        std::option::Option::Some(v)
17250                    }
17251                    _ => std::option::Option::None,
17252                })
17253            }
17254
17255            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17256            /// to hold a `BigEndianBytes`.
17257            ///
17258            /// Note that all the setters affecting `encoding` are
17259            /// mutually exclusive.
17260            ///
17261            /// # Example
17262            /// ```ignore,no_run
17263            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17264            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17265            /// let x = Encoding::new().set_big_endian_bytes(BigEndianBytes::default()/* use setters */);
17266            /// assert!(x.big_endian_bytes().is_some());
17267            /// assert!(x.ordered_code_bytes().is_none());
17268            /// ```
17269            pub fn set_big_endian_bytes<
17270                T: std::convert::Into<
17271                        std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17272                    >,
17273            >(
17274                mut self,
17275                v: T,
17276            ) -> Self {
17277                self.encoding = std::option::Option::Some(
17278                    crate::model::r#type::int_64::encoding::Encoding::BigEndianBytes(v.into()),
17279                );
17280                self
17281            }
17282
17283            /// The value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17284            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
17285            /// holds a different branch.
17286            pub fn ordered_code_bytes(
17287                &self,
17288            ) -> std::option::Option<
17289                &std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17290            > {
17291                #[allow(unreachable_patterns)]
17292                self.encoding.as_ref().and_then(|v| match v {
17293                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v) => {
17294                        std::option::Option::Some(v)
17295                    }
17296                    _ => std::option::Option::None,
17297                })
17298            }
17299
17300            /// Sets the value of [encoding][crate::model::r#type::int_64::Encoding::encoding]
17301            /// to hold a `OrderedCodeBytes`.
17302            ///
17303            /// Note that all the setters affecting `encoding` are
17304            /// mutually exclusive.
17305            ///
17306            /// # Example
17307            /// ```ignore,no_run
17308            /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding;
17309            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::OrderedCodeBytes;
17310            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
17311            /// assert!(x.ordered_code_bytes().is_some());
17312            /// assert!(x.big_endian_bytes().is_none());
17313            /// ```
17314            pub fn set_ordered_code_bytes<
17315                T: std::convert::Into<
17316                        std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17317                    >,
17318            >(
17319                mut self,
17320                v: T,
17321            ) -> Self {
17322                self.encoding = std::option::Option::Some(
17323                    crate::model::r#type::int_64::encoding::Encoding::OrderedCodeBytes(v.into()),
17324                );
17325                self
17326            }
17327        }
17328
17329        impl wkt::message::Message for Encoding {
17330            fn typename() -> &'static str {
17331                "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding"
17332            }
17333        }
17334
17335        /// Defines additional types related to [Encoding].
17336        pub mod encoding {
17337            #[allow(unused_imports)]
17338            use super::*;
17339
17340            /// Encodes the value as an 8-byte big-endian two's complement value.
17341            ///
17342            /// Sorted mode: non-negative values are supported.
17343            ///
17344            /// Distinct mode: all values are supported.
17345            ///
17346            /// Compatible with:
17347            ///
17348            /// - BigQuery `BINARY` encoding
17349            /// - HBase `Bytes.toBytes`
17350            /// - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN`
17351            #[derive(Clone, Default, PartialEq)]
17352            #[non_exhaustive]
17353            pub struct BigEndianBytes {
17354                /// Deprecated: ignored if set.
17355                #[deprecated]
17356                pub bytes_type: std::option::Option<crate::model::r#type::Bytes>,
17357
17358                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17359            }
17360
17361            impl BigEndianBytes {
17362                /// Creates a new default instance.
17363                pub fn new() -> Self {
17364                    std::default::Default::default()
17365                }
17366
17367                /// Sets the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
17368                ///
17369                /// # Example
17370                /// ```ignore,no_run
17371                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17372                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17373                /// let x = BigEndianBytes::new().set_bytes_type(Bytes::default()/* use setters */);
17374                /// ```
17375                #[deprecated]
17376                pub fn set_bytes_type<T>(mut self, v: T) -> Self
17377                where
17378                    T: std::convert::Into<crate::model::r#type::Bytes>,
17379                {
17380                    self.bytes_type = std::option::Option::Some(v.into());
17381                    self
17382                }
17383
17384                /// Sets or clears the value of [bytes_type][crate::model::r#type::int_64::encoding::BigEndianBytes::bytes_type].
17385                ///
17386                /// # Example
17387                /// ```ignore,no_run
17388                /// # use google_cloud_bigtable_admin_v2::model::r#type::int_64::encoding::BigEndianBytes;
17389                /// use google_cloud_bigtable_admin_v2::model::r#type::Bytes;
17390                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(Some(Bytes::default()/* use setters */));
17391                /// let x = BigEndianBytes::new().set_or_clear_bytes_type(None::<Bytes>);
17392                /// ```
17393                #[deprecated]
17394                pub fn set_or_clear_bytes_type<T>(mut self, v: std::option::Option<T>) -> Self
17395                where
17396                    T: std::convert::Into<crate::model::r#type::Bytes>,
17397                {
17398                    self.bytes_type = v.map(|x| x.into());
17399                    self
17400                }
17401            }
17402
17403            impl wkt::message::Message for BigEndianBytes {
17404                fn typename() -> &'static str {
17405                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes"
17406                }
17407            }
17408
17409            /// Encodes the value in a variable length binary format of up to 10 bytes.
17410            /// Values that are closer to zero use fewer bytes.
17411            ///
17412            /// Sorted mode: all values are supported.
17413            ///
17414            /// Distinct mode: all values are supported.
17415            #[derive(Clone, Default, PartialEq)]
17416            #[non_exhaustive]
17417            pub struct OrderedCodeBytes {
17418                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17419            }
17420
17421            impl OrderedCodeBytes {
17422                /// Creates a new default instance.
17423                pub fn new() -> Self {
17424                    std::default::Default::default()
17425                }
17426            }
17427
17428            impl wkt::message::Message for OrderedCodeBytes {
17429                fn typename() -> &'static str {
17430                    "type.googleapis.com/google.bigtable.admin.v2.Type.Int64.Encoding.OrderedCodeBytes"
17431                }
17432            }
17433
17434            /// Which encoding to use.
17435            #[derive(Clone, Debug, PartialEq)]
17436            #[non_exhaustive]
17437            pub enum Encoding {
17438                /// Use `BigEndianBytes` encoding.
17439                BigEndianBytes(
17440                    std::boxed::Box<crate::model::r#type::int_64::encoding::BigEndianBytes>,
17441                ),
17442                /// Use `OrderedCodeBytes` encoding.
17443                OrderedCodeBytes(
17444                    std::boxed::Box<crate::model::r#type::int_64::encoding::OrderedCodeBytes>,
17445                ),
17446            }
17447        }
17448    }
17449
17450    /// bool
17451    /// Values of type `Bool` are stored in `Value.bool_value`.
17452    #[derive(Clone, Default, PartialEq)]
17453    #[non_exhaustive]
17454    pub struct Bool {
17455        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17456    }
17457
17458    impl Bool {
17459        /// Creates a new default instance.
17460        pub fn new() -> Self {
17461            std::default::Default::default()
17462        }
17463    }
17464
17465    impl wkt::message::Message for Bool {
17466        fn typename() -> &'static str {
17467            "type.googleapis.com/google.bigtable.admin.v2.Type.Bool"
17468        }
17469    }
17470
17471    /// Float32
17472    /// Values of type `Float32` are stored in `Value.float_value`.
17473    #[derive(Clone, Default, PartialEq)]
17474    #[non_exhaustive]
17475    pub struct Float32 {
17476        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17477    }
17478
17479    impl Float32 {
17480        /// Creates a new default instance.
17481        pub fn new() -> Self {
17482            std::default::Default::default()
17483        }
17484    }
17485
17486    impl wkt::message::Message for Float32 {
17487        fn typename() -> &'static str {
17488            "type.googleapis.com/google.bigtable.admin.v2.Type.Float32"
17489        }
17490    }
17491
17492    /// Float64
17493    /// Values of type `Float64` are stored in `Value.float_value`.
17494    #[derive(Clone, Default, PartialEq)]
17495    #[non_exhaustive]
17496    pub struct Float64 {
17497        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17498    }
17499
17500    impl Float64 {
17501        /// Creates a new default instance.
17502        pub fn new() -> Self {
17503            std::default::Default::default()
17504        }
17505    }
17506
17507    impl wkt::message::Message for Float64 {
17508        fn typename() -> &'static str {
17509            "type.googleapis.com/google.bigtable.admin.v2.Type.Float64"
17510        }
17511    }
17512
17513    /// Timestamp
17514    /// Values of type `Timestamp` are stored in `Value.timestamp_value`.
17515    #[derive(Clone, Default, PartialEq)]
17516    #[non_exhaustive]
17517    pub struct Timestamp {
17518        /// The encoding to use when converting to or from lower level types.
17519        pub encoding: std::option::Option<crate::model::r#type::timestamp::Encoding>,
17520
17521        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17522    }
17523
17524    impl Timestamp {
17525        /// Creates a new default instance.
17526        pub fn new() -> Self {
17527            std::default::Default::default()
17528        }
17529
17530        /// Sets the value of [encoding][crate::model::r#type::Timestamp::encoding].
17531        ///
17532        /// # Example
17533        /// ```ignore,no_run
17534        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17535        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17536        /// let x = Timestamp::new().set_encoding(Encoding::default()/* use setters */);
17537        /// ```
17538        pub fn set_encoding<T>(mut self, v: T) -> Self
17539        where
17540            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
17541        {
17542            self.encoding = std::option::Option::Some(v.into());
17543            self
17544        }
17545
17546        /// Sets or clears the value of [encoding][crate::model::r#type::Timestamp::encoding].
17547        ///
17548        /// # Example
17549        /// ```ignore,no_run
17550        /// # use google_cloud_bigtable_admin_v2::model::r#type::Timestamp;
17551        /// use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17552        /// let x = Timestamp::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17553        /// let x = Timestamp::new().set_or_clear_encoding(None::<Encoding>);
17554        /// ```
17555        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17556        where
17557            T: std::convert::Into<crate::model::r#type::timestamp::Encoding>,
17558        {
17559            self.encoding = v.map(|x| x.into());
17560            self
17561        }
17562    }
17563
17564    impl wkt::message::Message for Timestamp {
17565        fn typename() -> &'static str {
17566            "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp"
17567        }
17568    }
17569
17570    /// Defines additional types related to [Timestamp].
17571    pub mod timestamp {
17572        #[allow(unused_imports)]
17573        use super::*;
17574
17575        /// Rules used to convert to or from lower level types.
17576        #[derive(Clone, Default, PartialEq)]
17577        #[non_exhaustive]
17578        pub struct Encoding {
17579            /// Which encoding to use.
17580            pub encoding: std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
17581
17582            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17583        }
17584
17585        impl Encoding {
17586            /// Creates a new default instance.
17587            pub fn new() -> Self {
17588                std::default::Default::default()
17589            }
17590
17591            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding].
17592            ///
17593            /// Note that all the setters affecting `encoding` are mutually
17594            /// exclusive.
17595            ///
17596            /// # Example
17597            /// ```ignore,no_run
17598            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17599            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
17600            /// let x = Encoding::new().set_encoding(Some(
17601            ///     google_cloud_bigtable_admin_v2::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(UnixMicrosInt64::default().into())));
17602            /// ```
17603            pub fn set_encoding<
17604                T: std::convert::Into<
17605                        std::option::Option<crate::model::r#type::timestamp::encoding::Encoding>,
17606                    >,
17607            >(
17608                mut self,
17609                v: T,
17610            ) -> Self {
17611                self.encoding = v.into();
17612                self
17613            }
17614
17615            /// The value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
17616            /// if it holds a `UnixMicrosInt64`, `None` if the field is not set or
17617            /// holds a different branch.
17618            pub fn unix_micros_int64(
17619                &self,
17620            ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::int_64::Encoding>>
17621            {
17622                #[allow(unreachable_patterns)]
17623                self.encoding.as_ref().and_then(|v| match v {
17624                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v) => {
17625                        std::option::Option::Some(v)
17626                    }
17627                    _ => std::option::Option::None,
17628                })
17629            }
17630
17631            /// Sets the value of [encoding][crate::model::r#type::timestamp::Encoding::encoding]
17632            /// to hold a `UnixMicrosInt64`.
17633            ///
17634            /// Note that all the setters affecting `encoding` are
17635            /// mutually exclusive.
17636            ///
17637            /// # Example
17638            /// ```ignore,no_run
17639            /// # use google_cloud_bigtable_admin_v2::model::r#type::timestamp::Encoding;
17640            /// use google_cloud_bigtable_admin_v2::model::r#type::int_64::Encoding as UnixMicrosInt64;
17641            /// let x = Encoding::new().set_unix_micros_int64(UnixMicrosInt64::default()/* use setters */);
17642            /// assert!(x.unix_micros_int64().is_some());
17643            /// ```
17644            pub fn set_unix_micros_int64<
17645                T: std::convert::Into<std::boxed::Box<crate::model::r#type::int_64::Encoding>>,
17646            >(
17647                mut self,
17648                v: T,
17649            ) -> Self {
17650                self.encoding = std::option::Option::Some(
17651                    crate::model::r#type::timestamp::encoding::Encoding::UnixMicrosInt64(v.into()),
17652                );
17653                self
17654            }
17655        }
17656
17657        impl wkt::message::Message for Encoding {
17658            fn typename() -> &'static str {
17659                "type.googleapis.com/google.bigtable.admin.v2.Type.Timestamp.Encoding"
17660            }
17661        }
17662
17663        /// Defines additional types related to [Encoding].
17664        pub mod encoding {
17665            #[allow(unused_imports)]
17666            use super::*;
17667
17668            /// Which encoding to use.
17669            #[derive(Clone, Debug, PartialEq)]
17670            #[non_exhaustive]
17671            pub enum Encoding {
17672                /// Encodes the number of microseconds since the Unix epoch using the
17673                /// given `Int64` encoding. Values must be microsecond-aligned.
17674                ///
17675                /// Compatible with:
17676                ///
17677                /// - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS`
17678                UnixMicrosInt64(std::boxed::Box<crate::model::r#type::int_64::Encoding>),
17679            }
17680        }
17681    }
17682
17683    /// Date
17684    /// Values of type `Date` are stored in `Value.date_value`.
17685    #[derive(Clone, Default, PartialEq)]
17686    #[non_exhaustive]
17687    pub struct Date {
17688        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17689    }
17690
17691    impl Date {
17692        /// Creates a new default instance.
17693        pub fn new() -> Self {
17694            std::default::Default::default()
17695        }
17696    }
17697
17698    impl wkt::message::Message for Date {
17699        fn typename() -> &'static str {
17700            "type.googleapis.com/google.bigtable.admin.v2.Type.Date"
17701        }
17702    }
17703
17704    /// A structured data value, consisting of fields which map to dynamically
17705    /// typed values.
17706    /// Values of type `Struct` are stored in `Value.array_value` where entries are
17707    /// in the same order and number as `field_types`.
17708    #[derive(Clone, Default, PartialEq)]
17709    #[non_exhaustive]
17710    pub struct Struct {
17711        /// The names and types of the fields in this struct.
17712        pub fields: std::vec::Vec<crate::model::r#type::r#struct::Field>,
17713
17714        /// The encoding to use when converting to or from lower level types.
17715        pub encoding: std::option::Option<crate::model::r#type::r#struct::Encoding>,
17716
17717        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17718    }
17719
17720    impl Struct {
17721        /// Creates a new default instance.
17722        pub fn new() -> Self {
17723            std::default::Default::default()
17724        }
17725
17726        /// Sets the value of [fields][crate::model::r#type::Struct::fields].
17727        ///
17728        /// # Example
17729        /// ```ignore,no_run
17730        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17731        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17732        /// let x = Struct::new()
17733        ///     .set_fields([
17734        ///         Field::default()/* use setters */,
17735        ///         Field::default()/* use (different) setters */,
17736        ///     ]);
17737        /// ```
17738        pub fn set_fields<T, V>(mut self, v: T) -> Self
17739        where
17740            T: std::iter::IntoIterator<Item = V>,
17741            V: std::convert::Into<crate::model::r#type::r#struct::Field>,
17742        {
17743            use std::iter::Iterator;
17744            self.fields = v.into_iter().map(|i| i.into()).collect();
17745            self
17746        }
17747
17748        /// Sets the value of [encoding][crate::model::r#type::Struct::encoding].
17749        ///
17750        /// # Example
17751        /// ```ignore,no_run
17752        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17753        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17754        /// let x = Struct::new().set_encoding(Encoding::default()/* use setters */);
17755        /// ```
17756        pub fn set_encoding<T>(mut self, v: T) -> Self
17757        where
17758            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17759        {
17760            self.encoding = std::option::Option::Some(v.into());
17761            self
17762        }
17763
17764        /// Sets or clears the value of [encoding][crate::model::r#type::Struct::encoding].
17765        ///
17766        /// # Example
17767        /// ```ignore,no_run
17768        /// # use google_cloud_bigtable_admin_v2::model::r#type::Struct;
17769        /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17770        /// let x = Struct::new().set_or_clear_encoding(Some(Encoding::default()/* use setters */));
17771        /// let x = Struct::new().set_or_clear_encoding(None::<Encoding>);
17772        /// ```
17773        pub fn set_or_clear_encoding<T>(mut self, v: std::option::Option<T>) -> Self
17774        where
17775            T: std::convert::Into<crate::model::r#type::r#struct::Encoding>,
17776        {
17777            self.encoding = v.map(|x| x.into());
17778            self
17779        }
17780    }
17781
17782    impl wkt::message::Message for Struct {
17783        fn typename() -> &'static str {
17784            "type.googleapis.com/google.bigtable.admin.v2.Type.Struct"
17785        }
17786    }
17787
17788    /// Defines additional types related to [Struct].
17789    pub mod r#struct {
17790        #[allow(unused_imports)]
17791        use super::*;
17792
17793        /// A struct field and its type.
17794        #[derive(Clone, Default, PartialEq)]
17795        #[non_exhaustive]
17796        pub struct Field {
17797            /// The field name (optional). Fields without a `field_name` are considered
17798            /// anonymous and cannot be referenced by name.
17799            pub field_name: std::string::String,
17800
17801            /// The type of values in this field.
17802            pub r#type: std::option::Option<std::boxed::Box<crate::model::Type>>,
17803
17804            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17805        }
17806
17807        impl Field {
17808            /// Creates a new default instance.
17809            pub fn new() -> Self {
17810                std::default::Default::default()
17811            }
17812
17813            /// Sets the value of [field_name][crate::model::r#type::r#struct::Field::field_name].
17814            ///
17815            /// # Example
17816            /// ```ignore,no_run
17817            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17818            /// let x = Field::new().set_field_name("example");
17819            /// ```
17820            pub fn set_field_name<T: std::convert::Into<std::string::String>>(
17821                mut self,
17822                v: T,
17823            ) -> Self {
17824                self.field_name = v.into();
17825                self
17826            }
17827
17828            /// Sets the value of [r#type][crate::model::r#type::r#struct::Field::type].
17829            ///
17830            /// # Example
17831            /// ```ignore,no_run
17832            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17833            /// use google_cloud_bigtable_admin_v2::model::Type;
17834            /// let x = Field::new().set_type(Type::default()/* use setters */);
17835            /// ```
17836            pub fn set_type<T>(mut self, v: T) -> Self
17837            where
17838                T: std::convert::Into<crate::model::Type>,
17839            {
17840                self.r#type = std::option::Option::Some(std::boxed::Box::new(v.into()));
17841                self
17842            }
17843
17844            /// Sets or clears the value of [r#type][crate::model::r#type::r#struct::Field::type].
17845            ///
17846            /// # Example
17847            /// ```ignore,no_run
17848            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Field;
17849            /// use google_cloud_bigtable_admin_v2::model::Type;
17850            /// let x = Field::new().set_or_clear_type(Some(Type::default()/* use setters */));
17851            /// let x = Field::new().set_or_clear_type(None::<Type>);
17852            /// ```
17853            pub fn set_or_clear_type<T>(mut self, v: std::option::Option<T>) -> Self
17854            where
17855                T: std::convert::Into<crate::model::Type>,
17856            {
17857                self.r#type = v.map(|x| std::boxed::Box::new(x.into()));
17858                self
17859            }
17860        }
17861
17862        impl wkt::message::Message for Field {
17863            fn typename() -> &'static str {
17864                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Field"
17865            }
17866        }
17867
17868        /// Rules used to convert to or from lower level types.
17869        #[derive(Clone, Default, PartialEq)]
17870        #[non_exhaustive]
17871        pub struct Encoding {
17872            /// Which encoding to use.
17873            pub encoding: std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17874
17875            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17876        }
17877
17878        impl Encoding {
17879            /// Creates a new default instance.
17880            pub fn new() -> Self {
17881                std::default::Default::default()
17882            }
17883
17884            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding].
17885            ///
17886            /// Note that all the setters affecting `encoding` are mutually
17887            /// exclusive.
17888            ///
17889            /// # Example
17890            /// ```ignore,no_run
17891            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17892            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17893            /// let x = Encoding::new().set_encoding(Some(
17894            ///     google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Encoding::Singleton(Singleton::default().into())));
17895            /// ```
17896            pub fn set_encoding<
17897                T: std::convert::Into<
17898                        std::option::Option<crate::model::r#type::r#struct::encoding::Encoding>,
17899                    >,
17900            >(
17901                mut self,
17902                v: T,
17903            ) -> Self {
17904                self.encoding = v.into();
17905                self
17906            }
17907
17908            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17909            /// if it holds a `Singleton`, `None` if the field is not set or
17910            /// holds a different branch.
17911            pub fn singleton(
17912                &self,
17913            ) -> std::option::Option<
17914                &std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17915            > {
17916                #[allow(unreachable_patterns)]
17917                self.encoding.as_ref().and_then(|v| match v {
17918                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v) => {
17919                        std::option::Option::Some(v)
17920                    }
17921                    _ => std::option::Option::None,
17922                })
17923            }
17924
17925            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17926            /// to hold a `Singleton`.
17927            ///
17928            /// Note that all the setters affecting `encoding` are
17929            /// mutually exclusive.
17930            ///
17931            /// # Example
17932            /// ```ignore,no_run
17933            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17934            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::Singleton;
17935            /// let x = Encoding::new().set_singleton(Singleton::default()/* use setters */);
17936            /// assert!(x.singleton().is_some());
17937            /// assert!(x.delimited_bytes().is_none());
17938            /// assert!(x.ordered_code_bytes().is_none());
17939            /// ```
17940            pub fn set_singleton<
17941                T: std::convert::Into<
17942                        std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>,
17943                    >,
17944            >(
17945                mut self,
17946                v: T,
17947            ) -> Self {
17948                self.encoding = std::option::Option::Some(
17949                    crate::model::r#type::r#struct::encoding::Encoding::Singleton(v.into()),
17950                );
17951                self
17952            }
17953
17954            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17955            /// if it holds a `DelimitedBytes`, `None` if the field is not set or
17956            /// holds a different branch.
17957            pub fn delimited_bytes(
17958                &self,
17959            ) -> std::option::Option<
17960                &std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17961            > {
17962                #[allow(unreachable_patterns)]
17963                self.encoding.as_ref().and_then(|v| match v {
17964                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v) => {
17965                        std::option::Option::Some(v)
17966                    }
17967                    _ => std::option::Option::None,
17968                })
17969            }
17970
17971            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
17972            /// to hold a `DelimitedBytes`.
17973            ///
17974            /// Note that all the setters affecting `encoding` are
17975            /// mutually exclusive.
17976            ///
17977            /// # Example
17978            /// ```ignore,no_run
17979            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
17980            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
17981            /// let x = Encoding::new().set_delimited_bytes(DelimitedBytes::default()/* use setters */);
17982            /// assert!(x.delimited_bytes().is_some());
17983            /// assert!(x.singleton().is_none());
17984            /// assert!(x.ordered_code_bytes().is_none());
17985            /// ```
17986            pub fn set_delimited_bytes<
17987                T: std::convert::Into<
17988                        std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
17989                    >,
17990            >(
17991                mut self,
17992                v: T,
17993            ) -> Self {
17994                self.encoding = std::option::Option::Some(
17995                    crate::model::r#type::r#struct::encoding::Encoding::DelimitedBytes(v.into()),
17996                );
17997                self
17998            }
17999
18000            /// The value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
18001            /// if it holds a `OrderedCodeBytes`, `None` if the field is not set or
18002            /// holds a different branch.
18003            pub fn ordered_code_bytes(
18004                &self,
18005            ) -> std::option::Option<
18006                &std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
18007            > {
18008                #[allow(unreachable_patterns)]
18009                self.encoding.as_ref().and_then(|v| match v {
18010                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v) => {
18011                        std::option::Option::Some(v)
18012                    }
18013                    _ => std::option::Option::None,
18014                })
18015            }
18016
18017            /// Sets the value of [encoding][crate::model::r#type::r#struct::Encoding::encoding]
18018            /// to hold a `OrderedCodeBytes`.
18019            ///
18020            /// Note that all the setters affecting `encoding` are
18021            /// mutually exclusive.
18022            ///
18023            /// # Example
18024            /// ```ignore,no_run
18025            /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::Encoding;
18026            /// use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::OrderedCodeBytes;
18027            /// let x = Encoding::new().set_ordered_code_bytes(OrderedCodeBytes::default()/* use setters */);
18028            /// assert!(x.ordered_code_bytes().is_some());
18029            /// assert!(x.singleton().is_none());
18030            /// assert!(x.delimited_bytes().is_none());
18031            /// ```
18032            pub fn set_ordered_code_bytes<
18033                T: std::convert::Into<
18034                        std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
18035                    >,
18036            >(
18037                mut self,
18038                v: T,
18039            ) -> Self {
18040                self.encoding = std::option::Option::Some(
18041                    crate::model::r#type::r#struct::encoding::Encoding::OrderedCodeBytes(v.into()),
18042                );
18043                self
18044            }
18045        }
18046
18047        impl wkt::message::Message for Encoding {
18048            fn typename() -> &'static str {
18049                "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding"
18050            }
18051        }
18052
18053        /// Defines additional types related to [Encoding].
18054        pub mod encoding {
18055            #[allow(unused_imports)]
18056            use super::*;
18057
18058            /// Uses the encoding of `fields[0].type` as-is.
18059            /// Only valid if `fields.size == 1`.
18060            #[derive(Clone, Default, PartialEq)]
18061            #[non_exhaustive]
18062            pub struct Singleton {
18063                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18064            }
18065
18066            impl Singleton {
18067                /// Creates a new default instance.
18068                pub fn new() -> Self {
18069                    std::default::Default::default()
18070                }
18071            }
18072
18073            impl wkt::message::Message for Singleton {
18074                fn typename() -> &'static str {
18075                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.Singleton"
18076                }
18077            }
18078
18079            /// Fields are encoded independently and concatenated with a configurable
18080            /// `delimiter` in between.
18081            ///
18082            /// A struct with no fields defined is encoded as a single `delimiter`.
18083            ///
18084            /// Sorted mode:
18085            ///
18086            /// - Fields are encoded in sorted mode.
18087            /// - Encoded field values must not contain any bytes <= `delimiter[0]`
18088            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
18089            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
18090            ///
18091            /// Distinct mode:
18092            ///
18093            /// - Fields are encoded in distinct mode.
18094            /// - Encoded field values must not contain `delimiter[0]`.
18095            #[derive(Clone, Default, PartialEq)]
18096            #[non_exhaustive]
18097            pub struct DelimitedBytes {
18098                /// Byte sequence used to delimit concatenated fields. The delimiter must
18099                /// contain at least 1 character and at most 50 characters.
18100                pub delimiter: ::bytes::Bytes,
18101
18102                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18103            }
18104
18105            impl DelimitedBytes {
18106                /// Creates a new default instance.
18107                pub fn new() -> Self {
18108                    std::default::Default::default()
18109                }
18110
18111                /// Sets the value of [delimiter][crate::model::r#type::r#struct::encoding::DelimitedBytes::delimiter].
18112                ///
18113                /// # Example
18114                /// ```ignore,no_run
18115                /// # use google_cloud_bigtable_admin_v2::model::r#type::r#struct::encoding::DelimitedBytes;
18116                /// let x = DelimitedBytes::new().set_delimiter(bytes::Bytes::from_static(b"example"));
18117                /// ```
18118                pub fn set_delimiter<T: std::convert::Into<::bytes::Bytes>>(
18119                    mut self,
18120                    v: T,
18121                ) -> Self {
18122                    self.delimiter = v.into();
18123                    self
18124                }
18125            }
18126
18127            impl wkt::message::Message for DelimitedBytes {
18128                fn typename() -> &'static str {
18129                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.DelimitedBytes"
18130                }
18131            }
18132
18133            /// Fields are encoded independently and concatenated with the fixed byte
18134            /// pair {0x00, 0x01} in between.
18135            ///
18136            /// Any null (0x00) byte in an encoded field is replaced by the fixed byte
18137            /// pair {0x00, 0xFF}.
18138            ///
18139            /// Fields that encode to the empty string "" have special handling:
18140            ///
18141            /// - If *every* field encodes to "", or if the STRUCT has no fields
18142            ///   defined, then the STRUCT is encoded as the fixed byte pair
18143            ///   {0x00, 0x00}.
18144            /// - Otherwise, the STRUCT only encodes until the last non-empty field,
18145            ///   omitting any trailing empty fields. Any empty fields that aren't
18146            ///   omitted are replaced with the fixed byte pair {0x00, 0x00}.
18147            ///
18148            /// Examples:
18149            ///
18150            /// - STRUCT()             -> "\00\00"
18151            /// - STRUCT("")           -> "\00\00"
18152            /// - STRUCT("", "")       -> "\00\00"
18153            /// - STRUCT("", "B")      -> "\00\00" + "\00\01" + "B"
18154            /// - STRUCT("A", "")      -> "A"
18155            /// - STRUCT("", "B", "")  -> "\00\00" + "\00\01" + "B"
18156            /// - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
18157            ///
18158            /// Since null bytes are always escaped, this encoding can cause size
18159            /// blowup for encodings like `Int64.BigEndianBytes` that are likely to
18160            /// produce many such bytes.
18161            ///
18162            /// Sorted mode:
18163            ///
18164            /// - Fields are encoded in sorted mode.
18165            /// - All values supported by the field encodings are allowed
18166            /// - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if
18167            ///   `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first.
18168            ///
18169            /// Distinct mode:
18170            ///
18171            /// - Fields are encoded in distinct mode.
18172            /// - All values supported by the field encodings are allowed.
18173            #[derive(Clone, Default, PartialEq)]
18174            #[non_exhaustive]
18175            pub struct OrderedCodeBytes {
18176                pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18177            }
18178
18179            impl OrderedCodeBytes {
18180                /// Creates a new default instance.
18181                pub fn new() -> Self {
18182                    std::default::Default::default()
18183                }
18184            }
18185
18186            impl wkt::message::Message for OrderedCodeBytes {
18187                fn typename() -> &'static str {
18188                    "type.googleapis.com/google.bigtable.admin.v2.Type.Struct.Encoding.OrderedCodeBytes"
18189                }
18190            }
18191
18192            /// Which encoding to use.
18193            #[derive(Clone, Debug, PartialEq)]
18194            #[non_exhaustive]
18195            pub enum Encoding {
18196                /// Use `Singleton` encoding.
18197                Singleton(std::boxed::Box<crate::model::r#type::r#struct::encoding::Singleton>),
18198                /// Use `DelimitedBytes` encoding.
18199                DelimitedBytes(
18200                    std::boxed::Box<crate::model::r#type::r#struct::encoding::DelimitedBytes>,
18201                ),
18202                /// User `OrderedCodeBytes` encoding.
18203                OrderedCodeBytes(
18204                    std::boxed::Box<crate::model::r#type::r#struct::encoding::OrderedCodeBytes>,
18205                ),
18206            }
18207        }
18208    }
18209
18210    /// A protobuf message type.
18211    /// Values of type `Proto` are stored in `Value.bytes_value`.
18212    #[derive(Clone, Default, PartialEq)]
18213    #[non_exhaustive]
18214    pub struct Proto {
18215        /// The ID of the schema bundle that this proto is defined in.
18216        pub schema_bundle_id: std::string::String,
18217
18218        /// The fully qualified name of the protobuf message, including package. In
18219        /// the format of "foo.bar.Message".
18220        pub message_name: std::string::String,
18221
18222        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18223    }
18224
18225    impl Proto {
18226        /// Creates a new default instance.
18227        pub fn new() -> Self {
18228            std::default::Default::default()
18229        }
18230
18231        /// Sets the value of [schema_bundle_id][crate::model::r#type::Proto::schema_bundle_id].
18232        ///
18233        /// # Example
18234        /// ```ignore,no_run
18235        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
18236        /// let x = Proto::new().set_schema_bundle_id("example");
18237        /// ```
18238        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
18239            mut self,
18240            v: T,
18241        ) -> Self {
18242            self.schema_bundle_id = v.into();
18243            self
18244        }
18245
18246        /// Sets the value of [message_name][crate::model::r#type::Proto::message_name].
18247        ///
18248        /// # Example
18249        /// ```ignore,no_run
18250        /// # use google_cloud_bigtable_admin_v2::model::r#type::Proto;
18251        /// let x = Proto::new().set_message_name("example");
18252        /// ```
18253        pub fn set_message_name<T: std::convert::Into<std::string::String>>(
18254            mut self,
18255            v: T,
18256        ) -> Self {
18257            self.message_name = v.into();
18258            self
18259        }
18260    }
18261
18262    impl wkt::message::Message for Proto {
18263        fn typename() -> &'static str {
18264            "type.googleapis.com/google.bigtable.admin.v2.Type.Proto"
18265        }
18266    }
18267
18268    /// A protobuf enum type.
18269    /// Values of type `Enum` are stored in `Value.int_value`.
18270    #[derive(Clone, Default, PartialEq)]
18271    #[non_exhaustive]
18272    pub struct Enum {
18273        /// The ID of the schema bundle that this enum is defined in.
18274        pub schema_bundle_id: std::string::String,
18275
18276        /// The fully qualified name of the protobuf enum message, including package.
18277        /// In the format of "foo.bar.EnumMessage".
18278        pub enum_name: std::string::String,
18279
18280        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18281    }
18282
18283    impl Enum {
18284        /// Creates a new default instance.
18285        pub fn new() -> Self {
18286            std::default::Default::default()
18287        }
18288
18289        /// Sets the value of [schema_bundle_id][crate::model::r#type::Enum::schema_bundle_id].
18290        ///
18291        /// # Example
18292        /// ```ignore,no_run
18293        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
18294        /// let x = Enum::new().set_schema_bundle_id("example");
18295        /// ```
18296        pub fn set_schema_bundle_id<T: std::convert::Into<std::string::String>>(
18297            mut self,
18298            v: T,
18299        ) -> Self {
18300            self.schema_bundle_id = v.into();
18301            self
18302        }
18303
18304        /// Sets the value of [enum_name][crate::model::r#type::Enum::enum_name].
18305        ///
18306        /// # Example
18307        /// ```ignore,no_run
18308        /// # use google_cloud_bigtable_admin_v2::model::r#type::Enum;
18309        /// let x = Enum::new().set_enum_name("example");
18310        /// ```
18311        pub fn set_enum_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18312            self.enum_name = v.into();
18313            self
18314        }
18315    }
18316
18317    impl wkt::message::Message for Enum {
18318        fn typename() -> &'static str {
18319            "type.googleapis.com/google.bigtable.admin.v2.Type.Enum"
18320        }
18321    }
18322
18323    /// An ordered list of elements of a given type.
18324    /// Values of type `Array` are stored in `Value.array_value`.
18325    #[derive(Clone, Default, PartialEq)]
18326    #[non_exhaustive]
18327    pub struct Array {
18328        /// The type of the elements in the array. This must not be `Array`.
18329        pub element_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18330
18331        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18332    }
18333
18334    impl Array {
18335        /// Creates a new default instance.
18336        pub fn new() -> Self {
18337            std::default::Default::default()
18338        }
18339
18340        /// Sets the value of [element_type][crate::model::r#type::Array::element_type].
18341        ///
18342        /// # Example
18343        /// ```ignore,no_run
18344        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
18345        /// use google_cloud_bigtable_admin_v2::model::Type;
18346        /// let x = Array::new().set_element_type(Type::default()/* use setters */);
18347        /// ```
18348        pub fn set_element_type<T>(mut self, v: T) -> Self
18349        where
18350            T: std::convert::Into<crate::model::Type>,
18351        {
18352            self.element_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18353            self
18354        }
18355
18356        /// Sets or clears the value of [element_type][crate::model::r#type::Array::element_type].
18357        ///
18358        /// # Example
18359        /// ```ignore,no_run
18360        /// # use google_cloud_bigtable_admin_v2::model::r#type::Array;
18361        /// use google_cloud_bigtable_admin_v2::model::Type;
18362        /// let x = Array::new().set_or_clear_element_type(Some(Type::default()/* use setters */));
18363        /// let x = Array::new().set_or_clear_element_type(None::<Type>);
18364        /// ```
18365        pub fn set_or_clear_element_type<T>(mut self, v: std::option::Option<T>) -> Self
18366        where
18367            T: std::convert::Into<crate::model::Type>,
18368        {
18369            self.element_type = v.map(|x| std::boxed::Box::new(x.into()));
18370            self
18371        }
18372    }
18373
18374    impl wkt::message::Message for Array {
18375        fn typename() -> &'static str {
18376            "type.googleapis.com/google.bigtable.admin.v2.Type.Array"
18377        }
18378    }
18379
18380    /// A mapping of keys to values of a given type.
18381    /// Values of type `Map` are stored in a `Value.array_value` where each entry
18382    /// is another `Value.array_value` with two elements (the key and the value,
18383    /// in that order).
18384    /// Normally encoded Map values won't have repeated keys, however, clients are
18385    /// expected to handle the case in which they do. If the same key appears
18386    /// multiple times, the _last_ value takes precedence.
18387    #[derive(Clone, Default, PartialEq)]
18388    #[non_exhaustive]
18389    pub struct Map {
18390        /// The type of a map key.
18391        /// Only `Bytes`, `String`, and `Int64` are allowed as key types.
18392        pub key_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18393
18394        /// The type of the values in a map.
18395        pub value_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18396
18397        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18398    }
18399
18400    impl Map {
18401        /// Creates a new default instance.
18402        pub fn new() -> Self {
18403            std::default::Default::default()
18404        }
18405
18406        /// Sets the value of [key_type][crate::model::r#type::Map::key_type].
18407        ///
18408        /// # Example
18409        /// ```ignore,no_run
18410        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18411        /// use google_cloud_bigtable_admin_v2::model::Type;
18412        /// let x = Map::new().set_key_type(Type::default()/* use setters */);
18413        /// ```
18414        pub fn set_key_type<T>(mut self, v: T) -> Self
18415        where
18416            T: std::convert::Into<crate::model::Type>,
18417        {
18418            self.key_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18419            self
18420        }
18421
18422        /// Sets or clears the value of [key_type][crate::model::r#type::Map::key_type].
18423        ///
18424        /// # Example
18425        /// ```ignore,no_run
18426        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18427        /// use google_cloud_bigtable_admin_v2::model::Type;
18428        /// let x = Map::new().set_or_clear_key_type(Some(Type::default()/* use setters */));
18429        /// let x = Map::new().set_or_clear_key_type(None::<Type>);
18430        /// ```
18431        pub fn set_or_clear_key_type<T>(mut self, v: std::option::Option<T>) -> Self
18432        where
18433            T: std::convert::Into<crate::model::Type>,
18434        {
18435            self.key_type = v.map(|x| std::boxed::Box::new(x.into()));
18436            self
18437        }
18438
18439        /// Sets the value of [value_type][crate::model::r#type::Map::value_type].
18440        ///
18441        /// # Example
18442        /// ```ignore,no_run
18443        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18444        /// use google_cloud_bigtable_admin_v2::model::Type;
18445        /// let x = Map::new().set_value_type(Type::default()/* use setters */);
18446        /// ```
18447        pub fn set_value_type<T>(mut self, v: T) -> Self
18448        where
18449            T: std::convert::Into<crate::model::Type>,
18450        {
18451            self.value_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18452            self
18453        }
18454
18455        /// Sets or clears the value of [value_type][crate::model::r#type::Map::value_type].
18456        ///
18457        /// # Example
18458        /// ```ignore,no_run
18459        /// # use google_cloud_bigtable_admin_v2::model::r#type::Map;
18460        /// use google_cloud_bigtable_admin_v2::model::Type;
18461        /// let x = Map::new().set_or_clear_value_type(Some(Type::default()/* use setters */));
18462        /// let x = Map::new().set_or_clear_value_type(None::<Type>);
18463        /// ```
18464        pub fn set_or_clear_value_type<T>(mut self, v: std::option::Option<T>) -> Self
18465        where
18466            T: std::convert::Into<crate::model::Type>,
18467        {
18468            self.value_type = v.map(|x| std::boxed::Box::new(x.into()));
18469            self
18470        }
18471    }
18472
18473    impl wkt::message::Message for Map {
18474        fn typename() -> &'static str {
18475            "type.googleapis.com/google.bigtable.admin.v2.Type.Map"
18476        }
18477    }
18478
18479    /// A value that combines incremental updates into a summarized value.
18480    ///
18481    /// Data is never directly written or read using type `Aggregate`. Writes will
18482    /// provide either the `input_type` or `state_type`, and reads will always
18483    /// return the `state_type` .
18484    #[derive(Clone, Default, PartialEq)]
18485    #[non_exhaustive]
18486    pub struct Aggregate {
18487        /// Type of the inputs that are accumulated by this `Aggregate`, which must
18488        /// specify a full encoding.
18489        /// Use `AddInput` mutations to accumulate new inputs.
18490        pub input_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18491
18492        /// Output only. Type that holds the internal accumulator state for the
18493        /// `Aggregate`. This is a function of the `input_type` and `aggregator`
18494        /// chosen, and will always specify a full encoding.
18495        pub state_type: std::option::Option<std::boxed::Box<crate::model::Type>>,
18496
18497        /// Which aggregator function to use. The configured types must match.
18498        pub aggregator: std::option::Option<crate::model::r#type::aggregate::Aggregator>,
18499
18500        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18501    }
18502
18503    impl Aggregate {
18504        /// Creates a new default instance.
18505        pub fn new() -> Self {
18506            std::default::Default::default()
18507        }
18508
18509        /// Sets the value of [input_type][crate::model::r#type::Aggregate::input_type].
18510        ///
18511        /// # Example
18512        /// ```ignore,no_run
18513        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18514        /// use google_cloud_bigtable_admin_v2::model::Type;
18515        /// let x = Aggregate::new().set_input_type(Type::default()/* use setters */);
18516        /// ```
18517        pub fn set_input_type<T>(mut self, v: T) -> Self
18518        where
18519            T: std::convert::Into<crate::model::Type>,
18520        {
18521            self.input_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18522            self
18523        }
18524
18525        /// Sets or clears the value of [input_type][crate::model::r#type::Aggregate::input_type].
18526        ///
18527        /// # Example
18528        /// ```ignore,no_run
18529        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18530        /// use google_cloud_bigtable_admin_v2::model::Type;
18531        /// let x = Aggregate::new().set_or_clear_input_type(Some(Type::default()/* use setters */));
18532        /// let x = Aggregate::new().set_or_clear_input_type(None::<Type>);
18533        /// ```
18534        pub fn set_or_clear_input_type<T>(mut self, v: std::option::Option<T>) -> Self
18535        where
18536            T: std::convert::Into<crate::model::Type>,
18537        {
18538            self.input_type = v.map(|x| std::boxed::Box::new(x.into()));
18539            self
18540        }
18541
18542        /// Sets the value of [state_type][crate::model::r#type::Aggregate::state_type].
18543        ///
18544        /// # Example
18545        /// ```ignore,no_run
18546        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18547        /// use google_cloud_bigtable_admin_v2::model::Type;
18548        /// let x = Aggregate::new().set_state_type(Type::default()/* use setters */);
18549        /// ```
18550        pub fn set_state_type<T>(mut self, v: T) -> Self
18551        where
18552            T: std::convert::Into<crate::model::Type>,
18553        {
18554            self.state_type = std::option::Option::Some(std::boxed::Box::new(v.into()));
18555            self
18556        }
18557
18558        /// Sets or clears the value of [state_type][crate::model::r#type::Aggregate::state_type].
18559        ///
18560        /// # Example
18561        /// ```ignore,no_run
18562        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18563        /// use google_cloud_bigtable_admin_v2::model::Type;
18564        /// let x = Aggregate::new().set_or_clear_state_type(Some(Type::default()/* use setters */));
18565        /// let x = Aggregate::new().set_or_clear_state_type(None::<Type>);
18566        /// ```
18567        pub fn set_or_clear_state_type<T>(mut self, v: std::option::Option<T>) -> Self
18568        where
18569            T: std::convert::Into<crate::model::Type>,
18570        {
18571            self.state_type = v.map(|x| std::boxed::Box::new(x.into()));
18572            self
18573        }
18574
18575        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator].
18576        ///
18577        /// Note that all the setters affecting `aggregator` are mutually
18578        /// exclusive.
18579        ///
18580        /// # Example
18581        /// ```ignore,no_run
18582        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18583        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
18584        /// let x = Aggregate::new().set_aggregator(Some(
18585        ///     google_cloud_bigtable_admin_v2::model::r#type::aggregate::Aggregator::Sum(Sum::default().into())));
18586        /// ```
18587        pub fn set_aggregator<
18588            T: std::convert::Into<std::option::Option<crate::model::r#type::aggregate::Aggregator>>,
18589        >(
18590            mut self,
18591            v: T,
18592        ) -> Self {
18593            self.aggregator = v.into();
18594            self
18595        }
18596
18597        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18598        /// if it holds a `Sum`, `None` if the field is not set or
18599        /// holds a different branch.
18600        pub fn sum(
18601            &self,
18602        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Sum>> {
18603            #[allow(unreachable_patterns)]
18604            self.aggregator.as_ref().and_then(|v| match v {
18605                crate::model::r#type::aggregate::Aggregator::Sum(v) => std::option::Option::Some(v),
18606                _ => std::option::Option::None,
18607            })
18608        }
18609
18610        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18611        /// to hold a `Sum`.
18612        ///
18613        /// Note that all the setters affecting `aggregator` are
18614        /// mutually exclusive.
18615        ///
18616        /// # Example
18617        /// ```ignore,no_run
18618        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18619        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Sum;
18620        /// let x = Aggregate::new().set_sum(Sum::default()/* use setters */);
18621        /// assert!(x.sum().is_some());
18622        /// assert!(x.hllpp_unique_count().is_none());
18623        /// assert!(x.max().is_none());
18624        /// assert!(x.min().is_none());
18625        /// ```
18626        pub fn set_sum<
18627            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Sum>>,
18628        >(
18629            mut self,
18630            v: T,
18631        ) -> Self {
18632            self.aggregator = std::option::Option::Some(
18633                crate::model::r#type::aggregate::Aggregator::Sum(v.into()),
18634            );
18635            self
18636        }
18637
18638        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18639        /// if it holds a `HllppUniqueCount`, `None` if the field is not set or
18640        /// holds a different branch.
18641        pub fn hllpp_unique_count(
18642            &self,
18643        ) -> std::option::Option<
18644            &std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18645        > {
18646            #[allow(unreachable_patterns)]
18647            self.aggregator.as_ref().and_then(|v| match v {
18648                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v) => {
18649                    std::option::Option::Some(v)
18650                }
18651                _ => std::option::Option::None,
18652            })
18653        }
18654
18655        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18656        /// to hold a `HllppUniqueCount`.
18657        ///
18658        /// Note that all the setters affecting `aggregator` are
18659        /// mutually exclusive.
18660        ///
18661        /// # Example
18662        /// ```ignore,no_run
18663        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18664        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount;
18665        /// let x = Aggregate::new().set_hllpp_unique_count(HyperLogLogPlusPlusUniqueCount::default()/* use setters */);
18666        /// assert!(x.hllpp_unique_count().is_some());
18667        /// assert!(x.sum().is_none());
18668        /// assert!(x.max().is_none());
18669        /// assert!(x.min().is_none());
18670        /// ```
18671        pub fn set_hllpp_unique_count<
18672            T: std::convert::Into<
18673                    std::boxed::Box<
18674                        crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount,
18675                    >,
18676                >,
18677        >(
18678            mut self,
18679            v: T,
18680        ) -> Self {
18681            self.aggregator = std::option::Option::Some(
18682                crate::model::r#type::aggregate::Aggregator::HllppUniqueCount(v.into()),
18683            );
18684            self
18685        }
18686
18687        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18688        /// if it holds a `Max`, `None` if the field is not set or
18689        /// holds a different branch.
18690        pub fn max(
18691            &self,
18692        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Max>> {
18693            #[allow(unreachable_patterns)]
18694            self.aggregator.as_ref().and_then(|v| match v {
18695                crate::model::r#type::aggregate::Aggregator::Max(v) => std::option::Option::Some(v),
18696                _ => std::option::Option::None,
18697            })
18698        }
18699
18700        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18701        /// to hold a `Max`.
18702        ///
18703        /// Note that all the setters affecting `aggregator` are
18704        /// mutually exclusive.
18705        ///
18706        /// # Example
18707        /// ```ignore,no_run
18708        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18709        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Max;
18710        /// let x = Aggregate::new().set_max(Max::default()/* use setters */);
18711        /// assert!(x.max().is_some());
18712        /// assert!(x.sum().is_none());
18713        /// assert!(x.hllpp_unique_count().is_none());
18714        /// assert!(x.min().is_none());
18715        /// ```
18716        pub fn set_max<
18717            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Max>>,
18718        >(
18719            mut self,
18720            v: T,
18721        ) -> Self {
18722            self.aggregator = std::option::Option::Some(
18723                crate::model::r#type::aggregate::Aggregator::Max(v.into()),
18724            );
18725            self
18726        }
18727
18728        /// The value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18729        /// if it holds a `Min`, `None` if the field is not set or
18730        /// holds a different branch.
18731        pub fn min(
18732            &self,
18733        ) -> std::option::Option<&std::boxed::Box<crate::model::r#type::aggregate::Min>> {
18734            #[allow(unreachable_patterns)]
18735            self.aggregator.as_ref().and_then(|v| match v {
18736                crate::model::r#type::aggregate::Aggregator::Min(v) => std::option::Option::Some(v),
18737                _ => std::option::Option::None,
18738            })
18739        }
18740
18741        /// Sets the value of [aggregator][crate::model::r#type::Aggregate::aggregator]
18742        /// to hold a `Min`.
18743        ///
18744        /// Note that all the setters affecting `aggregator` are
18745        /// mutually exclusive.
18746        ///
18747        /// # Example
18748        /// ```ignore,no_run
18749        /// # use google_cloud_bigtable_admin_v2::model::r#type::Aggregate;
18750        /// use google_cloud_bigtable_admin_v2::model::r#type::aggregate::Min;
18751        /// let x = Aggregate::new().set_min(Min::default()/* use setters */);
18752        /// assert!(x.min().is_some());
18753        /// assert!(x.sum().is_none());
18754        /// assert!(x.hllpp_unique_count().is_none());
18755        /// assert!(x.max().is_none());
18756        /// ```
18757        pub fn set_min<
18758            T: std::convert::Into<std::boxed::Box<crate::model::r#type::aggregate::Min>>,
18759        >(
18760            mut self,
18761            v: T,
18762        ) -> Self {
18763            self.aggregator = std::option::Option::Some(
18764                crate::model::r#type::aggregate::Aggregator::Min(v.into()),
18765            );
18766            self
18767        }
18768    }
18769
18770    impl wkt::message::Message for Aggregate {
18771        fn typename() -> &'static str {
18772            "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate"
18773        }
18774    }
18775
18776    /// Defines additional types related to [Aggregate].
18777    pub mod aggregate {
18778        #[allow(unused_imports)]
18779        use super::*;
18780
18781        /// Computes the sum of the input values.
18782        /// Allowed input: `Int64`
18783        /// State: same as input
18784        #[derive(Clone, Default, PartialEq)]
18785        #[non_exhaustive]
18786        pub struct Sum {
18787            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18788        }
18789
18790        impl Sum {
18791            /// Creates a new default instance.
18792            pub fn new() -> Self {
18793                std::default::Default::default()
18794            }
18795        }
18796
18797        impl wkt::message::Message for Sum {
18798            fn typename() -> &'static str {
18799                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Sum"
18800            }
18801        }
18802
18803        /// Computes the max of the input values.
18804        /// Allowed input: `Int64`
18805        /// State: same as input
18806        #[derive(Clone, Default, PartialEq)]
18807        #[non_exhaustive]
18808        pub struct Max {
18809            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18810        }
18811
18812        impl Max {
18813            /// Creates a new default instance.
18814            pub fn new() -> Self {
18815                std::default::Default::default()
18816            }
18817        }
18818
18819        impl wkt::message::Message for Max {
18820            fn typename() -> &'static str {
18821                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Max"
18822            }
18823        }
18824
18825        /// Computes the min of the input values.
18826        /// Allowed input: `Int64`
18827        /// State: same as input
18828        #[derive(Clone, Default, PartialEq)]
18829        #[non_exhaustive]
18830        pub struct Min {
18831            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18832        }
18833
18834        impl Min {
18835            /// Creates a new default instance.
18836            pub fn new() -> Self {
18837                std::default::Default::default()
18838            }
18839        }
18840
18841        impl wkt::message::Message for Min {
18842            fn typename() -> &'static str {
18843                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.Min"
18844            }
18845        }
18846
18847        /// Computes an approximate unique count over the input values. When using
18848        /// raw data as input, be careful to use a consistent encoding. Otherwise
18849        /// the same value encoded differently could count more than once, or two
18850        /// distinct values could count as identical.
18851        /// Input: Any, or omit for Raw
18852        /// State: TBD
18853        /// Special state conversions: `Int64` (the unique count estimate)
18854        #[derive(Clone, Default, PartialEq)]
18855        #[non_exhaustive]
18856        pub struct HyperLogLogPlusPlusUniqueCount {
18857            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18858        }
18859
18860        impl HyperLogLogPlusPlusUniqueCount {
18861            /// Creates a new default instance.
18862            pub fn new() -> Self {
18863                std::default::Default::default()
18864            }
18865        }
18866
18867        impl wkt::message::Message for HyperLogLogPlusPlusUniqueCount {
18868            fn typename() -> &'static str {
18869                "type.googleapis.com/google.bigtable.admin.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount"
18870            }
18871        }
18872
18873        /// Which aggregator function to use. The configured types must match.
18874        #[derive(Clone, Debug, PartialEq)]
18875        #[non_exhaustive]
18876        pub enum Aggregator {
18877            /// Sum aggregator.
18878            Sum(std::boxed::Box<crate::model::r#type::aggregate::Sum>),
18879            /// HyperLogLogPlusPlusUniqueCount aggregator.
18880            HllppUniqueCount(
18881                std::boxed::Box<crate::model::r#type::aggregate::HyperLogLogPlusPlusUniqueCount>,
18882            ),
18883            /// Max aggregator.
18884            Max(std::boxed::Box<crate::model::r#type::aggregate::Max>),
18885            /// Min aggregator.
18886            Min(std::boxed::Box<crate::model::r#type::aggregate::Min>),
18887        }
18888    }
18889
18890    /// The kind of type that this represents.
18891    #[derive(Clone, Debug, PartialEq)]
18892    #[non_exhaustive]
18893    pub enum Kind {
18894        /// Bytes
18895        BytesType(std::boxed::Box<crate::model::r#type::Bytes>),
18896        /// String
18897        StringType(std::boxed::Box<crate::model::r#type::String>),
18898        /// Int64
18899        Int64Type(std::boxed::Box<crate::model::r#type::Int64>),
18900        /// Float32
18901        Float32Type(std::boxed::Box<crate::model::r#type::Float32>),
18902        /// Float64
18903        Float64Type(std::boxed::Box<crate::model::r#type::Float64>),
18904        /// Bool
18905        BoolType(std::boxed::Box<crate::model::r#type::Bool>),
18906        /// Timestamp
18907        TimestampType(std::boxed::Box<crate::model::r#type::Timestamp>),
18908        /// Date
18909        DateType(std::boxed::Box<crate::model::r#type::Date>),
18910        /// Aggregate
18911        AggregateType(std::boxed::Box<crate::model::r#type::Aggregate>),
18912        /// Struct
18913        StructType(std::boxed::Box<crate::model::r#type::Struct>),
18914        /// Array
18915        ArrayType(std::boxed::Box<crate::model::r#type::Array>),
18916        /// Map
18917        MapType(std::boxed::Box<crate::model::r#type::Map>),
18918        /// Proto
18919        ProtoType(std::boxed::Box<crate::model::r#type::Proto>),
18920        /// Enum
18921        EnumType(std::boxed::Box<crate::model::r#type::Enum>),
18922    }
18923}
18924
18925/// Storage media types for persisting Bigtable data.
18926///
18927/// # Working with unknown values
18928///
18929/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18930/// additional enum variants at any time. Adding new variants is not considered
18931/// a breaking change. Applications should write their code in anticipation of:
18932///
18933/// - New values appearing in future releases of the client library, **and**
18934/// - New values received dynamically, without application changes.
18935///
18936/// Please consult the [Working with enums] section in the user guide for some
18937/// guidelines.
18938///
18939/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18940#[derive(Clone, Debug, PartialEq)]
18941#[non_exhaustive]
18942pub enum StorageType {
18943    /// The user did not specify a storage type.
18944    Unspecified,
18945    /// Flash (SSD) storage should be used.
18946    Ssd,
18947    /// Magnetic drive (HDD) storage should be used.
18948    Hdd,
18949    /// If set, the enum was initialized with an unknown value.
18950    ///
18951    /// Applications can examine the value using [StorageType::value] or
18952    /// [StorageType::name].
18953    UnknownValue(storage_type::UnknownValue),
18954}
18955
18956#[doc(hidden)]
18957pub mod storage_type {
18958    #[allow(unused_imports)]
18959    use super::*;
18960    #[derive(Clone, Debug, PartialEq)]
18961    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18962}
18963
18964impl StorageType {
18965    /// Gets the enum value.
18966    ///
18967    /// Returns `None` if the enum contains an unknown value deserialized from
18968    /// the string representation of enums.
18969    pub fn value(&self) -> std::option::Option<i32> {
18970        match self {
18971            Self::Unspecified => std::option::Option::Some(0),
18972            Self::Ssd => std::option::Option::Some(1),
18973            Self::Hdd => std::option::Option::Some(2),
18974            Self::UnknownValue(u) => u.0.value(),
18975        }
18976    }
18977
18978    /// Gets the enum value as a string.
18979    ///
18980    /// Returns `None` if the enum contains an unknown value deserialized from
18981    /// the integer representation of enums.
18982    pub fn name(&self) -> std::option::Option<&str> {
18983        match self {
18984            Self::Unspecified => std::option::Option::Some("STORAGE_TYPE_UNSPECIFIED"),
18985            Self::Ssd => std::option::Option::Some("SSD"),
18986            Self::Hdd => std::option::Option::Some("HDD"),
18987            Self::UnknownValue(u) => u.0.name(),
18988        }
18989    }
18990}
18991
18992impl std::default::Default for StorageType {
18993    fn default() -> Self {
18994        use std::convert::From;
18995        Self::from(0)
18996    }
18997}
18998
18999impl std::fmt::Display for StorageType {
19000    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19001        wkt::internal::display_enum(f, self.name(), self.value())
19002    }
19003}
19004
19005impl std::convert::From<i32> for StorageType {
19006    fn from(value: i32) -> Self {
19007        match value {
19008            0 => Self::Unspecified,
19009            1 => Self::Ssd,
19010            2 => Self::Hdd,
19011            _ => Self::UnknownValue(storage_type::UnknownValue(
19012                wkt::internal::UnknownEnumValue::Integer(value),
19013            )),
19014        }
19015    }
19016}
19017
19018impl std::convert::From<&str> for StorageType {
19019    fn from(value: &str) -> Self {
19020        use std::string::ToString;
19021        match value {
19022            "STORAGE_TYPE_UNSPECIFIED" => Self::Unspecified,
19023            "SSD" => Self::Ssd,
19024            "HDD" => Self::Hdd,
19025            _ => Self::UnknownValue(storage_type::UnknownValue(
19026                wkt::internal::UnknownEnumValue::String(value.to_string()),
19027            )),
19028        }
19029    }
19030}
19031
19032impl serde::ser::Serialize for StorageType {
19033    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19034    where
19035        S: serde::Serializer,
19036    {
19037        match self {
19038            Self::Unspecified => serializer.serialize_i32(0),
19039            Self::Ssd => serializer.serialize_i32(1),
19040            Self::Hdd => serializer.serialize_i32(2),
19041            Self::UnknownValue(u) => u.0.serialize(serializer),
19042        }
19043    }
19044}
19045
19046impl<'de> serde::de::Deserialize<'de> for StorageType {
19047    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19048    where
19049        D: serde::Deserializer<'de>,
19050    {
19051        deserializer.deserialize_any(wkt::internal::EnumVisitor::<StorageType>::new(
19052            ".google.bigtable.admin.v2.StorageType",
19053        ))
19054    }
19055}
19056
19057/// Indicates the type of the restore source.
19058///
19059/// # Working with unknown values
19060///
19061/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
19062/// additional enum variants at any time. Adding new variants is not considered
19063/// a breaking change. Applications should write their code in anticipation of:
19064///
19065/// - New values appearing in future releases of the client library, **and**
19066/// - New values received dynamically, without application changes.
19067///
19068/// Please consult the [Working with enums] section in the user guide for some
19069/// guidelines.
19070///
19071/// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
19072#[derive(Clone, Debug, PartialEq)]
19073#[non_exhaustive]
19074pub enum RestoreSourceType {
19075    /// No restore associated.
19076    Unspecified,
19077    /// A backup was used as the source of the restore.
19078    Backup,
19079    /// If set, the enum was initialized with an unknown value.
19080    ///
19081    /// Applications can examine the value using [RestoreSourceType::value] or
19082    /// [RestoreSourceType::name].
19083    UnknownValue(restore_source_type::UnknownValue),
19084}
19085
19086#[doc(hidden)]
19087pub mod restore_source_type {
19088    #[allow(unused_imports)]
19089    use super::*;
19090    #[derive(Clone, Debug, PartialEq)]
19091    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
19092}
19093
19094impl RestoreSourceType {
19095    /// Gets the enum value.
19096    ///
19097    /// Returns `None` if the enum contains an unknown value deserialized from
19098    /// the string representation of enums.
19099    pub fn value(&self) -> std::option::Option<i32> {
19100        match self {
19101            Self::Unspecified => std::option::Option::Some(0),
19102            Self::Backup => std::option::Option::Some(1),
19103            Self::UnknownValue(u) => u.0.value(),
19104        }
19105    }
19106
19107    /// Gets the enum value as a string.
19108    ///
19109    /// Returns `None` if the enum contains an unknown value deserialized from
19110    /// the integer representation of enums.
19111    pub fn name(&self) -> std::option::Option<&str> {
19112        match self {
19113            Self::Unspecified => std::option::Option::Some("RESTORE_SOURCE_TYPE_UNSPECIFIED"),
19114            Self::Backup => std::option::Option::Some("BACKUP"),
19115            Self::UnknownValue(u) => u.0.name(),
19116        }
19117    }
19118}
19119
19120impl std::default::Default for RestoreSourceType {
19121    fn default() -> Self {
19122        use std::convert::From;
19123        Self::from(0)
19124    }
19125}
19126
19127impl std::fmt::Display for RestoreSourceType {
19128    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
19129        wkt::internal::display_enum(f, self.name(), self.value())
19130    }
19131}
19132
19133impl std::convert::From<i32> for RestoreSourceType {
19134    fn from(value: i32) -> Self {
19135        match value {
19136            0 => Self::Unspecified,
19137            1 => Self::Backup,
19138            _ => Self::UnknownValue(restore_source_type::UnknownValue(
19139                wkt::internal::UnknownEnumValue::Integer(value),
19140            )),
19141        }
19142    }
19143}
19144
19145impl std::convert::From<&str> for RestoreSourceType {
19146    fn from(value: &str) -> Self {
19147        use std::string::ToString;
19148        match value {
19149            "RESTORE_SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
19150            "BACKUP" => Self::Backup,
19151            _ => Self::UnknownValue(restore_source_type::UnknownValue(
19152                wkt::internal::UnknownEnumValue::String(value.to_string()),
19153            )),
19154        }
19155    }
19156}
19157
19158impl serde::ser::Serialize for RestoreSourceType {
19159    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
19160    where
19161        S: serde::Serializer,
19162    {
19163        match self {
19164            Self::Unspecified => serializer.serialize_i32(0),
19165            Self::Backup => serializer.serialize_i32(1),
19166            Self::UnknownValue(u) => u.0.serialize(serializer),
19167        }
19168    }
19169}
19170
19171impl<'de> serde::de::Deserialize<'de> for RestoreSourceType {
19172    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
19173    where
19174        D: serde::Deserializer<'de>,
19175    {
19176        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RestoreSourceType>::new(
19177            ".google.bigtable.admin.v2.RestoreSourceType",
19178        ))
19179    }
19180}